]> spindle.queued.net Git - midori/commitdiff
Remove obsolete MidoriLocationAction and panel boilerplate
authorChristian Dywan <christian@twotoasts.de>
Wed, 9 Nov 2011 20:54:17 +0000 (21:54 +0100)
committerChristian Dywan <christian@twotoasts.de>
Wed, 9 Nov 2011 21:06:11 +0000 (22:06 +0100)
midori/main.c
midori/midori-browser.c
midori/midori-locationaction.c
panels/midori-bookmarks.c
panels/midori-extensions.c
panels/midori-history.c
panels/midori-transfers.c

index e51838b17714934ff3a278cf7485174fe6ac843b..129a81f1f624ed73c539d0d0a6f86c1a6873281f 100644 (file)
@@ -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 */
index 336b9a82a9a04e0d64783c1f4c96722486a46e3c..d70753953d43854e158bd50fc12d1105fc9f4137 100644 (file)
@@ -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);
 }
index b4039d880dff99ddda9e9ab1622aced95a2a8f08..36fe369d4406fdcca6a1c50202182f0db93a32f4 100644 (file)
@@ -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
index 8bf7e48b871169c026691d7682db36700139b6d9..15d27b2a05973ca8256cd0473ec6702e3797c0fe 100644 (file)
@@ -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);
-}
index ad2de72f6b07ee6f332e73b59d7d69640582dcd7..0aec2be07492ebc3c891f6718b60cb6a6ed25eb4 100644 (file)
@@ -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);
-}
index 0678df8210049a667df9ac8e89a7ae11e11588b1..712dc70cb490cefdc60292ecb03fdf30a2fdbd1e 100644 (file)
@@ -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);
-}
index 83d070bab47f28baa8a25b42b989fdd58cea80ab..d24577e0b44cec348b70dfefcb5c783707225e29 100644 (file)
@@ -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);
-}