aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'modules/calendar')
-rw-r--r--modules/calendar/e-cal-config-calendar-item.c11
-rw-r--r--modules/calendar/e-cal-config-date-edit.c11
-rw-r--r--modules/calendar/e-cal-config-meeting-store.c11
-rw-r--r--modules/calendar/e-cal-config-meeting-time-selector.c16
-rw-r--r--modules/calendar/e-cal-config-model.c26
-rw-r--r--modules/calendar/e-cal-config-view.c61
-rw-r--r--modules/calendar/e-cal-shell-content.c6
-rw-r--r--modules/calendar/e-cal-shell-settings.c252
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c11
-rw-r--r--modules/calendar/e-cal-shell-view-private.c11
-rw-r--r--modules/calendar/e-cal-shell-view-private.h1
-rw-r--r--modules/calendar/e-memo-shell-content.c11
-rw-r--r--modules/calendar/e-memo-shell-view-actions.c10
-rw-r--r--modules/calendar/e-memo-shell-view-private.c5
-rw-r--r--modules/calendar/e-memo-shell-view-private.h1
-rw-r--r--modules/calendar/e-task-shell-content.c11
-rw-r--r--modules/calendar/e-task-shell-view-actions.c10
-rw-r--r--modules/calendar/e-task-shell-view-private.c11
-rw-r--r--modules/calendar/e-task-shell-view-private.h1
19 files changed, 278 insertions, 199 deletions
diff --git a/modules/calendar/e-cal-config-calendar-item.c b/modules/calendar/e-cal-config-calendar-item.c
index 5c585f94ca..45d1797714 100644
--- a/modules/calendar/e-cal-config-calendar-item.c
+++ b/modules/calendar/e-cal-config-calendar-item.c
@@ -19,7 +19,6 @@
#include "e-cal-config-calendar-item.h"
#include <shell/e-shell.h>
-#include <e-util/e-binding.h>
#include <e-util/e-extension.h>
#include <misc/e-calendar-item.h>
@@ -37,13 +36,15 @@ cal_config_calendar_item_constructed (GObject *object)
shell = e_shell_get_default ();
shell_settings = e_shell_get_shell_settings (shell);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-show-week-numbers",
- extensible, "show-week-numbers");
+ extensible, "show-week-numbers",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-week-start-day",
- extensible, "week-start-day");
+ extensible, "week-start-day",
+ G_BINDING_SYNC_CREATE);
}
static void
diff --git a/modules/calendar/e-cal-config-date-edit.c b/modules/calendar/e-cal-config-date-edit.c
index 667e749dff..594dee7f94 100644
--- a/modules/calendar/e-cal-config-date-edit.c
+++ b/modules/calendar/e-cal-config-date-edit.c
@@ -19,7 +19,6 @@
#include "e-cal-config-date-edit.h"
#include <shell/e-shell.h>
-#include <e-util/e-binding.h>
#include <e-util/e-extension.h>
#include <misc/e-dateedit.h>
@@ -37,13 +36,15 @@ cal_config_date_edit_constructed (GObject *object)
shell = e_shell_get_default ();
shell_settings = e_shell_get_shell_settings (shell);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-show-week-numbers",
- extensible, "show-week-numbers");
+ extensible, "show-week-numbers",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-week-start-day",
- extensible, "week-start-day");
+ extensible, "week-start-day",
+ G_BINDING_SYNC_CREATE);
}
static void
diff --git a/modules/calendar/e-cal-config-meeting-store.c b/modules/calendar/e-cal-config-meeting-store.c
index 7169ac4029..72f103bbec 100644
--- a/modules/calendar/e-cal-config-meeting-store.c
+++ b/modules/calendar/e-cal-config-meeting-store.c
@@ -19,7 +19,6 @@
#include "e-cal-config-meeting-store.h"
#include <shell/e-shell.h>
-#include <e-util/e-binding.h>
#include <e-util/e-extension.h>
#include <calendar/gui/e-meeting-store.h>
@@ -37,13 +36,15 @@ cal_config_meeting_store_constructed (GObject *object)
shell = e_shell_get_default ();
shell_settings = e_shell_get_shell_settings (shell);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-free-busy-template",
- extensible, "free-busy-template");
+ extensible, "free-busy-template",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-timezone",
- extensible, "timezone");
+ extensible, "timezone",
+ G_BINDING_SYNC_CREATE);
}
static void
diff --git a/modules/calendar/e-cal-config-meeting-time-selector.c b/modules/calendar/e-cal-config-meeting-time-selector.c
index 1c45d3b9ef..c4ae93e0ae 100644
--- a/modules/calendar/e-cal-config-meeting-time-selector.c
+++ b/modules/calendar/e-cal-config-meeting-time-selector.c
@@ -19,7 +19,6 @@
#include "e-cal-config-meeting-time-selector.h"
#include <shell/e-shell.h>
-#include <e-util/e-binding.h>
#include <e-util/e-extension.h>
#include <calendar/gui/e-meeting-time-sel.h>
@@ -37,17 +36,20 @@ cal_config_meeting_time_selector_constructed (GObject *object)
shell = e_shell_get_default ();
shell_settings = e_shell_get_shell_settings (shell);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-show-week-numbers",
- extensible, "show-week-numbers");
+ extensible, "show-week-numbers",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-use-24-hour-format",
- extensible, "use-24-hour-format");
+ extensible, "use-24-hour-format",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-week-start-day",
- extensible, "week-start-day");
+ extensible, "week-start-day",
+ G_BINDING_SYNC_CREATE);
}
static void
diff --git a/modules/calendar/e-cal-config-model.c b/modules/calendar/e-cal-config-model.c
index d176d509e9..62ff9b57b6 100644
--- a/modules/calendar/e-cal-config-model.c
+++ b/modules/calendar/e-cal-config-model.c
@@ -19,7 +19,6 @@
#include "e-cal-config-model.h"
#include <shell/e-shell.h>
-#include <e-util/e-binding.h>
#include <e-util/e-extension.h>
#include <calendar/gui/e-cal-model.h>
#include <calendar/gui/e-cal-model-tasks.h>
@@ -40,29 +39,34 @@ cal_config_model_constructed (GObject *object)
/*** ECalModel ***/
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-timezone",
- extensible, "timezone");
+ extensible, "timezone",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-use-24-hour-format",
- extensible, "use-24-hour-format");
+ extensible, "use-24-hour-format",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-week-start-day",
- extensible, "week-start-day");
+ extensible, "week-start-day",
+ G_BINDING_SYNC_CREATE);
/*** ECalModelTasks ***/
if (E_IS_CAL_MODEL_TASKS (extensible)) {
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-tasks-color-due-today",
- extensible, "color-due-today");
+ extensible, "color-due-today",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-tasks-color-overdue",
- extensible, "color-overdue");
+ extensible, "color-overdue",
+ G_BINDING_SYNC_CREATE);
}
}
diff --git a/modules/calendar/e-cal-config-view.c b/modules/calendar/e-cal-config-view.c
index e543bf6c56..c1630223eb 100644
--- a/modules/calendar/e-cal-config-view.c
+++ b/modules/calendar/e-cal-config-view.c
@@ -19,7 +19,6 @@
#include "e-cal-config-view.h"
#include <shell/e-shell.h>
-#include <e-util/e-binding.h>
#include <e-util/e-extension.h>
#include <calendar/gui/e-day-view.h>
#include <calendar/gui/e-week-view.h>
@@ -42,58 +41,70 @@ cal_config_view_constructed (GObject *object)
if (E_IS_DAY_VIEW (extensible)) {
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-show-week-numbers",
- E_DAY_VIEW (extensible)->week_number_label, "visible");
+ E_DAY_VIEW (extensible)->week_number_label, "visible",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-marcus-bains-show-line",
- extensible, "marcus-bains-show-line");
+ extensible, "marcus-bains-show-line",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-marcus-bains-day-view-color",
- extensible, "marcus-bains-day-view-color");
+ extensible, "marcus-bains-day-view-color",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-marcus-bains-time-bar-color",
- extensible, "marcus-bains-time-bar-color");
+ extensible, "marcus-bains-time-bar-color",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-time-divisions",
- extensible, "mins-per-row");
+ extensible, "mins-per-row",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-work-day-end-hour",
- extensible, "work-day-end-hour");
+ extensible, "work-day-end-hour",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-work-day-end-minute",
- extensible, "work-day-end-minute");
+ extensible, "work-day-end-minute",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-work-day-start-hour",
- extensible, "work-day-start-hour");
+ extensible, "work-day-start-hour",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-work-day-start-minute",
- extensible, "work-day-start-minute");
+ extensible, "work-day-start-minute",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-working-days-bitset",
- extensible, "working-days");
+ extensible, "working-days",
+ G_BINDING_SYNC_CREATE);
}
/*** EWeekView ***/
if (E_IS_WEEK_VIEW (extensible)) {
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-compress-weekend",
- extensible, "compress-weekend");
+ extensible, "compress-weekend",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-show-event-end-times",
- extensible, "show-event-end-times");
+ extensible, "show-event-end-times",
+ G_BINDING_SYNC_CREATE);
}
}
diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c
index 737c387a6f..e7a082bc05 100644
--- a/modules/calendar/e-cal-shell-content.c
+++ b/modules/calendar/e-cal-shell-content.c
@@ -24,7 +24,6 @@
#include <string.h>
#include <glib/gi18n.h>
-#include "e-util/e-binding.h"
#include "e-util/gconf-bridge.h"
#include "widgets/menus/gal-view-etable.h"
#include "widgets/misc/e-paned.h"
@@ -413,9 +412,10 @@ cal_shell_content_constructed (GObject *object)
gtk_widget_show (GTK_WIDGET (calendar_view));
}
- e_binding_new (
+ g_object_bind_property (
priv->calendar, "view",
- priv->notebook, "page");
+ priv->notebook, "page",
+ G_BINDING_SYNC_CREATE);
container = priv->vpaned;
diff --git a/modules/calendar/e-cal-shell-settings.c b/modules/calendar/e-cal-shell-settings.c
index 4613f280bb..0ab35ebfee 100644
--- a/modules/calendar/e-cal-shell-settings.c
+++ b/modules/calendar/e-cal-shell-settings.c
@@ -24,11 +24,10 @@
#include <gconf/gconf-client.h>
#include <libecal/e-cal-util.h>
-#include "e-util/e-binding.h"
-
static gboolean
-transform_string_to_icaltimezone (const GValue *src_value,
- GValue *dst_value,
+transform_string_to_icaltimezone (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
EShellSettings *shell_settings;
@@ -44,7 +43,7 @@ transform_string_to_icaltimezone (const GValue *src_value,
if (use_system_timezone)
timezone = e_cal_util_get_system_timezone ();
else
- location = g_value_get_string (src_value);
+ location = g_value_get_string (source_value);
if (location != NULL && *location != '\0')
timezone = icaltimezone_get_builtin_timezone (location);
@@ -52,20 +51,21 @@ transform_string_to_icaltimezone (const GValue *src_value,
if (timezone == NULL)
timezone = icaltimezone_get_utc_timezone ();
- g_value_set_pointer (dst_value, timezone);
+ g_value_set_pointer (target_value, timezone);
return TRUE;
}
static gboolean
-transform_icaltimezone_to_string (const GValue *src_value,
- GValue *dst_value,
+transform_icaltimezone_to_string (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
const gchar *location = NULL;
icaltimezone *timezone;
- timezone = g_value_get_pointer (src_value);
+ timezone = g_value_get_pointer (source_value);
if (timezone != NULL)
location = icaltimezone_get_location (timezone);
@@ -73,14 +73,15 @@ transform_icaltimezone_to_string (const GValue *src_value,
if (location == NULL)
location = "UTC";
- g_value_set_string (dst_value, location);
+ g_value_set_string (target_value, location);
return TRUE;
}
static gboolean
-transform_weekdays_gconf_to_evolution (const GValue *src_value,
- GValue *dst_value,
+transform_weekdays_gconf_to_evolution (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
GDateWeekday weekday;
@@ -94,7 +95,7 @@ transform_weekdays_gconf_to_evolution (const GValue *src_value,
/* This is purposefully verbose for better readability. */
/* GConf numbering */
- switch (g_value_get_int (src_value)) {
+ switch (g_value_get_int (source_value)) {
case 0:
weekday = G_DATE_SUNDAY;
break;
@@ -123,25 +124,25 @@ transform_weekdays_gconf_to_evolution (const GValue *src_value,
/* Evolution numbering */
switch (weekday) {
case G_DATE_MONDAY:
- g_value_set_int (dst_value, 0);
+ g_value_set_int (target_value, 0);
break;
case G_DATE_TUESDAY:
- g_value_set_int (dst_value, 1);
+ g_value_set_int (target_value, 1);
break;
case G_DATE_WEDNESDAY:
- g_value_set_int (dst_value, 2);
+ g_value_set_int (target_value, 2);
break;
case G_DATE_THURSDAY:
- g_value_set_int (dst_value, 3);
+ g_value_set_int (target_value, 3);
break;
case G_DATE_FRIDAY:
- g_value_set_int (dst_value, 4);
+ g_value_set_int (target_value, 4);
break;
case G_DATE_SATURDAY:
- g_value_set_int (dst_value, 5);
+ g_value_set_int (target_value, 5);
break;
case G_DATE_SUNDAY:
- g_value_set_int (dst_value, 6);
+ g_value_set_int (target_value, 6);
break;
default:
return FALSE;
@@ -151,8 +152,9 @@ transform_weekdays_gconf_to_evolution (const GValue *src_value,
}
static gboolean
-transform_weekdays_evolution_to_gconf (const GValue *src_value,
- GValue *dst_value,
+transform_weekdays_evolution_to_gconf (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
GDateWeekday weekday;
@@ -166,7 +168,7 @@ transform_weekdays_evolution_to_gconf (const GValue *src_value,
/* This is purposefully verbose for better readability. */
/* GConf numbering */
- switch (g_value_get_int (src_value)) {
+ switch (g_value_get_int (source_value)) {
case 0:
weekday = G_DATE_MONDAY;
break;
@@ -195,25 +197,25 @@ transform_weekdays_evolution_to_gconf (const GValue *src_value,
/* Evolution numbering */
switch (weekday) {
case G_DATE_MONDAY:
- g_value_set_int (dst_value, 1);
+ g_value_set_int (target_value, 1);
break;
case G_DATE_TUESDAY:
- g_value_set_int (dst_value, 2);
+ g_value_set_int (target_value, 2);
break;
case G_DATE_WEDNESDAY:
- g_value_set_int (dst_value, 3);
+ g_value_set_int (target_value, 3);
break;
case G_DATE_THURSDAY:
- g_value_set_int (dst_value, 4);
+ g_value_set_int (target_value, 4);
break;
case G_DATE_FRIDAY:
- g_value_set_int (dst_value, 5);
+ g_value_set_int (target_value, 5);
break;
case G_DATE_SATURDAY:
- g_value_set_int (dst_value, 6);
+ g_value_set_int (target_value, 6);
break;
case G_DATE_SUNDAY:
- g_value_set_int (dst_value, 0);
+ g_value_set_int (target_value, 0);
break;
default:
return FALSE;
@@ -234,23 +236,25 @@ enum {
};
static gboolean
-transform_working_days_bitset_to_sunday (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_bitset_to_sunday (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
gint bitset;
gboolean working_day;
- bitset = g_value_get_int (src_value);
+ bitset = g_value_get_int (source_value);
working_day = ((bitset & WORKING_DAY_SUNDAY) != 0);
- g_value_set_boolean (dst_value, working_day);
+ g_value_set_boolean (target_value, working_day);
return TRUE;
}
static gboolean
-transform_working_days_sunday_to_bitset (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_sunday_to_bitset (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
EShellSettings *shell_settings;
@@ -261,30 +265,32 @@ transform_working_days_sunday_to_bitset (const GValue *src_value,
bitset = e_shell_settings_get_int (
shell_settings, "cal-working-days-bitset");
- bit = g_value_get_boolean (src_value) ? WORKING_DAY_SUNDAY : 0;
- g_value_set_int (dst_value, (bitset & ~WORKING_DAY_SUNDAY) | bit);
+ bit = g_value_get_boolean (source_value) ? WORKING_DAY_SUNDAY : 0;
+ g_value_set_int (target_value, (bitset & ~WORKING_DAY_SUNDAY) | bit);
return TRUE;
}
static gboolean
-transform_working_days_bitset_to_monday (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_bitset_to_monday (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
gint bitset;
gboolean working_day;
- bitset = g_value_get_int (src_value);
+ bitset = g_value_get_int (source_value);
working_day = ((bitset & WORKING_DAY_MONDAY) != 0);
- g_value_set_boolean (dst_value, working_day);
+ g_value_set_boolean (target_value, working_day);
return TRUE;
}
static gboolean
-transform_working_days_monday_to_bitset (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_monday_to_bitset (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
EShellSettings *shell_settings;
@@ -295,30 +301,32 @@ transform_working_days_monday_to_bitset (const GValue *src_value,
bitset = e_shell_settings_get_int (
shell_settings, "cal-working-days-bitset");
- bit = g_value_get_boolean (src_value) ? WORKING_DAY_MONDAY : 0;
- g_value_set_int (dst_value, (bitset & ~WORKING_DAY_MONDAY) | bit);
+ bit = g_value_get_boolean (source_value) ? WORKING_DAY_MONDAY : 0;
+ g_value_set_int (target_value, (bitset & ~WORKING_DAY_MONDAY) | bit);
return TRUE;
}
static gboolean
-transform_working_days_bitset_to_tuesday (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_bitset_to_tuesday (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
gint bitset;
gboolean working_day;
- bitset = g_value_get_int (src_value);
+ bitset = g_value_get_int (source_value);
working_day = ((bitset & WORKING_DAY_TUESDAY) != 0);
- g_value_set_boolean (dst_value, working_day);
+ g_value_set_boolean (target_value, working_day);
return TRUE;
}
static gboolean
-transform_working_days_tuesday_to_bitset (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_tuesday_to_bitset (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
EShellSettings *shell_settings;
@@ -329,30 +337,32 @@ transform_working_days_tuesday_to_bitset (const GValue *src_value,
bitset = e_shell_settings_get_int (
shell_settings, "cal-working-days-bitset");
- bit = g_value_get_boolean (src_value) ? WORKING_DAY_TUESDAY : 0;
- g_value_set_int (dst_value, (bitset & ~WORKING_DAY_TUESDAY) | bit);
+ bit = g_value_get_boolean (source_value) ? WORKING_DAY_TUESDAY : 0;
+ g_value_set_int (target_value, (bitset & ~WORKING_DAY_TUESDAY) | bit);
return TRUE;
}
static gboolean
-transform_working_days_bitset_to_wednesday (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_bitset_to_wednesday (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
gint bitset;
gboolean working_day;
- bitset = g_value_get_int (src_value);
+ bitset = g_value_get_int (source_value);
working_day = ((bitset & WORKING_DAY_WEDNESDAY) != 0);
- g_value_set_boolean (dst_value, working_day);
+ g_value_set_boolean (target_value, working_day);
return TRUE;
}
static gboolean
-transform_working_days_wednesday_to_bitset (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_wednesday_to_bitset (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
EShellSettings *shell_settings;
@@ -363,30 +373,32 @@ transform_working_days_wednesday_to_bitset (const GValue *src_value,
bitset = e_shell_settings_get_int (
shell_settings, "cal-working-days-bitset");
- bit = g_value_get_boolean (src_value) ? WORKING_DAY_WEDNESDAY : 0;
- g_value_set_int (dst_value, (bitset & ~WORKING_DAY_WEDNESDAY) | bit);
+ bit = g_value_get_boolean (source_value) ? WORKING_DAY_WEDNESDAY : 0;
+ g_value_set_int (target_value, (bitset & ~WORKING_DAY_WEDNESDAY) | bit);
return TRUE;
}
static gboolean
-transform_working_days_bitset_to_thursday (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_bitset_to_thursday (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
gint bitset;
gboolean working_day;
- bitset = g_value_get_int (src_value);
+ bitset = g_value_get_int (source_value);
working_day = ((bitset & WORKING_DAY_THURSDAY) != 0);
- g_value_set_boolean (dst_value, working_day);
+ g_value_set_boolean (target_value, working_day);
return TRUE;
}
static gboolean
-transform_working_days_thursday_to_bitset (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_thursday_to_bitset (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
EShellSettings *shell_settings;
@@ -397,30 +409,32 @@ transform_working_days_thursday_to_bitset (const GValue *src_value,
bitset = e_shell_settings_get_int (
shell_settings, "cal-working-days-bitset");
- bit = g_value_get_boolean (src_value) ? WORKING_DAY_THURSDAY : 0;
- g_value_set_int (dst_value, (bitset & ~WORKING_DAY_THURSDAY) | bit);
+ bit = g_value_get_boolean (source_value) ? WORKING_DAY_THURSDAY : 0;
+ g_value_set_int (target_value, (bitset & ~WORKING_DAY_THURSDAY) | bit);
return TRUE;
}
static gboolean
-transform_working_days_bitset_to_friday (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_bitset_to_friday (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
gint bitset;
gboolean working_day;
- bitset = g_value_get_int (src_value);
+ bitset = g_value_get_int (source_value);
working_day = ((bitset & WORKING_DAY_FRIDAY) != 0);
- g_value_set_boolean (dst_value, working_day);
+ g_value_set_boolean (target_value, working_day);
return TRUE;
}
static gboolean
-transform_working_days_friday_to_bitset (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_friday_to_bitset (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
EShellSettings *shell_settings;
@@ -431,30 +445,32 @@ transform_working_days_friday_to_bitset (const GValue *src_value,
bitset = e_shell_settings_get_int (
shell_settings, "cal-working-days-bitset");
- bit = g_value_get_boolean (src_value) ? WORKING_DAY_FRIDAY : 0;
- g_value_set_int (dst_value, (bitset & ~WORKING_DAY_FRIDAY) | bit);
+ bit = g_value_get_boolean (source_value) ? WORKING_DAY_FRIDAY : 0;
+ g_value_set_int (target_value, (bitset & ~WORKING_DAY_FRIDAY) | bit);
return TRUE;
}
static gboolean
-transform_working_days_bitset_to_saturday (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_bitset_to_saturday (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
gint bitset;
gboolean working_day;
- bitset = g_value_get_int (src_value);
+ bitset = g_value_get_int (source_value);
working_day = ((bitset & WORKING_DAY_SATURDAY) != 0);
- g_value_set_boolean (dst_value, working_day);
+ g_value_set_boolean (target_value, working_day);
return TRUE;
}
static gboolean
-transform_working_days_saturday_to_bitset (const GValue *src_value,
- GValue *dst_value,
+transform_working_days_saturday_to_bitset (GBinding *binding,
+ const GValue *source_value,
+ GValue *target_value,
gpointer user_data)
{
EShellSettings *shell_settings;
@@ -465,8 +481,8 @@ transform_working_days_saturday_to_bitset (const GValue *src_value,
bitset = e_shell_settings_get_int (
shell_settings, "cal-working-days-bitset");
- bit = g_value_get_boolean (src_value) ? WORKING_DAY_SATURDAY : 0;
- g_value_set_int (dst_value, (bitset & ~WORKING_DAY_SATURDAY) | bit);
+ bit = g_value_get_boolean (source_value) ? WORKING_DAY_SATURDAY : 0;
+ g_value_set_int (target_value, (bitset & ~WORKING_DAY_SATURDAY) | bit);
return TRUE;
}
@@ -602,13 +618,15 @@ e_cal_shell_backend_init_settings (EShell *shell)
NULL,
G_PARAM_READWRITE));
- e_mutual_binding_new_full (
+ g_object_bind_property_full (
shell_settings, "cal-timezone-string",
shell_settings, "cal-timezone",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE,
transform_string_to_icaltimezone,
transform_icaltimezone_to_string,
- (GDestroyNotify) g_object_unref,
- g_object_ref (shell_settings));
+ g_object_ref (shell_settings),
+ (GDestroyNotify) g_object_unref);
e_shell_settings_install_property (
g_param_spec_int (
@@ -620,12 +638,14 @@ e_cal_shell_backend_init_settings (EShell *shell)
0,
G_PARAM_READWRITE));
- e_mutual_binding_new_full (
+ g_object_bind_property_full (
shell_settings, "cal-week-start-day-gconf",
shell_settings, "cal-week-start-day",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE,
transform_weekdays_gconf_to_evolution,
transform_weekdays_evolution_to_gconf,
- (GDestroyNotify) NULL, NULL);
+ NULL, (GDestroyNotify) NULL);
/* XXX These are my favorite. Storing a bit array in GConf
* instead of separate boolean keys. Brilliant move. */
@@ -638,12 +658,15 @@ e_cal_shell_backend_init_settings (EShell *shell)
FALSE,
G_PARAM_READWRITE));
- e_mutual_binding_new_full (
+ g_object_bind_property_full (
shell_settings, "cal-working-days-bitset",
shell_settings, "cal-working-days-sunday",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE,
transform_working_days_bitset_to_sunday,
transform_working_days_sunday_to_bitset,
- (GDestroyNotify) NULL, shell_settings);
+ g_object_ref (shell_settings),
+ (GDestroyNotify) g_object_unref);
e_shell_settings_install_property (
g_param_spec_boolean (
@@ -653,12 +676,15 @@ e_cal_shell_backend_init_settings (EShell *shell)
TRUE,
G_PARAM_READWRITE));
- e_mutual_binding_new_full (
+ g_object_bind_property_full (
shell_settings, "cal-working-days-bitset",
shell_settings, "cal-working-days-monday",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE,
transform_working_days_bitset_to_monday,
transform_working_days_monday_to_bitset,
- (GDestroyNotify) NULL, shell_settings);
+ g_object_ref (shell_settings),
+ (GDestroyNotify) g_object_unref);
e_shell_settings_install_property (
g_param_spec_boolean (
@@ -668,12 +694,15 @@ e_cal_shell_backend_init_settings (EShell *shell)
TRUE,
G_PARAM_READWRITE));
- e_mutual_binding_new_full (
+ g_object_bind_property_full (
shell_settings, "cal-working-days-bitset",
shell_settings, "cal-working-days-tuesday",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE,
transform_working_days_bitset_to_tuesday,
transform_working_days_tuesday_to_bitset,
- (GDestroyNotify) NULL, shell_settings);
+ g_object_ref (shell_settings),
+ (GDestroyNotify) g_object_unref);
e_shell_settings_install_property (
g_param_spec_boolean (
@@ -683,12 +712,15 @@ e_cal_shell_backend_init_settings (EShell *shell)
TRUE,
G_PARAM_READWRITE));
- e_mutual_binding_new_full (
+ g_object_bind_property_full (
shell_settings, "cal-working-days-bitset",
shell_settings, "cal-working-days-wednesday",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE,
transform_working_days_bitset_to_wednesday,
transform_working_days_wednesday_to_bitset,
- (GDestroyNotify) NULL, shell_settings);
+ g_object_ref (shell_settings),
+ (GDestroyNotify) g_object_unref);
e_shell_settings_install_property (
g_param_spec_boolean (
@@ -698,12 +730,15 @@ e_cal_shell_backend_init_settings (EShell *shell)
TRUE,
G_PARAM_READWRITE));
- e_mutual_binding_new_full (
+ g_object_bind_property_full (
shell_settings, "cal-working-days-bitset",
shell_settings, "cal-working-days-thursday",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE,
transform_working_days_bitset_to_thursday,
transform_working_days_thursday_to_bitset,
- (GDestroyNotify) NULL, shell_settings);
+ g_object_ref (shell_settings),
+ (GDestroyNotify) g_object_unref);
e_shell_settings_install_property (
g_param_spec_boolean (
@@ -713,12 +748,15 @@ e_cal_shell_backend_init_settings (EShell *shell)
TRUE,
G_PARAM_READWRITE));
- e_mutual_binding_new_full (
+ g_object_bind_property_full (
shell_settings, "cal-working-days-bitset",
shell_settings, "cal-working-days-friday",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE,
transform_working_days_bitset_to_friday,
transform_working_days_friday_to_bitset,
- (GDestroyNotify) NULL, shell_settings);
+ g_object_ref (shell_settings),
+ (GDestroyNotify) g_object_unref);
e_shell_settings_install_property (
g_param_spec_boolean (
@@ -728,11 +766,13 @@ e_cal_shell_backend_init_settings (EShell *shell)
FALSE,
G_PARAM_READWRITE));
- e_mutual_binding_new_full (
+ g_object_bind_property_full (
shell_settings, "cal-working-days-bitset",
shell_settings, "cal-working-days-saturday",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE,
transform_working_days_bitset_to_saturday,
transform_working_days_saturday_to_bitset,
- (GDestroyNotify) g_object_unref,
- g_object_ref (shell_settings));
+ g_object_ref (shell_settings),
+ (GDestroyNotify) g_object_unref);
}
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index 61f2f639c9..965cc9fa60 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -25,7 +25,6 @@
#include <glib/gi18n.h>
#include "e-util/e-alert-dialog.h"
-#include "e-util/e-binding.h"
#include "e-util/gconf-bridge.h"
#include "widgets/misc/e-paned.h"
@@ -703,13 +702,15 @@ cal_shell_sidebar_constructed (GObject *object)
priv->date_navigator = g_object_ref (widget);
gtk_widget_show (widget);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-show-week-numbers",
- calitem, "show-week-numbers");
+ calitem, "show-week-numbers",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_settings, "cal-week-start-day",
- calitem, "week-start-day");
+ calitem, "week-start-day",
+ G_BINDING_SYNC_CREATE);
/* Restore widget state from the last session once
* the shell view is fully initialized and visible. */
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index c5a9f22f03..29c7d1e528 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -669,14 +669,17 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view)
e_cal_shell_view_update_timezone (cal_shell_view);
/* Keep the ECalModel in sync with the sidebar. */
- e_binding_new (
+ g_object_bind_property (
shell_sidebar, "default-client",
- model, "default-client");
+ model, "default-client",
+ G_BINDING_SYNC_CREATE);
/* Keep the toolbar view buttons in sync with the calendar. */
- e_mutual_binding_new (
+ g_object_bind_property (
calendar, "view",
- ACTION (CALENDAR_VIEW_DAY), "current-value");
+ ACTION (CALENDAR_VIEW_DAY), "current-value",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
/* Force the main calendar to update its default source. */
g_signal_emit_by_name (selector, "primary-selection-changed");
diff --git a/modules/calendar/e-cal-shell-view-private.h b/modules/calendar/e-cal-shell-view-private.h
index 71a191f332..d6f37ba7bf 100644
--- a/modules/calendar/e-cal-shell-view-private.h
+++ b/modules/calendar/e-cal-shell-view-private.h
@@ -32,7 +32,6 @@
#include <libedataserver/e-data-server-util.h>
#include <libedataserver/e-sexp.h>
-#include "e-util/e-binding.h"
#include "e-util/e-selection.h"
#include "e-util/e-dialog-utils.h"
#include "e-util/e-file-utils.h"
diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c
index cc17964f48..476460761c 100644
--- a/modules/calendar/e-memo-shell-content.c
+++ b/modules/calendar/e-memo-shell-content.c
@@ -23,7 +23,6 @@
#include <glib/gi18n.h>
-#include "e-util/e-binding.h"
#include "e-util/e-selection.h"
#include "e-util/gconf-bridge.h"
#include "shell/e-shell-utils.h"
@@ -457,7 +456,10 @@ memo_shell_content_constructed (GObject *object)
priv->paned = g_object_ref (widget);
gtk_widget_show (widget);
- e_binding_new (object, "orientation", widget, "orientation");
+ g_object_bind_property (
+ object, "orientation",
+ widget, "orientation",
+ G_BINDING_SYNC_CREATE);
container = priv->paned;
@@ -495,7 +497,10 @@ memo_shell_content_constructed (GObject *object)
priv->preview_pane = g_object_ref (widget);
gtk_widget_show (widget);
- e_binding_new (object, "preview-visible", widget, "visible");
+ g_object_bind_property (
+ object, "preview-visible",
+ widget, "visible",
+ G_BINDING_SYNC_CREATE);
/* Configure the memo table. */
diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c
index 2ed1f9c4ce..a30d0f1b1f 100644
--- a/modules/calendar/e-memo-shell-view-actions.c
+++ b/modules/calendar/e-memo-shell-view-actions.c
@@ -920,13 +920,15 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view)
ACTION (GAL_SAVE_CUSTOM_VIEW), "activate",
G_CALLBACK (action_gal_save_custom_view_cb), memo_shell_view);
- e_binding_new (
+ g_object_bind_property (
ACTION (MEMO_PREVIEW), "active",
- ACTION (MEMO_VIEW_CLASSIC), "sensitive");
+ ACTION (MEMO_VIEW_CLASSIC), "sensitive",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
ACTION (MEMO_PREVIEW), "active",
- ACTION (MEMO_VIEW_VERTICAL), "sensitive");
+ ACTION (MEMO_VIEW_VERTICAL), "sensitive",
+ G_BINDING_SYNC_CREATE);
e_web_view_set_open_proxy (web_view, ACTION (MEMO_OPEN));
e_web_view_set_print_proxy (web_view, ACTION (MEMO_PRINT));
diff --git a/modules/calendar/e-memo-shell-view-private.c b/modules/calendar/e-memo-shell-view-private.c
index a33296daf5..8c83619564 100644
--- a/modules/calendar/e-memo-shell-view-private.c
+++ b/modules/calendar/e-memo-shell-view-private.c
@@ -274,9 +274,10 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view)
memo_shell_view);
/* Keep the ECalModel in sync with the sidebar. */
- e_binding_new (
+ g_object_bind_property (
shell_sidebar, "default-client",
- model, "default-client");
+ model, "default-client",
+ G_BINDING_SYNC_CREATE);
e_memo_shell_view_actions_init (memo_shell_view);
e_memo_shell_view_update_sidebar (memo_shell_view);
diff --git a/modules/calendar/e-memo-shell-view-private.h b/modules/calendar/e-memo-shell-view-private.h
index 06db399036..0b8867a5b3 100644
--- a/modules/calendar/e-memo-shell-view-private.h
+++ b/modules/calendar/e-memo-shell-view-private.h
@@ -29,7 +29,6 @@
#include <libedataserver/e-categories.h>
#include <libedataserver/e-sexp.h>
-#include "e-util/e-binding.h"
#include "e-util/e-dialog-utils.h"
#include "e-util/e-file-utils.h"
#include "e-util/e-util.h"
diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c
index 6b3f23eeb0..f0af66fa93 100644
--- a/modules/calendar/e-task-shell-content.c
+++ b/modules/calendar/e-task-shell-content.c
@@ -23,7 +23,6 @@
#include <glib/gi18n.h>
-#include "e-util/e-binding.h"
#include "e-util/e-selection.h"
#include "e-util/gconf-bridge.h"
#include "shell/e-shell-utils.h"
@@ -452,7 +451,10 @@ task_shell_content_constructed (GObject *object)
priv->paned = g_object_ref (widget);
gtk_widget_show (widget);
- e_binding_new (object, "orientation", widget, "orientation");
+ g_object_bind_property (
+ object, "orientation",
+ widget, "orientation",
+ G_BINDING_SYNC_CREATE);
container = priv->paned;
@@ -490,7 +492,10 @@ task_shell_content_constructed (GObject *object)
priv->preview_pane = g_object_ref (widget);
gtk_widget_show (widget);
- e_binding_new (object, "preview-visible", widget, "visible");
+ g_object_bind_property (
+ object, "preview-visible",
+ widget, "visible",
+ G_BINDING_SYNC_CREATE);
/* Configure the task table. */
diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c
index 66cf26a696..b792c829bc 100644
--- a/modules/calendar/e-task-shell-view-actions.c
+++ b/modules/calendar/e-task-shell-view-actions.c
@@ -1119,13 +1119,15 @@ e_task_shell_view_actions_init (ETaskShellView *task_shell_view)
ACTION (GAL_SAVE_CUSTOM_VIEW), "activate",
G_CALLBACK (action_gal_save_custom_view_cb), task_shell_view);
- e_binding_new (
+ g_object_bind_property (
ACTION (TASK_PREVIEW), "active",
- ACTION (TASK_VIEW_CLASSIC), "sensitive");
+ ACTION (TASK_VIEW_CLASSIC), "sensitive",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
ACTION (TASK_PREVIEW), "active",
- ACTION (TASK_VIEW_VERTICAL), "sensitive");
+ ACTION (TASK_VIEW_VERTICAL), "sensitive",
+ G_BINDING_SYNC_CREATE);
e_web_view_set_open_proxy (web_view, ACTION (TASK_OPEN));
e_web_view_set_print_proxy (web_view, ACTION (TASK_PRINT));
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c
index 5e1b352ecd..f0e8cbff2f 100644
--- a/modules/calendar/e-task-shell-view-private.c
+++ b/modules/calendar/e-task-shell-view-private.c
@@ -326,14 +326,17 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view)
task_shell_view);
/* Listen for configuration changes. */
- e_mutual_binding_new (
+ g_object_bind_property (
shell_settings, "cal-confirm-purge",
- task_shell_view, "confirm-purge");
+ task_shell_view, "confirm-purge",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
/* Keep the ECalModel in sync with the sidebar. */
- e_binding_new (
+ g_object_bind_property (
shell_sidebar, "default-client",
- model, "default-client");
+ model, "default-client",
+ G_BINDING_SYNC_CREATE);
/* Hide Completed Tasks (enable/units/value) */
g_signal_connect_object (
diff --git a/modules/calendar/e-task-shell-view-private.h b/modules/calendar/e-task-shell-view-private.h
index 5b0231e108..b95c0d5e5b 100644
--- a/modules/calendar/e-task-shell-view-private.h
+++ b/modules/calendar/e-task-shell-view-private.h
@@ -30,7 +30,6 @@
#include <libedataserver/e-categories.h>
#include <libedataserver/e-sexp.h>
-#include "e-util/e-binding.h"
#include "e-util/e-dialog-utils.h"
#include "e-util/e-file-utils.h"
#include "e-util/e-util.h"