[gimp] app: Remove windows_commands_get_toolbox(), use dialog variant



commit 84dd0d5241e30f7bfa046b866e5b01a5d2aebb5d
Author: Martin Nordholts <martinn src gnome org>
Date:   Tue Jan 19 23:05:45 2010 +0100

    app: Remove windows_commands_get_toolbox(), use dialog variant
    
    Remove windows_commands_get_toolbox() and use dialogs_get_toolbox()
    instead.

 app/actions/windows-commands.c |   25 +------------------------
 1 files changed, 1 insertions(+), 24 deletions(-)
---
diff --git a/app/actions/windows-commands.c b/app/actions/windows-commands.c
index fe21942..73f5e4c 100644
--- a/app/actions/windows-commands.c
+++ b/app/actions/windows-commands.c
@@ -41,29 +41,6 @@
 #include "windows-commands.h"
 
 
-static GtkWidget * windows_commands_get_toolbox (GimpDialogFactory *toolbox_factory);
-
-
-static GtkWidget *
-windows_commands_get_toolbox (GimpDialogFactory *toolbox_factory)
-{
-  GList *list = NULL;
-
-  for (list = gimp_dialog_factory_get_open_dialogs (toolbox_factory);
-       list;
-       list = list->next)
-    {
-      /* The only toplevel widget in the toolbox factory is the
-       * toolbox
-       */
-      if (GTK_IS_WIDGET (list->data) && gtk_widget_is_toplevel (list->data))
-        return list->data;
-    }
-
-  return NULL;
-}
-
-
 void
 windows_show_toolbox_cmd_callback (GtkAction *action,
                                    gpointer   data)
@@ -134,7 +111,7 @@ windows_show_toolbox (void)
     }
   else
     {
-      toolbox = windows_commands_get_toolbox (global_toolbox_factory);
+      toolbox = dialogs_get_toolbox ();
 
       if (toolbox)
         gtk_window_present (GTK_WINDOW (toolbox));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]