From dbc22f9de50142b8339fa843575a5e15bd3fe8ff Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 30 Jan 2011 11:32:55 -0500 Subject: More whitespace cleanup. --- calendar/gui/dialogs/alarm-dialog.c | 99 +++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 49 deletions(-) (limited to 'calendar/gui/dialogs/alarm-dialog.c') diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index 418bf8a704..6d4219c2b4 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -129,7 +129,7 @@ static const gint action_map[] = { static const gchar *action_map_cap[] = { CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS, CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS, - CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS, + CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS, CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS }; @@ -499,46 +499,46 @@ malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) static void alarm_to_malarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm ) { - ENameSelectorModel *name_selector_model; - EDestinationStore *destination_store; - ECalComponentText description; - GtkTextBuffer *text_buffer; - GSList *attendee_list, *l; - gint len; - - /* Attendees */ - name_selector_model = e_name_selector_peek_model (dialog->name_selector); - e_name_selector_model_peek_section (name_selector_model, section_name, NULL, &destination_store); - - e_cal_component_alarm_get_attendee_list (alarm, &attendee_list); - len = g_slist_length (attendee_list); - if (len > 0) { - for (l = attendee_list; l; l = g_slist_next (l)) { - ECalComponentAttendee *a = l->data; - EDestination *dest; - - dest = e_destination_new (); - if (a->cn != NULL && *a->cn) - e_destination_set_name (dest, a->cn); - if (a->value != NULL && *a->value) { - if (!strncasecmp (a->value, "MAILTO:", 7)) - e_destination_set_email (dest, a->value + 7); - else - e_destination_set_email (dest, a->value); - } - e_destination_store_append_destination (destination_store, dest); - g_object_unref (G_OBJECT (dest)); - } - e_cal_component_free_attendee_list (attendee_list); - } - - /* Description */ - e_cal_component_alarm_get_description (alarm, &description); - if (description.value) { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->malarm_message), TRUE); - text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->malarm_description)); - gtk_text_buffer_set_text (text_buffer, description.value, -1); - } + ENameSelectorModel *name_selector_model; + EDestinationStore *destination_store; + ECalComponentText description; + GtkTextBuffer *text_buffer; + GSList *attendee_list, *l; + gint len; + + /* Attendees */ + name_selector_model = e_name_selector_peek_model (dialog->name_selector); + e_name_selector_model_peek_section (name_selector_model, section_name, NULL, &destination_store); + + e_cal_component_alarm_get_attendee_list (alarm, &attendee_list); + len = g_slist_length (attendee_list); + if (len > 0) { + for (l = attendee_list; l; l = g_slist_next (l)) { + ECalComponentAttendee *a = l->data; + EDestination *dest; + + dest = e_destination_new (); + if (a->cn != NULL && *a->cn) + e_destination_set_name (dest, a->cn); + if (a->value != NULL && *a->value) { + if (!strncasecmp (a->value, "MAILTO:", 7)) + e_destination_set_email (dest, a->value + 7); + else + e_destination_set_email (dest, a->value); + } + e_destination_store_append_destination (destination_store, dest); + g_object_unref (G_OBJECT (dest)); + } + e_cal_component_free_attendee_list (attendee_list); + } + + /* Description */ + e_cal_component_alarm_get_description (alarm, &description); + if (description.value) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->malarm_message), TRUE); + text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->malarm_description)); + gtk_text_buffer_set_text (text_buffer, description.value, -1); + } } /* Fills the widgets from procedure alarm data */ @@ -634,8 +634,8 @@ populate_widgets_from_alarm (Dialog *dialog) case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END: e_dialog_combo_box_set (dialog->time_combo, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END, time_map); break; - default: - g_warning ("%s: Unexpected alarm type (%d)", G_STRLOC, trigger->type); + default: + g_warning ("%s: Unexpected alarm type (%d)", G_STRLOC, trigger->type); } switch (trigger->u.rel_duration.is_neg) { @@ -692,8 +692,8 @@ populate_widgets_from_alarm (Dialog *dialog) case E_CAL_COMPONENT_ALARM_PROCEDURE: alarm_to_palarm_widgets (dialog, dialog->alarm); break; - default: - g_warning ("%s: Unexpected alarm action (%d)", G_STRLOC, *action); + default: + g_warning ("%s: Unexpected alarm action (%d)", G_STRLOC, *action); } } @@ -1085,8 +1085,8 @@ check_custom_email (Dialog *dialog) } static void -malarm_addresses_changed_cb (GtkWidget *editable, - gpointer data) +malarm_addresses_changed_cb (GtkWidget *editable, + gpointer data) { Dialog *dialog = data; @@ -1241,8 +1241,9 @@ alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm) gtk_window_set_icon_name ( GTK_WINDOW (dialog.toplevel), "x-office-calendar"); - gtk_window_set_transient_for (GTK_WINDOW (dialog.toplevel), - GTK_WINDOW (parent)); + gtk_window_set_transient_for ( + GTK_WINDOW (dialog.toplevel), + GTK_WINDOW (parent)); response_id = gtk_dialog_run (GTK_DIALOG (dialog.toplevel)); -- cgit v1.2.3 From 54da4fc09cf226fdb59b9f0c70555e2e57dc1f91 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 8 May 2011 13:24:42 -0400 Subject: Coding style cleanups. --- calendar/gui/dialogs/alarm-dialog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/gui/dialogs/alarm-dialog.c') diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index 6d4219c2b4..6b234f6cce 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -820,7 +820,7 @@ get_widgets (Dialog *dialog) N_("Send an email") }; - GtkComboBox *combo = (GtkComboBox*)dialog->action_combo; + GtkComboBox *combo = (GtkComboBox*) dialog->action_combo; GtkCellRenderer *cell; GtkListStore *store; gint i; -- cgit v1.2.3 From 84339b3be5a771406fcd5898bbd21dc1c5b98c82 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 14 Jun 2011 08:54:20 +0200 Subject: Do not use deprecated EBook/ECal API --- calendar/gui/dialogs/alarm-dialog.c | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) (limited to 'calendar/gui/dialogs/alarm-dialog.c') diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index 6b234f6cce..564c4dd1f4 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -54,7 +54,7 @@ typedef struct { ECalComponentAlarm *alarm; /* The client */ - ECal *ecal; + ECalClient *cal_client; /* Toplevel */ GtkWidget *toplevel; @@ -209,16 +209,16 @@ alarm_to_dialog (Dialog *dialog) for (i = 0; valid && action_map[i] != -1; i++) { gtk_list_store_set ( GTK_LIST_STORE (model), &iter, - 1, !e_cal_get_static_capability (dialog->ecal, action_map_cap[i]), + 1, !e_client_check_capability (E_CLIENT (dialog->cal_client), action_map_cap[i]), -1); valid = gtk_tree_model_iter_next (model, &iter); } /* Set a default address if possible */ - if (!e_cal_get_static_capability (dialog->ecal, CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS) - && !e_cal_component_alarm_has_attendees (dialog->alarm) - && e_cal_get_alarm_email_address (dialog->ecal, &email, NULL)) { + if (!e_client_check_capability (E_CLIENT (dialog->cal_client), CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS) + && !e_cal_component_alarm_has_attendees (dialog->alarm) + && e_client_get_backend_property_sync (E_CLIENT (dialog->cal_client), CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS, &email, NULL, NULL)) { ECalComponentAttendee *a; GSList attendee_list; @@ -235,7 +235,7 @@ alarm_to_dialog (Dialog *dialog) } /* If we can repeat */ - repeat = !e_cal_get_static_capability (dialog->ecal, CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT); + repeat = !e_client_check_capability (E_CLIENT (dialog->cal_client), CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT); gtk_widget_set_sensitive (dialog->repeat_toggle, repeat); /* if we are editing a exiting alarm */ @@ -880,27 +880,6 @@ get_widgets (Dialog *dialog) && dialog->palarm_args); } -#if 0 -/* Callback used when the alarm options button is clicked */ -static void -show_options (Dialog *dialog) -{ - gboolean repeat; - gchar *email; - - e_cal_component_alarm_set_action (dialog->alarm, - e_dialog_combo_box_get (dialog->action_combo, action_map)); - - repeat = !e_cal_get_static_capability (dialog->ecal, CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT); - - if (e_cal_get_static_capability (dialog->ecal, CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS) - || e_cal_get_alarm_email_address (dialog->ecal, &email, NULL)) { - if (!alarm_options_dialog_run (dialog->toplevel, dialog->alarm, email, repeat)) - g_message (G_STRLOC ": not create the alarm options dialog"); - } -} -#endif - static void addressbook_clicked_cb (GtkWidget *widget, Dialog *dialog) { @@ -1202,7 +1181,7 @@ init_widgets (Dialog *dialog) } gboolean -alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm) +alarm_dialog_run (GtkWidget *parent, ECalClient *cal_client, ECalComponentAlarm *alarm) { Dialog dialog; GtkWidget *container; @@ -1211,7 +1190,7 @@ alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm) g_return_val_if_fail (alarm != NULL, FALSE); dialog.alarm = alarm; - dialog.ecal = ecal; + dialog.cal_client = cal_client; dialog.builder = gtk_builder_new (); e_load_ui_builder_definition (dialog.builder, "alarm-dialog.ui"); -- cgit v1.2.3 From 54e056e2ddd661e589ccbc31b3faa2999631175e Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 23 Jun 2011 18:30:36 +0200 Subject: Postpone ENameSelector loading as much as possible Also fixes few memory leaks around ENameSelector and cancels loading of its address books when not needed any more. --- calendar/gui/dialogs/alarm-dialog.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'calendar/gui/dialogs/alarm-dialog.c') diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index 564c4dd1f4..ec57b11657 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -903,6 +903,7 @@ setup_select_names (Dialog *dialog) ENameSelectorDialog *name_selector_dialog; dialog->name_selector = e_name_selector_new (); + e_name_selector_load_books (dialog->name_selector); name_selector_model = e_name_selector_peek_model (dialog->name_selector); e_name_selector_model_add_section (name_selector_model, section_name, section_name, NULL); @@ -1229,6 +1230,10 @@ alarm_dialog_run (GtkWidget *parent, ECalClient *cal_client, ECalComponentAlarm if (response_id == GTK_RESPONSE_OK) dialog_to_alarm (&dialog); + if (dialog.name_selector) { + e_name_selector_cancel_loading (dialog.name_selector); + g_object_unref (dialog.name_selector); + } gtk_widget_destroy (dialog.toplevel); g_object_unref (dialog.builder); -- cgit v1.2.3 From 86f37c46dd2f61e86a82938c956490c37ed6f2ce Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Tue, 2 Aug 2011 11:29:12 +0200 Subject: Replace alarm by reminder for UI consistency. Fixes bug #340614 --- calendar/gui/dialogs/alarm-dialog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/gui/dialogs/alarm-dialog.c') diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index ec57b11657..ab50520d5c 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -623,7 +623,7 @@ populate_widgets_from_alarm (Dialog *dialog) if (*action == E_CAL_COMPONENT_ALARM_NONE) return; - gtk_window_set_title (GTK_WINDOW (dialog->toplevel),_("Edit Alarm")); + gtk_window_set_title (GTK_WINDOW (dialog->toplevel),_("Edit Reminder")); /* Alarm Types */ switch (trigger->type) { -- cgit v1.2.3 From 777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 16 Aug 2011 11:25:56 -0400 Subject: Coding style and whitespace cleanup. --- calendar/gui/dialogs/alarm-dialog.c | 121 +++++++++++++++++++++++------------- 1 file changed, 77 insertions(+), 44 deletions(-) (limited to 'calendar/gui/dialogs/alarm-dialog.c') diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index ab50520d5c..59cdb4515b 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -246,7 +246,8 @@ alarm_to_dialog (Dialog *dialog) } static void -alarm_to_repeat_widgets (Dialog *dialog, ECalComponentAlarm *alarm) +alarm_to_repeat_widgets (Dialog *dialog, + ECalComponentAlarm *alarm) { ECalComponentAlarmRepeat repeat; @@ -284,7 +285,8 @@ alarm_to_repeat_widgets (Dialog *dialog, ECalComponentAlarm *alarm) } static void -repeat_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) +repeat_widgets_to_alarm (Dialog *dialog, + ECalComponentAlarm *alarm) { ECalComponentAlarmRepeat repeat; @@ -325,7 +327,8 @@ repeat_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) /* Fills the audio alarm data with the values from the widgets */ static void -aalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) +aalarm_widgets_to_alarm (Dialog *dialog, + ECalComponentAlarm *alarm) { gchar *url; icalattach *attach; @@ -344,7 +347,8 @@ aalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) /* Fills the widgets with audio alarm data */ static void -alarm_to_aalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm) +alarm_to_aalarm_widgets (Dialog *dialog, + ECalComponentAlarm *alarm) { const gchar *url; icalattach *attach; @@ -364,7 +368,8 @@ alarm_to_aalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm) /* Fills the widgets with display alarm data */ static void -alarm_to_dalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm ) +alarm_to_dalarm_widgets (Dialog *dialog, + ECalComponentAlarm *alarm) { ECalComponentText description; GtkTextBuffer *text_buffer; @@ -381,7 +386,8 @@ alarm_to_dalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm ) /* Fills the display alarm data with the values from the widgets */ static void -dalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) +dalarm_widgets_to_alarm (Dialog *dialog, + ECalComponentAlarm *alarm) { gchar *str; ECalComponentText description; @@ -423,7 +429,8 @@ dalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) /* Fills the mail alarm data with the values from the widgets */ static void -malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) +malarm_widgets_to_alarm (Dialog *dialog, + ECalComponentAlarm *alarm) { gchar *str; ECalComponentText description; @@ -497,7 +504,8 @@ malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) /* Fills the widgets from mail alarm data */ static void -alarm_to_malarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm ) +alarm_to_malarm_widgets (Dialog *dialog, + ECalComponentAlarm *alarm) { ENameSelectorModel *name_selector_model; EDestinationStore *destination_store; @@ -543,7 +551,8 @@ alarm_to_malarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm ) /* Fills the widgets from procedure alarm data */ static void -alarm_to_palarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm) +alarm_to_palarm_widgets (Dialog *dialog, + ECalComponentAlarm *alarm) { ECalComponentText description; const gchar *url; @@ -564,7 +573,8 @@ alarm_to_palarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm) /* Fills the procedure alarm data with the values from the widgets */ static void -palarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm) +palarm_widgets_to_alarm (Dialog *dialog, + ECalComponentAlarm *alarm) { gchar *program; icalattach *attach; @@ -820,7 +830,7 @@ get_widgets (Dialog *dialog) N_("Send an email") }; - GtkComboBox *combo = (GtkComboBox*) dialog->action_combo; + GtkComboBox *combo = (GtkComboBox *) dialog->action_combo; GtkCellRenderer *cell; GtkListStore *store; gint i; @@ -881,13 +891,16 @@ get_widgets (Dialog *dialog) } static void -addressbook_clicked_cb (GtkWidget *widget, Dialog *dialog) +addressbook_clicked_cb (GtkWidget *widget, + Dialog *dialog) { e_name_selector_show_dialog (dialog->name_selector, dialog->toplevel); } static void -addressbook_response_cb (GtkWidget *widget, gint response, gpointer data) +addressbook_response_cb (GtkWidget *widget, + gint response, + gpointer data) { Dialog *dialog = data; ENameSelectorDialog *name_selector_dialog; @@ -913,8 +926,9 @@ setup_select_names (Dialog *dialog) gtk_widget_show (dialog->malarm_addresses); gtk_box_pack_end (GTK_BOX (dialog->malarm_address_group), dialog->malarm_addresses, TRUE, TRUE, 0); - g_signal_connect (G_OBJECT (dialog->malarm_addressbook), "clicked", - G_CALLBACK (addressbook_clicked_cb), dialog); + g_signal_connect ( + dialog->malarm_addressbook, "clicked", + G_CALLBACK (addressbook_clicked_cb), dialog); name_selector_dialog = e_name_selector_peek_dialog (dialog->name_selector); g_signal_connect (name_selector_dialog, "response", @@ -927,7 +941,8 @@ setup_select_names (Dialog *dialog) * repeat group options as appropriate. */ static void -repeat_toggle_toggled_cb (GtkToggleButton *toggle, gpointer data) +repeat_toggle_toggled_cb (GtkToggleButton *toggle, + gpointer data) { Dialog *dialog = data; gboolean active; @@ -960,7 +975,8 @@ check_custom_sound (Dialog *dialog) } static void -aalarm_sound_toggled_cb (GtkToggleButton *toggle, gpointer data) +aalarm_sound_toggled_cb (GtkToggleButton *toggle, + gpointer data) { Dialog *dialog = data; gboolean active; @@ -972,7 +988,8 @@ aalarm_sound_toggled_cb (GtkToggleButton *toggle, gpointer data) } static void -aalarm_attach_changed_cb (GtkWidget *widget, gpointer data) +aalarm_attach_changed_cb (GtkWidget *widget, + gpointer data) { Dialog *dialog = data; @@ -999,7 +1016,8 @@ check_custom_message (Dialog *dialog) } static void -dalarm_message_toggled_cb (GtkToggleButton *toggle, gpointer data) +dalarm_message_toggled_cb (GtkToggleButton *toggle, + gpointer data) { Dialog *dialog = data; gboolean active; @@ -1011,7 +1029,8 @@ dalarm_message_toggled_cb (GtkToggleButton *toggle, gpointer data) } static void -dalarm_description_changed_cb (GtkWidget *widget, gpointer data) +dalarm_description_changed_cb (GtkWidget *widget, + gpointer data) { Dialog *dialog = data; @@ -1031,7 +1050,8 @@ check_custom_program (Dialog *dialog) } static void -palarm_program_changed_cb (GtkWidget *widget, gpointer data) +palarm_program_changed_cb (GtkWidget *widget, + gpointer data) { Dialog *dialog = data; @@ -1074,7 +1094,8 @@ malarm_addresses_changed_cb (GtkWidget *editable, } static void -malarm_message_toggled_cb (GtkToggleButton *toggle, gpointer data) +malarm_message_toggled_cb (GtkToggleButton *toggle, + gpointer data) { Dialog *dialog = data; gboolean active; @@ -1086,7 +1107,8 @@ malarm_message_toggled_cb (GtkToggleButton *toggle, gpointer data) } static void -malarm_description_changed_cb (GtkWidget *widget, gpointer data) +malarm_description_changed_cb (GtkWidget *widget, + gpointer data) { Dialog *dialog = data; @@ -1094,7 +1116,8 @@ malarm_description_changed_cb (GtkWidget *widget, gpointer data) } static void -action_changed_cb (GtkWidget *action_combo, gpointer data) +action_changed_cb (GtkWidget *action_combo, + gpointer data) { Dialog *dialog = data; gchar *dir; @@ -1146,43 +1169,53 @@ init_widgets (Dialog *dialog) { GtkTextBuffer *text_buffer; - g_signal_connect (dialog->action_combo, "changed", - G_CALLBACK (action_changed_cb), - dialog); + g_signal_connect ( + dialog->action_combo, "changed", + G_CALLBACK (action_changed_cb), dialog); - g_signal_connect (G_OBJECT (dialog->repeat_toggle), "toggled", - G_CALLBACK (repeat_toggle_toggled_cb), dialog); + g_signal_connect ( + dialog->repeat_toggle, "toggled", + G_CALLBACK (repeat_toggle_toggled_cb), dialog); /* Handle custom sounds */ - g_signal_connect (G_OBJECT (dialog->aalarm_sound), "toggled", - G_CALLBACK (aalarm_sound_toggled_cb), dialog); - g_signal_connect (G_OBJECT (dialog->aalarm_file_chooser), "selection-changed", - G_CALLBACK (aalarm_attach_changed_cb), dialog); + g_signal_connect ( + dialog->aalarm_sound, "toggled", + G_CALLBACK (aalarm_sound_toggled_cb), dialog); + g_signal_connect ( + dialog->aalarm_file_chooser, "selection-changed", + G_CALLBACK (aalarm_attach_changed_cb), dialog); /* Handle custom messages */ - g_signal_connect (G_OBJECT (dialog->dalarm_message), "toggled", - G_CALLBACK (dalarm_message_toggled_cb), dialog); + g_signal_connect ( + dialog->dalarm_message, "toggled", + G_CALLBACK (dalarm_message_toggled_cb), dialog); text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->dalarm_description)); - g_signal_connect (G_OBJECT (text_buffer), "changed", - G_CALLBACK (dalarm_description_changed_cb), dialog); + g_signal_connect ( + text_buffer, "changed", + G_CALLBACK (dalarm_description_changed_cb), dialog); /* Handle program */ - g_signal_connect (G_OBJECT (dialog->palarm_program), "changed", - G_CALLBACK (palarm_program_changed_cb), dialog); + g_signal_connect ( + dialog->palarm_program, "changed", + G_CALLBACK (palarm_program_changed_cb), dialog); /* Handle custom email */ - g_signal_connect (G_OBJECT (dialog->malarm_message), "toggled", - G_CALLBACK (malarm_message_toggled_cb), dialog); + g_signal_connect ( + dialog->malarm_message, "toggled", + G_CALLBACK (malarm_message_toggled_cb), dialog); text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->malarm_description)); - g_signal_connect (G_OBJECT (text_buffer), "changed", - G_CALLBACK (malarm_description_changed_cb), dialog); + g_signal_connect ( + text_buffer, "changed", + G_CALLBACK (malarm_description_changed_cb), dialog); g_signal_connect (dialog->malarm_addresses, "changed", G_CALLBACK (malarm_addresses_changed_cb), dialog); } gboolean -alarm_dialog_run (GtkWidget *parent, ECalClient *cal_client, ECalComponentAlarm *alarm) +alarm_dialog_run (GtkWidget *parent, + ECalClient *cal_client, + ECalComponentAlarm *alarm) { Dialog dialog; GtkWidget *container; -- cgit v1.2.3 From e64d6fe05c30c2cc1d7625a202afba3ba2da07cd Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 22 Nov 2011 18:22:14 -0500 Subject: Miscellaneous cleanups. --- calendar/gui/dialogs/alarm-dialog.c | 1 - 1 file changed, 1 deletion(-) (limited to 'calendar/gui/dialogs/alarm-dialog.c') diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index 4576f3df6f..1c76c79d83 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -45,7 +45,6 @@ #include "comp-editor-util.h" #include "alarm-dialog.h" - typedef struct { GtkBuilder *builder; -- cgit v1.2.3