Remove obsolete MidoriLocationAction and panel boilerplate
This commit is contained in:
parent
c12d8f1f25
commit
d9c4bb15c0
7 changed files with 5 additions and 123 deletions
|
@ -730,13 +730,11 @@ midori_browser_show_preferences_cb (MidoriBrowser* browser,
|
|||
}
|
||||
g_object_unref (array);
|
||||
|
||||
scrolled = katze_scrolled_new (NULL, NULL);
|
||||
addon = g_object_new (MIDORI_TYPE_EXTENSIONS, NULL);
|
||||
scrolled = g_object_new (KATZE_TYPE_SCROLLED, "visible", TRUE, NULL);
|
||||
addon = g_object_new (MIDORI_TYPE_EXTENSIONS, "app", app, NULL);
|
||||
children = gtk_container_get_children (GTK_CONTAINER (addon));
|
||||
gtk_widget_reparent (g_list_nth_data (children, 0), scrolled);
|
||||
g_list_free (children);
|
||||
g_object_set (addon, "app", app, NULL);
|
||||
gtk_widget_show (scrolled);
|
||||
page = katze_preferences_add_category (preferences,
|
||||
_("Extensions"), STOCK_EXTENSIONS);
|
||||
gtk_box_pack_start (GTK_BOX (page), scrolled, TRUE, TRUE, 4);
|
||||
|
@ -793,19 +791,13 @@ midori_app_add_browser_cb (MidoriApp* app,
|
|||
|
||||
panel = katze_object_get_object (browser, "panel");
|
||||
|
||||
/* Bookmarks */
|
||||
addon = g_object_new (MIDORI_TYPE_BOOKMARKS, "app", app, NULL);
|
||||
gtk_widget_show (addon);
|
||||
addon = g_object_new (MIDORI_TYPE_BOOKMARKS, "app", app, "visible", TRUE, NULL);
|
||||
midori_panel_append_page (MIDORI_PANEL (panel), MIDORI_VIEWABLE (addon));
|
||||
|
||||
/* History */
|
||||
addon = g_object_new (MIDORI_TYPE_HISTORY, "app", app, NULL);
|
||||
gtk_widget_show (addon);
|
||||
addon = g_object_new (MIDORI_TYPE_HISTORY, "app", app, "visible", TRUE, NULL);
|
||||
midori_panel_append_page (MIDORI_PANEL (panel), MIDORI_VIEWABLE (addon));
|
||||
|
||||
/* Transfers */
|
||||
addon = g_object_new (MIDORI_TYPE_TRANSFERS, "app", app, NULL);
|
||||
gtk_widget_show (addon);
|
||||
addon = g_object_new (MIDORI_TYPE_TRANSFERS, "app", app, "visible", TRUE, NULL);
|
||||
midori_panel_append_page (MIDORI_PANEL (panel), MIDORI_VIEWABLE (addon));
|
||||
|
||||
/* Extensions */
|
||||
|
|
|
@ -5700,14 +5700,6 @@ midori_browser_new_history_item (MidoriBrowser* browser,
|
|||
katze_array_remove_item (browser->history, item);
|
||||
}
|
||||
|
||||
static void
|
||||
midori_browser_history_clear_cb (KatzeArray* history,
|
||||
MidoriBrowser* browser)
|
||||
{
|
||||
GtkAction* location_action = _action_by_name (browser, "Location");
|
||||
midori_location_action_clear (MIDORI_LOCATION_ACTION (location_action));
|
||||
}
|
||||
|
||||
static void
|
||||
midori_browser_set_history (MidoriBrowser* browser,
|
||||
KatzeArray* history)
|
||||
|
@ -5715,21 +5707,13 @@ midori_browser_set_history (MidoriBrowser* browser,
|
|||
if (browser->history == history)
|
||||
return;
|
||||
|
||||
if (browser->history)
|
||||
g_signal_handlers_disconnect_by_func (browser->history,
|
||||
midori_browser_history_clear_cb,
|
||||
browser);
|
||||
if (history)
|
||||
g_object_ref (history);
|
||||
katze_object_assign (browser->history, history);
|
||||
midori_browser_history_clear_cb (history, browser);
|
||||
|
||||
if (!history)
|
||||
return;
|
||||
|
||||
g_signal_connect (browser->history, "clear",
|
||||
G_CALLBACK (midori_browser_history_clear_cb), browser);
|
||||
|
||||
g_object_set (_action_by_name (browser, "Location"), "history",
|
||||
browser->history, NULL);
|
||||
}
|
||||
|
|
|
@ -1530,14 +1530,6 @@ midori_location_action_set_icon_for_uri (MidoriLocationAction* location_action,
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
midori_location_action_set_title_for_uri (MidoriLocationAction* location_action,
|
||||
const gchar* title,
|
||||
const gchar* uri)
|
||||
{
|
||||
/* Nothing to do */
|
||||
}
|
||||
|
||||
/**
|
||||
* midori_location_action_set_search_engines:
|
||||
* @location_action: a #MidoriLocationAction
|
||||
|
@ -1616,27 +1608,6 @@ midori_location_action_set_secondary_icon (MidoriLocationAction* location_action
|
|||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* midori_location_action_delete_item_from_uri:
|
||||
* @location_action: a #MidoriLocationAction
|
||||
* @uri: a string
|
||||
*
|
||||
* Finds the item from the list matching @uri
|
||||
* and removes it if it is the last instance.
|
||||
**/
|
||||
void
|
||||
midori_location_action_delete_item_from_uri (MidoriLocationAction* location_action,
|
||||
const gchar* uri)
|
||||
{
|
||||
/* Nothing to do */
|
||||
}
|
||||
|
||||
void
|
||||
midori_location_action_clear (MidoriLocationAction* location_action)
|
||||
{
|
||||
g_return_if_fail (MIDORI_IS_LOCATION_ACTION (location_action));
|
||||
}
|
||||
|
||||
/**
|
||||
* midori_location_action_set_security_hint:
|
||||
* @location_action: a #MidoriLocationAction
|
||||
|
|
|
@ -1028,19 +1028,3 @@ midori_bookmarks_finalize (GObject* object)
|
|||
g_object_unref (bookmarks->app);
|
||||
}
|
||||
|
||||
/**
|
||||
* midori_bookmarks_new:
|
||||
*
|
||||
* Creates a new empty bookmarks.
|
||||
*
|
||||
* Return value: a new #MidoriBookmarks
|
||||
*
|
||||
* Since: 0.1.3
|
||||
**/
|
||||
GtkWidget*
|
||||
midori_bookmarks_new (void)
|
||||
{
|
||||
MidoriBookmarks* bookmarks = g_object_new (MIDORI_TYPE_BOOKMARKS, NULL);
|
||||
|
||||
return GTK_WIDGET (bookmarks);
|
||||
}
|
||||
|
|
|
@ -504,20 +504,3 @@ midori_extensions_finalize (GObject* object)
|
|||
g_object_unref (array);
|
||||
}
|
||||
|
||||
/**
|
||||
* midori_extensions_new:
|
||||
*
|
||||
* Creates a new empty extensions.
|
||||
*
|
||||
* Return value: a new #MidoriExtensions
|
||||
*
|
||||
* Since: 0.1.2
|
||||
**/
|
||||
GtkWidget*
|
||||
midori_extensions_new (void)
|
||||
{
|
||||
MidoriExtensions* extensions = g_object_new (MIDORI_TYPE_EXTENSIONS,
|
||||
NULL);
|
||||
|
||||
return GTK_WIDGET (extensions);
|
||||
}
|
||||
|
|
|
@ -1021,19 +1021,3 @@ midori_history_finalize (GObject* object)
|
|||
katze_assign (history->filter, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* midori_history_new:
|
||||
*
|
||||
* Creates a new empty history.
|
||||
*
|
||||
* Return value: a new #MidoriHistory
|
||||
*
|
||||
* Since: 0.1.3
|
||||
**/
|
||||
GtkWidget*
|
||||
midori_history_new (void)
|
||||
{
|
||||
MidoriHistory* history = g_object_new (MIDORI_TYPE_HISTORY, NULL);
|
||||
|
||||
return GTK_WIDGET (history);
|
||||
}
|
||||
|
|
|
@ -561,19 +561,3 @@ midori_transfers_init (MidoriTransfers* transfers)
|
|||
G_CALLBACK (midori_transfers_hierarchy_changed_cb), NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* midori_transfers_new:
|
||||
*
|
||||
* Creates a new empty transfers.
|
||||
*
|
||||
* Return value: a new #MidoriTransfers
|
||||
*
|
||||
* Since 0.1.5
|
||||
**/
|
||||
GtkWidget*
|
||||
midori_transfers_new (void)
|
||||
{
|
||||
MidoriTransfers* transfers = g_object_new (MIDORI_TYPE_TRANSFERS, NULL);
|
||||
|
||||
return GTK_WIDGET (transfers);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue