From 6d6c1171ec57818c96e9f1f00fb0502791cbeab8 Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Wed, 13 May 2009 23:05:36 +0200 Subject: Make the Calendar view scroll using the arrow keys This fixes bug 559366. --- calendar/gui/e-week-view.c | 91 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 74 insertions(+), 17 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 264e30271d..eaa6a3a47c 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -3812,10 +3812,16 @@ static gint map_right[] = {3, 4, 5, 3, 4, 5, 6}; static void e_week_view_do_cursor_key_up (EWeekView *week_view) { - if (week_view->selection_start_day <= 0) + if (week_view->selection_start_day == -1) return; week_view->selection_start_day--; + + if (week_view->selection_start_day < 0) { + e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_UP); + week_view->selection_start_day = 6; + } + week_view->selection_end_day = week_view->selection_start_day; g_signal_emit_by_name (week_view, "selected_time_changed"); gtk_widget_queue_draw (week_view->main_canvas); @@ -3824,11 +3830,16 @@ e_week_view_do_cursor_key_up (EWeekView *week_view) static void e_week_view_do_cursor_key_down (EWeekView *week_view) { - if (week_view->selection_start_day == -1 || - week_view->selection_start_day >= 6) + if (week_view->selection_start_day == -1) return; week_view->selection_start_day++; + + if (week_view->selection_start_day > 6) { + e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_DOWN); + week_view->selection_start_day = 0; + } + week_view->selection_end_day = week_view->selection_start_day; g_signal_emit_by_name (week_view, "selected_time_changed"); gtk_widget_queue_draw (week_view->main_canvas); @@ -3861,11 +3872,23 @@ e_week_view_do_cursor_key_right (EWeekView *week_view) static void e_month_view_do_cursor_key_up (EWeekView *week_view) { - if (week_view->selection_start_day < 7) + if (week_view->selection_start_day == -1) return; - week_view->selection_start_day -= 7; - week_view->selection_end_day = week_view->selection_start_day; + if (week_view->selection_start_day < 7) { + /* no easy way to calculate new selection_start_day, therefore + * calculate a time_t value and set_selected_time_range */ + time_t current; + if (e_calendar_view_get_selected_time_range(&week_view->cal_view, ¤t, NULL)) { + current = time_add_week(current,-1); + e_week_view_scroll_a_step(week_view, E_CAL_VIEW_MOVE_PAGE_UP); + e_week_view_set_selected_time_range_visible(week_view,current,current); + } + } else { + week_view->selection_start_day -= 7; + week_view->selection_end_day = week_view->selection_start_day; + } + g_signal_emit_by_name (week_view, "selected_time_changed"); gtk_widget_queue_draw (week_view->main_canvas); } @@ -3875,12 +3898,23 @@ e_month_view_do_cursor_key_down (EWeekView *week_view) { gint weeks_shown = e_week_view_get_weeks_shown (week_view); - if (week_view->selection_start_day == -1 || - week_view->selection_start_day >= (weeks_shown - 1) * 7) + if (week_view->selection_start_day == -1) return; - week_view->selection_start_day += 7; - week_view->selection_end_day = week_view->selection_start_day; + if (week_view->selection_start_day >= (weeks_shown - 1) * 7) { + /* no easy way to calculate new selection_start_day, therefore + * calculate a time_t value and set_selected_time_range */ + time_t current; + if (e_calendar_view_get_selected_time_range(&week_view->cal_view, ¤t, NULL)) { + current = time_add_week(current,1); + e_week_view_scroll_a_step(week_view, E_CAL_VIEW_MOVE_PAGE_DOWN); + e_week_view_set_selected_time_range_visible(week_view,current,current); + } + } else { + week_view->selection_start_day += 7; + week_view->selection_end_day = week_view->selection_start_day; + } + g_signal_emit_by_name (week_view, "selected_time_changed"); gtk_widget_queue_draw (week_view->main_canvas); } @@ -3888,11 +3922,23 @@ e_month_view_do_cursor_key_down (EWeekView *week_view) static void e_month_view_do_cursor_key_left (EWeekView *week_view) { - if (week_view->selection_start_day <= 0) + if (week_view->selection_start_day == -1) return; - week_view->selection_start_day--; - week_view->selection_end_day = week_view->selection_start_day; + if (week_view->selection_start_day == 0) { + /* no easy way to calculate new selection_start_day, therefore + * calculate a time_t value and set_selected_time_range */ + time_t current; + if (e_calendar_view_get_selected_time_range(&week_view->cal_view, ¤t, NULL)) { + current = time_add_day(current,-1); + e_week_view_scroll_a_step(week_view, E_CAL_VIEW_MOVE_PAGE_UP); + e_week_view_set_selected_time_range_visible(week_view,current,current); + } + } else { + week_view->selection_start_day--; + week_view->selection_end_day = week_view->selection_start_day; + } + g_signal_emit_by_name (week_view, "selected_time_changed"); gtk_widget_queue_draw (week_view->main_canvas); } @@ -3902,12 +3948,23 @@ e_month_view_do_cursor_key_right (EWeekView *week_view) { gint weeks_shown = e_week_view_get_weeks_shown (week_view); - if (week_view->selection_start_day == -1 || - week_view->selection_start_day >= weeks_shown * 7 - 1) + if (week_view->selection_start_day == -1) return; - week_view->selection_start_day++; - week_view->selection_end_day = week_view->selection_start_day; + if (week_view->selection_start_day == weeks_shown * 7 - 1) { + /* no easy way to calculate new selection_start_day, therefore + * calculate a time_t value and set_selected_time_range */ + time_t current; + if (e_calendar_view_get_selected_time_range(&week_view->cal_view, ¤t, NULL)) { + current = time_add_day(current,1); + e_week_view_scroll_a_step(week_view, E_CAL_VIEW_MOVE_PAGE_DOWN); + e_week_view_set_selected_time_range_visible(week_view,current,current); + } + } else { + week_view->selection_start_day++; + week_view->selection_end_day = week_view->selection_start_day; + } + g_signal_emit_by_name (week_view, "selected_time_changed"); gtk_widget_queue_draw (week_view->main_canvas); } -- cgit v1.2.3 From cdfa00701f45b3ada6bbec771ab4531b09a7b83d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 13 May 2009 17:27:50 -0400 Subject: Remove an unnecessary variable from get_attachment_list(). --- calendar/gui/dialogs/comp-editor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 4af998eb26..2a1513327e 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -197,7 +197,7 @@ get_attachment_list (CompEditor *editor) EAttachmentView *view; GtkTreeModel *model; GtkTreeIter iter; - GSList *parts = NULL, *list = NULL; + GSList *list = NULL; const char *comp_uid = NULL; const char *local_store = e_cal_get_local_attachment_store (editor->priv->client); gboolean valid; @@ -282,8 +282,6 @@ get_attachment_list (CompEditor *editor) g_free (filename); } - if (parts) - g_slist_free (parts); return list; } -- cgit v1.2.3 From 6c1805443f69bc65e05e323ff60ceeb0ae702800 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 14 May 2009 20:04:35 +0200 Subject: Bug 582626 - Remove forgotten widgets from a glade file --- calendar/gui/dialogs/cal-prefs-dialog.glade | 36 ----------------------------- 1 file changed, 36 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/dialogs/cal-prefs-dialog.glade b/calendar/gui/dialogs/cal-prefs-dialog.glade index 87e69d74c5..9f2617db04 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.glade +++ b/calendar/gui/dialogs/cal-prefs-dialog.glade @@ -113,24 +113,6 @@ - - - Adjust for daylight sa_ving time - True - True - False - True - True - - - 1 - 2 - 1 - 2 - GTK_FILL - - - True @@ -176,24 +158,6 @@ GTK_FILL - - - Adjust for daylight sa_ving time - True - True - False - True - True - - - 1 - 2 - 2 - 3 - GTK_FILL - - - True -- cgit v1.2.3 From e4fa8fe10408c4c370e1e11e4bb2d7745f50aceb Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 16 May 2009 12:11:55 -0400 Subject: Fix several types of pedantic compiler warnings. --- calendar/conduits/calendar/calendar-conduit.c | 2 +- calendar/conduits/common/libecalendar-common-conduit.c | 4 ++-- calendar/conduits/todo/todo-conduit.c | 2 +- calendar/gui/alarm-notify/alarm-queue.c | 2 +- calendar/gui/calendar-component.c | 2 +- calendar/gui/dialogs/event-page.c | 4 ++-- calendar/gui/dialogs/task-details-page.c | 2 +- calendar/gui/dialogs/task-page.c | 2 +- calendar/gui/e-cal-config.h | 2 +- calendar/gui/e-cal-event.h | 4 ++-- calendar/gui/e-cal-list-view-config.c | 2 +- calendar/gui/e-cal-menu.h | 4 ++-- calendar/gui/e-cal-popup.h | 6 +++--- calendar/gui/e-calendar-table.c | 2 +- calendar/gui/e-calendar-view.c | 4 ++-- calendar/gui/e-cell-date-edit-config.c | 2 +- calendar/gui/e-date-edit-config.c | 2 +- calendar/gui/e-day-view-config.c | 2 +- calendar/gui/e-memo-table.c | 2 +- calendar/gui/memos-component.c | 2 +- calendar/gui/tasks-component.c | 2 +- 21 files changed, 28 insertions(+), 28 deletions(-) (limited to 'calendar') diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index e7e5f57506..b9b6b3449c 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -1631,7 +1631,7 @@ pre_sync (GnomePilotConduit *conduit, pi_buffer_free(buffer); #endif unpack_AppointmentAppInfo (&(ctxt->ai), buf, len); - //unpack_CategoryAppInfo (&(ctxt->ai.category), buf, len); + /* unpack_CategoryAppInfo (&(ctxt->ai.category), buf, len); */ g_free (buf); check_for_slow_setting (conduit, ctxt); diff --git a/calendar/conduits/common/libecalendar-common-conduit.c b/calendar/conduits/common/libecalendar-common-conduit.c index fbbe0278b1..59f411da69 100644 --- a/calendar/conduits/common/libecalendar-common-conduit.c +++ b/calendar/conduits/common/libecalendar-common-conduit.c @@ -93,7 +93,7 @@ e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *categ category->name[i][j] = '\0'; } - //find a desktop id that is not in use between 128 and 255 + /* find a desktop id that is not in use between 128 and 255 */ for (desktopUniqueID = 128; desktopUniqueID <= 255; desktopUniqueID++) { int found = 0; for(j=0; jdata); if (c_list->next != 0) { LOG (g_message ("Note: item has more categories in evolution, first chosen")); diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index f40bc82eab..7639291504 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -1013,7 +1013,7 @@ pre_sync (GnomePilotConduit *conduit, /* Get the default component */ if (!e_cal_get_default_object (ctxt->client, &icalcomp, NULL)) return -1; - LOG (g_message ( " Got default component: %p", icalcomp)); + LOG (g_message (" Got default component: %p", (gpointer) icalcomp)); ctxt->default_comp = e_cal_component_new (); if (!e_cal_component_set_icalcomponent (ctxt->default_comp, icalcomp)) { diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 859b775607..e7be5554b8 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -1540,7 +1540,7 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa, g_signal_connect (G_OBJECT (tray_data->query), "objects_removed", G_CALLBACK (on_dialog_objs_removed_cb), tray_data); - // FIXME: We should remove this check + /* FIXME: We should remove this check */ if (!config_data_get_notify_with_tray ()) { tray_blink_id = -1; open_alarm_dialog (tray_data); diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 4d30929272..078c854b98 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -73,7 +73,7 @@ #define CALENDAR_ERROR_TIME_OUT_KEY "/apps/evolution/calendar/display/error_timeout" enum DndTargetType { - DND_TARGET_TYPE_CALENDAR_LIST, + DND_TARGET_TYPE_CALENDAR_LIST }; #define CALENDAR_TYPE "text/calendar" #define XCALENDAR_TYPE "text/x-calendar" diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index dfc33fbbc4..cd54c65c08 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -209,7 +209,7 @@ static void update_end_time_combo ( EventPage *epage); static void event_page_select_organizer (EventPage *epage, const char *backend_address); static void set_subscriber_info_string (EventPage *epage, const char *backend_address); -G_DEFINE_TYPE (EventPage, event_page, TYPE_COMP_EDITOR_PAGE); +G_DEFINE_TYPE (EventPage, event_page, TYPE_COMP_EDITOR_PAGE) static void event_page_dispose (GObject *object) @@ -1885,7 +1885,7 @@ enum { ATTENDEE_CAN_DELEGATE = 1<<1, ATTENDEE_CAN_DELETE = 1<<2, ATTENDEE_CAN_ADD = 1<<3, - ATTENDEE_LAST = 1<<4, + ATTENDEE_LAST = 1<<4 }; static EPopupItem context_menu_items[] = { diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index 959c275443..86a39aad24 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -77,7 +77,7 @@ typedef enum { PRIORITY_HIGH, PRIORITY_NORMAL, PRIORITY_LOW, - PRIORITY_UNDEFINED, + PRIORITY_UNDEFINED } TaskEditorPriority; static const int priority_map[] = { diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index c3a8e34ba0..fc0c2330bf 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -1195,7 +1195,7 @@ enum { ATTENDEE_CAN_DELEGATE = 1<<1, ATTENDEE_CAN_DELETE = 1<<2, ATTENDEE_CAN_ADD = 1<<3, - ATTENDEE_LAST = 1<<4, + ATTENDEE_LAST = 1<<4 }; static EPopupItem context_menu_items[] = { diff --git a/calendar/gui/e-cal-config.h b/calendar/gui/e-cal-config.h index 8af6313b5b..8f27cbd2f2 100644 --- a/calendar/gui/e-cal-config.h +++ b/calendar/gui/e-cal-config.h @@ -47,7 +47,7 @@ struct _ECalConfigClass { enum _e_cal_config_target_t { EC_CONFIG_TARGET_SOURCE, - EC_CONFIG_TARGET_PREFS, + EC_CONFIG_TARGET_PREFS }; typedef struct _ECalConfigTargetSource ECalConfigTargetSource; diff --git a/calendar/gui/e-cal-event.h b/calendar/gui/e-cal-event.h index 4fbaa394ec..a77d2a147f 100644 --- a/calendar/gui/e-cal-event.h +++ b/calendar/gui/e-cal-event.h @@ -37,12 +37,12 @@ typedef struct _ECalEvent ECalEvent; typedef struct _ECalEventClass ECalEventClass; enum _e_cal_event_target_t { - E_CAL_EVENT_TARGET_COMPONENT, + E_CAL_EVENT_TARGET_COMPONENT }; /* Flags that describe TARGET_COMPONENT */ enum { - E_CAL_EVENT_COMPONENT_MIGRATION = 1 << 0, + E_CAL_EVENT_COMPONENT_MIGRATION = 1 << 0 }; typedef struct _ECalEventTargetComponent ECalEventTargetComponent; diff --git a/calendar/gui/e-cal-list-view-config.c b/calendar/gui/e-cal-list-view-config.c index efa8b9b7fb..6c930b1b61 100644 --- a/calendar/gui/e-cal-list-view-config.c +++ b/calendar/gui/e-cal-list-view-config.c @@ -32,7 +32,7 @@ struct _ECalListViewConfigPrivate { /* Property IDs */ enum props { PROP_0, - PROP_VIEW, + PROP_VIEW }; G_DEFINE_TYPE (ECalListViewConfig, e_cal_list_view_config, G_TYPE_OBJECT) diff --git a/calendar/gui/e-cal-menu.h b/calendar/gui/e-cal-menu.h index 30962d9a1a..9c37a6a9ae 100644 --- a/calendar/gui/e-cal-menu.h +++ b/calendar/gui/e-cal-menu.h @@ -39,7 +39,7 @@ typedef struct _ECalMenuClass ECalMenuClass; /* Current target description */ /* Types of popup tagets */ enum _e_cal_menu_target_t { - E_CAL_MENU_TARGET_SELECT, + E_CAL_MENU_TARGET_SELECT }; /** @@ -73,7 +73,7 @@ enum _e_cal_menu_target_select_t { E_CAL_MENU_SELECT_ASSIGNABLE = 1<<10, E_CAL_MENU_SELECT_HASURL = 1<<11, - E_CAL_MENU_SELECT_NOTCOMPLETE = 1<<12, + E_CAL_MENU_SELECT_NOTCOMPLETE = 1<<12 }; typedef struct _ECalMenuTargetSelect ECalMenuTargetSelect; diff --git a/calendar/gui/e-cal-popup.h b/calendar/gui/e-cal-popup.h index 34874efdba..185e9877f0 100644 --- a/calendar/gui/e-cal-popup.h +++ b/calendar/gui/e-cal-popup.h @@ -50,7 +50,7 @@ struct _ECalendarView; enum _e_cal_popup_target_t { E_CAL_POPUP_TARGET_SELECT, E_CAL_POPUP_TARGET_SOURCE, - E_CAL_POPUP_TARGET_ATTACHMENTS, + E_CAL_POPUP_TARGET_ATTACHMENTS }; /** @@ -89,7 +89,7 @@ enum _e_cal_popup_target_select_t { E_CAL_POPUP_SELECT_ACCEPTABLE = 1<<14, E_CAL_POPUP_SELECT_NOTCOMPLETE = 1<<15, E_CAL_POPUP_SELECT_NOSAVESCHEDULES = 1<<16, - E_CAL_POPUP_SELECT_COMPLETE = 1<<17, + E_CAL_POPUP_SELECT_COMPLETE = 1<<17 }; /** @@ -121,7 +121,7 @@ enum _e_cal_popup_target_attachments_t { E_CAL_POPUP_ATTACHMENTS_MANY = 1<<1, /* one or more selected */ E_CAL_POPUP_ATTACHMENTS_MODIFY = 1<<2, /* check for modify operation */ E_CAL_POPUP_ATTACHMENTS_MULTIPLE = 1<<3, - E_CAL_POPUP_ATTACHMENTS_IMAGE = 1<<4, + E_CAL_POPUP_ATTACHMENTS_IMAGE = 1<<4 }; typedef struct _ECalPopupTargetSelect ECalPopupTargetSelect; diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index ddf96d00f2..d032066f86 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -1882,7 +1882,7 @@ e_calendar_table_set_status_message (ECalendarTable *cal_table, const gchar *mes cal_table->activity_id = 0; } } else if (cal_table->activity_id == 0) { - char *client_id = g_strdup_printf ("%p", cal_table); + char *client_id = g_strdup_printf ("%p", (gpointer) cal_table); cal_table->activity_id = e_activity_handler_operation_started ( cal_table->activity_handler, client_id, message, TRUE); diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 6c8e1f83ab..a99149ae2e 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -85,7 +85,7 @@ extern ECompEditorRegistry *comp_editor_registry; /* Property IDs */ enum props { PROP_0, - PROP_MODEL, + PROP_MODEL }; /* FIXME Why are we emitting these event signals here? Can't the model just be listened to? */ @@ -567,7 +567,7 @@ e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *messag priv->activity_id = 0; } } else if (priv->activity_id == 0) { - char *client_id = g_strdup_printf ("%p", cal_view); + char *client_id = g_strdup_printf ("%p", (gpointer) cal_view); priv->activity_id = e_activity_handler_operation_started ( priv->activity_handler, client_id, message, TRUE); diff --git a/calendar/gui/e-cell-date-edit-config.c b/calendar/gui/e-cell-date-edit-config.c index e2a9cc6eb2..5be8569bd3 100644 --- a/calendar/gui/e-cell-date-edit-config.c +++ b/calendar/gui/e-cell-date-edit-config.c @@ -35,7 +35,7 @@ struct _ECellDateEditConfigPrivate { /* Property IDs */ enum props { PROP_0, - PROP_CELL, + PROP_CELL }; G_DEFINE_TYPE (ECellDateEditConfig, e_cell_date_edit_config, G_TYPE_OBJECT) diff --git a/calendar/gui/e-date-edit-config.c b/calendar/gui/e-date-edit-config.c index 16732305ec..d6fd6cf675 100644 --- a/calendar/gui/e-date-edit-config.c +++ b/calendar/gui/e-date-edit-config.c @@ -32,7 +32,7 @@ struct _EDateEditConfigPrivate { /* Property IDs */ enum props { PROP_0, - PROP_EDIT, + PROP_EDIT }; G_DEFINE_TYPE (EDateEditConfig, e_date_edit_config, G_TYPE_OBJECT) diff --git a/calendar/gui/e-day-view-config.c b/calendar/gui/e-day-view-config.c index b7acf6541f..44156bf18e 100644 --- a/calendar/gui/e-day-view-config.c +++ b/calendar/gui/e-day-view-config.c @@ -32,7 +32,7 @@ struct _EDayViewConfigPrivate { /* Property IDs */ enum props { PROP_0, - PROP_VIEW, + PROP_VIEW }; G_DEFINE_TYPE (EDayViewConfig, e_day_view_config, G_TYPE_OBJECT) diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c index 260103ada0..067a87bf29 100644 --- a/calendar/gui/e-memo-table.c +++ b/calendar/gui/e-memo-table.c @@ -1130,7 +1130,7 @@ e_memo_table_set_status_message (EMemoTable *memo_table, const gchar *message) memo_table->activity_id = 0; } } else if (memo_table->activity_id == 0) { - char *client_id = g_strdup_printf ("%p", memo_table); + char *client_id = g_strdup_printf ("%p", (gpointer) memo_table); memo_table->activity_id = e_activity_handler_operation_started ( memo_table->activity_handler, client_id, message, TRUE); diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index 0e422d548d..66b6f6a2ec 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -59,7 +59,7 @@ #define CREATE_MEMO_LIST_ID "memo-list" enum DndTargetType { - DND_TARGET_TYPE_CALENDAR_LIST, + DND_TARGET_TYPE_CALENDAR_LIST }; #define CALENDAR_TYPE "text/calendar" #define XCALENDAR_TYPE "text/x-calendar" diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c index 9ed21d5186..25bf06bda1 100644 --- a/calendar/gui/tasks-component.c +++ b/calendar/gui/tasks-component.c @@ -58,7 +58,7 @@ #define CREATE_TASK_LIST_ID "task-list" enum DndTargetType { - DND_TARGET_TYPE_CALENDAR_LIST, + DND_TARGET_TYPE_CALENDAR_LIST }; #define CALENDAR_TYPE "text/calendar" #define XCALENDAR_TYPE "text/x-calendar" -- cgit v1.2.3 From 3b946037007857c3d2be0c39db0782f9dbaef461 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Thu, 21 May 2009 14:10:36 +0530 Subject: Adds the resend feature to GroupWise features. --- calendar/gui/dialogs/comp-editor.c | 7 ++++--- calendar/gui/e-calendar-view.c | 12 ++++++------ calendar/gui/e-calendar-view.h | 2 ++ 3 files changed, 12 insertions(+), 9 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 2a1513327e..545fca4448 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -1848,7 +1848,7 @@ comp_editor_set_summary (CompEditor *editor, !editor->priv->warned && !(editor->priv->flags & COMP_EDITOR_DELEGATE) && editor->priv->existing_org && - !editor->priv->user_org; + !editor->priv->user_org && !(editor->priv->flags & COMP_EDITOR_NEW_ITEM); if (show_warning) { e_notice ( @@ -1896,7 +1896,8 @@ comp_editor_set_changed (CompEditor *editor, show_warning = changed && !editor->priv->warned && !(editor->priv->flags & COMP_EDITOR_DELEGATE) && - editor->priv->existing_org && !editor->priv->user_org; + editor->priv->existing_org && !editor->priv->user_org + && !(editor->priv->flags & COMP_EDITOR_NEW_ITEM); if (show_warning) { e_notice ( @@ -2701,7 +2702,7 @@ page_dates_changed_cb (CompEditor *editor, if (page != (CompEditorPage *) l->data) comp_editor_page_set_dates (l->data, dates); - if (!priv->warned && priv->existing_org && !priv->user_org) { + if (!priv->warned && priv->existing_org && !priv->user_org && !(editor->priv->flags & COMP_EDITOR_NEW_ITEM)) { e_notice (priv->notebook, GTK_MESSAGE_INFO, _("Changes made to this item may be discarded if an update arrives")); priv->warned = TRUE; diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index a99149ae2e..ffb08bbee0 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -78,7 +78,6 @@ struct _ECalendarViewPrivate { static void e_calendar_view_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void e_calendar_view_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static void e_calendar_view_destroy (GtkObject *object); -static void open_event_with_flags (ECalendarView *cal_view, ECal *client, icalcomponent *icalcomp, guint32 flags); extern ECompEditorRegistry *comp_editor_registry; @@ -1602,7 +1601,7 @@ on_delegate (EPopup *ep, EPopupItem *pitem, void *data) flags |= COMP_EDITOR_MEETING | COMP_EDITOR_DELEGATE; - open_event_with_flags (cal_view, event->comp_data->client, clone, flags); + e_calendar_view_open_event_with_flags (cal_view, event->comp_data->client, clone, flags); icalcomponent_free (clone); g_list_free (selected); @@ -2013,7 +2012,7 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view, flags |= COMP_EDITOR_USER_ORG; } - open_event_with_flags (cal_view, default_client, + e_calendar_view_open_event_with_flags (cal_view, default_client, icalcomp, flags); g_object_unref (comp); @@ -2102,8 +2101,8 @@ object_created_cb (CompEditor *ce, ECalendarView *cal_view) gnome_calendar_emit_user_created_signal (cal_view, e_calendar_view_get_calendar (cal_view), comp_editor_get_client (ce)); } -static void -open_event_with_flags (ECalendarView *cal_view, ECal *client, icalcomponent *icalcomp, guint32 flags) +CompEditor * +e_calendar_view_open_event_with_flags (ECalendarView *cal_view, ECal *client, icalcomponent *icalcomp, guint32 flags) { CompEditor *ce; const char *uid; @@ -2131,6 +2130,7 @@ open_event_with_flags (ECalendarView *cal_view, ECal *client, icalcomponent *ica gtk_window_present (GTK_WINDOW (ce)); + return ce; } /** @@ -2165,7 +2165,7 @@ e_calendar_view_edit_appointment (ECalendarView *cal_view, } - open_event_with_flags (cal_view, client, icalcomp, flags); + e_calendar_view_open_event_with_flags (cal_view, client, icalcomp, flags); } void diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h index 1f18e67241..eedef31856 100644 --- a/calendar/gui/e-calendar-view.h +++ b/calendar/gui/e-calendar-view.h @@ -28,6 +28,7 @@ #include "e-cal-model.h" #include "gnome-cal.h" #include "e-activity-handler.h" +#include "dialogs/comp-editor.h" G_BEGIN_DECLS @@ -144,6 +145,7 @@ void e_calendar_view_paste_clipboard (ECalendarView *cal_view); void e_calendar_view_delete_selected_event (ECalendarView *cal_view); void e_calendar_view_delete_selected_events (ECalendarView *cal_view); void e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view); +CompEditor* e_calendar_view_open_event_with_flags (ECalendarView *cal_view, ECal *client, icalcomponent *icalcomp, guint32 flags); GtkMenu *e_calendar_view_create_popup_menu (ECalendarView *cal_view); -- cgit v1.2.3 From ceb57eb3a8bc04eca26d859ff766130d06cb0e54 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Thu, 21 May 2009 14:12:04 +0530 Subject: Fixes bug 498712 (bnc) - deleting meetings sometimes does not work properly. --- calendar/gui/dialogs/delete-comp.c | 6 ++++-- calendar/gui/dialogs/delete-comp.h | 2 +- calendar/gui/e-calendar-table.c | 6 +----- calendar/gui/e-calendar-view.c | 9 ++++----- 4 files changed, 10 insertions(+), 13 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c index 3508f38f02..e5ae1e6cdc 100644 --- a/calendar/gui/dialogs/delete-comp.c +++ b/calendar/gui/dialogs/delete-comp.c @@ -167,7 +167,7 @@ cb_toggled_cb (GtkWidget *toggle, gpointer data) } gboolean -prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *parent) +prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *parent, gboolean *retract) { char *message = NULL; ECalComponentVType type = E_CAL_COMPONENT_NO_TYPE; @@ -232,13 +232,15 @@ prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *pare GtkTextIter text_iter_start, text_iter_end; GtkTextBuffer *text_buffer; + *retract = TRUE; text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (entry)); gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start); gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end); *retract_text = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE); - } + } else + *retract = FALSE; } gtk_widget_destroy ((GtkWidget *) dialog); diff --git a/calendar/gui/dialogs/delete-comp.h b/calendar/gui/dialogs/delete-comp.h index a2f85301a0..bb4b5983d9 100644 --- a/calendar/gui/dialogs/delete-comp.h +++ b/calendar/gui/dialogs/delete-comp.h @@ -33,6 +33,6 @@ gboolean delete_component_dialog (ECalComponent *comp, gboolean consider_as_untitled, int n_comps, ECalComponentVType vtype, GtkWidget *widget); -gboolean prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *parent); +gboolean prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *parent, gboolean *retract); #endif diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index d032066f86..ac920020f9 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -947,9 +947,6 @@ check_for_retract (ECalComponent *comp, ECal *client) ret_val = TRUE; } - if (!ret_val) - ret_val = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL; - g_free (email); return ret_val; } @@ -995,8 +992,7 @@ e_calendar_table_delete_selected (ECalendarTable *cal_table) char *retract_comment = NULL; gboolean retract = FALSE; - retract = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_table)); - delete = retract; + delete = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_table), &retract); if (retract) { GList *users = NULL; icalcomponent *icalcomp = NULL, *mod_comp = NULL; diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index ffb08bbee0..4ceb8910c3 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -1005,9 +1005,6 @@ check_for_retract (ECalComponent *comp, ECal *client) ret_val = TRUE; } - if (!ret_val) - ret_val = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL; - g_free (email); return ret_val; } @@ -1028,11 +1025,12 @@ delete_event (ECalendarView *cal_view, ECalendarViewEvent *event) if (!e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER)) e_cal_component_set_recurid (comp, NULL); + /*FIXME Retract should be moved to Groupwise features plugin */ if (check_for_retract (comp, event->comp_data->client)) { char *retract_comment = NULL; gboolean retract = FALSE; - retract = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_view)); + delete = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_view), &retract); if (retract) { GList *users = NULL; icalcomponent *icalcomp = NULL, *mod_comp = NULL; @@ -1144,11 +1142,12 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view) e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp)); vtype = e_cal_component_get_vtype (comp); + /*FIXME Retract should be moved to Groupwise features plugin */ if (check_for_retract (comp, event->comp_data->client)) { char *retract_comment = NULL; gboolean retract = FALSE; - retract = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_view)); + delete = prompt_retract_dialog (comp, &retract_comment, GTK_WIDGET (cal_view), &retract); if (retract) { GList *users = NULL; icalcomponent *icalcomp = NULL, *mod_comp = NULL; -- cgit v1.2.3 From b93ab66792aa3a24e5a360a4710ed0a03c5c8c8e Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 21 May 2009 11:11:12 +0200 Subject: Bug #583360 - Be able to select UTC as day view's second timezone --- calendar/gui/calendar-config.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'calendar') diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 8af8230efd..285490b8f4 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -1725,8 +1725,16 @@ calendar_config_select_day_second_zone (void) dialog = e_timezone_dialog_get_toplevel (tzdlg); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { + const char *location = NULL; + zone = e_timezone_dialog_get_timezone (tzdlg); - calendar_config_set_day_second_zone (zone ? icaltimezone_get_location (zone) : NULL); + if (zone == icaltimezone_get_utc_timezone ()) { + location = "UTC"; + } else if (zone) { + location = icaltimezone_get_location (zone); + } + + calendar_config_set_day_second_zone (location); } g_object_unref (tzdlg); -- cgit v1.2.3 From 1c69cee0239f3252a58e142eb4df8d760ee0274d Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 21 May 2009 12:47:49 +0200 Subject: Bug #579779 - No crash when updating repeating event --- calendar/gui/comp-util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c index 57704da0f2..53fdacefb9 100644 --- a/calendar/gui/comp-util.c +++ b/calendar/gui/comp-util.c @@ -820,8 +820,7 @@ comp_util_sanitize_recurrence_master (ECalComponent *comp, ECal *client) e_cal_component_get_recurid (comp, &rid); e_cal_component_get_dtstart (comp, &sdt); - if (icaltime_compare_date_only (*rid.datetime.value, *sdt.value) == 0) - { + if (rid.datetime.value && sdt.value && icaltime_compare_date_only (*rid.datetime.value, *sdt.value) == 0) { ECalComponentDateTime msdt, medt, edt; int *sequence; -- cgit v1.2.3