[Xfce4-commits] <midori:master> Avoid the rarely used sokoke_container_show_children

Christian Dywan noreply at xfce.org
Fri Oct 28 22:52:02 CEST 2011


Updating branch refs/heads/master
         to 2976f6ebb2d8071321e30c70fe4c4676877e2e44 (commit)
       from 6bceb5a10af1acad58821522bc701cb936f7b6ea (commit)

commit 2976f6ebb2d8071321e30c70fe4c4676877e2e44
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Oct 28 22:24:04 2011 +0200

    Avoid the rarely used sokoke_container_show_children

 midori/midori-browser.c   |    3 ++-
 midori/sokoke.c           |    7 -------
 midori/sokoke.h           |    3 ---
 toolbars/midori-findbar.c |    3 ++-
 4 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 8a0514e..b15594b 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -3909,7 +3909,8 @@ _action_location_secondary_icon_released (GtkAction*     action,
                         G_CALLBACK (midori_browser_news_feed_clicked_cb), browser);
                     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
                 }
-                sokoke_container_show_children (GTK_CONTAINER (menu));
+                gtk_container_foreach (GTK_CONTAINER (menu),
+                                       (GtkCallback)(gtk_widget_show_all), NULL);
                 katze_widget_popup (widget, GTK_MENU (menu), NULL,
                                     KATZE_MENU_POSITION_RIGHT);
             }
diff --git a/midori/sokoke.c b/midori/sokoke.c
index 6b12fb8..1a7b898 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -732,13 +732,6 @@ void sokoke_widget_set_visible (GtkWidget* widget, gboolean visible)
         gtk_widget_hide (widget);
 }
 
-void
-sokoke_container_show_children (GtkContainer* container)
-{
-    /* Show every child but not the container itself */
-    gtk_container_foreach (container, (GtkCallback)(gtk_widget_show_all), NULL);
-}
-
 typedef enum
 {
     SOKOKE_DESKTOP_UNTESTED,
diff --git a/midori/sokoke.h b/midori/sokoke.h
index 9e4d394..f21935b 100644
--- a/midori/sokoke.h
+++ b/midori/sokoke.h
@@ -64,9 +64,6 @@ void
 sokoke_widget_set_visible               (GtkWidget*      widget,
                                          gboolean        visible);
 
-void
-sokoke_container_show_children          (GtkContainer*   container);
-
 GtkWidget*
 sokoke_xfce_header_new                  (const gchar*    icon,
                                          const gchar*    title);
diff --git a/toolbars/midori-findbar.c b/toolbars/midori-findbar.c
index faa7fa7..a639035 100644
--- a/toolbars/midori-findbar.c
+++ b/toolbars/midori-findbar.c
@@ -322,7 +322,8 @@ midori_findbar_init (MidoriFindbar* findbar)
     g_signal_connect (findbar->find_close, "clicked",
         G_CALLBACK (midori_findbar_button_close_clicked_cb), findbar);
     gtk_toolbar_insert (GTK_TOOLBAR (findbar), findbar->find_close, -1);
-    sokoke_container_show_children (GTK_CONTAINER (findbar));
+    gtk_container_foreach (GTK_CONTAINER (findbar),
+                           (GtkCallback)(gtk_widget_show_all), NULL);
 }
 
 void


More information about the Xfce4-commits mailing list