diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-08-01 19:29:41 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-08-06 04:13:02 +0800 |
commit | de85e3c7862100da10fe860aef2b651245a1fdbf (patch) | |
tree | dd4a3482966c041a80c9798d45b73f5fe986dad6 /calendar/gui/dialogs/comp-editor-util.c | |
parent | fac731e7359c978ff730d48f9ab88a5794450206 (diff) | |
download | gsoc2013-evolution-de85e3c7862100da10fe860aef2b651245a1fdbf.tar gsoc2013-evolution-de85e3c7862100da10fe860aef2b651245a1fdbf.tar.gz gsoc2013-evolution-de85e3c7862100da10fe860aef2b651245a1fdbf.tar.bz2 gsoc2013-evolution-de85e3c7862100da10fe860aef2b651245a1fdbf.tar.lz gsoc2013-evolution-de85e3c7862100da10fe860aef2b651245a1fdbf.tar.xz gsoc2013-evolution-de85e3c7862100da10fe860aef2b651245a1fdbf.tar.zst gsoc2013-evolution-de85e3c7862100da10fe860aef2b651245a1fdbf.zip |
Replace more "config" classes with property bindings.
Diffstat (limited to 'calendar/gui/dialogs/comp-editor-util.c')
-rw-r--r-- | calendar/gui/dialogs/comp-editor-util.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c index e330a7f9d4..cfe4139708 100644 --- a/calendar/gui/dialogs/comp-editor-util.c +++ b/calendar/gui/dialogs/comp-editor-util.c @@ -32,8 +32,9 @@ #include <glib/gi18n.h> #include <libedataserver/e-time-utils.h> #include <libecal/e-cal-time-util.h> +#include "e-util/e-binding.h" +#include "widgets/misc/e-dateedit.h" #include "../calendar-config.h" -#include "../e-date-edit-config.h" #include "comp-editor-util.h" @@ -204,16 +205,9 @@ comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label) gtk_label_set_text (GTK_LABEL (label), buffer); } -static void -date_edit_destroy_cb (EDateEdit *date_edit, gpointer data) -{ - EDateEditConfig *config = data; - - g_object_unref (config); -} - /** * comp_editor_new_date_edit: + * @shell_settings: an #EShellSettings * @show_date: Whether to show a date picker in the widget. * @show_time: Whether to show a time picker in the widget. * @make_time_insensitive: Whether the time field is made insensitive rather @@ -225,11 +219,14 @@ date_edit_destroy_cb (EDateEdit *date_edit, gpointer data) * Return value: A newly-created #EDateEdit widget. **/ GtkWidget * -comp_editor_new_date_edit (gboolean show_date, gboolean show_time, - gboolean make_time_insensitive) +comp_editor_new_date_edit (EShellSettings *shell_settings, + gboolean show_date, + gboolean show_time, + gboolean make_time_insensitive) { EDateEdit *dedit; - EDateEditConfig *config; + + g_return_val_if_fail (E_IS_SHELL_SETTINGS (shell_settings), NULL); dedit = E_DATE_EDIT (e_date_edit_new ()); @@ -241,8 +238,13 @@ comp_editor_new_date_edit (gboolean show_date, gboolean show_time, e_date_edit_set_make_time_insensitive (dedit, FALSE); #endif - config = e_date_edit_config_new (dedit); - g_signal_connect (G_OBJECT (dedit), "destroy", G_CALLBACK (date_edit_destroy_cb), config); + e_binding_new ( + G_OBJECT (shell_settings), "cal-date-navigator-show-week-numbers", + G_OBJECT (dedit), "show-week-numbers"); + + e_binding_new ( + G_OBJECT (shell_settings), "cal-week-start-day", + G_OBJECT (dedit), "week-start-day"); return GTK_WIDGET (dedit); } |