From 8f2b4f9c6554698af19a39223acc33f965e2dfca Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 30 Apr 2009 16:56:58 +0200 Subject: Bug #570730 - Get rid of gnome-config in Evolution --- calendar/conduits/calendar/calendar-conduit.c | 27 ++-- .../conduits/common/libecalendar-common-conduit.c | 166 +++++++++++++++++++++ .../conduits/common/libecalendar-common-conduit.h | 6 + calendar/conduits/memo/memo-conduit.c | 28 +--- calendar/conduits/todo/todo-conduit.c | 28 +--- 5 files changed, 197 insertions(+), 58 deletions(-) (limited to 'calendar') diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index f936e33fe7..e7e5f57506 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -28,7 +28,6 @@ #define G_LOG_DOMAIN "ecalconduit" #include -#include #include #include #include @@ -134,8 +133,7 @@ calconduit_load_configuration (guint32 pilot_id) g_object_unref (management); /* Custom settings */ - g_snprintf (prefix, 255, "/gnome-pilot.d/e-calendar-conduit/Pilot_%u/", pilot_id); - gnome_config_push_prefix (prefix); + g_snprintf (prefix, 255, "e-calendar-conduit/Pilot_%u", pilot_id); if (!e_cal_get_sources (&c->source_list, E_CAL_SOURCE_TYPE_EVENT, NULL)) c->source_list = NULL; @@ -150,9 +148,9 @@ calconduit_load_configuration (guint32 pilot_id) c->source_list = NULL; } } - c->secret = gnome_config_get_bool ("secret=FALSE"); - c->multi_day_split = gnome_config_get_bool ("multi_day_split=TRUE"); - if ((c->last_uri = gnome_config_get_string ("last_uri")) && !strncmp (c->last_uri, "file://", 7)) { + c->secret = e_pilot_setup_get_bool (prefix, "secret", FALSE); + c->multi_day_split = e_pilot_setup_get_bool (prefix, "multi_day_split", TRUE); + if ((c->last_uri = e_pilot_setup_get_string (prefix, "last_uri", NULL)) && !strncmp (c->last_uri, "file://", 7)) { char *filename = g_filename_from_uri (c->last_uri, NULL, NULL); const char *path = filename; const char *home; @@ -178,8 +176,6 @@ calconduit_load_configuration (guint32 pilot_id) g_free (filename); } - gnome_config_pop_prefix (); - return c; } @@ -188,18 +184,13 @@ calconduit_save_configuration (ECalConduitCfg *c) { gchar prefix[256]; - g_snprintf (prefix, 255, "/gnome-pilot.d/e-calendar-conduit/Pilot_%u/", c->pilot_id); - gnome_config_push_prefix (prefix); + g_snprintf (prefix, 255, "e-calendar-conduit/Pilot_%u", c->pilot_id); e_pilot_set_sync_source (c->source_list, c->source); - gnome_config_set_bool ("secret", c->secret); - gnome_config_set_bool ("multi_day_split", c->multi_day_split); - gnome_config_set_string ("last_uri", c->last_uri); - - gnome_config_pop_prefix (); - - gnome_config_sync (); - gnome_config_drop_all (); + + e_pilot_setup_set_bool (prefix, "secret", c->secret); + e_pilot_setup_set_bool (prefix, "multi_day_split", c->multi_day_split); + e_pilot_setup_set_string (prefix, "last_uri", c->last_uri ? c->last_uri : ""); } static ECalConduitCfg* diff --git a/calendar/conduits/common/libecalendar-common-conduit.c b/calendar/conduits/common/libecalendar-common-conduit.c index 1b7013bb0a..fbbe0278b1 100644 --- a/calendar/conduits/common/libecalendar-common-conduit.c +++ b/calendar/conduits/common/libecalendar-common-conduit.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "libecalendar-common-conduit.h" @@ -204,3 +205,168 @@ void e_pilot_remote_category_to_local(int pilotCategory, ECalComponent *comp, st e_cal_component_free_categories_list(c_list); } } + +static char * +build_setup_path (const char *path, const char *key) +{ + return g_strconcat ("/apps/evolution/conduit", "/", path, "/", key, NULL); +} + +gboolean +e_pilot_setup_get_bool (const char *path, const char *key, gboolean def) +{ + gboolean res = def; + char *full_path; + GConfValue *value; + GConfClient *gconf; + + g_return_val_if_fail (path != NULL, res); + g_return_val_if_fail (key != NULL, res); + + gconf = gconf_client_get_default (); + full_path = build_setup_path (path, key); + + value = gconf_client_get (gconf, full_path, NULL); + if (value) { + if (value->type == GCONF_VALUE_BOOL) + res = gconf_value_get_bool (value); + + gconf_value_free (value); + } + + g_free (full_path); + g_object_unref (gconf); + + return res; +} + +void +e_pilot_setup_set_bool (const char *path, const char *key, gboolean value) +{ + GError *error = NULL; + char *full_path; + GConfClient *gconf; + + g_return_if_fail (path != NULL); + g_return_if_fail (key != NULL); + + gconf = gconf_client_get_default (); + full_path = build_setup_path (path, key); + + gconf_client_set_bool (gconf, full_path, value, &error); + + g_free (full_path); + g_object_unref (gconf); + + if (error) { + g_message ("%s: Failed to write: %s", G_STRFUNC, error->message); + g_error_free (error); + } +} + +int +e_pilot_setup_get_int (const char *path, const char *key, int def) +{ + int res = def; + char *full_path; + GConfValue *value; + GConfClient *gconf; + + g_return_val_if_fail (path != NULL, res); + g_return_val_if_fail (key != NULL, res); + + gconf = gconf_client_get_default (); + full_path = build_setup_path (path, key); + + value = gconf_client_get (gconf, full_path, NULL); + if (value) { + if (value->type == GCONF_VALUE_INT) + res = gconf_value_get_int (value); + + gconf_value_free (value); + } + + g_free (full_path); + g_object_unref (gconf); + + return res; +} + +void +e_pilot_setup_set_int (const char *path, const char *key, int value) +{ + GError *error = NULL; + char *full_path; + GConfClient *gconf; + + g_return_if_fail (path != NULL); + g_return_if_fail (key != NULL); + + gconf = gconf_client_get_default (); + full_path = build_setup_path (path, key); + + gconf_client_set_int (gconf, full_path, value, &error); + + g_free (full_path); + g_object_unref (gconf); + + if (error) { + g_message ("%s: Failed to write: %s", G_STRFUNC, error->message); + g_error_free (error); + } +} + +char * +e_pilot_setup_get_string (const char *path, const char *key, const char *def) +{ + char *res = g_strdup (def); + char *full_path; + GConfValue *value; + GConfClient *gconf; + + g_return_val_if_fail (path != NULL, res); + g_return_val_if_fail (key != NULL, res); + + gconf = gconf_client_get_default (); + full_path = build_setup_path (path, key); + + value = gconf_client_get (gconf, full_path, NULL); + if (value) { + if (value->type == GCONF_VALUE_STRING) { + g_free (res); + res = g_strdup (gconf_value_get_string (value)); + } + + gconf_value_free (value); + } + + g_free (full_path); + g_object_unref (gconf); + + return res; +} + +void +e_pilot_setup_set_string (const char *path, const char *key, const char *value) +{ + GError *error = NULL; + char *full_path; + GConfClient *gconf; + + g_return_if_fail (path != NULL); + g_return_if_fail (key != NULL); + g_return_if_fail (value != NULL); + + gconf = gconf_client_get_default (); + full_path = build_setup_path (path, key); + + gconf_client_set_string (gconf, full_path, value, &error); + + g_free (full_path); + g_object_unref (gconf); + + if (error) { + g_message ("%s: Failed to write: %s", G_STRFUNC, error->message); + g_error_free (error); + } +} diff --git a/calendar/conduits/common/libecalendar-common-conduit.h b/calendar/conduits/common/libecalendar-common-conduit.h index e168e001eb..0641ec3e88 100644 --- a/calendar/conduits/common/libecalendar-common-conduit.h +++ b/calendar/conduits/common/libecalendar-common-conduit.h @@ -29,3 +29,9 @@ int e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *c void e_pilot_local_category_to_remote(int * pilotCategory, ECalComponent *comp, struct CategoryAppInfo *category); void e_pilot_remote_category_to_local(int pilotCategory, ECalComponent *comp, struct CategoryAppInfo *category); +gboolean e_pilot_setup_get_bool (const char *path, const char *key, gboolean def); +void e_pilot_setup_set_bool (const char *path, const char *key, gboolean value); +int e_pilot_setup_get_int (const char *path, const char *key, int def); +void e_pilot_setup_set_int (const char *path, const char *key, int value); +char *e_pilot_setup_get_string (const char *path, const char *key, const char *def); +void e_pilot_setup_set_string (const char *path, const char *key, const char *value); diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index ecaa07fa48..4d599a6924 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -30,7 +30,6 @@ #define G_LOG_DOMAIN "ememoconduit" #include -#include #include #include #include @@ -120,8 +119,7 @@ memoconduit_load_configuration (guint32 pilot_id) gchar prefix[256]; - g_snprintf (prefix, 255, "/gnome-pilot.d/e-memo-conduit/Pilot_%u/", - pilot_id); + g_snprintf (prefix, 255, "e-memo-conduit/Pilot_%u", pilot_id); c = g_new0 (EMemoConduitCfg,1); g_assert (c != NULL); @@ -138,8 +136,6 @@ memoconduit_load_configuration (guint32 pilot_id) g_object_unref (management); /* Custom settings */ - gnome_config_push_prefix (prefix); - if (!e_cal_get_sources (&c->source_list, E_CAL_SOURCE_TYPE_JOURNAL, NULL)) c->source_list = NULL; if (c->source_list) { @@ -154,11 +150,9 @@ memoconduit_load_configuration (guint32 pilot_id) } } - c->secret = gnome_config_get_bool ("secret=FALSE"); - c->priority = gnome_config_get_int ("priority=3"); - c->last_uri = gnome_config_get_string ("last_uri"); - - gnome_config_pop_prefix (); + c->secret = e_pilot_setup_get_bool (prefix, "secret", FALSE); + c->priority = e_pilot_setup_get_int (prefix, "priority", 3); + c->last_uri = e_pilot_setup_get_string (prefix, "last_uri", NULL); return c; } @@ -168,18 +162,12 @@ memoconduit_save_configuration (EMemoConduitCfg *c) { gchar prefix[256]; - g_snprintf (prefix, 255, "/gnome-pilot.d/e-memo-conduit/Pilot_%u/", - c->pilot_id); + g_snprintf (prefix, 255, "e-memo-conduit/Pilot_%u", c->pilot_id); - gnome_config_push_prefix (prefix); e_pilot_set_sync_source (c->source_list, c->source); - gnome_config_set_bool ("secret", c->secret); - gnome_config_set_int ("priority", c->priority); - gnome_config_set_string ("last_uri", c->last_uri); - gnome_config_pop_prefix (); - - gnome_config_sync (); - gnome_config_drop_all (); + e_pilot_setup_set_bool (prefix, "secret", c->secret); + e_pilot_setup_set_int (prefix, "priority", c->priority); + e_pilot_setup_set_string (prefix, "last_uri", c->last_uri ? c->last_uri : ""); } static EMemoConduitCfg* diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 620e9ec6f0..f40bc82eab 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -30,7 +30,6 @@ #define G_LOG_DOMAIN "etodoconduit" #include -#include #include #include #include @@ -122,8 +121,7 @@ todoconduit_load_configuration (guint32 pilot_id) gchar prefix[256]; - g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/", - pilot_id); + g_snprintf (prefix, 255, "e-todo-conduit/Pilot_%u", pilot_id); c = g_new0 (EToDoConduitCfg,1); g_assert (c != NULL); @@ -140,8 +138,6 @@ todoconduit_load_configuration (guint32 pilot_id) g_object_unref (management); /* Custom settings */ - gnome_config_push_prefix (prefix); - if (!e_cal_get_sources (&c->source_list, E_CAL_SOURCE_TYPE_TODO, NULL)) c->source_list = NULL; if (c->source_list) { @@ -156,11 +152,9 @@ todoconduit_load_configuration (guint32 pilot_id) } } - c->secret = gnome_config_get_bool ("secret=FALSE"); - c->priority = gnome_config_get_int ("priority=3"); - c->last_uri = gnome_config_get_string ("last_uri"); - - gnome_config_pop_prefix (); + c->secret = e_pilot_setup_get_bool (prefix, "secret", FALSE); + c->priority = e_pilot_setup_get_int (prefix, "priority", 3); + c->last_uri = e_pilot_setup_get_string (prefix, "last_uri", NULL); return c; } @@ -170,18 +164,12 @@ todoconduit_save_configuration (EToDoConduitCfg *c) { gchar prefix[256]; - g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/", - c->pilot_id); + g_snprintf (prefix, 255, "e-todo-conduit/Pilot_%u", c->pilot_id); - gnome_config_push_prefix (prefix); e_pilot_set_sync_source (c->source_list, c->source); - gnome_config_set_bool ("secret", c->secret); - gnome_config_set_int ("priority", c->priority); - gnome_config_set_string ("last_uri", c->last_uri); - gnome_config_pop_prefix (); - - gnome_config_sync (); - gnome_config_drop_all (); + e_pilot_setup_set_bool (prefix, "secret", c->secret); + e_pilot_setup_set_int (prefix, "priority", c->priority); + e_pilot_setup_set_string (prefix, "last_uri", c->last_uri ? c->last_uri : ""); } static EToDoConduitCfg* -- cgit v1.2.3 From 7961048944d446f523a9ed12c811d7c2e8a47e97 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 30 Apr 2009 20:51:39 +0200 Subject: Bug #273818 - Allow scrolling Month View by a week only Edit->Preferences->Calendar and Tasks, tab Display, option Scroll Month View by a week. --- calendar/gui/apps_evolution_calendar.schemas.in | 12 +++++++ calendar/gui/calendar-config-keys.h | 2 +- calendar/gui/calendar-config.c | 29 +++++++++++++++ calendar/gui/calendar-config.h | 5 +++ calendar/gui/dialogs/cal-prefs-dialog.c | 11 ++++++ calendar/gui/dialogs/cal-prefs-dialog.glade | 19 ++++++++++ calendar/gui/dialogs/cal-prefs-dialog.h | 1 + calendar/gui/e-week-view.c | 48 ++++++++++++++++++++++--- calendar/gui/e-week-view.h | 4 +++ calendar/gui/gnome-cal.c | 2 +- 10 files changed, 127 insertions(+), 6 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/apps_evolution_calendar.schemas.in b/calendar/gui/apps_evolution_calendar.schemas.in index acf9550874..48c5100ad8 100644 --- a/calendar/gui/apps_evolution_calendar.schemas.in +++ b/calendar/gui/apps_evolution_calendar.schemas.in @@ -538,6 +538,18 @@ + + /schemas/apps/evolution/calendar/display/month_scroll_by_week + /apps/evolution/calendar/display/month_scroll_by_week + evolution-calendar + bool + false + + Scroll Month View by a week + Whether to scroll a Month View by a week, not by a month. + + + diff --git a/calendar/gui/calendar-config-keys.h b/calendar/gui/calendar-config-keys.h index 691b4f0281..6277f46d31 100644 --- a/calendar/gui/calendar-config-keys.h +++ b/calendar/gui/calendar-config-keys.h @@ -46,7 +46,7 @@ G_BEGIN_DECLS #define CALENDAR_CONFIG_DAY_END_HOUR CALENDAR_CONFIG_PREFIX "/display/day_end_hour" #define CALENDAR_CONFIG_DAY_END_MINUTE CALENDAR_CONFIG_PREFIX "/display/day_end_minute" #define CALENDAR_CONFIG_TIME_DIVISIONS CALENDAR_CONFIG_PREFIX "/display/time_divisions" -#define CALENDAR_CONFIG_TIME_DIVISIONS CALENDAR_CONFIG_PREFIX "/display/time_divisions" +#define CALENDAR_CONFIG_MONTH_SCROLL_BY_WEEK CALENDAR_CONFIG_PREFIX "/display/month_scroll_by_week" #define CALENDAR_CONFIG_MARCUS_BAINS_LINE CALENDAR_CONFIG_PREFIX "/display/marcus_bains_line" #define CALENDAR_CONFIG_MARCUS_BAINS_COLOR_DAYVIEW CALENDAR_CONFIG_PREFIX "/display/marcus_bains_color_dayview" #define CALENDAR_CONFIG_MARCUS_BAINS_COLOR_TIMEBAR CALENDAR_CONFIG_PREFIX "/display/marcus_bains_color_timebar" diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 65864ea272..8af8230efd 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -587,6 +587,35 @@ calendar_config_add_notification_time_divisions (GConfClientNotifyFunc func, gpo return id; } +/* Scroll in a month view by a week, not by a month */ +gboolean +calendar_config_get_month_scroll_by_week (void) +{ + calendar_config_init (); + + return gconf_client_get_bool (config, CALENDAR_CONFIG_MONTH_SCROLL_BY_WEEK, NULL); +} + +void +calendar_config_set_month_scroll_by_week (gboolean value) +{ + calendar_config_init (); + + gconf_client_set_bool (config, CALENDAR_CONFIG_MONTH_SCROLL_BY_WEEK, value, NULL); +} + +guint +calendar_config_add_notification_month_scroll_by_week (GConfClientNotifyFunc func, gpointer data) +{ + guint id; + + calendar_config_init (); + + id = gconf_client_notify_add (config, CALENDAR_CONFIG_MONTH_SCROLL_BY_WEEK, func, data, NULL, NULL); + + return id; +} + /* Whether we show the Marcus Bains Line (current time), and in what colors. */ void calendar_config_get_marcus_bains (gboolean *show_line, const char **dayview_color, const char **timebar_color) diff --git a/calendar/gui/calendar-config.h b/calendar/gui/calendar-config.h index 667962e1db..c28077c1ec 100644 --- a/calendar/gui/calendar-config.h +++ b/calendar/gui/calendar-config.h @@ -276,4 +276,9 @@ guint calendar_config_add_notification_day_second_zone (GConfClientNotifyFunc gboolean calendar_config_get_ba_reminder (int *interval, CalUnits *units); void calendar_config_set_ba_reminder (gboolean *enabled, int *interval, CalUnits *units); +/* Scroll in a month view by a week, not by a month */ +gboolean calendar_config_get_month_scroll_by_week (void); +void calendar_config_set_month_scroll_by_week (gboolean value); +guint calendar_config_add_notification_month_scroll_by_week (GConfClientNotifyFunc func, gpointer data); + #endif /* _CALENDAR_CONFIG_H_ */ diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index 60678d93e1..0e1f0f05d1 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -324,6 +324,12 @@ dview_show_week_no_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs) calendar_config_set_dview_show_week_no (gtk_toggle_button_get_active (toggle)); } +static void +month_scroll_by_week_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs) +{ + calendar_config_set_month_scroll_by_week (gtk_toggle_button_get_active (toggle)); +} + static void hide_completed_tasks_toggled (GtkToggleButton *toggle, CalendarPrefsDialog *prefs) { @@ -528,6 +534,7 @@ setup_changes (CalendarPrefsDialog *prefs) g_signal_connect (G_OBJECT (prefs->compress_weekend), "toggled", G_CALLBACK (compress_weekend_toggled), prefs); g_signal_connect (G_OBJECT (prefs->dnav_show_week_no), "toggled", G_CALLBACK (dnav_show_week_no_toggled), prefs); g_signal_connect (G_OBJECT (prefs->dview_show_week_no), "toggled", G_CALLBACK (dview_show_week_no_toggled), prefs); + g_signal_connect (G_OBJECT (prefs->month_scroll_by_week), "toggled", G_CALLBACK (month_scroll_by_week_toggled), prefs); g_signal_connect (G_OBJECT (prefs->tasks_hide_completed), "toggled", G_CALLBACK (hide_completed_tasks_toggled), prefs); @@ -704,6 +711,9 @@ show_config (CalendarPrefsDialog *prefs) /* Day/Work Week view - Show Week Number. */ e_dialog_toggle_set (prefs->dview_show_week_no, calendar_config_get_dview_show_week_no ()); + /* Month View - Scroll by a week */ + e_dialog_toggle_set (prefs->month_scroll_by_week, calendar_config_get_month_scroll_by_week ()); + /* Task list */ show_task_list_config (prefs); @@ -817,6 +827,7 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs) prefs->compress_weekend = glade_xml_get_widget (gui, "compress_weekend"); prefs->dnav_show_week_no = glade_xml_get_widget (gui, "dnav_show_week_no"); prefs->dview_show_week_no = glade_xml_get_widget (gui, "dview_show_week_no"); + prefs->month_scroll_by_week = glade_xml_get_widget (gui, "month_scroll_by_week"); prefs->tasks_due_today_color = glade_xml_get_widget (gui, "tasks_due_today_color"); prefs->tasks_overdue_color = glade_xml_get_widget (gui, "tasks_overdue_color"); prefs->tasks_hide_completed = glade_xml_get_widget (gui, "tasks_hide_completed"); diff --git a/calendar/gui/dialogs/cal-prefs-dialog.glade b/calendar/gui/dialogs/cal-prefs-dialog.glade index 867abdbb22..a279ad1107 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.glade +++ b/calendar/gui/dialogs/cal-prefs-dialog.glade @@ -1368,6 +1368,25 @@ Days False + + + + True + True + Sc_roll Month View by a week + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + False + False + + 0 diff --git a/calendar/gui/dialogs/cal-prefs-dialog.h b/calendar/gui/dialogs/cal-prefs-dialog.h index 559eacced7..30b62440e5 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.h +++ b/calendar/gui/dialogs/cal-prefs-dialog.h @@ -67,6 +67,7 @@ struct _CalendarPrefsDialog { GtkWidget *compress_weekend; GtkWidget *dnav_show_week_no; GtkWidget *dview_show_week_no; + GtkWidget *month_scroll_by_week; GtkWidget *tasks_due_today_color; GtkWidget *tasks_overdue_color; GtkWidget *tasks_hide_completed; diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 3109094d30..3e5c42725f 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -504,6 +504,8 @@ e_week_view_init (EWeekView *week_view) week_view->spans = NULL; week_view->multi_week_view = FALSE; + week_view->month_scroll_by_week = FALSE; + week_view->scroll_by_week_notif_id = 0; week_view->update_base_date = TRUE; week_view->weeks_shown = 6; week_view->rows = 6; @@ -703,6 +705,11 @@ e_week_view_destroy (GtkObject *object) week_view->resize_width_cursor = NULL; } + if (week_view->scroll_by_week_notif_id) { + calendar_config_remove_notification (week_view->scroll_by_week_notif_id); + week_view->scroll_by_week_notif_id = 0; + } + GTK_OBJECT_CLASS (e_week_view_parent_class)->destroy (object); } @@ -1643,6 +1650,19 @@ e_week_view_recalc_day_starts (EWeekView *week_view, } } +static void +month_scrol_by_week_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data) +{ + EWeekView *week_view = user_data; + + g_return_if_fail (week_view != NULL); + g_return_if_fail (E_IS_WEEK_VIEW (week_view)); + + if (week_view->multi_week_view && week_view->month_scroll_by_week != calendar_config_get_month_scroll_by_week ()) { + week_view->multi_week_view = FALSE; + e_week_view_set_multi_week_view (week_view, TRUE); + } +} gboolean e_week_view_get_multi_week_view (EWeekView *week_view) @@ -1669,11 +1689,26 @@ e_week_view_set_multi_week_view (EWeekView *week_view, if (multi_week_view) { gtk_widget_show (week_view->titles_canvas); - page_increment = 4; - page_size = 5; + week_view->month_scroll_by_week = calendar_config_get_month_scroll_by_week (); + + if (!week_view->scroll_by_week_notif_id) + week_view->scroll_by_week_notif_id = calendar_config_add_notification_month_scroll_by_week (month_scrol_by_week_changed_cb, week_view); + + if (week_view->month_scroll_by_week) { + page_increment = 1; + page_size = 1; + } else { + page_increment = 4; + page_size = 5; + } } else { gtk_widget_hide (week_view->titles_canvas); page_increment = page_size = 1; + + if (week_view->scroll_by_week_notif_id) { + calendar_config_remove_notification (week_view->scroll_by_week_notif_id); + week_view->scroll_by_week_notif_id = 0; + } } adjustment = GTK_RANGE (week_view->vscrollbar)->adjustment; @@ -1731,8 +1766,13 @@ e_week_view_set_weeks_shown (EWeekView *week_view, week_view->weeks_shown = weeks_shown; if (week_view->multi_week_view) { - page_increment = 4; - page_size = 5; + if (week_view->month_scroll_by_week) { + page_increment = 1; + page_size = 1; + } else { + page_increment = 4; + page_size = 5; + } adjustment = GTK_RANGE (week_view->vscrollbar)->adjustment; adjustment->page_increment = page_increment; diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h index 132857c712..2458efcdd1 100644 --- a/calendar/gui/e-week-view.h +++ b/calendar/gui/e-week-view.h @@ -203,6 +203,10 @@ struct _EWeekView one week is shown, with a different layout. */ gboolean multi_week_view; + /* TRUE when requires scrolling by a week in a multi_week_view */ + gboolean month_scroll_by_week; + guint scroll_by_week_notif_id; + gboolean update_base_date; /* How many weeks we are showing. This is only relevant if diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index c2e4511ce6..87c61bb418 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -710,7 +710,7 @@ get_times_for_views (GnomeCalendar *gcal, GnomeCalendarViewType view_type, time_ /* FIXME We should be using the same day of the week enum every where */ display_start = (E_WEEK_VIEW (priv->views[view_type])->display_start_day + 1) % 7; - if (!priv->range_selected) + if (!priv->range_selected && (!E_WEEK_VIEW (priv->views[view_type])->multi_week_view || !E_WEEK_VIEW (priv->views[view_type])->month_scroll_by_week)) *start_time = time_month_begin_with_zone (*start_time, priv->zone); *start_time = time_week_begin_with_zone (*start_time, display_start, priv->zone); *end_time = time_add_week_with_zone (*start_time, shown, priv->zone); -- cgit v1.2.3 From c3191ec86b0f711af58a9a902b7464f8f958fe2c Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 30 Apr 2009 15:22:22 -0400 Subject: Bump the required GLib and GTK+ versions to latest stable. We now require GLib >= 2.20 and GTK+ >= 2.16. Also removed all GLIB_CHECK_VERSION and GTK_CHECK_VERSION workarounds for older versions. --- calendar/gui/alarm-notify/alarm-queue.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 6aefeecf9f..1ec93f8df1 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -55,10 +55,6 @@ #include "e-util/e-popup.h" #include "e-util/e-error.h" -#if !GTK_CHECK_VERSION(2,16,0) -#define gtk_status_icon_set_tooltip_text gtk_status_icon_set_tooltip -#endif - #define d(x) /* The dialog with alarm nofications */ -- cgit v1.2.3 From 6f97d9d4194df14e44680dac9a292b5254cb1c71 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 30 Apr 2009 15:40:36 -0400 Subject: =?UTF-8?q?Bug=20580898=20=E2=80=93=20Kill=20libgnomeui/gnome-winh?= =?UTF-8?q?ints?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include directive was already commented out. --- calendar/gui/alarm-notify/alarm-notify-dialog.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c index ee09c0dde4..7f54b6bf2d 100644 --- a/calendar/gui/alarm-notify/alarm-notify-dialog.c +++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c @@ -26,9 +26,6 @@ #include #include #include -#if 0 -# include -#endif #include #include #include -- cgit v1.2.3 From 1c198bd71100c3c0af0aa1d80bb0e1f51918c4f2 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 30 Apr 2009 16:28:36 -0400 Subject: =?UTF-8?q?Bug=20580896=20=E2=80=93=20Kill=20libgnome/gnome-progra?= =?UTF-8?q?m?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed e-util/e-gui-utils.[ch]. --- calendar/gui/e-meeting-time-sel.c | 1 - 1 file changed, 1 deletion(-) (limited to 'calendar') diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index 8466dc3014..a106a46d49 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -40,7 +40,6 @@ #include #include -#include #include #include -- cgit v1.2.3 From 71c5738707028d12a3129a94a1b3823a7fab573c Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 30 Apr 2009 23:30:00 -0400 Subject: Only #include specific libgnome[ui] headers; easier to track. Stop including top-level libgnome[ui] headers -- , and . Instead, include specific header files so we can track them easier. Also, remove several unshipped test programs. Mostly ETable stuff. --- calendar/gui/dialogs/calendar-setup.c | 1 - calendar/gui/e-calendar-table.c | 2 +- calendar/gui/e-comp-editor-registry.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index 724206a072..b182f9cc78 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include "calendar-setup.h" #include "../e-cal-config.h" diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 3f5e708e9d..ddf96d00f2 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -35,8 +35,8 @@ #include #include #include -#include #include +#include #include #include #include
diff --git a/calendar/gui/e-comp-editor-registry.c b/calendar/gui/e-comp-editor-registry.c index 9855d12462..31b46372b2 100644 --- a/calendar/gui/e-comp-editor-registry.c +++ b/calendar/gui/e-comp-editor-registry.c @@ -24,7 +24,6 @@ #include #endif -#include #include "e-comp-editor-registry.h" struct _ECompEditorRegistryPrivate { -- cgit v1.2.3 From d523f10dfe2a6ba53c068189f10055d46e71e10f Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 2 May 2009 11:09:30 -0400 Subject: Use Behdad's brilliant git.mk to generate .gitignore files. --- calendar/Makefile.am | 2 ++ calendar/common/Makefile.am | 2 ++ calendar/conduits/Makefile.am | 2 ++ calendar/conduits/calendar/Makefile.am | 2 ++ calendar/conduits/common/Makefile.am | 2 ++ calendar/conduits/memo/Makefile.am | 2 ++ calendar/conduits/todo/Makefile.am | 2 ++ calendar/gui/Makefile.am | 2 ++ calendar/gui/alarm-notify/Makefile.am | 2 ++ calendar/gui/dialogs/Makefile.am | 2 ++ calendar/idl/Makefile.am | 2 ++ calendar/importers/Makefile.am | 2 ++ 12 files changed, 24 insertions(+) (limited to 'calendar') diff --git a/calendar/Makefile.am b/calendar/Makefile.am index f9a54aff06..87057a4d3a 100644 --- a/calendar/Makefile.am +++ b/calendar/Makefile.am @@ -22,3 +22,5 @@ dist-hook: BUILT_SOURCES = $(error_DATA) CLEANFILES = $(BUILT_SOURCES) + +-include $(top_srcdir)/git.mk diff --git a/calendar/common/Makefile.am b/calendar/common/Makefile.am index ad0b1ca2cf..b8c5d181fb 100644 --- a/calendar/common/Makefile.am +++ b/calendar/common/Makefile.am @@ -13,3 +13,5 @@ INCLUDES = \ libevolution_calendarprivate_la_SOURCES = \ authentication.c \ authentication.h + +-include $(top_srcdir)/git.mk diff --git a/calendar/conduits/Makefile.am b/calendar/conduits/Makefile.am index a53bd426d5..430168130f 100644 --- a/calendar/conduits/Makefile.am +++ b/calendar/conduits/Makefile.am @@ -1,3 +1,5 @@ SUBDIRS = common calendar memo todo + +-include $(top_srcdir)/git.mk diff --git a/calendar/conduits/calendar/Makefile.am b/calendar/conduits/calendar/Makefile.am index cb431e9619..4a957633e7 100644 --- a/calendar/conduits/calendar/Makefile.am +++ b/calendar/conduits/calendar/Makefile.am @@ -39,3 +39,5 @@ EXTRA_DIST = \ dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) + +-include $(top_srcdir)/git.mk diff --git a/calendar/conduits/common/Makefile.am b/calendar/conduits/common/Makefile.am index 2db1df5fca..59e4b5aa1f 100644 --- a/calendar/conduits/common/Makefile.am +++ b/calendar/conduits/common/Makefile.am @@ -22,3 +22,5 @@ libecalendar_common_conduit_la_LIBADD = \ $(EVOLUTION_CALENDAR_CONDUIT_LIBS) + +-include $(top_srcdir)/git.mk diff --git a/calendar/conduits/memo/Makefile.am b/calendar/conduits/memo/Makefile.am index 791af9268f..01a04579f7 100644 --- a/calendar/conduits/memo/Makefile.am +++ b/calendar/conduits/memo/Makefile.am @@ -39,3 +39,5 @@ EXTRA_DIST = \ dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) + +-include $(top_srcdir)/git.mk diff --git a/calendar/conduits/todo/Makefile.am b/calendar/conduits/todo/Makefile.am index bf3a07b23f..5141393c91 100644 --- a/calendar/conduits/todo/Makefile.am +++ b/calendar/conduits/todo/Makefile.am @@ -39,3 +39,5 @@ EXTRA_DIST = \ dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) + +-include $(top_srcdir)/git.mk diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am index b5dab7aeac..509aff1596 100644 --- a/calendar/gui/Makefile.am +++ b/calendar/gui/Makefile.am @@ -280,3 +280,5 @@ endif dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) + +-include $(top_srcdir)/git.mk diff --git a/calendar/gui/alarm-notify/Makefile.am b/calendar/gui/alarm-notify/Makefile.am index cd1b638fb6..76c2783fc6 100644 --- a/calendar/gui/alarm-notify/Makefile.am +++ b/calendar/gui/alarm-notify/Makefile.am @@ -67,3 +67,5 @@ CLEANFILES = $(BUILT_SOURCES) dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) + +-include $(top_srcdir)/git.mk diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am index c6d61101a8..8e7a1bf916 100644 --- a/calendar/gui/dialogs/Makefile.am +++ b/calendar/gui/dialogs/Makefile.am @@ -102,3 +102,5 @@ dist-hook: EXTRA_DIST = \ $(glade_DATA) + +-include $(top_srcdir)/git.mk diff --git a/calendar/idl/Makefile.am b/calendar/idl/Makefile.am index dd866141fc..1d393a8f9d 100644 --- a/calendar/idl/Makefile.am +++ b/calendar/idl/Makefile.am @@ -3,3 +3,5 @@ idl_DATA = \ EXTRA_DIST = \ $(idl_DATA) + +-include $(top_srcdir)/git.mk diff --git a/calendar/importers/Makefile.am b/calendar/importers/Makefile.am index d45ad07e41..16a3fee232 100644 --- a/calendar/importers/Makefile.am +++ b/calendar/importers/Makefile.am @@ -18,3 +18,5 @@ libevolution_calendar_importers_la_LIBADD = \ $(top_builddir)/e-util/libeutil.la \ $(top_builddir)/calendar/common/libevolution-calendarprivate.la \ $(EVOLUTION_CALENDAR_LIBS) + +-include $(top_srcdir)/git.mk -- cgit v1.2.3 From b4d7c0892ef5b329476a6c3689585ca60ca2d8b0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 2 May 2009 23:11:12 -0400 Subject: =?UTF-8?q?Bug=20572977=20=E2=80=93=20Use=20g=5Fstrerror()=20inste?= =?UTF-8?q?ad=20of=20strerror()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- calendar/gui/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar') diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c index 80d58b67fd..0f012d5f12 100644 --- a/calendar/gui/migration.c +++ b/calendar/gui/migration.c @@ -689,7 +689,7 @@ migrate_pilot_data (const char *component, const char *conduit, const char *old_ n = fsync (fd1); if (n == -1) { - g_warning ("Failed to migrate %s: %s", dent, strerror (errno)); + g_warning ("Failed to migrate %s: %s", dent, g_strerror (errno)); g_unlink (filename); } -- cgit v1.2.3 From a8ee44b505bb9d8c7dad2dd567f15c689ba2a243 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 3 May 2009 09:10:09 -0400 Subject: =?UTF-8?q?Bug=20575122=20=E2=80=93=20"before=20every=20anniversar?= =?UTF-8?q?y/birthday"=20is=20missing=20translator=20comment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- calendar/gui/dialogs/cal-prefs-dialog.glade | 3186 +++++++++++---------------- 1 file changed, 1226 insertions(+), 1960 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/dialogs/cal-prefs-dialog.glade b/calendar/gui/dialogs/cal-prefs-dialog.glade index a279ad1107..87e69d74c5 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.glade +++ b/calendar/gui/dialogs/cal-prefs-dialog.glade @@ -1,1978 +1,1244 @@ - - - + - - - - True - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - True - True - True - GTK_POS_TOP - False - False - - - - 12 - True - False - 12 - - - - True - <span weight="bold">Time</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - 5 - 2 - False - 6 - 6 - - - - True - Se_cond zone: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - day_second_zone - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 4 - 5 - fill - - - - - - - True - False - 0 - - - - True - True - None - True - GTK_RELIEF_NORMAL - True - - - 0 - True - True - - - - - - True - (Shown in a Day View) - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 6 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 1 - 2 - 4 - 5 - fill - fill - - - - - - True - Time format: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 3 - 4 - fill - - - - - - - True - True - Adjust for daylight sa_ving time - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 1 - 2 - 1 - 2 - fill - - - - - - - True - False - 6 - - - - True - True - _12 hour (AM/PM) - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - _24 hour - True - GTK_RELIEF_NORMAL - True - False - False - True - use_12_hour - - - 0 - False - False - - - - - 1 - 2 - 3 - 4 - fill - fill - - - - - - True - True - Adjust for daylight sa_ving time - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 1 - 2 - 2 - 3 - fill - - - - - - - True - make_timezone_entry - 0 - 0 - Thu, 13 Jan 2005 04:18:03 GMT - - - - - - 1 - 2 - 1 - 2 - fill - - - - - - True - Time _zone: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - timezone - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - False - 0 - - - - True - True - Use s_ystem time zone - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - True - - - - - - True - (system/tz) - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 5 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 1 - 2 - 0 - 1 - fill - - - - - 0 - True - True - - - - - 0 - False - True - - - - - - True - <span weight="bold">Work Week</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - 4 - 2 - False - 6 - 6 - - - - True - Wee_k starts on: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - week_start_day - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - Work days: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - _Day begins: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - start_of_day - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - Day _ends: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - end_of_day - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 3 - 4 - fill - - - - - - - True - cal_prefs_dialog_create_time_edit - 0 - 0 - Thu, 13 Jan 2005 04:23:55 GMT - - - 1 - 2 - 2 - 3 - fill - - - - - - True - cal_prefs_dialog_create_time_edit - 0 - 0 - Thu, 13 Jan 2005 04:24:06 GMT - - - 1 - 2 - 3 - 4 - fill - fill - - - - - - True - False - 6 - - - - True - True - _Mon - True - GTK_RELIEF_NORMAL - True - False - False - True - - Monday - - - - 0 - False - False - - - - - - True - True - _Tue - True - GTK_RELIEF_NORMAL - True - False - False - True - - Tuesday - - - - 0 - False - False - - - - - - True - True - _Wed - True - GTK_RELIEF_NORMAL - True - False - False - True - - Wednesday - - - - 0 - False - False - - - - - - True - True - T_hu - True - GTK_RELIEF_NORMAL - True - False - False - True - - Thursday - - - - 0 - False - False - - - - - - True - True - _Fri - True - GTK_RELIEF_NORMAL - True - False - False - True - - Friday - - - - 0 - False - False - - - - - - True - True - _Sat - True - GTK_RELIEF_NORMAL - True - False - False - True - - Saturday - - - - 0 - False - False - - - - - - True - True - S_un - True - GTK_RELIEF_NORMAL - True - False - False - True - - Sunday - - - - 0 - False - False - - - - - 1 - 2 - 1 - 2 - fill - fill - - - - - - True - Monday + + + + True + window1 + + + True + True + + + True + 12 + 12 + + + True + 0 + <span weight="bold">Time</span> + True + + + False + False + 0 + + + + + True + 12 + + + True + + + False + False + 0 + + + + + True + 5 + 2 + 6 + 6 + + + True + 0 + Se_cond zone: + True + day_second_zone + + + 4 + 5 + GTK_FILL + + + + + + True + + + None + True + True + False + True + + + 0 + + + + + True + 6 + (Shown in a Day View) + + + False + False + 1 + + + + + 1 + 2 + 4 + 5 + GTK_FILL + GTK_FILL + + + + + True + 0 + Time format: + + + 3 + 4 + GTK_FILL + + + + + + Adjust for daylight sa_ving time + True + True + False + True + True + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + + True + 6 + + + _12 hour (AM/PM) + True + True + False + True + True + + + False + False + 0 + + + + + _24 hour + True + True + False + True + True + use_12_hour + + + False + False + 1 + + + + + 1 + 2 + 3 + 4 + GTK_FILL + GTK_FILL + + + + + Adjust for daylight sa_ving time + True + True + False + True + True + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + + True + make_timezone_entry + + + + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + 0 + Time _zone: + True + timezone + + + GTK_FILL + + + + + + True + + + Use s_ystem time zone + True + True + False + True + True + + + False + 0 + + + + + True + 5 + (system/tz) + + + False + False + 1 + + + + + 1 + 2 + GTK_FILL + + + + + + + + + + + 1 + + + + + False + 1 + + + + + True + 0 + <span weight="bold">Work Week</span> + True + + + False + False + 2 + + + + + True + 12 + + + True + + + False + False + 0 + + + + + True + 4 + 2 + 6 + 6 + + + True + 0 + Wee_k starts on: + True + week_start_day + + + GTK_FILL + + + + + + True + 0 + Work days: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + _Day begins: + True + start_of_day + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Day _ends: + True + end_of_day + + + 3 + 4 + GTK_FILL + + + + + + True + cal_prefs_dialog_create_time_edit + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + True + cal_prefs_dialog_create_time_edit + + + 1 + 2 + 3 + 4 + GTK_FILL + GTK_FILL + + + + + True + 6 + + + _Mon + True + True + False + True + True + + Monday + + + + False + False + 0 + + + + + _Tue + True + True + False + True + True + + Tuesday + + + + False + False + 1 + + + + + _Wed + True + True + False + True + True + + Wednesday + + + + False + False + 2 + + + + + T_hu + True + True + False + True + True + + Thursday + + + + False + False + 3 + + + + + _Fri + True + True + False + True + True + + Friday + + + + False + False + 4 + + + + + _Sat + True + True + False + True + True + + Saturday + + + + False + False + 5 + + + + + S_un + True + True + False + True + True + + Sunday + + + + False + False + 6 + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + Monday Tuesday Wednesday Thursday Friday Saturday Sunday - False - True - - - 1 - 2 - 0 - 1 - fill - fill - - - - - 0 - True - True - - - - - 0 - False - True - - - - - - True - <span weight="bold">Alerts</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 6 - - - - True - True - _Ask for confirmation when deleting items - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - False - 4 - - - - True - True - Sh_ow a reminder - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 0 9999 1 10 0 - - - 0 - True - True - - - - - - True - Minutes + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + 1 + + + + + False + 3 + + + + + True + 0 + <span weight="bold">Alerts</span> + True + + + False + False + 4 + + + + + True + 12 + + + True + + + False + False + 0 + + + + + True + 6 + + + _Ask for confirmation when deleting items + True + True + False + True + True + + + False + False + 0 + + + + + True + 4 + + + Sh_ow a reminder + True + True + False + True + True + + + False + False + 0 + + + + + True + True + 0 0 9999 1 10 0 + 1 + + + 1 + + + + + True + Minutes Hours Days - False - True - - - 0 - True - True - - - - - - True - before every appointment - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - - True - False - 4 - - - - True - True - Show a _reminder - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 0 0 9999 1 10 0 - - - 0 - True - True - - - - - - True - Minutes + + + 2 + + + + + True + before every appointment + + + False + False + 3 + + + + + 1 + + + + + True + 4 + + + Show a _reminder + True + True + False + True + True + + + False + False + 0 + + + + + True + True + 0 0 9999 1 10 0 + 1 + + + 1 + + + + + True + Minutes Hours Days - False - True - - - 0 - True - True - - - - - - True - before every anniversary/birthday - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - 0 - True - True - - - - - 0 - False - True - - - - - False - True - - - - - - True - General - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - 12 - True - False - 12 - - - - True - <span weight="bold">General</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 6 - - - - True - False - 6 - - - - True - _Time divisions: - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - time_divisions - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - 60 minutes + + + 2 + + + + + True + before every anniversary/birthday + + + False + False + 3 + + + + + 2 + + + + + 1 + + + + + False + 5 + + + + + + + True + General + + + False + tab + + + + + True + 12 + 12 + + + True + 0 + <span weight="bold">General</span> + True + + + False + False + 0 + + + + + True + 12 + + + True + + + False + False + 0 + + + + + True + 6 + + + True + 6 + + + True + _Time divisions: + True + time_divisions + + + False + False + 0 + + + + + True + 60 minutes 30 minutes 15 minutes 10 minutes 05 minutes - False - True - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - True - _Show appointment end times in week and month view - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - _Compress weekends in month view - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Show week _numbers in date navigator - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Show week n_umber in Day and Work Week View - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Sc_roll Month View by a week - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - 0 - True - True - - - - - 0 - False - True - - - - - - True - <span weight="bold">Task List</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 6 - - - - True - 2 - 2 - False - 6 - 6 - - - - True - T_asks due today: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - tasks_due_today_color - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - _Overdue tasks: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - tasks_overdue_color - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - True - False - Pick a color - True - - - 1 - 2 - 0 - 1 - - - - - - - - True - True - False - Pick a color - True - - - 1 - 2 - 1 - 2 - - - - - - - 0 - True - True - - - - - - True - False - 6 - - - - True - True - _Hide completed tasks after - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 0 9999 1 10 0 - - - 0 - True - True - - - - - - True - Minutes + + + 1 + + + + + 0 + + + + + _Show appointment end times in week and month view + True + True + False + True + True + + + False + False + 1 + + + + + _Compress weekends in month view + True + True + False + True + True + + + False + False + 2 + + + + + Show week _numbers in date navigator + True + True + False + True + True + + + False + False + 3 + + + + + Show week n_umber in Day and Work Week View + True + True + False + True + True + + + False + False + 4 + + + + + Sc_roll Month View by a week + True + True + False + True + True + + + False + False + 5 + + + + + 1 + + + + + False + 1 + + + + + True + 0 + <span weight="bold">Task List</span> + True + + + False + False + 2 + + + + + True + 12 + + + True + + + False + False + 0 + + + + + True + 6 + + + True + 2 + 2 + 6 + 6 + + + True + 0 + T_asks due today: + True + tasks_due_today_color + + + GTK_FILL + + + + + + True + 0 + _Overdue tasks: + True + tasks_overdue_color + + + 1 + 2 + GTK_FILL + + + + + + True + True + False + Pick a color + + + 1 + 2 + + + + + + + True + True + False + Pick a color + + + 1 + 2 + 1 + 2 + + + + + + + 0 + + + + + True + 6 + + + _Hide completed tasks after + True + True + False + True + True + + + False + False + 0 + + + + + True + True + 1 0 9999 1 10 0 + 1 + + + 1 + + + + + True + Minutes Hours Days - False - True - - - 0 - True - True - - - - - 0 - True - True - - - - - 0 - True - True - - - - - 0 - False - True - - - - - False - True - - - - - - True - Display - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - 12 - True - False - 6 - - - - True - False - 0 - - - - True - Select the calendars for alarm notification - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - - - - 0 - True - True - - - - - False - True - - - - - - True - Alarms - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - 12 - True - False - 12 - - - - True - <span weight="bold">Default Free/Busy Server</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 6 - - - - True - False - 6 - - - - True - Template: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - True - True - 0 - - True - * - False - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - <i>%u and %d will be replaced by user and domain from the email address.</i> - False - True - GTK_JUSTIFY_LEFT - True - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - 0 - False - True - - - - - False - True - - - - - - True - Free/Busy - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - + + + 2 + + + + + 1 + + + + + 1 + + + + + False + 3 + + + + + 1 + + + + + True + Display + + + 1 + False + tab + + + + + True + 12 + 6 + + + True + + + True + Select the calendars for alarm notification + + + False + False + 0 + + + + + False + False + 0 + + + + + True + True + automatic + automatic + in + + + + + + 1 + + + + + 2 + + + + + True + Alarms + + + 2 + False + tab + + + + + True + 12 + 12 + + + True + 0 + <span weight="bold">Default Free/Busy Server</span> + True + + + False + False + 0 + + + + + True + 12 + + + True + + + False + False + 0 + + + + + True + 6 + + + True + 6 + + + True + Template: + + + False + False + 0 + + + + + True + True + + + 1 + + + + + 0 + + + + + True + <i>%u and %d will be replaced by user and domain from the email address.</i> + True + True + + + False + False + 1 + + + + + 1 + + + + + False + 1 + + + + + 3 + + + + + True + Free/Busy + + + 3 + False + tab + + + + + -- cgit v1.2.3 From 6e72a236dcb592a942881e118d6a71888ea1581b Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Mon, 4 May 2009 10:10:55 +0530 Subject: ** BUGFIX: 573830 - g_timeout_add_seconds should be preferred to g_timeout_add According to https://wiki.ubuntu.com/SavingTheWorld (and of course according to the gtk docs) using g_timeout_add_seconds is preferred over g_timeout_add if a timeout in seconds is desired. --- calendar/gui/alarm-notify/alarm-queue.c | 2 +- calendar/gui/alarm-notify/alarm.c | 2 +- calendar/gui/e-meeting-time-sel.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 1ec93f8df1..f3167d813c 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -1864,7 +1864,7 @@ alarm_queue_init (gpointer data) } /* install timeout handler (every 30 mins) for not missing the midnight refresh */ - g_timeout_add (1800000, (GSourceFunc) check_midnight_refresh, NULL); + g_timeout_add_seconds (1800, (GSourceFunc) check_midnight_refresh, NULL); #ifdef HAVE_LIBNOTIFY notify_init("Evolution Alarms"); diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c index bf96f1f664..5dca49ae25 100644 --- a/calendar/gui/alarm-notify/alarm.c +++ b/calendar/gui/alarm-notify/alarm.c @@ -153,7 +153,7 @@ setup_timeout (void) g_message ("Setting timeout for %d %lu %lu", diff, ar->trigger, now); g_message (" %s", ctime (&ar->trigger)); g_message (" %s", ctime (&now)); - timeout_id = g_timeout_add (diff * 1000, alarm_ready_cb, NULL); + timeout_id = g_timeout_add_seconds (diff, alarm_ready_cb, NULL); } diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index a106a46d49..25c8a86b97 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -2918,7 +2918,7 @@ row_deleted_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data) } -#define REFRESH_PAUSE 5000 +#define REFRESH_PAUSE 5 static gboolean free_busy_timeout_refresh (gpointer data) @@ -2952,7 +2952,7 @@ free_busy_template_changed_cb (GConfClient *client, g_source_remove (mts->fb_refresh_not); } - mts->fb_refresh_not = g_timeout_add (REFRESH_PAUSE, + mts->fb_refresh_not = g_timeout_add_seconds (REFRESH_PAUSE, free_busy_timeout_refresh, data); } -- cgit v1.2.3 From f4ecf2d62fd8766fa0b0c7d6483d9a583459267c Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 4 May 2009 10:48:31 +0530 Subject: Assure that the filename <-> uri conversion are done with g_filename_{to,from}_uri and not by concatenating strings which is broken with win32-style uris --- calendar/gui/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar') diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c index 0f012d5f12..8a68e4ffdc 100644 --- a/calendar/gui/migration.c +++ b/calendar/gui/migration.c @@ -317,7 +317,7 @@ migrate_ical_folder_to_source (char *old_path, ESource *new_source, ECalSourceTy ECal *old_ecal = NULL, *new_ecal = NULL; ESource *old_source; ESourceGroup *group; - char *old_uri = g_strdup_printf ("file://%s", old_path); + char *old_uri = g_filename_to_uri (old_path, NULL, NULL); GError *error = NULL; gboolean retval = FALSE; -- cgit v1.2.3