diff options
author | Kjartan Maraas <kmaraas@src.gnome.org> | 2006-02-08 21:06:24 +0800 |
---|---|---|
committer | Kjartan Maraas <kmaraas@src.gnome.org> | 2006-02-08 21:06:24 +0800 |
commit | d21d923423231c70ddb674b2e6bd61b1f39675cf (patch) | |
tree | 8719db8d42b5614ef43e0612baf38e1dd4e30da2 /calendar | |
parent | e081754bc2aef21109661dbde5b47282af7371a5 (diff) | |
download | gsoc2013-evolution-d21d923423231c70ddb674b2e6bd61b1f39675cf.tar.gz gsoc2013-evolution-d21d923423231c70ddb674b2e6bd61b1f39675cf.tar.zst gsoc2013-evolution-d21d923423231c70ddb674b2e6bd61b1f39675cf.zip |
broken pipes are soo fun
svn path=/trunk/; revision=31452
Diffstat (limited to 'calendar')
22 files changed, 41 insertions, 210 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c index 5ea58229e3..959f93b4ea 100644 --- a/calendar/gui/alarm-notify/alarm-notify-dialog.c +++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c @@ -351,7 +351,8 @@ add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigge AlarmFuncInfo *funcinfo = NULL; gchar *to_display = NULL, *start, *end, *str_time; icaltimezone *current_zone; - + + /* Iter is not yet defined but still we return it in all the g_return_val_if_fail() calls? */ g_return_val_if_fail (trigger != -1, iter); /* Only VEVENTs or VTODOs can have alarms */ diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index c837a7d8f4..d97d49af96 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -290,8 +290,7 @@ remove_queued_alarm (CompQueuedAlarms *cqa, gpointer alarm_id, if (!l) return; - cqa->queued_alarms = g_slist_remove_link (cqa->queued_alarms, l); - g_slist_free_1 (l); + cqa->queued_alarms = g_slist_delete_link (cqa->queued_alarms, l); if (remove_alarm) { cqa->expecting_update = TRUE; @@ -981,12 +980,9 @@ open_alarm_dialog (TrayIconData *tray_data) if (alarm_notifications_dialog) { GtkTreeSelection *selection = NULL; - GtkTreeModel *model = NULL; selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW (alarm_notifications_dialog->treeview)); - model = gtk_tree_view_get_model ( - GTK_TREE_VIEW(alarm_notifications_dialog->treeview)); tray_data->iter = add_alarm_to_notified_alarms_dialog ( alarm_notifications_dialog, diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c index d29ad3133a..1eb9d899b5 100644 --- a/calendar/gui/alarm-notify/alarm.c +++ b/calendar/gui/alarm-notify/alarm.c @@ -61,8 +61,7 @@ pop_alarm (void) ar = alarms->data; l = alarms; - alarms = g_list_remove_link (alarms, l); - g_list_free_1 (l); + alarms = g_list_delete_link (alarms, l); g_free (ar); } @@ -246,8 +245,7 @@ alarm_remove (gpointer alarm) ar = &ar_copy; pop_alarm (); /* This will free the original AlarmRecord; that's why we copy it */ } else { - alarms = g_list_remove_link (alarms, l); - g_list_free_1 (l); + alarms = g_list_delete_link (alarms, l); } /* Reset the timeout */ diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c index c8a35fada5..28b3730e9e 100644 --- a/calendar/gui/alarm-notify/config-data.c +++ b/calendar/gui/alarm-notify/config-data.c @@ -162,7 +162,7 @@ config_data_replace_string_list (const char *key, g_free (tmp->data); tmp->data = g_strdup ((gchar *) new); - + /* Should this be checked somewhere? */ state = gconf_client_set_list (conf_client, key, GCONF_VALUE_STRING, diff --git a/calendar/gui/alarm-notify/util.c b/calendar/gui/alarm-notify/util.c index 900d20e67d..93e44c1336 100644 --- a/calendar/gui/alarm-notify/util.c +++ b/calendar/gui/alarm-notify/util.c @@ -55,7 +55,7 @@ calculate_time (time_t start, time_t end) char *str; if (difference < 60) {/* Can't be zero */ - str = g_strdup_printf (_("(%d seconds)"), difference); + str = g_strdup_printf (_("(%ld seconds)"), difference); } else if (difference > 60 && difference < 3600) { /* It will be x minutes y seconds*/ int minutes, seconds; minutes = difference / 60; diff --git a/calendar/gui/dialogs/cal-attachment-select-file.c b/calendar/gui/dialogs/cal-attachment-select-file.c index 6e64ea09c7..44e6e4ab0c 100644 --- a/calendar/gui/dialogs/cal-attachment-select-file.c +++ b/calendar/gui/dialogs/cal-attachment-select-file.c @@ -191,9 +191,9 @@ comp_editor_select_file_attachments (CompEditor *editor, gboolean *showinline_p) if (selection) { #ifdef USE_GTKFILECHOOSER - GSList *files, *l, *n; + GSList *l, *n; - if ((l = files = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (selection)))) { + if ((l = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (selection)))) { list = g_ptr_array_new (); while (l) { diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index e2bebb31a8..c88f14c85d 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -420,7 +420,7 @@ static void show_task_list_config (CalendarPrefsDialog *prefs) { CalUnits units; - gboolean hide_completed_tasks; + gboolean hide_completed_tasks = FALSE; set_color_picker (prefs->tasks_due_today_color, calendar_config_get_tasks_due_today_color ()); set_color_picker (prefs->tasks_overdue_color, calendar_config_get_tasks_overdue_color ()); diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index 37b18d0d77..5a5ee80f28 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -195,6 +195,7 @@ eccp_get_source_type (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidg cell = gtk_cell_renderer_text_new (); store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); for (l = sdialog->menu_source_groups; l; l = g_slist_next (l)) { + /* Reuse previously defined *group here? */ ESourceGroup *group = l->data; gtk_list_store_append (store, &iter); @@ -273,7 +274,7 @@ static GtkWidget * eccp_general_offline (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) { CalendarSourceDialog *sdialog = data; - GtkWidget *offline_setting; + GtkWidget *offline_setting = NULL; const char *offline_sync; int row; gboolean is_local = g_str_has_prefix (e_source_group_peek_base_uri (sdialog->source_group), "file:"); diff --git a/calendar/gui/dialogs/comp-editor-page.h b/calendar/gui/dialogs/comp-editor-page.h index 3859202098..a5ddb03e89 100644 --- a/calendar/gui/dialogs/comp-editor-page.h +++ b/calendar/gui/dialogs/comp-editor-page.h @@ -97,6 +97,8 @@ typedef struct { GtkType comp_editor_page_get_type (void); GtkWidget *comp_editor_page_get_widget (CompEditorPage *page); void comp_editor_page_focus_main_widget (CompEditorPage *page); +void comp_editor_page_unset_focused_widget (CompEditorPage *page, GtkWidget *widget); +void comp_editor_page_set_focused_widget (CompEditorPage *page, GtkWidget *widget); gboolean comp_editor_page_fill_widgets (CompEditorPage *page, ECalComponent *comp); gboolean comp_editor_page_fill_component (CompEditorPage *page, diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 15975b50fa..d0bcbd4b1d 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -152,7 +152,7 @@ static void obj_modified_cb (ECal *client, GList *objs, gpointer data); static void obj_removed_cb (ECal *client, GList *uids, gpointer data); static gboolean open_attachment (EAttachmentBar *bar, CompEditor *editor); -G_DEFINE_TYPE (CompEditor, comp_editor, BONOBO_TYPE_WINDOW); +G_DEFINE_TYPE (CompEditor, comp_editor, BONOBO_TYPE_WINDOW) enum { DND_TYPE_MESSAGE_RFC822, @@ -533,13 +533,11 @@ comp_editor_class_init (CompEditorClass *klass) { GObjectClass *object_class; GtkWidgetClass *widget_class; - GObjectClass *gobject_class; int i; for (i=0;i<sizeof(drag_info)/sizeof(drag_info[0]);i++) drag_info[i].atom = gdk_atom_intern(drag_info[i].target, FALSE); - gobject_class = G_OBJECT_CLASS(klass); object_class = G_OBJECT_CLASS (klass); widget_class = GTK_WIDGET_CLASS (klass); @@ -609,10 +607,6 @@ listen_for_changes (CompEditor *editor) static void commit_all_fields (CompEditor *editor) { - CompEditorPrivate *priv; - - priv = editor->priv; - gtk_window_set_focus (GTK_WINDOW (editor), NULL); } @@ -927,9 +921,6 @@ static int delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data) { CompEditor *editor = COMP_EDITOR (data); - CompEditorPrivate *priv; - - priv = editor->priv; commit_all_fields (editor); @@ -1213,9 +1204,6 @@ key_press_event(GtkWidget *widget, GdkEventKey *event) static gint editor_key_press_event(GtkWidget *widget, GdkEventKey *event, CompEditor *editor) { - CompEditor *Editor = COMP_EDITOR (widget); - EAttachmentBar *bar = E_ATTACHMENT_BAR (Editor->priv->attachment_bar); - if (event->keyval == GDK_Escape) { commit_all_fields (editor); @@ -1236,7 +1224,7 @@ menu_file_save_cb (BonoboUIComponent *uic, CompEditor *editor = (CompEditor *) data; CompEditorPrivate *priv = editor->priv; ECalComponentText text; - gboolean delegated; + gboolean delegated = FALSE; ECalComponent *comp; if (e_attachment_bar_get_download_count (E_ATTACHMENT_BAR (editor->priv->attachment_bar)) ){ @@ -1282,9 +1270,6 @@ menu_file_close_cb (BonoboUIComponent *uic, const char *path) { CompEditor *editor = (CompEditor *) data; - ECalComponent *comp; - ECalComponentText text; - CompEditorPrivate *priv = editor->priv; commit_all_fields (editor); @@ -1898,7 +1883,7 @@ comp_editor_append_page (CompEditor *editor, { CompEditorPrivate *priv; GtkWidget *page_widget; - GtkWidget *label_widget; + GtkWidget *label_widget = NULL; gboolean is_first_page; g_return_if_fail (editor != NULL); @@ -2175,10 +2160,8 @@ make_icon_from_comp (ECalComponent *comp) switch (type) { case E_CAL_COMPONENT_EVENT: return "stock_new-appointment"; - break; case E_CAL_COMPONENT_TODO: return "stock_task"; - break; default: return "stock_calendar"; } @@ -2704,13 +2687,9 @@ raise_and_focus (GtkWidget *widget) void comp_editor_focus (CompEditor *editor) { - CompEditorPrivate *priv; - g_return_if_fail (editor != NULL); g_return_if_fail (IS_COMP_EDITOR (editor)); - priv = editor->priv; - gtk_widget_show (GTK_WIDGET (editor)); raise_and_focus (GTK_WIDGET (editor)); } @@ -2770,9 +2749,6 @@ static void needs_send_cb (GtkObject *obj, gpointer data) { CompEditor *editor = COMP_EDITOR (data); - CompEditorPrivate *priv; - - priv = editor->priv; comp_editor_set_needs_send (editor, TRUE); } diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c index 6ac8d5d61a..dab62ae8b9 100644 --- a/calendar/gui/dialogs/delete-comp.c +++ b/calendar/gui/dialogs/delete-comp.c @@ -61,7 +61,7 @@ delete_component_dialog (ECalComponent *comp, int n_comps, ECalComponentVType vtype, GtkWidget *widget) { - const char *stock_icon, *id; + const char *id; char *arg0 = NULL; int response; @@ -91,7 +91,6 @@ delete_component_dialog (ECalComponent *comp, switch (vtype) { case E_CAL_COMPONENT_EVENT: - stock_icon = "stock_calendar"; if (arg0) id = "calendar:prompt-delete-titled-appointment"; else @@ -99,7 +98,6 @@ delete_component_dialog (ECalComponent *comp, break; case E_CAL_COMPONENT_TODO: - stock_icon = "stock_todo"; if (arg0) id = "calendar:prompt-delete-named-task"; else @@ -107,7 +105,6 @@ delete_component_dialog (ECalComponent *comp, break; case E_CAL_COMPONENT_JOURNAL: - stock_icon = "stock_calendar"; if (arg0) id = "calendar:prompt-delete-named-journal"; else diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c index 657d0fa6c5..70591ef9d6 100644 --- a/calendar/gui/dialogs/e-delegate-dialog.c +++ b/calendar/gui/dialogs/e-delegate-dialog.c @@ -60,7 +60,7 @@ static gboolean get_widgets (EDelegateDialog *edd); static void addressbook_clicked_cb (GtkWidget *widget, gpointer data); static void addressbook_response_cb (GtkWidget *widget, gint response, gpointer data); -G_DEFINE_TYPE (EDelegateDialog, e_delegate_dialog, G_TYPE_OBJECT); +G_DEFINE_TYPE (EDelegateDialog, e_delegate_dialog, G_TYPE_OBJECT) /* Class initialization function for the event editor */ static void diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index 0d160d5c3a..0366cd5d7f 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -66,7 +66,7 @@ static void model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, static void model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data); -G_DEFINE_TYPE (EventEditor, event_editor, TYPE_COMP_EDITOR); +G_DEFINE_TYPE (EventEditor, event_editor, TYPE_COMP_EDITOR) /* Class initialization function for the event editor */ static void diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index a714ef9310..3f95a27929 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -1053,8 +1053,8 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) if (!priv->user_org) { list = g_list_append (list, string); - gtk_combo_set_popdown_strings (GTK_COMBO (priv->organizer), list); - gtk_entry_set_editable (GTK_COMBO (priv->organizer)->entry, FALSE); + gtk_combo_set_popdown_strings (GTK_ENTRY (priv->organizer)->entry, list); + gtk_entry_set_editable (GTK_ENTRY (priv->organizer), FALSE); } g_free (string); @@ -1066,6 +1066,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) a = get_current_account (epage); if (a != NULL) { + /* Reuse earlier declared *page, or rename this to avoid confusion? */ CompEditorPage *page = (CompEditorPage *) epage; priv->ia = e_meeting_store_add_attendee_with_defaults (priv->model); g_object_ref (priv->ia); @@ -1132,7 +1133,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) g_signal_handlers_block_matched (priv->alarm_list_store, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); if (e_cal_component_has_alarms (comp)) { - GList *alarms, *l; + GList *alarms, *list; int alarm_type; alarms = e_cal_component_get_alarm_uids (comp); @@ -1141,10 +1142,10 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) else e_dialog_option_menu_set (priv->alarm_time, ALARM_CUSTOM, alarm_map); - for (l = alarms; l != NULL; l = l->next) { + for (list = alarms; list != NULL; list = list->next) { ECalComponentAlarm *ca; - ca = e_cal_component_get_alarm (comp, l->data); + ca = e_cal_component_get_alarm (comp, list->data); e_alarm_list_append (priv->alarm_list_store, NULL, ca); e_cal_component_alarm_free (ca); } @@ -1661,7 +1662,6 @@ static void edit_clicked_cb (GtkButton *btn, EventPage *epage) { EventPagePrivate *priv; - EMeetingAttendee *attendee; GtkTreePath *path = NULL; GtkTreeViewColumn *focus_col; gint row = 0; @@ -1882,10 +1882,7 @@ static void popup_delete_cb (EPopup *ep, EPopupItem *pitem, void *data) { EventPage *epage = data; - EventPagePrivate *priv; - priv = epage->priv; - remove_clicked_cb (NULL, epage); } @@ -1990,9 +1987,7 @@ static gboolean list_key_press (EMeetingListView *list_view, GdkEventKey *event, EventPage *epage) { if (event->keyval == GDK_Delete) { - EventPagePrivate *priv; - priv = epage->priv; remove_clicked_cb (NULL, epage); return TRUE; diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c index 5f994ac3c2..37f873b2d4 100644 --- a/calendar/gui/dialogs/meeting-page.c +++ b/calendar/gui/dialogs/meeting-page.c @@ -105,7 +105,7 @@ static void meeting_page_focus_main_widget (CompEditorPage *page); static gboolean meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp); static gboolean meeting_page_fill_component (CompEditorPage *page, ECalComponent *comp); static void attendee_added_cb (EMeetingListView *emlv, EMeetingAttendee *attendee, gpointer user_data); -G_DEFINE_TYPE (MeetingPage, meeting_page, TYPE_COMP_EDITOR_PAGE); +G_DEFINE_TYPE (MeetingPage, meeting_page, TYPE_COMP_EDITOR_PAGE) /* Class initialization function for the task page */ static void @@ -738,18 +738,6 @@ remove_attendee (MeetingPage *mpage, EMeetingAttendee *ia) } static void -remove_attendee_at_row (MeetingPage *mpage, int row) -{ - MeetingPagePrivate *priv; - EMeetingAttendee *ia; - - priv = mpage->priv; - - ia = e_meeting_store_find_attendee_at_row (priv->model, row); - remove_attendee (mpage, ia); -} - -static void remove_clicked_cb (GtkButton *btn, MeetingPage *mpage) { MeetingPagePrivate *priv; @@ -801,7 +789,7 @@ remove_clicked_cb (GtkButton *btn, MeetingPage *mpage) gtk_tree_selection_select_iter (selection, &iter); } - g_list_foreach (paths, gtk_tree_path_free, NULL); + g_list_foreach (paths, (GFunc)gtk_tree_path_free, NULL); g_list_free (paths); } @@ -896,9 +884,6 @@ static void popup_delete_cb (EPopup *ep, EPopupItem *pitem, void *data) { MeetingPage *mpage = data; - MeetingPagePrivate *priv; - - priv = mpage->priv; remove_clicked_cb (NULL, mpage); } @@ -952,7 +937,7 @@ button_press_event (GtkWidget *widget, GdkEventButton *event, MeetingPage *mpage g_free (address); if (ia) { - selection = gtk_tree_view_get_selection (priv->list_view); + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list_view)); gtk_tree_selection_unselect_all (selection); gtk_tree_selection_select_path (selection, path); @@ -1005,9 +990,6 @@ static gboolean list_key_press (EMeetingListView *list_view, GdkEventKey *event, MeetingPage *mpage) { if (event->keyval == GDK_Delete) { - MeetingPagePrivate *priv; - - priv = mpage->priv; remove_clicked_cb (NULL, mpage); return TRUE; @@ -1109,7 +1091,7 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems, priv->model = ems; priv->list_view = e_meeting_list_view_new (priv->model); - selection = gtk_tree_view_get_selection (priv->list_view); + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list_view)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE); g_signal_connect (G_OBJECT (priv->list_view), "button_press_event", G_CALLBACK (button_press_event), mpage); @@ -1131,7 +1113,7 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems, g_signal_connect_after (G_OBJECT (mpage), "client_changed", G_CALLBACK (client_changed_cb), NULL); - g_signal_connect (priv->list_view, "key_press_event", list_key_press, mpage); + g_signal_connect (priv->list_view, "key_press_event", G_CALLBACK (list_key_press), mpage); return mpage; } diff --git a/calendar/gui/dialogs/memo-editor.c b/calendar/gui/dialogs/memo-editor.c index 5d18450203..27babe97fe 100644 --- a/calendar/gui/dialogs/memo-editor.c +++ b/calendar/gui/dialogs/memo-editor.c @@ -50,14 +50,7 @@ static void memo_editor_edit_comp (CompEditor *editor, ECalComponent *comp); static gboolean memo_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method); static void memo_editor_finalize (GObject *object); -static void refresh_memo_cmd (GtkWidget *widget, gpointer data); -static void cancel_memo_cmd (GtkWidget *widget, gpointer data); -static void forward_cmd (GtkWidget *widget, gpointer data); - -static void model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data); -static void model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data); - -G_DEFINE_TYPE (MemoEditor, memo_editor, TYPE_COMP_EDITOR); +G_DEFINE_TYPE (MemoEditor, memo_editor, TYPE_COMP_EDITOR) @@ -90,9 +83,6 @@ memo_editor_class_init (MemoEditorClass *klass) static void init_widgets (MemoEditor *me) { - MemoEditorPrivate *priv; - - priv = me->priv; } static void @@ -244,12 +234,6 @@ memo_editor_construct (MemoEditor *me, ECal *client) static void memo_editor_set_e_cal (CompEditor *editor, ECal *client) { - MemoEditor *me; - MemoEditorPrivate *priv; - - me = MEMO_EDITOR (editor); - priv = me->priv; - if (COMP_EDITOR_CLASS (memo_editor_parent_class)->set_e_cal) COMP_EDITOR_CLASS (memo_editor_parent_class)->set_e_cal (editor, client); } @@ -257,33 +241,13 @@ memo_editor_set_e_cal (CompEditor *editor, ECal *client) static void memo_editor_edit_comp (CompEditor *editor, ECalComponent *comp) { - MemoEditor *me; - MemoEditorPrivate *priv; - ECalComponentOrganizer organizer; - ECal *client; - - me = MEMO_EDITOR (editor); - priv = me->priv; - - priv->updating = TRUE; - if (COMP_EDITOR_CLASS (memo_editor_parent_class)->edit_comp) COMP_EDITOR_CLASS (memo_editor_parent_class)->edit_comp (editor, comp); - - client = comp_editor_get_e_cal (COMP_EDITOR (editor)); - - priv->updating = FALSE; } static gboolean memo_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method) { - MemoEditor *me = MEMO_EDITOR (editor); - MemoEditorPrivate *priv; - ECalComponent *comp = NULL; - - priv = me->priv; - if (COMP_EDITOR_CLASS (memo_editor_parent_class)->send_comp) return COMP_EDITOR_CLASS (memo_editor_parent_class)->send_comp (editor, method); @@ -333,54 +297,3 @@ memo_editor_new (ECal *client) return memo_editor_construct (me, client); } -static void -refresh_memo_cmd (GtkWidget *widget, gpointer data) -{ - MemoEditor *me = MEMO_EDITOR (data); - - comp_editor_send_comp (COMP_EDITOR (me), E_CAL_COMPONENT_METHOD_REFRESH); -} - -static void -cancel_memo_cmd (GtkWidget *widget, gpointer data) -{ - MemoEditor *me = MEMO_EDITOR (data); - ECalComponent *comp; - - comp = comp_editor_get_current_comp (COMP_EDITOR (me)); - if (cancel_component_dialog ((GtkWindow *) me, - comp_editor_get_e_cal (COMP_EDITOR (me)), comp, FALSE)) { - comp_editor_send_comp (COMP_EDITOR (me), E_CAL_COMPONENT_METHOD_CANCEL); - comp_editor_delete_comp (COMP_EDITOR (me)); - } -} - -static void -forward_cmd (GtkWidget *widget, gpointer data) -{ - MemoEditor *me = MEMO_EDITOR (data); - - if (comp_editor_save_comp (COMP_EDITOR (me), TRUE)) - comp_editor_send_comp (COMP_EDITOR (me), E_CAL_COMPONENT_METHOD_PUBLISH); -} - -static void -model_changed (MemoEditor *me) -{ - if (!me->priv->updating) { - comp_editor_set_changed (COMP_EDITOR (me), TRUE); - comp_editor_set_needs_send (COMP_EDITOR (me), TRUE); - } -} - -static void -model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) -{ - model_changed (MEMO_EDITOR (data)); -} - -static void -model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data) -{ - model_changed (MEMO_EDITOR (data)); -} diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index eb4b18ccdc..4fa478238f 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -88,7 +88,7 @@ static void memo_page_focus_main_widget (CompEditorPage *page); static gboolean memo_page_fill_widgets (CompEditorPage *page, ECalComponent *comp); static gboolean memo_page_fill_component (CompEditorPage *page, ECalComponent *comp); -G_DEFINE_TYPE (MemoPage, memo_page, TYPE_COMP_EDITOR_PAGE); +G_DEFINE_TYPE (MemoPage, memo_page, TYPE_COMP_EDITOR_PAGE) diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index c3f393b86c..5968ca4324 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -211,7 +211,7 @@ static void field_changed (RecurrencePage *apage); static void make_ending_count_special (RecurrencePage *rpage); static void make_ending_special (RecurrencePage *rpage); -G_DEFINE_TYPE (RecurrencePage, recurrence_page, TYPE_COMP_EDITOR_PAGE); +G_DEFINE_TYPE (RecurrencePage, recurrence_page, TYPE_COMP_EDITOR_PAGE) /* Class initialization function for the recurrence page */ static void @@ -406,18 +406,13 @@ append_exception (RecurrencePage *rpage, ECalComponentDateTime *datetime) static void fill_exception_widgets (RecurrencePage *rpage, ECalComponent *comp) { - RecurrencePagePrivate *priv; GSList *list, *l; - gboolean added = FALSE; - priv = rpage->priv; e_cal_component_get_exdate_list (comp, &list); for (l = list; l; l = l->next) { ECalComponentDateTime *cdt; - added = TRUE; - cdt = l->data; append_exception (rpage, cdt); } @@ -2104,12 +2099,10 @@ static void exception_add_cb (GtkWidget *widget, gpointer data) { RecurrencePage *rpage; - RecurrencePagePrivate *priv; GtkWidget *dialog, *date_edit; gboolean date_set; rpage = RECURRENCE_PAGE (data); - priv = rpage->priv; dialog = create_exception_dialog (rpage, "Add exception", &date_edit); diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c index 42141f296c..ccfa98ee25 100644 --- a/calendar/gui/dialogs/schedule-page.c +++ b/calendar/gui/dialogs/schedule-page.c @@ -79,7 +79,7 @@ static void schedule_page_set_dates (CompEditorPage *page, CompEditorPageDates * static void times_changed_cb (GtkWidget *widget, gpointer data); -G_DEFINE_TYPE (SchedulePage, schedule_page, TYPE_COMP_EDITOR_PAGE); +G_DEFINE_TYPE (SchedulePage, schedule_page, TYPE_COMP_EDITOR_PAGE) /* Class initialization function for the schedule page */ static void @@ -275,9 +275,6 @@ update_time (SchedulePage *spage, ECalComponentDateTime *start_date, ECalCompone static void clear_widgets (SchedulePage *spage) { - SchedulePagePrivate *priv; - - priv = spage->priv; } /* fill_widgets handler for the schedule page */ @@ -321,12 +318,6 @@ schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) static gboolean schedule_page_fill_component (CompEditorPage *page, ECalComponent *comp) { - SchedulePage *spage; - SchedulePagePrivate *priv; - - spage = SCHEDULE_PAGE (page); - priv = spage->priv; - return TRUE; } diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index d8449db72d..aa3b26abef 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -96,7 +96,7 @@ static gboolean task_details_page_fill_widgets (CompEditorPage *page, ECalCompon static gboolean task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp); static gboolean task_details_page_fill_timezones (CompEditorPage *page, GHashTable *timezones); -G_DEFINE_TYPE (TaskDetailsPage, task_details_page, TYPE_COMP_EDITOR_PAGE); +G_DEFINE_TYPE (TaskDetailsPage, task_details_page, TYPE_COMP_EDITOR_PAGE) /* Class initialization function for the task page */ static void @@ -458,13 +458,8 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp) static gboolean task_details_page_fill_timezones (CompEditorPage *page, GHashTable *timezones) { - TaskDetailsPage *tdpage; - TaskDetailsPagePrivate *priv; icaltimezone *zone; - tdpage = TASK_DETAILS_PAGE (page); - priv = tdpage->priv; - /* add UTC timezone, which is the one used for the DATE-COMPLETED property */ zone = icaltimezone_get_utc_timezone (); if (zone) { @@ -537,13 +532,10 @@ get_widgets (TaskDetailsPage *tdpage) static void complete_date_changed (TaskDetailsPage *tdpage, time_t ctime, gboolean complete) { - TaskDetailsPagePrivate *priv; CompEditorPageDates dates = {NULL, NULL, NULL, NULL}; icaltimezone *zone; struct icaltimetype completed_tt = icaltime_null_time(); - priv = tdpage->priv; - /* Get the current time in UTC. */ zone = icaltimezone_get_utc_timezone (); completed_tt = icaltime_from_timet_with_zone (ctime, FALSE, zone); diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c index 4b2d344cf1..32984a64b0 100644 --- a/calendar/gui/dialogs/task-editor.c +++ b/calendar/gui/dialogs/task-editor.c @@ -63,7 +63,7 @@ static void task_editor_finalize (GObject *object); static void model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data); static void model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data); -G_DEFINE_TYPE (TaskEditor, task_editor, TYPE_COMP_EDITOR); +G_DEFINE_TYPE (TaskEditor, task_editor, TYPE_COMP_EDITOR) /* Class initialization function for the event editor */ static void diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 2025c4075c..f112482890 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -146,7 +146,7 @@ static gboolean task_page_fill_timezones (CompEditorPage *page, GHashTable *time static void task_page_set_summary (CompEditorPage *page, const char *summary); static void task_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates); -G_DEFINE_TYPE (TaskPage, task_page, TYPE_COMP_EDITOR_PAGE); +G_DEFINE_TYPE (TaskPage, task_page, TYPE_COMP_EDITOR_PAGE) /* Class initialization function for the task page */ static void @@ -382,7 +382,7 @@ task_page_set_classification (TaskPage *page, ECalComponentClassification class) static void sensitize_widgets (TaskPage *tpage) { - gboolean read_only, sens, sensitize; + gboolean read_only, sens = FALSE, sensitize; TaskPagePrivate *priv; priv = tpage->priv; @@ -706,6 +706,7 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) a = get_current_account (tpage); if (a != NULL) { + /* Reuse *page declared further up? */ CompEditorPage *page = (CompEditorPage *) tpage; priv->ia = e_meeting_store_add_attendee_with_defaults (priv->model); g_object_ref (priv->ia); @@ -981,13 +982,11 @@ add_clicked_cb (GtkButton *btn, TaskPage *page) e_meeting_list_view_edit (page->priv->list_view, attendee); } -edit_clicked_cb (GtkButton *btn, TaskPage *tpage) +void edit_clicked_cb (GtkButton *btn, TaskPage *tpage) { TaskPagePrivate *priv; - EMeetingAttendee *attendee; GtkTreePath *path = NULL; GtkTreeViewColumn *focus_col; - gint row = 0; priv = tpage->priv; @@ -1188,9 +1187,6 @@ static void popup_delete_cb (EPopup *ep, EPopupItem *pitem, void *data) { TaskPage *page = data; - TaskPagePrivate *priv; - - priv = page->priv; remove_clicked_cb (NULL, page); } @@ -1297,9 +1293,7 @@ static gboolean list_key_press (EMeetingListView *list_view, GdkEventKey *event, TaskPage *page) { if (event->keyval == GDK_Delete) { - TaskPagePrivate *priv; - priv = page->priv; remove_clicked_cb (NULL, page); return TRUE; |