patch by Kevin Bauder <kevin.bauder@gmail.com>, "Replaced deprecated
2006-07-23 Sebastien Bacher <seb128@debian.org> * gconf-property-editor.c: (peditor_color_value_changed), (peditor_color_widget_changed), (gconf_peditor_new_color): patch by Kevin Bauder <kevin.bauder@gmail.com>, "Replaced deprecated GnomeColorPicker with GtkColorButton." (Closes: #171680)
This commit is contained in:
parent
5463ac90eb
commit
c7a822c879
3 changed files with 22 additions and 12 deletions
2
NEWS
2
NEWS
|
@ -4,6 +4,8 @@ misc:
|
||||||
- add an encoding key to some .directory.in (Vincent Fretin) (#338593)
|
- add an encoding key to some .directory.in (Vincent Fretin) (#338593)
|
||||||
- don't use the Application category for the .desktops, use
|
- don't use the Application category for the .desktops, use
|
||||||
HardwareSettings for some (Vincent Fretin) (#344321)
|
HardwareSettings for some (Vincent Fretin) (#344321)
|
||||||
|
- made gconf-property-editor.c use GtkColorButton instead of GnomeColorPicker
|
||||||
|
(Kevin Bauder) (#171680)
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
gnome-control-center 2.15.4
|
gnome-control-center 2.15.4
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
2006-07-23 Sebastien Bacher <seb128@debian.org>
|
||||||
|
|
||||||
|
* gconf-property-editor.c: (peditor_color_value_changed),
|
||||||
|
(peditor_color_widget_changed), (gconf_peditor_new_color):
|
||||||
|
patch by Kevin Bauder <kevin.bauder@gmail.com>,
|
||||||
|
"Replaced deprecated GnomeColorPicker with GtkColorButton."
|
||||||
|
(Closes: #171680)
|
||||||
|
|
||||||
2006-07-05 Sergey Udaltsov <svu@gnome.org>
|
2006-07-05 Sergey Udaltsov <svu@gnome.org>
|
||||||
|
|
||||||
* Makefile.am, added DBUS_LIBS, closing #346442
|
* Makefile.am, added DBUS_LIBS, closing #346442
|
||||||
|
|
|
@ -720,26 +720,26 @@ peditor_color_value_changed (GConfClient *client,
|
||||||
if (value != NULL) {
|
if (value != NULL) {
|
||||||
value_wid = peditor->p->conv_to_widget_cb (peditor, value);
|
value_wid = peditor->p->conv_to_widget_cb (peditor, value);
|
||||||
gdk_color_parse (gconf_value_get_string (value_wid), &color);
|
gdk_color_parse (gconf_value_get_string (value_wid), &color);
|
||||||
gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (peditor->p->ui_control), color.red, color.green, color.blue, 65535);
|
gtk_color_button_set_color (
|
||||||
|
GTK_COLOR_BUTTON (peditor->p->ui_control), &color);
|
||||||
gconf_value_free (value_wid);
|
gconf_value_free (value_wid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
peditor_color_widget_changed (GConfPropertyEditor *peditor,
|
peditor_color_widget_changed (GConfPropertyEditor *peditor,
|
||||||
guint r,
|
GtkColorButton *cb)
|
||||||
guint g,
|
|
||||||
guint b,
|
|
||||||
guint a,
|
|
||||||
GnomeColorPicker *cp)
|
|
||||||
{
|
{
|
||||||
gchar *str;
|
gchar *str;
|
||||||
GConfValue *value, *value_wid;
|
GConfValue *value, *value_wid;
|
||||||
|
GdkColor color;
|
||||||
|
|
||||||
if (!peditor->p->inited) return;
|
if (!peditor->p->inited) return;
|
||||||
|
|
||||||
value_wid = gconf_value_new (GCONF_VALUE_STRING);
|
value_wid = gconf_value_new (GCONF_VALUE_STRING);
|
||||||
str = g_strdup_printf ("#%02x%02x%02x", r >> 8, g >> 8, b >> 8);
|
gtk_color_button_get_color (cb, &color);
|
||||||
|
str = g_strdup_printf ("#%02x%02x%02x", color.red >> 8,
|
||||||
|
color.green >> 8, color.blue >> 8);
|
||||||
gconf_value_set_string (value_wid, str);
|
gconf_value_set_string (value_wid, str);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
|
|
||||||
|
@ -755,7 +755,7 @@ peditor_color_widget_changed (GConfPropertyEditor *peditor,
|
||||||
GObject *
|
GObject *
|
||||||
gconf_peditor_new_color (GConfChangeSet *changeset,
|
gconf_peditor_new_color (GConfChangeSet *changeset,
|
||||||
gchar *key,
|
gchar *key,
|
||||||
GtkWidget *cp,
|
GtkWidget *cb,
|
||||||
gchar *first_property_name,
|
gchar *first_property_name,
|
||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
|
@ -763,8 +763,8 @@ gconf_peditor_new_color (GConfChangeSet *changeset,
|
||||||
va_list var_args;
|
va_list var_args;
|
||||||
|
|
||||||
g_return_val_if_fail (key != NULL, NULL);
|
g_return_val_if_fail (key != NULL, NULL);
|
||||||
g_return_val_if_fail (cp != NULL, NULL);
|
g_return_val_if_fail (cb != NULL, NULL);
|
||||||
g_return_val_if_fail (GNOME_IS_COLOR_PICKER (cp), NULL);
|
g_return_val_if_fail (GTK_IS_COLOR_BUTTON (cb), NULL);
|
||||||
|
|
||||||
va_start (var_args, first_property_name);
|
va_start (var_args, first_property_name);
|
||||||
|
|
||||||
|
@ -772,13 +772,13 @@ gconf_peditor_new_color (GConfChangeSet *changeset,
|
||||||
(key,
|
(key,
|
||||||
(GConfClientNotifyFunc) peditor_color_value_changed,
|
(GConfClientNotifyFunc) peditor_color_value_changed,
|
||||||
changeset,
|
changeset,
|
||||||
G_OBJECT (cp),
|
G_OBJECT (cb),
|
||||||
first_property_name,
|
first_property_name,
|
||||||
var_args, NULL);
|
var_args, NULL);
|
||||||
|
|
||||||
va_end (var_args);
|
va_end (var_args);
|
||||||
|
|
||||||
g_signal_connect_swapped (G_OBJECT (cp), "color_set",
|
g_signal_connect_swapped (G_OBJECT (cb), "color_set",
|
||||||
(GCallback) peditor_color_widget_changed, peditor);
|
(GCallback) peditor_color_widget_changed, peditor);
|
||||||
|
|
||||||
return peditor;
|
return peditor;
|
||||||
|
|
Loading…
Add table
Reference in a new issue