diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-01-23 13:04:31 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-01-23 13:04:31 +0800 |
commit | bf60b8fe359c3d9f26f45a25f38752d9290a3bca (patch) | |
tree | 78e5a07506d40bcccb94b6de246c2fa49bee713e /calendar/gui/dialogs/cal-prefs-dialog.c | |
parent | 420e78b55d57c9e6cefe2fe3e3c4ce1199f4449d (diff) | |
download | gsoc2013-evolution-bf60b8fe359c3d9f26f45a25f38752d9290a3bca.tar gsoc2013-evolution-bf60b8fe359c3d9f26f45a25f38752d9290a3bca.tar.gz gsoc2013-evolution-bf60b8fe359c3d9f26f45a25f38752d9290a3bca.tar.bz2 gsoc2013-evolution-bf60b8fe359c3d9f26f45a25f38752d9290a3bca.tar.lz gsoc2013-evolution-bf60b8fe359c3d9f26f45a25f38752d9290a3bca.tar.xz gsoc2013-evolution-bf60b8fe359c3d9f26f45a25f38752d9290a3bca.tar.zst gsoc2013-evolution-bf60b8fe359c3d9f26f45a25f38752d9290a3bca.zip |
fixes #326478
svn path=/trunk/; revision=31268
Diffstat (limited to 'calendar/gui/dialogs/cal-prefs-dialog.c')
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index 4bd19b15e2..2f548b66c1 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -31,6 +31,7 @@ #include "../e-timezone-entry.h" #include "../calendar-config.h" #include "cal-prefs-dialog.h" +#include <libgnomeui/gnome-color-picker.h> #include <widgets/misc/e-dateedit.h> #include <e-util/e-dialog-widgets.h> #include <e-util/e-util-private.h> @@ -101,10 +102,10 @@ static const char * spec_from_picker (GtkWidget *picker) { static char spec[8]; - GdkColor color; + guint8 r, g, b; - gtk_color_button_get_color (GTK_COLOR_BUTTON (picker), &color); - g_snprintf (spec, sizeof (spec), "#%02x%02x%02x", color.red, color.green, color.blue); + gnome_color_picker_get_i8 (GNOME_COLOR_PICKER (picker), &r, &g, &b, NULL); + g_snprintf (spec, sizeof (spec), "#%02x%02x%02x", r, g, b); return spec; } @@ -259,13 +260,13 @@ hide_completed_tasks_units_changed (GtkWidget *widget, CalendarPrefsDialog *pref } static void -tasks_due_today_set_color (GtkColorButton *picker, guint r, guint g, guint b, guint a, CalendarPrefsDialog *prefs) +tasks_due_today_set_color (GnomeColorPicker *picker, guint r, guint g, guint b, guint a, CalendarPrefsDialog *prefs) { calendar_config_set_tasks_due_today_color (spec_from_picker (prefs->tasks_due_today_color)); } static void -tasks_overdue_set_color (GtkColorButton *picker, guint r, guint g, guint b, guint a, CalendarPrefsDialog *prefs) +tasks_overdue_set_color (GnomeColorPicker *picker, guint r, guint g, guint b, guint a, CalendarPrefsDialog *prefs) { calendar_config_set_tasks_overdue_color (spec_from_picker (prefs->tasks_overdue_color)); } @@ -358,7 +359,11 @@ set_color_picker (GtkWidget *picker, const char *spec) if (!spec || !gdk_color_parse (spec, &color)) color.red = color.green = color.blue = 0; - gtk_color_button_set_color (GTK_COLOR_BUTTON (picker), &color); + gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (picker), + color.red, + color.green, + color.blue, + 65535); } /* Shows the current Free/Busy settings in the dialog */ |