Commit 2f629072 authored by Michael Natterer's avatar Michael Natterer 😴

Bug 787919 - Tool options are lost when switching device

GimpDeviceInfo is the only way to store per-device settings like
color, brush etc. It used to be derived from GimpContext and therefore
limited to the context's properties, causing everything else (all
tool-individual options) to be lost on device change.

Derive it from GimpToolPreset instead, so it's capable of storing
arbitrary tool options.

Adapt things to the new class hierarchy and add a bunch of signal
handlers that make sure the active device's GimpDeviceInfo is updated
properly when the tool changes. Also change device switching
accordingly.

Change GimpDeviceStatus to only show the stuff that is relevant to
each device's tool.

And various small changes to make things work properly...
parent d6e0ca50
......@@ -516,7 +516,8 @@ gimp_tool_preset_set_options (GimpToolPreset *preset,
serialize_props |
GIMP_CONTEXT_PROP_MASK_TOOL);
if (! (serialize_props & GIMP_CONTEXT_PROP_MASK_FOREGROUND))
if (! (serialize_props & GIMP_CONTEXT_PROP_MASK_FOREGROUND) &&
! (serialize_props & GIMP_CONTEXT_PROP_MASK_BACKGROUND))
g_object_set (preset, "use-fg-bg", FALSE, NULL);
if (! (serialize_props & GIMP_CONTEXT_PROP_MASK_BRUSH))
......
......@@ -30,6 +30,7 @@
#include "core/gimp.h"
#include "core/gimp-filter-history.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpitem.h"
......
......@@ -31,6 +31,7 @@
#include "widgets-types.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpcontainer.h"
#include "core/gimpcurve.h"
#include "core/gimpcurve-map.h"
......@@ -47,12 +48,6 @@
#define GIMP_DEVICE_INFO_DATA_KEY "gimp-device-info"
enum
{
CHANGED,
LAST_SIGNAL
};
enum
{
PROP_0,
......@@ -81,12 +76,10 @@ static void gimp_device_info_get_property (GObject *object,
static void gimp_device_info_guess_icon (GimpDeviceInfo *info);
G_DEFINE_TYPE (GimpDeviceInfo, gimp_device_info, GIMP_TYPE_CONTEXT)
G_DEFINE_TYPE (GimpDeviceInfo, gimp_device_info, GIMP_TYPE_TOOL_PRESET)
#define parent_class gimp_device_info_parent_class
static guint device_info_signals[LAST_SIGNAL] = { 0 };
static void
gimp_device_info_class_init (GimpDeviceInfoClass *klass)
......@@ -95,15 +88,6 @@ gimp_device_info_class_init (GimpDeviceInfoClass *klass)
GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass);
GParamSpec *param_spec;
device_info_signals[CHANGED] =
g_signal_new ("changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GimpDeviceInfoClass, changed),
NULL, NULL,
gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0);
object_class->constructed = gimp_device_info_constructed;
object_class->finalize = gimp_device_info_finalize;
object_class->set_property = gimp_device_info_set_property;
......@@ -169,14 +153,9 @@ gimp_device_info_class_init (GimpDeviceInfoClass *klass)
static void
gimp_device_info_init (GimpDeviceInfo *info)
{
info->device = NULL;
info->display = NULL;
info->mode = GDK_MODE_DISABLED;
info->n_axes = 0;
info->axes = NULL;
info->n_keys = 0;
info->keys = NULL;
gimp_data_make_internal (GIMP_DATA (info), NULL);
info->mode = GDK_MODE_DISABLED;
info->pressure_curve = GIMP_CURVE (gimp_curve_new ("pressure curve"));
g_signal_connect (info, "notify::name",
......@@ -188,15 +167,12 @@ static void
gimp_device_info_constructed (GObject *object)
{
GimpDeviceInfo *info = GIMP_DEVICE_INFO (object);
Gimp *gimp;
G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_assert ((info->device == NULL && info->display == NULL) ||
(GDK_IS_DEVICE (info->device) && GDK_IS_DISPLAY (info->display)));
gimp = GIMP_CONTEXT (object)->gimp;
if (info->device)
{
g_object_set_data (G_OBJECT (info->device), GIMP_DEVICE_INFO_DATA_KEY,
......@@ -208,38 +184,6 @@ gimp_device_info_constructed (GObject *object)
info->n_axes = info->device->num_axes;
info->n_keys = info->device->num_keys;
}
gimp_context_define_properties (GIMP_CONTEXT (object),
GIMP_DEVICE_INFO_CONTEXT_MASK,
FALSE);
gimp_context_copy_properties (gimp_get_user_context (gimp),
GIMP_CONTEXT (object),
GIMP_DEVICE_INFO_CONTEXT_MASK);
gimp_context_set_serialize_properties (GIMP_CONTEXT (object),
GIMP_DEVICE_INFO_CONTEXT_MASK);
/* FIXME: this is ugly and needs to be done via "notify" once
* the contexts' properties are dynamic.
*/
g_signal_connect (object, "foreground-changed",
G_CALLBACK (gimp_device_info_changed),
NULL);
g_signal_connect (object, "background-changed",
G_CALLBACK (gimp_device_info_changed),
NULL);
g_signal_connect (object, "tool-changed",
G_CALLBACK (gimp_device_info_changed),
NULL);
g_signal_connect (object, "brush-changed",
G_CALLBACK (gimp_device_info_changed),
NULL);
g_signal_connect (object, "pattern-changed",
G_CALLBACK (gimp_device_info_changed),
NULL);
g_signal_connect (object, "gradient-changed",
G_CALLBACK (gimp_device_info_changed),
NULL);
}
static void
......@@ -517,7 +461,6 @@ gimp_device_info_guess_icon (GimpDeviceInfo *info)
}
/* public functions */
GimpDeviceInfo *
......@@ -525,14 +468,23 @@ gimp_device_info_new (Gimp *gimp,
GdkDevice *device,
GdkDisplay *display)
{
GimpContext *context;
GimpToolInfo *tool_info;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
context = gimp_get_user_context (gimp);
tool_info = gimp_context_get_tool (context);
g_return_val_if_fail (tool_info != NULL, NULL);
return g_object_new (GIMP_TYPE_DEVICE_INFO,
"gimp", gimp,
"device", device,
"display", display,
"gimp", gimp,
"device", device,
"display", display,
"tool-options", tool_info->tool_options,
NULL);
}
......@@ -626,7 +578,6 @@ gimp_device_info_set_device (GimpDeviceInfo *info,
gimp_object_name_changed (GIMP_OBJECT (info));
g_object_notify (G_OBJECT (info), "device");
gimp_device_info_changed (info);
}
void
......@@ -637,7 +588,7 @@ gimp_device_info_set_default_tool (GimpDeviceInfo *info)
if (info->device &&
gdk_device_get_source (info->device) == GDK_SOURCE_ERASER)
{
GimpContainer *tools = GIMP_CONTEXT (info)->gimp->tool_info_list;
GimpContainer *tools = GIMP_TOOL_PRESET (info)->gimp->tool_info_list;
GimpToolInfo *eraser;
eraser =
......@@ -645,7 +596,84 @@ gimp_device_info_set_default_tool (GimpDeviceInfo *info)
"gimp-eraser-tool"));
if (eraser)
gimp_context_set_tool (GIMP_CONTEXT (info), eraser);
g_object_set (info,
"tool-options", eraser->tool_options,
NULL);
}
}
void
gimp_device_info_save_tool (GimpDeviceInfo *info)
{
GimpToolPreset *preset = GIMP_TOOL_PRESET (info);
GimpContext *user_context;
GimpToolInfo *tool_info;
GimpContextPropMask serialize_props;
g_return_if_fail (GIMP_IS_DEVICE_INFO (info));
user_context = gimp_get_user_context (GIMP_TOOL_PRESET (info)->gimp);
tool_info = gimp_context_get_tool (user_context);
g_object_set (info,
"tool-options", tool_info->tool_options,
NULL);
serialize_props =
gimp_context_get_serialize_properties (GIMP_CONTEXT (preset->tool_options));
g_object_set (preset,
"use-fg-bg",
(serialize_props & GIMP_CONTEXT_PROP_MASK_FOREGROUND) ||
(serialize_props & GIMP_CONTEXT_PROP_MASK_BACKGROUND),
"use-brush",
(serialize_props & GIMP_CONTEXT_PROP_MASK_BRUSH) != 0,
"use-dynamics",
(serialize_props & GIMP_CONTEXT_PROP_MASK_DYNAMICS) != 0,
"use-mypaint-brush",
(serialize_props & GIMP_CONTEXT_PROP_MASK_MYBRUSH) != 0,
"use-gradient",
(serialize_props & GIMP_CONTEXT_PROP_MASK_GRADIENT) != 0,
"use-pattern",
(serialize_props & GIMP_CONTEXT_PROP_MASK_PATTERN) != 0,
"use-palette",
(serialize_props & GIMP_CONTEXT_PROP_MASK_PALETTE) != 0,
"use-font",
(serialize_props & GIMP_CONTEXT_PROP_MASK_FONT) != 0,
NULL);
}
void
gimp_device_info_restore_tool (GimpDeviceInfo *info)
{
GimpToolPreset *preset;
GimpContext *user_context;
g_return_if_fail (GIMP_IS_DEVICE_INFO (info));
preset = GIMP_TOOL_PRESET (info);
user_context = gimp_get_user_context (GIMP_TOOL_PRESET (info)->gimp);
if (preset->tool_options)
{
if (gimp_context_get_tool_preset (user_context) != preset)
{
gimp_context_set_tool_preset (user_context, preset);
}
else
{
gimp_context_tool_preset_changed (user_context);
}
}
}
......@@ -674,7 +702,6 @@ gimp_device_info_set_mode (GimpDeviceInfo *info,
info->mode = mode;
g_object_notify (G_OBJECT (info), "mode");
gimp_device_info_changed (info);
}
}
......@@ -845,14 +872,6 @@ gimp_device_info_map_axis (GimpDeviceInfo *info,
return value;
}
void
gimp_device_info_changed (GimpDeviceInfo *info)
{
g_return_if_fail (GIMP_IS_DEVICE_INFO (info));
g_signal_emit (info, device_info_signals[CHANGED], 0);
}
GimpDeviceInfo *
gimp_device_info_get_by_device (GdkDevice *device)
{
......
......@@ -19,22 +19,12 @@
#define __GIMP_DEVICE_INFO_H__
#include "core/gimpcontext.h"
#include "core/gimptoolpreset.h"
G_BEGIN_DECLS
#define GIMP_DEVICE_INFO_CONTEXT_MASK (GIMP_CONTEXT_PROP_MASK_TOOL | \
GIMP_CONTEXT_PROP_MASK_PAINT_INFO | \
GIMP_CONTEXT_PROP_MASK_FOREGROUND | \
GIMP_CONTEXT_PROP_MASK_BACKGROUND | \
GIMP_CONTEXT_PROP_MASK_BRUSH | \
GIMP_CONTEXT_PROP_MASK_DYNAMICS | \
GIMP_CONTEXT_PROP_MASK_PATTERN | \
GIMP_CONTEXT_PROP_MASK_GRADIENT)
#define GIMP_TYPE_DEVICE_INFO (gimp_device_info_get_type ())
#define GIMP_DEVICE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DEVICE_INFO, GimpDeviceInfo))
#define GIMP_DEVICE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DEVICE_INFO, GimpDeviceInfoClass))
......@@ -47,29 +37,27 @@ typedef struct _GimpDeviceInfoClass GimpDeviceInfoClass;
struct _GimpDeviceInfo
{
GimpContext parent_instance;
GimpToolPreset parent_instance;
GdkDevice *device;
GdkDisplay *display;
GdkDevice *device;
GdkDisplay *display;
/* either "device" or the options below are set */
GdkInputMode mode;
gint n_axes;
GdkAxisUse *axes;
gint n_keys;
GdkDeviceKey *keys;
GdkInputMode mode;
gint n_axes;
GdkAxisUse *axes;
gint n_keys;
GdkDeviceKey *keys;
/* curves */
GimpCurve *pressure_curve;
GimpCurve *pressure_curve;
};
struct _GimpDeviceInfoClass
{
GimpContextClass parent_class;
void (* changed) (GimpDeviceInfo *device_info);
GimpToolPresetClass parent_class;
};
......@@ -87,6 +75,9 @@ void gimp_device_info_set_device (GimpDeviceInfo *info,
void gimp_device_info_set_default_tool (GimpDeviceInfo *info);
void gimp_device_info_save_tool (GimpDeviceInfo *info);
void gimp_device_info_restore_tool (GimpDeviceInfo *info);
GdkInputMode gimp_device_info_get_mode (GimpDeviceInfo *info);
void gimp_device_info_set_mode (GimpDeviceInfo *info,
GdkInputMode mode);
......
......@@ -445,7 +445,7 @@ gimp_device_info_editor_constructed (GObject *object)
view = gimp_curve_view_new ();
g_object_set (view,
"gimp", GIMP_CONTEXT (private->info)->gimp,
"gimp", GIMP_TOOL_PRESET (private->info)->gimp,
"border-width", CURVE_BORDER,
NULL);
gtk_widget_set_size_request (view,
......
......@@ -27,10 +27,13 @@
#include "widgets-types.h"
#include "config/gimpconfig-utils.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpmarshal.h"
#include "core/gimptoolinfo.h"
#include "gimpdeviceinfo.h"
#include "gimpdevicemanager.h"
......@@ -50,40 +53,48 @@ struct _GimpDeviceManagerPrivate
Gimp *gimp;
GHashTable *displays;
GimpDeviceInfo *current_device;
GimpToolInfo *active_tool;
};
#define GET_PRIVATE(obj) (((GimpDeviceManager *) (obj))->priv)
static void gimp_device_manager_constructed (GObject *object);
static void gimp_device_manager_dispose (GObject *object);
static void gimp_device_manager_finalize (GObject *object);
static void gimp_device_manager_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_device_manager_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_device_manager_display_opened (GdkDisplayManager *disp_manager,
GdkDisplay *display,
GimpDeviceManager *manager);
static void gimp_device_manager_display_closed (GdkDisplay *display,
gboolean is_error,
GimpDeviceManager *manager);
static void gimp_device_manager_device_added (GdkDisplay *gdk_display,
GdkDevice *device,
GimpDeviceManager *manager);
static void gimp_device_manager_device_removed (GdkDisplay *gdk_display,
GdkDevice *device,
GimpDeviceManager *manager);
static void gimp_device_manager_config_notify (GimpGuiConfig *config,
const GParamSpec *pspec,
GimpDeviceManager *manager);
static void gimp_device_manager_constructed (GObject *object);
static void gimp_device_manager_dispose (GObject *object);
static void gimp_device_manager_finalize (GObject *object);
static void gimp_device_manager_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_device_manager_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_device_manager_display_opened (GdkDisplayManager *disp_manager,
GdkDisplay *display,
GimpDeviceManager *manager);
static void gimp_device_manager_display_closed (GdkDisplay *display,
gboolean is_error,
GimpDeviceManager *manager);
static void gimp_device_manager_device_added (GdkDisplay *gdk_display,
GdkDevice *device,
GimpDeviceManager *manager);
static void gimp_device_manager_device_removed (GdkDisplay *gdk_display,
GdkDevice *device,
GimpDeviceManager *manager);
static void gimp_device_manager_config_notify (GimpGuiConfig *config,
const GParamSpec *pspec,
GimpDeviceManager *manager);
static void gimp_device_manager_tool_changed (GimpContext *user_context,
GimpToolInfo *tool_info,
GimpDeviceManager *manager);
static void gimp_device_manager_connect_tool (GimpDeviceManager *manager);
static void gimp_device_manager_disconnect_tool (GimpDeviceManager *manager);
G_DEFINE_TYPE (GimpDeviceManager, gimp_device_manager, GIMP_TYPE_LIST)
......@@ -141,6 +152,8 @@ gimp_device_manager_constructed (GObject *object)
GSList *displays;
GSList *list;
GdkDisplay *display;
GimpDeviceInfo *device_info;
GimpContext *user_context;
G_OBJECT_CLASS (parent_class)->constructed (object);
......@@ -166,17 +179,29 @@ gimp_device_manager_constructed (GObject *object)
display = gdk_display_get_default ();
private->current_device =
device_info =
gimp_device_info_get_by_device (gdk_display_get_core_pointer (display));
gimp_device_manager_set_current_device (manager, device_info);
g_signal_connect_object (private->gimp->config, "notify::devices-share-tool",
G_CALLBACK (gimp_device_manager_config_notify),
manager, 0);
user_context = gimp_get_user_context (private->gimp);
g_signal_connect_object (user_context, "tool-changed",
G_CALLBACK (gimp_device_manager_tool_changed),
manager, 0);
}
static void
gimp_device_manager_dispose (GObject *object)
{
GimpDeviceManager *manager = GIMP_DEVICE_MANAGER (object);
gimp_device_manager_disconnect_tool (manager);
g_signal_handlers_disconnect_by_func (gdk_display_manager_get (),
gimp_device_manager_display_opened,
object);
......@@ -277,20 +302,29 @@ gimp_device_manager_set_current_device (GimpDeviceManager *manager,
config = GIMP_GUI_CONFIG (private->gimp->config);
if (! config->devices_share_tool)
if (! config->devices_share_tool && private->current_device)
{
gimp_context_set_parent (GIMP_CONTEXT (private->current_device), NULL);
gimp_device_manager_disconnect_tool (manager);
}
private->current_device = info;
if (! config->devices_share_tool)
if (! config->devices_share_tool && private->current_device)
{
GimpContext *user_context = gimp_get_user_context (private->gimp);
gimp_context_copy_properties (GIMP_CONTEXT (info), user_context,
GIMP_DEVICE_INFO_CONTEXT_MASK);
gimp_context_set_parent (GIMP_CONTEXT (info), user_context);
g_signal_handlers_block_by_func (user_context,
gimp_device_manager_tool_changed,
manager);
gimp_device_info_restore_tool (private->current_device);
g_signal_handlers_unblock_by_func (user_context,
gimp_device_manager_tool_changed,
manager);
private->active_tool = gimp_context_get_tool (user_context);
gimp_device_manager_connect_tool (manager);
}
g_object_notify (G_OBJECT (manager), "current-device");
......@@ -299,7 +333,6 @@ gimp_device_manager_set_current_device (GimpDeviceManager *manager,
/* private functions */
static void
gimp_device_manager_display_opened (GdkDisplayManager *disp_manager,
GdkDisplay *gdk_display,
......@@ -431,16 +464,87 @@ gimp_device_manager_config_notify (GimpGuiConfig *config,
current_device = gimp_device_manager_get_current_device (manager);
if (GIMP_GUI_CONFIG (private->gimp->config)->devices_share_tool)
if (config->devices_share_tool)
{
gimp_context_set_parent (GIMP_CONTEXT (current_device), NULL);
gimp_device_manager_disconnect_tool (manager);
gimp_device_info_save_tool (current_device);
}
else
{
GimpContext *user_context = gimp_get_user_context (private->gimp);
gimp_context_copy_properties (GIMP_CONTEXT (current_device), user_context,
GIMP_DEVICE_INFO_CONTEXT_MASK);
gimp_context_set_parent (GIMP_CONTEXT (current_device), user_context);
g_signal_handlers_block_by_func (user_context,
gimp_device_manager_tool_changed,
manager);
gimp_device_info_restore_tool (private->current_device);
g_signal_handlers_unblock_by_func (user_context,
gimp_device_manager_tool_changed,
manager);
private->active_tool = gimp_context_get_tool (user_context);
gimp_device_manager_connect_tool (manager);
}
}
static void
gimp_device_manager_tool_changed (GimpContext *user_context,
GimpToolInfo *tool_info,
GimpDeviceManager *manager)
{
GimpDeviceManagerPrivate *private = GET_PRIVATE (manager);
GimpGuiConfig *config;
config = GIMP_GUI_CONFIG (private->gimp->config);
if (! config->devices_share_tool)
{
gimp_device_manager_disconnect_tool (manager);
}
private->active_tool = tool_info;
if (! config->devices_share_tool)
{
gimp_device_info_save_tool (private->current_device);
gimp_device_manager_connect_tool (manager);
}
}
static void
gimp_device_manager_connect_tool (GimpDeviceManager *manager)
{
GimpDeviceManagerPrivate *private = GET_PRIVATE (manager);
GimpGuiConfig *config;
config = GIMP_GUI_CONFIG (private->gimp->config);
if (! config->devices_share_tool &&
private->active_tool && private->current_device)
{
GimpToolPreset *preset = GIMP_TOOL_PRESET (private->current_device);
gimp_config_connect (G_OBJECT (private->active_tool->tool_options),
G_OBJECT (preset->tool_options),
NULL);
}
}
static void
gimp_device_manager_disconnect_tool (GimpDeviceManager *manager)
{
GimpDeviceManagerPrivate *private = GET_PRIVATE (manager);
GimpGuiConfig *config;
config = GIMP_GUI_CONFIG (private->gimp->config);
if (! config->devices_share_tool &&
private->active_tool && private->current_device)
{
GimpToolPreset *preset = GIMP_TOOL_PRESET (private->current_device);
gimp_config_disconnect (G_OBJECT (private->active_tool->tool_options),
G_OBJECT (preset->tool_options));
}
}
......@@ -29,6 +29,7 @@
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpdatafactory.h"
#include "core/gimperror.h"
#include "core/gimpgradient.h"
......@@ -87,7 +88,6 @@ void
gimp_devices_restore (Gimp *gimp)
{
GimpDeviceManager *manager;
GimpContext *user_context;
GList *list;
GFile *file;
GError *error = NULL;
......@@ -98,17 +98,13 @@ gimp_devices_restore (Gimp *gimp)
g_return_if_fail (GIMP_IS_DEVICE_MANAGER (manager));
user_context = gimp_get_user_context (gimp);
for (list = GIMP_LIST (manager)->queue->head;
list;
list = g_list_next (list))
{
GimpDeviceInfo *device_info = list->data;
gimp_context_copy_properties (user_context, GIMP_CONTEXT (device_info),
GIMP_DEVICE_INFO_CONTEXT_MASK);
gimp_device_info_save_tool (device_info);
gimp_device_info_set_default_tool (device_info);
}
......@@ -137,9 +133,7 @@ gimp_devices_restore (Gimp *gimp)
current_device = gimp_device_manager_get_current_device (manager);
gimp_context_copy_properties (GIMP_CONTEXT (current_device), user_context,
GIMP_DEVICE_INFO_CONTEXT_MASK);
gimp_context_set_parent (GIMP_CONTEXT (current_device), user_context);
gimp_device_info_restore_tool (current_device);
}
}
......
......@@ -34,6 +34,7 @@
#include "core/gimp.h"
#include "core/gimpbrush.h"
#include "core/gimpcontext.h"
#include "core/gimpdatafactory.h"
#include "core/gimpgradient.h"
#include "core/gimplist.h"
......@@ -66,16 +67,23 @@ enum
struct _GimpDeviceStatusEntry
{
GimpDeviceInfo *device_info;
GtkWidget *ebox;
GtkWidget *options_hbox;
GtkWidget *tool;
GtkWidget *foreground;
GtkWidget *background;
GtkWidget *brush;
GtkWidget *pattern;
GtkWidget *gradient;
GimpDeviceInfo *device_info;
GimpContext *context;
GimpToolOptions *tool_options;
GtkWidget *ebox;
GtkWidget *options_hbox;
GtkWidget *tool;
GtkWidget *foreground;
GtkWidget *foreground_none;
GtkWidget *background;
GtkWidget *background_none;
GtkWidget *brush;
GtkWidget *brush_none;
GtkWidget *pattern;
GtkWidget *pattern_none;
GtkWidget *gradient;
GtkWidget *gradient_none;
};
......@@ -99,7 +107,8 @@ static void gimp_device_status_notify_device (GimpDeviceManager *manager,
static void gimp_device_status_config_notify (GimpGuiConfig *config,
const GParamSpec *pspec,
GimpDeviceStatus *status);
static void gimp_device_status_update_entry (GimpDeviceInfo *device_info,
static void gimp_device_status_notify_info (GimpDeviceInfo *device_info,
const GParamSpec *pspec,
GimpDeviceStatusEntry *entry);
static void gimp_device_status_save_clicked (GtkWidget *button,
GimpDeviceStatus *status);
......@@ -199,9 +208,10 @@ gimp_device_status_dispose (GObject *object)
GimpDeviceStatusEntry *entry = list->data;
g_signal_handlers_disconnect_by_func (entry->device_info,