diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-09-02 09:12:44 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-09-02 09:12:44 +0800 |
commit | 8962868ff902e58456c545478e62796029d1fe5c (patch) | |
tree | d43efa77beba51f716a259a3538dd55a38711923 /modules/calendar | |
parent | 6b2a55be48922c9fe5c94d654a4d463f23a428f2 (diff) | |
download | gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar.gz gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar.bz2 gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar.lz gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar.xz gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.tar.zst gsoc2013-evolution-8962868ff902e58456c545478e62796029d1fe5c.zip |
Relax the EBinding API to reduce GObject casting.
Also make it more fault-tolerant by warning about non-existent
property names instead of just crashing.
Diffstat (limited to 'modules/calendar')
-rw-r--r-- | modules/calendar/e-cal-shell-content.c | 4 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-settings.c | 36 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-sidebar.c | 8 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view-private.c | 4 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-content.c | 8 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-view-actions.c | 8 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-content.c | 8 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view-actions.c | 8 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view-private.c | 4 |
9 files changed, 44 insertions, 44 deletions
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c index e199f0524d..8821a7fe07 100644 --- a/modules/calendar/e-cal-shell-content.c +++ b/modules/calendar/e-cal-shell-content.c @@ -386,8 +386,8 @@ cal_shell_content_constructed (GObject *object) } e_binding_new ( - G_OBJECT (priv->calendar), "view", - G_OBJECT (priv->notebook), "page"); + priv->calendar, "view", + priv->notebook, "page"); container = priv->vpaned; diff --git a/modules/calendar/e-cal-shell-settings.c b/modules/calendar/e-cal-shell-settings.c index 4e6939c892..3852de0a52 100644 --- a/modules/calendar/e-cal-shell-settings.c +++ b/modules/calendar/e-cal-shell-settings.c @@ -607,8 +607,8 @@ e_cal_shell_backend_init_settings (EShell *shell) G_PARAM_READWRITE)); e_mutual_binding_new_full ( - G_OBJECT (shell_settings), "cal-timezone-string", - G_OBJECT (shell_settings), "cal-timezone", + shell_settings, "cal-timezone-string", + shell_settings, "cal-timezone", transform_string_to_icaltimezone, transform_icaltimezone_to_string, (GDestroyNotify) g_object_unref, @@ -625,8 +625,8 @@ e_cal_shell_backend_init_settings (EShell *shell) G_PARAM_READWRITE)); e_mutual_binding_new_full ( - G_OBJECT (shell_settings), "cal-week-start-day-gconf", - G_OBJECT (shell_settings), "cal-week-start-day", + shell_settings, "cal-week-start-day-gconf", + shell_settings, "cal-week-start-day", transform_weekdays_gconf_to_evolution, transform_weekdays_evolution_to_gconf, (GDestroyNotify) NULL, NULL); @@ -643,8 +643,8 @@ e_cal_shell_backend_init_settings (EShell *shell) G_PARAM_READWRITE)); e_mutual_binding_new_full ( - G_OBJECT (shell_settings), "cal-working-days-bitset", - G_OBJECT (shell_settings), "cal-working-days-sunday", + shell_settings, "cal-working-days-bitset", + shell_settings, "cal-working-days-sunday", transform_working_days_bitset_to_sunday, transform_working_days_sunday_to_bitset, (GDestroyNotify) NULL, shell_settings); @@ -658,8 +658,8 @@ e_cal_shell_backend_init_settings (EShell *shell) G_PARAM_READWRITE)); e_mutual_binding_new_full ( - G_OBJECT (shell_settings), "cal-working-days-bitset", - G_OBJECT (shell_settings), "cal-working-days-monday", + shell_settings, "cal-working-days-bitset", + shell_settings, "cal-working-days-monday", transform_working_days_bitset_to_monday, transform_working_days_monday_to_bitset, (GDestroyNotify) NULL, shell_settings); @@ -673,8 +673,8 @@ e_cal_shell_backend_init_settings (EShell *shell) G_PARAM_READWRITE)); e_mutual_binding_new_full ( - G_OBJECT (shell_settings), "cal-working-days-bitset", - G_OBJECT (shell_settings), "cal-working-days-tuesday", + shell_settings, "cal-working-days-bitset", + shell_settings, "cal-working-days-tuesday", transform_working_days_bitset_to_tuesday, transform_working_days_tuesday_to_bitset, (GDestroyNotify) NULL, shell_settings); @@ -688,8 +688,8 @@ e_cal_shell_backend_init_settings (EShell *shell) G_PARAM_READWRITE)); e_mutual_binding_new_full ( - G_OBJECT (shell_settings), "cal-working-days-bitset", - G_OBJECT (shell_settings), "cal-working-days-wednesday", + shell_settings, "cal-working-days-bitset", + shell_settings, "cal-working-days-wednesday", transform_working_days_bitset_to_wednesday, transform_working_days_wednesday_to_bitset, (GDestroyNotify) NULL, shell_settings); @@ -703,8 +703,8 @@ e_cal_shell_backend_init_settings (EShell *shell) G_PARAM_READWRITE)); e_mutual_binding_new_full ( - G_OBJECT (shell_settings), "cal-working-days-bitset", - G_OBJECT (shell_settings), "cal-working-days-thursday", + shell_settings, "cal-working-days-bitset", + shell_settings, "cal-working-days-thursday", transform_working_days_bitset_to_thursday, transform_working_days_thursday_to_bitset, (GDestroyNotify) NULL, shell_settings); @@ -718,8 +718,8 @@ e_cal_shell_backend_init_settings (EShell *shell) G_PARAM_READWRITE)); e_mutual_binding_new_full ( - G_OBJECT (shell_settings), "cal-working-days-bitset", - G_OBJECT (shell_settings), "cal-working-days-friday", + shell_settings, "cal-working-days-bitset", + shell_settings, "cal-working-days-friday", transform_working_days_bitset_to_friday, transform_working_days_friday_to_bitset, (GDestroyNotify) NULL, shell_settings); @@ -733,8 +733,8 @@ e_cal_shell_backend_init_settings (EShell *shell) G_PARAM_READWRITE)); e_mutual_binding_new_full ( - G_OBJECT (shell_settings), "cal-working-days-bitset", - G_OBJECT (shell_settings), "cal-working-days-saturday", + shell_settings, "cal-working-days-bitset", + shell_settings, "cal-working-days-saturday", transform_working_days_bitset_to_saturday, transform_working_days_saturday_to_bitset, (GDestroyNotify) g_object_unref, diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index 05b3a47d72..cb09c93ef1 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -440,12 +440,12 @@ cal_shell_sidebar_constructed (GObject *object) gtk_widget_show (widget); e_binding_new ( - G_OBJECT (shell_settings), "cal-show-week-numbers", - G_OBJECT (calitem), "show-week-numbers"); + shell_settings, "cal-show-week-numbers", + calitem, "show-week-numbers"); e_binding_new ( - G_OBJECT (shell_settings), "cal-week-start-day", - G_OBJECT (calitem), "week-start-day"); + shell_settings, "cal-week-start-day", + calitem, "week-start-day"); /* Restore the selector state from the last session. */ diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c index 1b9c8d367a..3fe59945f5 100644 --- a/modules/calendar/e-cal-shell-view-private.c +++ b/modules/calendar/e-cal-shell-view-private.c @@ -539,8 +539,8 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view) /* Keep the toolbar view buttons in sync with the calendar. */ e_mutual_binding_new ( - G_OBJECT (calendar), "view", - G_OBJECT (ACTION (CALENDAR_VIEW_DAY)), "current-value"); + calendar, "view", + ACTION (CALENDAR_VIEW_DAY), "current-value"); } void diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index 2f4e436056..027beec1cd 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -426,8 +426,8 @@ memo_shell_content_constructed (GObject *object) gtk_widget_show (widget); e_binding_new ( - G_OBJECT (object), "orientation", - G_OBJECT (widget), "orientation"); + object, "orientation", + widget, "orientation"); container = widget; @@ -446,8 +446,8 @@ memo_shell_content_constructed (GObject *object) gtk_widget_show (widget); e_binding_new ( - G_OBJECT (object), "preview-visible", - G_OBJECT (widget), "visible"); + object, "preview-visible", + widget, "visible"); container = widget; diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c index 8604d8e2c5..991c99b5d1 100644 --- a/modules/calendar/e-memo-shell-view-actions.c +++ b/modules/calendar/e-memo-shell-view-actions.c @@ -935,12 +935,12 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view) G_CALLBACK (action_search_execute_cb), memo_shell_view); e_binding_new ( - G_OBJECT (ACTION (MEMO_PREVIEW)), "active", - G_OBJECT (ACTION (MEMO_VIEW_CLASSIC)), "sensitive"); + ACTION (MEMO_PREVIEW), "active", + ACTION (MEMO_VIEW_CLASSIC), "sensitive"); e_binding_new ( - G_OBJECT (ACTION (MEMO_PREVIEW)), "active", - G_OBJECT (ACTION (MEMO_VIEW_VERTICAL)), "sensitive"); + ACTION (MEMO_PREVIEW), "active", + ACTION (MEMO_VIEW_VERTICAL), "sensitive"); } void diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index a095003978..f78f142d60 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -424,8 +424,8 @@ task_shell_content_constructed (GObject *object) gtk_widget_show (widget); e_binding_new ( - G_OBJECT (object), "orientation", - G_OBJECT (widget), "orientation"); + object, "orientation", + widget, "orientation"); container = widget; @@ -444,8 +444,8 @@ task_shell_content_constructed (GObject *object) gtk_widget_show (widget); e_binding_new ( - G_OBJECT (object), "preview-visible", - G_OBJECT (widget), "visible"); + object, "preview-visible", + widget, "visible"); container = widget; diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c index b08f9656c9..7b70ec1902 100644 --- a/modules/calendar/e-task-shell-view-actions.c +++ b/modules/calendar/e-task-shell-view-actions.c @@ -1135,12 +1135,12 @@ e_task_shell_view_actions_init (ETaskShellView *task_shell_view) G_CALLBACK (action_search_execute_cb), task_shell_view); e_binding_new ( - G_OBJECT (ACTION (TASK_PREVIEW)), "active", - G_OBJECT (ACTION (TASK_VIEW_CLASSIC)), "sensitive"); + ACTION (TASK_PREVIEW), "active", + ACTION (TASK_VIEW_CLASSIC), "sensitive"); e_binding_new ( - G_OBJECT (ACTION (TASK_PREVIEW)), "active", - G_OBJECT (ACTION (TASK_VIEW_VERTICAL)), "sensitive"); + ACTION (TASK_PREVIEW), "active", + ACTION (TASK_VIEW_VERTICAL), "sensitive"); } void diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c index a0ca5ee978..3b49ddbc5b 100644 --- a/modules/calendar/e-task-shell-view-private.c +++ b/modules/calendar/e-task-shell-view-private.c @@ -333,8 +333,8 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) /* Listen for configuration changes. */ e_mutual_binding_new ( - G_OBJECT (shell_settings), "cal-confirm-purge", - G_OBJECT (task_shell_view), "confirm-purge"); + shell_settings, "cal-confirm-purge", + task_shell_view, "confirm-purge"); /* Hide Completed Tasks (enable/units/value) */ g_signal_connect_swapped ( |