mirror of https://github.com/GNOME/gimp.git
app: Set the dock-window-hint centrally in GimpDockWindow
Set the dock-window-hint centrally in GimpDockWindow instead of both in GimpToolbox and GimpMenuDock.
This commit is contained in:
parent
81d961423a
commit
26fbeebf02
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue