mirror of https://github.com/GNOME/gimp.git
app/config/gimpguiconfig.[ch] app/config/gimprc-blurbs.h
2004-01-17 Sven Neumann <sven@gimp.org> * app/config/gimpguiconfig.[ch] * app/config/gimprc-blurbs.h * app/widgets/gimpdock.c * app/widgets/gimptoolbox.c * app/widgets/gimpwidgets-utils.[ch] * app/widgets/gimpwidgets-utils.[ch] * app/widgets/widgets-enums.[ch]: GTK+-2.4 will allow to request windows to be kept above. This change prepares the code so that we can optionally do this for docks and the toolbox as soon as we depend on GTK+-2.4 (see bug #131672).
This commit is contained in:
parent
c40b7bb0de
commit
bfe567c42b
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2004-01-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/config/gimpguiconfig.[ch]
|
||||
* app/config/gimprc-blurbs.h
|
||||
* app/widgets/gimpdock.c
|
||||
* app/widgets/gimptoolbox.c
|
||||
* app/widgets/gimpwidgets-utils.[ch]
|
||||
* app/widgets/gimpwidgets-utils.[ch]
|
||||
* app/widgets/widgets-enums.[ch]: GTK+-2.4 will allow to request
|
||||
windows to be kept above. This change prepares the code so that we
|
||||
can optionally do this for docks and the toolbox as soon as we
|
||||
depend on GTK+-2.4 (see bug #131672).
|
||||
|
||||
2004-01-16 Dave Neary <bolsh@gimp.org>
|
||||
|
||||
* plug-ins/common/tiff.c: Apply a (modified) patch from Pablo
|
||||
|
|
|
@ -83,8 +83,8 @@ enum
|
|||
PROP_USE_HELP,
|
||||
PROP_HELP_BROWSER,
|
||||
PROP_WEB_BROWSER,
|
||||
PROP_TOOLBOX_WINDOW_TYPE,
|
||||
PROP_DOCK_WINDOW_TYPE
|
||||
PROP_TOOLBOX_WINDOW_HINT,
|
||||
PROP_DOCK_WINDOW_HINT
|
||||
};
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
@ -223,17 +223,17 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
|
|||
GIMP_PARAM_PATH_FILE,
|
||||
DEFAULT_WEB_BROWSER,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_TOOLBOX_WINDOW_TYPE,
|
||||
"toolbox-window-type",
|
||||
TOOLBOX_WINDOW_TYPE_BLURB,
|
||||
GIMP_TYPE_WINDOW_TYPE_HINT,
|
||||
GIMP_WINDOW_TYPE_HINT_NORMAL,
|
||||
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_TOOLBOX_WINDOW_HINT,
|
||||
"toolbox-window-hint",
|
||||
TOOLBOX_WINDOW_HINT_BLURB,
|
||||
GIMP_TYPE_WINDOW_HINT,
|
||||
GIMP_WINDOW_HINT_NORMAL,
|
||||
GIMP_PARAM_RESTART);
|
||||
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_DOCK_WINDOW_TYPE,
|
||||
"dock-window-type",
|
||||
DOCK_WINDOW_TYPE_BLURB,
|
||||
GIMP_TYPE_WINDOW_TYPE_HINT,
|
||||
GIMP_WINDOW_TYPE_HINT_NORMAL,
|
||||
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_DOCK_WINDOW_HINT,
|
||||
"dock-window-hint",
|
||||
DOCK_WINDOW_HINT_BLURB,
|
||||
GIMP_TYPE_WINDOW_HINT,
|
||||
GIMP_WINDOW_HINT_NORMAL,
|
||||
GIMP_PARAM_RESTART);
|
||||
}
|
||||
|
||||
|
@ -325,11 +325,11 @@ gimp_gui_config_set_property (GObject *object,
|
|||
g_free (gui_config->web_browser);
|
||||
gui_config->web_browser = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_TOOLBOX_WINDOW_TYPE:
|
||||
gui_config->toolbox_window_type = g_value_get_enum (value);
|
||||
case PROP_TOOLBOX_WINDOW_HINT:
|
||||
gui_config->toolbox_window_hint = g_value_get_enum (value);
|
||||
break;
|
||||
case PROP_DOCK_WINDOW_TYPE:
|
||||
gui_config->dock_window_type = g_value_get_enum (value);
|
||||
case PROP_DOCK_WINDOW_HINT:
|
||||
gui_config->dock_window_hint = g_value_get_enum (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -411,11 +411,11 @@ gimp_gui_config_get_property (GObject *object,
|
|||
case PROP_WEB_BROWSER:
|
||||
g_value_set_string (value, gui_config->web_browser);
|
||||
break;
|
||||
case PROP_TOOLBOX_WINDOW_TYPE:
|
||||
g_value_set_enum (value, gui_config->toolbox_window_type);
|
||||
case PROP_TOOLBOX_WINDOW_HINT:
|
||||
g_value_set_enum (value, gui_config->toolbox_window_hint);
|
||||
break;
|
||||
case PROP_DOCK_WINDOW_TYPE:
|
||||
g_value_set_enum (value, gui_config->dock_window_type);
|
||||
case PROP_DOCK_WINDOW_HINT:
|
||||
g_value_set_enum (value, gui_config->dock_window_hint);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -61,8 +61,8 @@ struct _GimpGuiConfig
|
|||
gboolean use_help;
|
||||
GimpHelpBrowserType help_browser;
|
||||
gchar *web_browser;
|
||||
GimpWindowTypeHint toolbox_window_type;
|
||||
GimpWindowTypeHint dock_window_type;
|
||||
GimpWindowHint toolbox_window_hint;
|
||||
GimpWindowHint dock_window_hint;
|
||||
|
||||
gint last_tip; /* saved in sessionrc */
|
||||
};
|
||||
|
|
|
@ -77,7 +77,7 @@ N_("Tools such as fuzzy-select and bucket fill find regions based on a " \
|
|||
#define DEFAULT_FULLSCREEN_VIEW_BLURB \
|
||||
"Sets the default settings used when an image is viewed in fullscreen mode."
|
||||
|
||||
#define DOCK_WINDOW_TYPE_BLURB \
|
||||
#define DOCK_WINDOW_HINT_BLURB \
|
||||
N_("The window type hint that is set on dock windows. This may affect " \
|
||||
"the way your window manager decorates and handles dock windows.")
|
||||
|
||||
|
@ -317,7 +317,7 @@ N_("The tile cache is used to make sure the GIMP doesn't thrash " \
|
|||
"the GIMP to use more memory. Conversely, a smaller cache size " \
|
||||
"causes the GIMP to use more swap space and less memory.")
|
||||
|
||||
#define TOOLBOX_WINDOW_TYPE_BLURB \
|
||||
#define TOOLBOX_WINDOW_HINT_BLURB \
|
||||
N_("The window type hint that is set on the toolbox. This may affect " \
|
||||
"how your window manager decorates and handles the toolbox window.")
|
||||
|
||||
|
|
|
@ -285,8 +285,7 @@ gimp_dock_constructor (GType type,
|
|||
|
||||
config = GIMP_GUI_CONFIG (GIMP_DOCK (object)->context->gimp->config);
|
||||
|
||||
gtk_window_set_type_hint (GTK_WINDOW (object),
|
||||
gimp_window_type_hint_to_gdk_hint (config->dock_window_type));
|
||||
gimp_window_set_hint (GTK_WINDOW (object), config->dock_window_hint);
|
||||
|
||||
return object;
|
||||
}
|
||||
|
|
|
@ -446,8 +446,7 @@ gimp_toolbox_new (GimpDialogFactory *dialog_factory,
|
|||
|
||||
config = GIMP_GUI_CONFIG (gimp->config);
|
||||
|
||||
gtk_window_set_type_hint (GTK_WINDOW (toolbox),
|
||||
gimp_window_type_hint_to_gdk_hint (config->toolbox_window_type));
|
||||
gimp_window_set_hint (GTK_WINDOW (toolbox), config->toolbox_window_hint);
|
||||
|
||||
/* We need to know when the current device changes, so we can update
|
||||
* the correct tool - to do this we connect to motion events.
|
||||
|
|
|
@ -689,17 +689,20 @@ gimp_rgb_set_gdk_color (GimpRGB *rgb,
|
|||
gimp_rgb_set_uchar (rgb, r, g, b);
|
||||
}
|
||||
|
||||
GdkWindowTypeHint
|
||||
gimp_window_type_hint_to_gdk_hint (GimpWindowTypeHint hint)
|
||||
void
|
||||
gimp_window_set_hint (GtkWindow *window,
|
||||
GimpWindowHint hint)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WINDOW (window));
|
||||
|
||||
switch (hint)
|
||||
{
|
||||
case GIMP_WINDOW_TYPE_HINT_NORMAL:
|
||||
return GDK_WINDOW_TYPE_HINT_NORMAL;
|
||||
case GIMP_WINDOW_HINT_NORMAL:
|
||||
gtk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_NORMAL);
|
||||
break;
|
||||
|
||||
case GIMP_WINDOW_TYPE_HINT_UTILITY:
|
||||
return GDK_WINDOW_TYPE_HINT_UTILITY;
|
||||
case GIMP_WINDOW_HINT_UTILITY:
|
||||
gtk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_UTILITY);
|
||||
break;
|
||||
}
|
||||
|
||||
return GDK_WINDOW_TYPE_HINT_NORMAL;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,8 @@ void gimp_rgb_get_gdk_color (const GimpRGB *rgb,
|
|||
void gimp_rgb_set_gdk_color (GimpRGB *rgb,
|
||||
const GdkColor *gdk_color);
|
||||
|
||||
GdkWindowTypeHint gimp_window_type_hint_to_gdk_hint (GimpWindowTypeHint hint);
|
||||
void gimp_window_set_hint (GtkWindow *window,
|
||||
GimpWindowHint hint);
|
||||
|
||||
|
||||
#endif /* __GIMP_WIDGETS_UTILS_H__ */
|
||||
|
|
|
@ -131,20 +131,20 @@ gimp_view_type_get_type (void)
|
|||
}
|
||||
|
||||
|
||||
static const GEnumValue gimp_window_type_hint_enum_values[] =
|
||||
static const GEnumValue gimp_window_hint_enum_values[] =
|
||||
{
|
||||
{ GIMP_WINDOW_TYPE_HINT_NORMAL, N_("Normal"), "normal" },
|
||||
{ GIMP_WINDOW_TYPE_HINT_UTILITY, N_("Utility"), "utility" },
|
||||
{ GIMP_WINDOW_HINT_NORMAL, N_("Normal Window"), "normal" },
|
||||
{ GIMP_WINDOW_HINT_UTILITY, N_("Utility Window"), "utility" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
GType
|
||||
gimp_window_type_hint_get_type (void)
|
||||
gimp_window_hint_get_type (void)
|
||||
{
|
||||
static GType enum_type = 0;
|
||||
|
||||
if (!enum_type)
|
||||
enum_type = g_enum_register_static ("GimpWindowTypeHint", gimp_window_type_hint_enum_values);
|
||||
enum_type = g_enum_register_static ("GimpWindowHint", gimp_window_hint_enum_values);
|
||||
|
||||
return enum_type;
|
||||
}
|
||||
|
|
|
@ -99,15 +99,15 @@ typedef enum
|
|||
} GimpViewType;
|
||||
|
||||
|
||||
#define GIMP_TYPE_WINDOW_TYPE_HINT (gimp_window_type_hint_get_type ())
|
||||
#define GIMP_TYPE_WINDOW_HINT (gimp_window_hint_get_type ())
|
||||
|
||||
GType gimp_window_type_hint_get_type (void) G_GNUC_CONST;
|
||||
GType gimp_window_hint_get_type (void) G_GNUC_CONST;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_WINDOW_TYPE_HINT_NORMAL, /*< desc="Normal" >*/
|
||||
GIMP_WINDOW_TYPE_HINT_UTILITY /*< desc="Utility" >*/
|
||||
} GimpWindowTypeHint;
|
||||
GIMP_WINDOW_HINT_NORMAL, /*< desc="Normal Window" >*/
|
||||
GIMP_WINDOW_HINT_UTILITY, /*< desc="Utility Window" >*/
|
||||
} GimpWindowHint;
|
||||
|
||||
|
||||
#define GIMP_TYPE_ZOOM_TYPE (gimp_zoom_type_get_type ())
|
||||
|
|
Loading…
Reference in New Issue