[gimp] app: Set the dock-window-hint centrally in GimpDockWindow
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] app: Set the dock-window-hint centrally in GimpDockWindow
- Date: Thu, 10 Sep 2009 20:01:38 +0000 (UTC)
commit 26fbeebf02f4eb377eea4b5f4fd1fbf3203068fd
Author: Martin Nordholts <martinn src gnome org>
Date: Thu Sep 10 22:03:04 2009 +0200
app: Set the dock-window-hint centrally in GimpDockWindow
Set the dock-window-hint centrally in GimpDockWindow instead of both
in GimpToolbox and GimpMenuDock.
app/widgets/gimpdock.c | 30 ------------------------------
app/widgets/gimpdockwindow.c | 26 ++++++++++++++++++++++++++
app/widgets/gimptoolbox.c | 2 --
3 files changed, 26 insertions(+), 32 deletions(-)
---
diff --git a/app/widgets/gimpdock.c b/app/widgets/gimpdock.c
index a74c6da..de47f29 100644
--- a/app/widgets/gimpdock.c
+++ b/app/widgets/gimpdock.c
@@ -26,8 +26,6 @@
#include "widgets-types.h"
-#include "config/gimpguiconfig.h"
-
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpmarshal.h"
@@ -37,7 +35,6 @@
#include "gimpdockable.h"
#include "gimpdockbook.h"
#include "gimpdockseparator.h"
-#include "gimpwidgets-utils.h"
#include "gimpsessioninfo.h" /* FIXME */
#include "core/gimpcontainer.h" /* FIXME */
@@ -78,9 +75,6 @@ struct _GimpDockPrivate
};
-static GObject * gimp_dock_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params);
static void gimp_dock_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -137,7 +131,6 @@ gimp_dock_class_init (GimpDockClass *klass)
G_TYPE_NONE, 1,
GIMP_TYPE_DOCKBOOK);
- object_class->constructor = gimp_dock_constructor;
object_class->set_property = gimp_dock_set_property;
object_class->get_property = gimp_dock_get_property;
@@ -216,29 +209,6 @@ gimp_dock_init (GimpDock *dock)
gtk_widget_show (separator);
}
-static GObject *
-gimp_dock_constructor (GType type,
- guint n_params,
- GObjectConstructParam *params)
-{
- GObject *object;
- GimpDock *dock;
- GimpGuiConfig *config;
-
- object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
-
- dock = GIMP_DOCK (object);
-
- g_assert (GIMP_IS_CONTEXT (dock->p->context));
- g_assert (GIMP_IS_DIALOG_FACTORY (dock->p->dialog_factory));
-
- config = GIMP_GUI_CONFIG (dock->p->context->gimp->config);
-
- gimp_window_set_hint (GTK_WINDOW (dock), config->dock_window_hint);
-
- return object;
-}
-
static void
gimp_dock_set_property (GObject *object,
guint property_id,
diff --git a/app/widgets/gimpdockwindow.c b/app/widgets/gimpdockwindow.c
index 29145be..5578d97 100644
--- a/app/widgets/gimpdockwindow.c
+++ b/app/widgets/gimpdockwindow.c
@@ -27,9 +27,13 @@
#include "widgets-types.h"
+#include "config/gimpguiconfig.h"
+
+#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "gimpdockwindow.h"
+#include "gimpwidgets-utils.h"
#include "gimpwindow.h"
#include "gimp-intl.h"
@@ -47,6 +51,9 @@ struct _GimpDockWindowPrivate
GimpContext *context;
};
+static GObject * gimp_dock_window_constructor (GType type,
+ guint n_params,
+ GObjectConstructParam *params);
static void gimp_dock_window_dispose (GObject *object);
static void gimp_dock_window_set_property (GObject *object,
guint property_id,
@@ -67,6 +74,7 @@ gimp_dock_window_class_init (GimpDockWindowClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->constructor = gimp_dock_window_constructor;
object_class->dispose = gimp_dock_window_dispose;
object_class->set_property = gimp_dock_window_set_property;
object_class->get_property = gimp_dock_window_get_property;
@@ -89,6 +97,24 @@ gimp_dock_window_init (GimpDockWindow *dock_window)
dock_window->p->context = NULL;
}
+static GObject *
+gimp_dock_window_constructor (GType type,
+ guint n_params,
+ GObjectConstructParam *params)
+{
+ GObject *object;
+ GimpDockWindow *dock_window;
+ GimpGuiConfig *config;
+
+ object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
+ dock_window = GIMP_DOCK_WINDOW (object);
+ config = GIMP_GUI_CONFIG (dock_window->p->context->gimp->config);
+
+ gimp_window_set_hint (GTK_WINDOW (dock_window), config->dock_window_hint);
+
+ return object;
+}
+
static void
gimp_dock_window_dispose (GObject *object)
{
diff --git a/app/widgets/gimptoolbox.c b/app/widgets/gimptoolbox.c
index 7fa4173..7ee33ea 100644
--- a/app/widgets/gimptoolbox.c
+++ b/app/widgets/gimptoolbox.c
@@ -199,8 +199,6 @@ gimp_toolbox_constructor (GType type,
context = gimp_dock_get_context (GIMP_DOCK (toolbox));
config = GIMP_GUI_CONFIG (context->gimp->config);
- gimp_window_set_hint (GTK_WINDOW (toolbox), config->dock_window_hint);
-
main_vbox = gimp_dock_get_main_vbox (GIMP_DOCK (toolbox));
toolbox->vbox = gtk_vbox_new (FALSE, 2);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]