[gimp] app: Pass dock roles as construction parameters



commit 45a8d1f4878b17acbd2ac7e306d7a53e2156d619
Author: Martin Nordholts <martinn src gnome org>
Date:   Thu Sep 10 22:25:00 2009 +0200

    app: Pass dock roles as construction parameters
    
    In order to keep window specific settings as local as possible, also
    move the role setting to dock construction instead of having it in
    init.

 app/widgets/gimpdock.c     |    2 --
 app/widgets/gimpmenudock.c |    1 +
 app/widgets/gimptoolbox.c  |    3 +--
 3 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/app/widgets/gimpdock.c b/app/widgets/gimpdock.c
index b9c8599..e70957d 100644
--- a/app/widgets/gimpdock.c
+++ b/app/widgets/gimpdock.c
@@ -192,8 +192,6 @@ gimp_dock_init (GimpDock *dock)
   gtk_widget_set_name (GTK_WIDGET (dock), name);
   g_free (name);
 
-  gtk_window_set_role (GTK_WINDOW (dock), "gimp-dock");
-
   dock->p->main_vbox = gtk_vbox_new (FALSE, 0);
   gtk_container_add (GTK_CONTAINER (dock), dock->p->main_vbox);
   gtk_widget_show (dock->p->main_vbox);
diff --git a/app/widgets/gimpmenudock.c b/app/widgets/gimpmenudock.c
index 650b015..5192f92 100644
--- a/app/widgets/gimpmenudock.c
+++ b/app/widgets/gimpmenudock.c
@@ -385,6 +385,7 @@ gimp_menu_dock_new (GimpDialogFactory *dialog_factory,
                               "Dock Context", NULL);
 
   menu_dock = g_object_new (GIMP_TYPE_MENU_DOCK,
+                            "role",           "gimp-dock",
                             "gimp-context",   context,
                             "context",        context,
                             "dialog-factory", dialog_factory,
diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c
index 7ee33ea..de39836 100644
--- a/app/widgets/gimptoolbox.c
+++ b/app/widgets/gimptoolbox.c
@@ -173,8 +173,6 @@ gimp_toolbox_class_init (GimpToolboxClass *klass)
 static void
 gimp_toolbox_init (GimpToolbox *toolbox)
 {
-  gtk_window_set_role (GTK_WINDOW (toolbox), "gimp-toolbox");
-
   gimp_help_connect (GTK_WIDGET (toolbox), gimp_standard_help_func,
                      GIMP_HELP_TOOLBOX, NULL);
 }
@@ -623,6 +621,7 @@ gimp_toolbox_new (GimpDialogFactory *dialog_factory,
 
   toolbox = g_object_new (GIMP_TYPE_TOOLBOX,
                           "title",          _("Toolbox"),
+                          "role",           "gimp-toolbox",
                           "gimp-context",   context,
                           "context",        context,
                           "dialog-factory", dialog_factory,



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