Use new _with_item constructor everywhere
This commit is contained in:
parent
d81c80edb2
commit
cd05d0a351
3 changed files with 9 additions and 11 deletions
|
@ -2204,7 +2204,7 @@ main (int argc,
|
||||||
GtkWidget* offscreen = gtk_offscreen_window_new ();
|
GtkWidget* offscreen = gtk_offscreen_window_new ();
|
||||||
#endif
|
#endif
|
||||||
gchar* msg = NULL;
|
gchar* msg = NULL;
|
||||||
GtkWidget* view = midori_view_new_with_title (NULL, settings, FALSE);
|
GtkWidget* view = midori_view_new_with_item (NULL, settings);
|
||||||
g_object_set (settings, "open-new-pages-in", MIDORI_NEW_PAGE_WINDOW, NULL);
|
g_object_set (settings, "open-new-pages-in", MIDORI_NEW_PAGE_WINDOW, NULL);
|
||||||
midori_browser_add_tab (browser, view);
|
midori_browser_add_tab (browser, view);
|
||||||
#if 0 /* HAVE_OFFSCREEN */
|
#if 0 /* HAVE_OFFSCREEN */
|
||||||
|
|
|
@ -3423,7 +3423,7 @@ _action_source_view_activate (GtkAction* action,
|
||||||
source_uri = g_filename_to_uri (filename, NULL, NULL);
|
source_uri = g_filename_to_uri (filename, NULL, NULL);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
|
||||||
source = midori_view_new_with_title (NULL, browser->settings, FALSE);
|
source = midori_view_new_with_item (NULL, browser->settings);
|
||||||
source_view = midori_view_get_web_view (MIDORI_VIEW (source));
|
source_view = midori_view_get_web_view (MIDORI_VIEW (source));
|
||||||
webkit_web_view_set_view_source_mode (WEBKIT_WEB_VIEW (source_view), TRUE);
|
webkit_web_view_set_view_source_mode (WEBKIT_WEB_VIEW (source_view), TRUE);
|
||||||
webkit_web_view_load_uri (WEBKIT_WEB_VIEW (source_view), source_uri);
|
webkit_web_view_load_uri (WEBKIT_WEB_VIEW (source_view), source_uri);
|
||||||
|
@ -4684,8 +4684,8 @@ _action_tab_duplicate_activate (GtkAction* action,
|
||||||
{
|
{
|
||||||
GtkWidget* view = midori_browser_get_current_tab (browser);
|
GtkWidget* view = midori_browser_get_current_tab (browser);
|
||||||
MidoriNewView where = MIDORI_NEW_VIEW_TAB;
|
MidoriNewView where = MIDORI_NEW_VIEW_TAB;
|
||||||
GtkWidget* new_view = midori_view_new_with_title (
|
GtkWidget* new_view = midori_view_new_with_item (
|
||||||
NULL, browser->settings, FALSE);
|
midori_view_get_proxy_item (MIDORI_VIEW (view)), browser->settings);
|
||||||
const gchar* uri = midori_view_get_display_uri (MIDORI_VIEW (view));
|
const gchar* uri = midori_view_get_display_uri (MIDORI_VIEW (view));
|
||||||
g_signal_emit_by_name (view, "new-view", new_view, where, TRUE);
|
g_signal_emit_by_name (view, "new-view", new_view, where, TRUE);
|
||||||
midori_view_set_uri (MIDORI_VIEW (new_view), uri);
|
midori_view_set_uri (MIDORI_VIEW (new_view), uri);
|
||||||
|
|
|
@ -2701,8 +2701,7 @@ webkit_web_view_create_web_view_cb (GtkWidget* web_view,
|
||||||
new_view = view;
|
new_view = view;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new_view = (MidoriView*)midori_view_new_with_title (NULL,
|
new_view = (MidoriView*)midori_view_new_with_item (NULL, view->settings);
|
||||||
view->settings, FALSE);
|
|
||||||
g_signal_connect (new_view->web_view, "web-view-ready",
|
g_signal_connect (new_view->web_view, "web-view-ready",
|
||||||
G_CALLBACK (webkit_web_view_web_view_ready_cb), view);
|
G_CALLBACK (webkit_web_view_web_view_ready_cb), view);
|
||||||
}
|
}
|
||||||
|
@ -3206,7 +3205,7 @@ midori_view_focus_in_event (GtkWidget* widget,
|
||||||
*
|
*
|
||||||
* Return value: a new #MidoriView
|
* Return value: a new #MidoriView
|
||||||
*
|
*
|
||||||
* Deprecated: 0.2.8: Use midori_view_new_with_title() instead.
|
* Deprecated: 0.2.8: Use midori_view_new_with_item() instead.
|
||||||
**/
|
**/
|
||||||
GtkWidget*
|
GtkWidget*
|
||||||
midori_view_new (KatzeNet* net)
|
midori_view_new (KatzeNet* net)
|
||||||
|
@ -3261,6 +3260,7 @@ _midori_view_set_settings (MidoriView* view,
|
||||||
* Return value: a new #MidoriView
|
* Return value: a new #MidoriView
|
||||||
*
|
*
|
||||||
* Since: 0.3.0
|
* Since: 0.3.0
|
||||||
|
* Deprecated: 0.4.3
|
||||||
**/
|
**/
|
||||||
GtkWidget*
|
GtkWidget*
|
||||||
midori_view_new_with_title (const gchar* title,
|
midori_view_new_with_title (const gchar* title,
|
||||||
|
@ -4293,11 +4293,9 @@ midori_view_tab_label_menu_duplicate_tab_cb (GtkWidget* menuitem,
|
||||||
MidoriView* view)
|
MidoriView* view)
|
||||||
{
|
{
|
||||||
MidoriNewView where = MIDORI_NEW_VIEW_TAB;
|
MidoriNewView where = MIDORI_NEW_VIEW_TAB;
|
||||||
GtkWidget* new_view = midori_view_new_with_title (
|
GtkWidget* new_view = midori_view_new_with_item (view->item, view->settings);
|
||||||
NULL, view->settings, FALSE);
|
|
||||||
const gchar* uri = midori_view_get_display_uri (MIDORI_VIEW (view));
|
|
||||||
g_signal_emit (view, signals[NEW_VIEW], 0, new_view, where, TRUE);
|
g_signal_emit (view, signals[NEW_VIEW], 0, new_view, where, TRUE);
|
||||||
midori_view_set_uri (MIDORI_VIEW (new_view), uri);
|
midori_view_set_uri (MIDORI_VIEW (new_view), view->uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue