From 8d93dfa92382328b8cc640133d4bf17355674911 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Sun, 26 Sep 2010 23:14:25 +0200 Subject: [PATCH] app: remove xor-color property from gimprc --- app/config/gimpdisplayconfig.c | 35 +++++++++++++++++----------------- app/config/gimpdisplayconfig.h | 1 - app/config/gimprc-blurbs.h | 5 ----- docs/gimprc.5.in | 9 --------- etc/gimprc | 8 -------- 5 files changed, 18 insertions(+), 40 deletions(-) diff --git a/app/config/gimpdisplayconfig.c b/app/config/gimpdisplayconfig.c index 0b4d6fba56..0e513086ed 100644 --- a/app/config/gimpdisplayconfig.c +++ b/app/config/gimpdisplayconfig.c @@ -71,9 +71,11 @@ enum PROP_DEFAULT_SNAP_TO_PATH, PROP_ACTIVATE_ON_FOCUS, PROP_SPACE_BAR_ACTION, - PROP_XOR_COLOR, PROP_ZOOM_QUALITY, - PROP_USE_EVENT_HISTORY + PROP_USE_EVENT_HISTORY, + + /* ignored, only for backward compatibility: */ + PROP_XOR_COLOR }; @@ -104,9 +106,7 @@ static void gimp_display_config_class_init (GimpDisplayConfigClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - GimpRGB color; - - gimp_rgba_set_uchar (&color, 0x80, 0xff, 0x80, 0xff); + GimpRGB color = { 0, 0, 0, 0 }; object_class->finalize = gimp_display_config_finalize; object_class->set_property = gimp_display_config_set_property; @@ -252,10 +252,6 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass) GIMP_TYPE_SPACE_BAR_ACTION, GIMP_SPACE_BAR_ACTION_PAN, GIMP_PARAM_STATIC_STRINGS); - GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_XOR_COLOR, - "xor-color", XOR_COLOR_BLURB, - FALSE, &color, - GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_ZOOM_QUALITY, "zoom-quality", ZOOM_QUALITY_BLURB, @@ -268,6 +264,13 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass) DEFAULT_USE_EVENT_HISTORY_BLURB, DEFAULT_USE_EVENT_HISTORY, GIMP_PARAM_STATIC_STRINGS); + + /* only for backward compatibility: */ + GIMP_CONFIG_INSTALL_PROP_RGB (object_class, PROP_XOR_COLOR, + "xor-color", NULL, + FALSE, &color, + GIMP_PARAM_STATIC_STRINGS | + GIMP_CONFIG_PARAM_IGNORE); } static void @@ -406,16 +409,15 @@ gimp_display_config_set_property (GObject *object, case PROP_SPACE_BAR_ACTION: display_config->space_bar_action = g_value_get_enum (value); break; - case PROP_XOR_COLOR: - display_config->xor_color = *(GimpRGB *) g_value_get_boxed (value); - break; case PROP_ZOOM_QUALITY: display_config->zoom_quality = g_value_get_enum (value); break; - case PROP_USE_EVENT_HISTORY: display_config->use_event_history = g_value_get_boolean (value); break; + case PROP_XOR_COLOR: + /* ignored */ + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -517,16 +519,15 @@ gimp_display_config_get_property (GObject *object, case PROP_SPACE_BAR_ACTION: g_value_set_enum (value, display_config->space_bar_action); break; - case PROP_XOR_COLOR: - g_value_set_boxed (value, &display_config->xor_color); - break; case PROP_ZOOM_QUALITY: g_value_set_enum (value, display_config->zoom_quality); break; - case PROP_USE_EVENT_HISTORY: g_value_set_boolean (value, display_config->use_event_history); break; + case PROP_XOR_COLOR: + /* ignored */ + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); diff --git a/app/config/gimpdisplayconfig.h b/app/config/gimpdisplayconfig.h index cfdbdf2a5d..427e50e787 100644 --- a/app/config/gimpdisplayconfig.h +++ b/app/config/gimpdisplayconfig.h @@ -69,7 +69,6 @@ struct _GimpDisplayConfig gboolean default_snap_to_path; gboolean activate_on_focus; GimpSpaceBarAction space_bar_action; - GimpRGB xor_color; GimpZoomQuality zoom_quality; gboolean use_event_history; }; diff --git a/app/config/gimprc-blurbs.h b/app/config/gimprc-blurbs.h index 0298bc31ec..b8d11cac12 100644 --- a/app/config/gimprc-blurbs.h +++ b/app/config/gimprc-blurbs.h @@ -468,11 +468,6 @@ N_("When enabled, pressing F1 will open the help browser.") "The location of the online user manual. This is used if " \ "'user-manual-online' is enabled." -#define XOR_COLOR_BLURB \ -"Sets the color that is used for XOR drawing. This setting only exists as " \ -"a workaround for buggy display drivers. If lines on the canvas are not " \ -"correctly undrawn, try to set this to white." - #define ZOOM_QUALITY_BLURB \ "There's a tradeoff between speed and quality of the zoomed-out display." diff --git a/docs/gimprc.5.in b/docs/gimprc.5.in index d3c0db56c8..c3915632a6 100644 --- a/docs/gimprc.5.in +++ b/docs/gimprc.5.in @@ -682,15 +682,6 @@ receives the focus. This is useful for window managers using "click to focus". What to do when the space bar is pressed in the image window. Possible values are none, pan and move. -.TP -(xor-color (color-rgb 0.501961 1.000000 0.501961)) - -Sets the color that is used for XOR drawing. This setting only exists as a -workaround for buggy display drivers. If lines on the canvas are not correctly -undrawn, try to set this to white. The color is specified in the form -(color-rgb red green blue) with channel values as floats in the range of 0.0 -to 1.0. - .TP (zoom-quality high) diff --git a/etc/gimprc b/etc/gimprc index 6787beb5eb..b1a7f2d2c4 100644 --- a/etc/gimprc +++ b/etc/gimprc @@ -531,14 +531,6 @@ # # (space-bar-action pan) -# Sets the color that is used for XOR drawing. This setting only exists as a -# workaround for buggy display drivers. If lines on the canvas are not -# correctly undrawn, try to set this to white. The color is specified in the -# form (color-rgb red green blue) with channel values as floats in the range -# of 0.0 to 1.0. -# -# (xor-color (color-rgb 0.501961 1.000000 0.501961)) - # There's a tradeoff between speed and quality of the zoomed-out display. # Possible values are low and high. #