diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-06-07 04:08:47 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-06-07 08:09:08 +0800 |
commit | ffc019e36fd4703e5342030ca6779032d91c7611 (patch) | |
tree | 511ec7fb99746b600e2c176511d8e056831371bf | |
parent | 3fc28cd410369d299f080e44a71797f00c522eec (diff) | |
download | gsoc2013-evolution-ffc019e36fd4703e5342030ca6779032d91c7611.tar.gz gsoc2013-evolution-ffc019e36fd4703e5342030ca6779032d91c7611.tar.zst gsoc2013-evolution-ffc019e36fd4703e5342030ca6779032d91c7611.zip |
Coding style and whitespace cleanups.
-rw-r--r-- | addressbook/gui/widgets/ea-minicard-view.c | 18 | ||||
-rw-r--r-- | addressbook/importers/evolution-csv-importer.c | 13 | ||||
-rw-r--r-- | calendar/gui/dialogs/schedule-page.c | 178 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-details-page.c | 181 | ||||
-rw-r--r-- | calendar/gui/e-meeting-time-sel.h | 192 | ||||
-rw-r--r-- | calendar/gui/ea-week-view.c | 13 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 121 | ||||
-rw-r--r-- | capplet/anjal-settings-main.c | 9 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 266 | ||||
-rw-r--r-- | doc/reference/shell/tmpl/e-poolv.sgml | 2 | ||||
-rw-r--r-- | e-util/e-xml-utils.c | 81 | ||||
-rw-r--r-- | mail/em-account-editor.c | 2 | ||||
-rw-r--r-- | mail/importers/pine-importer.c | 64 | ||||
-rw-r--r-- | mail/mail-folder-cache.h | 4 | ||||
-rw-r--r-- | modules/addressbook/e-book-shell-migrate.c | 8 | ||||
-rw-r--r-- | plugins/mail-notification/mail-notification.c | 75 | ||||
-rw-r--r-- | widgets/misc/e-selection-model-simple.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-col.c | 25 | ||||
-rw-r--r-- | widgets/table/e-table-search.c | 9 | ||||
-rw-r--r-- | widgets/table/e-table-utils.c | 9 |
20 files changed, 773 insertions, 501 deletions
diff --git a/addressbook/gui/widgets/ea-minicard-view.c b/addressbook/gui/widgets/ea-minicard-view.c index d8bd962467..52624296a3 100644 --- a/addressbook/gui/widgets/ea-minicard-view.c +++ b/addressbook/gui/widgets/ea-minicard-view.c @@ -57,8 +57,13 @@ static gboolean selection_interface_is_child_selected (AtkSelection *selection, static void atk_action_interface_init (AtkActionIface *iface); static gboolean atk_action_interface_do_action (AtkAction *iface, gint i); static gint atk_action_interface_get_n_action (AtkAction *iface); -static G_CONST_RETURN gchar * atk_action_interface_get_description (AtkAction *iface, gint i); -static G_CONST_RETURN gchar * atk_action_interface_get_name (AtkAction *iface, gint i); +static G_CONST_RETURN gchar * + atk_action_interface_get_description + (AtkAction *iface, + gint i); +static G_CONST_RETURN gchar * + atk_action_interface_get_name (AtkAction *iface, + gint i); static gpointer parent_class = NULL; @@ -145,7 +150,8 @@ ea_minicard_view_get_name (AtkObject *accessible) g_return_val_if_fail (EA_IS_MINICARD_VIEW (accessible), NULL); - reflow = E_REFLOW(atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible))); + reflow = E_REFLOW (atk_gobject_accessible_get_object ( + ATK_GOBJECT_ACCESSIBLE (accessible))); if (!reflow) return NULL; @@ -201,7 +207,8 @@ ea_minicard_view_get_n_children (AtkObject *accessible) g_return_val_if_fail (EA_IS_MINICARD_VIEW (accessible), -1); - reflow = E_REFLOW (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible))); + reflow = E_REFLOW (atk_gobject_accessible_get_object ( + ATK_GOBJECT_ACCESSIBLE(accessible))); if (!reflow) return -1; @@ -245,7 +252,8 @@ ea_minicard_view_ref_child (AtkObject *accessible, gint index) if (child_num <= 0 || index < 0 || index >= child_num) return NULL; - reflow = E_REFLOW (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible))); + reflow = E_REFLOW (atk_gobject_accessible_get_object ( + ATK_GOBJECT_ACCESSIBLE (accessible))); if (!reflow) return NULL; if (!reflow->items ) diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c index bcd5a7a801..29204b2c2e 100644 --- a/addressbook/importers/evolution-csv-importer.c +++ b/addressbook/importers/evolution-csv-importer.c @@ -57,7 +57,10 @@ typedef struct { FILE *file; gulong size; gint count; - GHashTable *fields_map; /* gint->gint, column index in the csv file to an index in the known fields array */ + + /* gint -> gint -- Column index in the CSV + * file to an index in the known fields array. */ + GHashTable *fields_map; EBook *book; GSList *contacts; @@ -322,7 +325,7 @@ parseNextValue (const gchar **pptr) g_return_val_if_fail (pptr != NULL, NULL); g_return_val_if_fail (*pptr != NULL, NULL); - + if (!*ptr || *ptr == '\n') return NULL; @@ -476,7 +479,11 @@ parseLine (CSVImporter *gci, EContact *contact, gchar *buf) { e_contact_set (contact, contact_field, value->str); } else { if (contact_field == E_CONTACT_WANTS_HTML) - e_contact_set (contact, contact_field, GINT_TO_POINTER (g_ascii_strcasecmp (value->str, "TRUE") == 0)); + e_contact_set ( + contact, contact_field, + GINT_TO_POINTER ( + g_ascii_strcasecmp ( + value->str, "TRUE") == 0)); else e_contact_set (contact, contact_field, value->str); } diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c index 7cd177e410..b98987618c 100644 --- a/calendar/gui/dialogs/schedule-page.c +++ b/calendar/gui/dialogs/schedule-page.c @@ -65,94 +65,11 @@ struct _SchedulePagePrivate { icaltimezone *zone; }; -static GtkWidget *schedule_page_get_widget (CompEditorPage *page); -static void schedule_page_focus_main_widget (CompEditorPage *page); -static gboolean schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp); -static gboolean schedule_page_fill_component (CompEditorPage *page, ECalComponent *comp); -static void schedule_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates); - static void times_changed_cb (GtkWidget *widget, SchedulePage *spage); G_DEFINE_TYPE (SchedulePage, schedule_page, TYPE_COMP_EDITOR_PAGE) static void -schedule_page_dispose (GObject *object) -{ - SchedulePagePrivate *priv; - - priv = SCHEDULE_PAGE_GET_PRIVATE (object); - - if (priv->main != NULL) { - g_object_unref (priv->main); - priv->main = NULL; - } - - if (priv->builder != NULL) { - g_object_unref (priv->builder); - priv->builder = NULL; - } - - if (priv->model != NULL) { - g_object_unref (priv->model); - priv->model = NULL; - } - - /* Chain up to parent's dispose() method. */ - G_OBJECT_CLASS (schedule_page_parent_class)->dispose (object); -} - -static void -schedule_page_class_init (SchedulePageClass *class) -{ - GObjectClass *object_class; - CompEditorPageClass *editor_page_class; - - g_type_class_add_private (class, sizeof (SchedulePagePrivate)); - - object_class = G_OBJECT_CLASS (class); - object_class->dispose = schedule_page_dispose; - - editor_page_class = COMP_EDITOR_PAGE_CLASS (class); - editor_page_class->get_widget = schedule_page_get_widget; - editor_page_class->focus_main_widget = schedule_page_focus_main_widget; - editor_page_class->fill_widgets = schedule_page_fill_widgets; - editor_page_class->fill_component = schedule_page_fill_component; - editor_page_class->set_dates = schedule_page_set_dates; -} - -static void -schedule_page_init (SchedulePage *spage) -{ - spage->priv = SCHEDULE_PAGE_GET_PRIVATE (spage); -} - -/* get_widget handler for the schedule page */ -static GtkWidget * -schedule_page_get_widget (CompEditorPage *page) -{ - SchedulePage *spage; - SchedulePagePrivate *priv; - - spage = SCHEDULE_PAGE (page); - priv = spage->priv; - - return priv->main; -} - -/* focus_main_widget handler for the schedule page */ -static void -schedule_page_focus_main_widget (CompEditorPage *page) -{ - SchedulePage *spage; - SchedulePagePrivate *priv; - - spage = SCHEDULE_PAGE (page); - priv = spage->priv; - - gtk_widget_grab_focus (GTK_WIDGET (priv->sel)); -} - -static void sensitize_widgets (SchedulePage *spage) { SchedulePagePrivate *priv = spage->priv; @@ -171,7 +88,9 @@ sensitize_widgets (SchedulePage *spage) /* Set date/time */ static void -update_time (SchedulePage *spage, ECalComponentDateTime *start_date, ECalComponentDateTime *end_date) +update_time (SchedulePage *spage, + ECalComponentDateTime *start_date, + ECalComponentDateTime *end_date) { SchedulePagePrivate *priv = spage->priv; CompEditor *editor; @@ -241,13 +160,56 @@ update_time (SchedulePage *spage, ECalComponentDateTime *start_date, ECalCompone } -/* Fills the widgets with default values */ static void -clear_widgets (SchedulePage *spage) +schedule_page_dispose (GObject *object) { + SchedulePagePrivate *priv; + + priv = SCHEDULE_PAGE_GET_PRIVATE (object); + + if (priv->main != NULL) { + g_object_unref (priv->main); + priv->main = NULL; + } + + if (priv->builder != NULL) { + g_object_unref (priv->builder); + priv->builder = NULL; + } + + if (priv->model != NULL) { + g_object_unref (priv->model); + priv->model = NULL; + } + + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (schedule_page_parent_class)->dispose (object); +} + +static GtkWidget * +schedule_page_get_widget (CompEditorPage *page) +{ + SchedulePage *spage; + SchedulePagePrivate *priv; + + spage = SCHEDULE_PAGE (page); + priv = spage->priv; + + return priv->main; +} + +static void +schedule_page_focus_main_widget (CompEditorPage *page) +{ + SchedulePage *spage; + SchedulePagePrivate *priv; + + spage = SCHEDULE_PAGE (page); + priv = spage->priv; + + gtk_widget_grab_focus (GTK_WIDGET (priv->sel)); } -/* fill_widgets handler for the schedule page */ static gboolean schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) { @@ -257,9 +219,6 @@ schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) spage = SCHEDULE_PAGE (page); - /* Clean the screen */ - clear_widgets (spage); - /* Start and end times */ e_cal_component_get_dtstart (comp, &start_date); e_cal_component_get_dtend (comp, &end_date); @@ -278,7 +237,6 @@ schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) return validated; } -/* fill_component handler for the schedule page */ static gboolean schedule_page_fill_component (CompEditorPage *page, ECalComponent *comp) { @@ -297,7 +255,30 @@ schedule_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates) comp_editor_page_set_updating (page, FALSE); } - +static void +schedule_page_class_init (SchedulePageClass *class) +{ + GObjectClass *object_class; + CompEditorPageClass *editor_page_class; + + g_type_class_add_private (class, sizeof (SchedulePagePrivate)); + + object_class = G_OBJECT_CLASS (class); + object_class->dispose = schedule_page_dispose; + + editor_page_class = COMP_EDITOR_PAGE_CLASS (class); + editor_page_class->get_widget = schedule_page_get_widget; + editor_page_class->focus_main_widget = schedule_page_focus_main_widget; + editor_page_class->fill_widgets = schedule_page_fill_widgets; + editor_page_class->fill_component = schedule_page_fill_component; + editor_page_class->set_dates = schedule_page_set_dates; +} + +static void +schedule_page_init (SchedulePage *spage) +{ + spage->priv = SCHEDULE_PAGE_GET_PRIVATE (spage); +} /* Gets the widgets from the XML file and returns if they are all available. */ static gboolean @@ -345,9 +326,10 @@ init_widgets (SchedulePage *spage) return TRUE; } - void -schedule_page_set_meeting_time (SchedulePage *spage, icaltimetype *start_tt, icaltimetype *end_tt) +schedule_page_set_meeting_time (SchedulePage *spage, + icaltimetype *start_tt, + icaltimetype *end_tt) { SchedulePagePrivate *priv; gboolean all_day; @@ -362,9 +344,11 @@ schedule_page_set_meeting_time (SchedulePage *spage, icaltimetype *start_tt, ica } } - e_meeting_time_selector_set_meeting_time (priv->sel, start_tt->year, start_tt->month, start_tt->day, - start_tt->hour, start_tt->minute, end_tt->year, end_tt->month, end_tt->day, end_tt->hour, - end_tt->minute); + e_meeting_time_selector_set_meeting_time ( + priv->sel, start_tt->year, start_tt->month, + start_tt->day, start_tt->hour, start_tt->minute, + end_tt->year, end_tt->month, end_tt->day, + end_tt->hour, end_tt->minute); e_meeting_time_selector_set_all_day (priv->sel, all_day); } diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index f84b07ecd3..35ec225c19 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -88,86 +88,8 @@ static const gint priority_map[] = { -1 }; -static GtkWidget *task_details_page_get_widget (CompEditorPage *page); -static void task_details_page_focus_main_widget (CompEditorPage *page); -static gboolean task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp); -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) -static void -task_details_page_dispose (GObject *object) -{ - TaskDetailsPagePrivate *priv; - - priv = TASK_DETAILS_PAGE_GET_PRIVATE (object); - - if (priv->main != NULL) { - g_object_unref (priv->main); - priv->main = NULL; - } - - if (priv->builder != NULL) { - g_object_unref (priv->builder); - priv->builder = NULL; - } - - /* Chain up to parent's dispose() method. */ - G_OBJECT_CLASS (task_details_page_parent_class)->dispose (object); -} - -static void -task_details_page_class_init (TaskDetailsPageClass *class) -{ - GObjectClass *object_class; - CompEditorPageClass *editor_page_class; - - g_type_class_add_private (class, sizeof (TaskDetailsPagePrivate)); - - object_class = G_OBJECT_CLASS (class); - object_class->dispose = task_details_page_dispose; - - editor_page_class = COMP_EDITOR_PAGE_CLASS (class); - editor_page_class->get_widget = task_details_page_get_widget; - editor_page_class->focus_main_widget = task_details_page_focus_main_widget; - editor_page_class->fill_widgets = task_details_page_fill_widgets; - editor_page_class->fill_component = task_details_page_fill_component; - editor_page_class->fill_timezones = task_details_page_fill_timezones; -} - -static void -task_details_page_init (TaskDetailsPage *tdpage) -{ - tdpage->priv = TASK_DETAILS_PAGE_GET_PRIVATE (tdpage); -} - -/* get_widget handler for the task page */ -static GtkWidget * -task_details_page_get_widget (CompEditorPage *page) -{ - TaskDetailsPage *tdpage; - TaskDetailsPagePrivate *priv; - - tdpage = TASK_DETAILS_PAGE (page); - priv = tdpage->priv; - - return priv->main; -} - -/* focus_main_widget handler for the task page */ -static void -task_details_page_focus_main_widget (CompEditorPage *page) -{ - TaskDetailsPage *tdpage; - TaskDetailsPagePrivate *priv; - - tdpage = TASK_DETAILS_PAGE (page); - priv = tdpage->priv; - - gtk_widget_grab_focus (priv->status_combo); -} - static TaskEditorPriority priority_value_to_index (gint priority_value) { @@ -231,6 +153,7 @@ sensitize_widgets (TaskDetailsPage *tdpage) { TaskDetailsPagePrivate *priv = tdpage->priv; CompEditor *editor; + GtkWidget *entry; ECal *client; gboolean read_only; @@ -245,12 +168,59 @@ sensitize_widgets (TaskDetailsPage *tdpage) gtk_widget_set_sensitive (priv->percent_complete, !read_only); gtk_widget_set_sensitive (priv->completed_date, !read_only); gtk_widget_set_sensitive (priv->url_label, !read_only); - gtk_editable_set_editable (GTK_EDITABLE (e_url_entry_get_entry (E_URL_ENTRY (priv->url_entry))), !read_only); + + entry = e_url_entry_get_entry (E_URL_ENTRY (priv->url_entry)); + gtk_editable_set_editable (GTK_EDITABLE (entry), !read_only); +} + +static void +task_details_page_dispose (GObject *object) +{ + TaskDetailsPagePrivate *priv; + + priv = TASK_DETAILS_PAGE_GET_PRIVATE (object); + + if (priv->main != NULL) { + g_object_unref (priv->main); + priv->main = NULL; + } + + if (priv->builder != NULL) { + g_object_unref (priv->builder); + priv->builder = NULL; + } + + /* Chain up to parent's dispose() method. */ + G_OBJECT_CLASS (task_details_page_parent_class)->dispose (object); +} + +static GtkWidget * +task_details_page_get_widget (CompEditorPage *page) +{ + TaskDetailsPage *tdpage; + TaskDetailsPagePrivate *priv; + + tdpage = TASK_DETAILS_PAGE (page); + priv = tdpage->priv; + + return priv->main; +} + +static void +task_details_page_focus_main_widget (CompEditorPage *page) +{ + TaskDetailsPage *tdpage; + TaskDetailsPagePrivate *priv; + + tdpage = TASK_DETAILS_PAGE (page); + priv = tdpage->priv; + + gtk_widget_grab_focus (priv->status_combo); } -/* fill_widgets handler for the task page */ static gboolean -task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) +task_details_page_fill_widgets (CompEditorPage *page, + ECalComponent *comp) { TaskDetailsPage *tdpage; TaskDetailsPagePrivate *priv; @@ -337,9 +307,9 @@ task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) return TRUE; } -/* fill_component handler for the task page */ static gboolean -task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp) +task_details_page_fill_component (CompEditorPage *page, + ECalComponent *comp) { TaskDetailsPage *tdpage; TaskDetailsPagePrivate *priv; @@ -376,7 +346,9 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp) /* Completed Date. */ if (!e_date_edit_date_is_valid (E_DATE_EDIT (priv->completed_date)) || !e_date_edit_time_is_valid (E_DATE_EDIT (priv->completed_date))) { - comp_editor_page_display_validation_error (page, _("Completed date is wrong"), priv->completed_date); + comp_editor_page_display_validation_error ( + page, _("Completed date is wrong"), + priv->completed_date); return FALSE; } @@ -396,7 +368,9 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp) icaltimezone_get_utc_timezone()); if (icaltime_compare_date_only (icalcomplete, icaltoday) > 0) { - comp_editor_page_display_validation_error (page, _("Completed date is wrong"), priv->completed_date); + comp_editor_page_display_validation_error ( + page, _("Completed date is wrong"), + priv->completed_date); return FALSE; } @@ -422,9 +396,9 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp) return TRUE; } -/* fill_timezones handler for the event page */ static gboolean -task_details_page_fill_timezones (CompEditorPage *page, GHashTable *timezones) +task_details_page_fill_timezones (CompEditorPage *page, + GHashTable *timezones) { icaltimezone *zone; @@ -438,7 +412,30 @@ task_details_page_fill_timezones (CompEditorPage *page, GHashTable *timezones) return TRUE; } - +static void +task_details_page_class_init (TaskDetailsPageClass *class) +{ + GObjectClass *object_class; + CompEditorPageClass *editor_page_class; + + g_type_class_add_private (class, sizeof (TaskDetailsPagePrivate)); + + object_class = G_OBJECT_CLASS (class); + object_class->dispose = task_details_page_dispose; + + editor_page_class = COMP_EDITOR_PAGE_CLASS (class); + editor_page_class->get_widget = task_details_page_get_widget; + editor_page_class->focus_main_widget = task_details_page_focus_main_widget; + editor_page_class->fill_widgets = task_details_page_fill_widgets; + editor_page_class->fill_component = task_details_page_fill_component; + editor_page_class->fill_timezones = task_details_page_fill_timezones; +} + +static void +task_details_page_init (TaskDetailsPage *tdpage) +{ + tdpage->priv = TASK_DETAILS_PAGE_GET_PRIVATE (tdpage); +} /* Gets the widgets from the XML file and returns if they are all available. */ static gboolean @@ -674,8 +671,12 @@ init_widgets (TaskDetailsPage *tdpage) tdpage, NULL); /* These are created by hand, so hook the mnemonics manually */ - gtk_label_set_mnemonic_widget (GTK_LABEL (priv->date_completed_label), priv->completed_date); - gtk_label_set_mnemonic_widget (GTK_LABEL (priv->url_label), priv->url_entry); + gtk_label_set_mnemonic_widget ( + GTK_LABEL (priv->date_completed_label), + priv->completed_date); + gtk_label_set_mnemonic_widget ( + GTK_LABEL (priv->url_label), + priv->url_entry); /* Connect signals. The Status, Percent Complete & Date Completed properties are closely related so whenever one changes we may need diff --git a/calendar/gui/e-meeting-time-sel.h b/calendar/gui/e-meeting-time-sel.h index 1c61353c7b..dc1f2c8eeb 100644 --- a/calendar/gui/e-meeting-time-sel.h +++ b/calendar/gui/e-meeting-time-sel.h @@ -307,71 +307,85 @@ void e_meeting_time_selector_set_week_start_day Note that months are 1-12 and days are 1-31. The start time is guaranteed to be before or equal to the end time. You may want to check if they are equal if that if it is a problem. */ -void e_meeting_time_selector_get_meeting_time (EMeetingTimeSelector *mts, - gint *start_year, - gint *start_month, - gint *start_day, - gint *start_hour, - gint *start_minute, - gint *end_year, - gint *end_month, - gint *end_day, - gint *end_hour, - gint *end_minute); +void e_meeting_time_selector_get_meeting_time + (EMeetingTimeSelector *mts, + gint *start_year, + gint *start_month, + gint *start_day, + gint *start_hour, + gint *start_minute, + gint *end_year, + gint *end_month, + gint *end_day, + gint *end_hour, + gint *end_minute); /* This sets the meeting time, returning TRUE if it is valid. */ -gboolean e_meeting_time_selector_set_meeting_time (EMeetingTimeSelector *mts, - gint start_year, - gint start_month, - gint start_day, - gint start_hour, - gint start_minute, - gint end_year, - gint end_month, - gint end_day, - gint end_hour, - gint end_minute); - -void e_meeting_time_selector_set_all_day (EMeetingTimeSelector *mts, - gboolean all_day); -void e_meeting_time_selector_set_working_hours_only (EMeetingTimeSelector *mts, - gboolean working_hours_only); -void e_meeting_time_selector_set_working_hours (EMeetingTimeSelector *mts, - gint day_start_hour, - gint day_start_minute, - gint day_end_hour, - gint day_end_minute); - -void e_meeting_time_selector_set_zoomed_out (EMeetingTimeSelector *mts, - gboolean zoomed_out); - -EMeetingTimeSelectorAutopickOption e_meeting_time_selector_get_autopick_option (EMeetingTimeSelector *mts); -void e_meeting_time_selector_set_autopick_option (EMeetingTimeSelector *mts, - EMeetingTimeSelectorAutopickOption autopick_option); - -void e_meeting_time_selector_attendee_set_send_meeting_to (EMeetingTimeSelector *mts, - gint row, - gboolean send_meeting_to); - -void e_meeting_time_selector_set_read_only (EMeetingTimeSelector *mts, gboolean read_only); +gboolean e_meeting_time_selector_set_meeting_time + (EMeetingTimeSelector *mts, + gint start_year, + gint start_month, + gint start_day, + gint start_hour, + gint start_minute, + gint end_year, + gint end_month, + gint end_day, + gint end_hour, + gint end_minute); + +void e_meeting_time_selector_set_all_day + (EMeetingTimeSelector *mts, + gboolean all_day); +void e_meeting_time_selector_set_working_hours_only + (EMeetingTimeSelector *mts, + gboolean working_hours_only); +void e_meeting_time_selector_set_working_hours + (EMeetingTimeSelector *mts, + gint day_start_hour, + gint day_start_minute, + gint day_end_hour, + gint day_end_minute); + +void e_meeting_time_selector_set_zoomed_out + (EMeetingTimeSelector *mts, + gboolean zoomed_out); + +EMeetingTimeSelectorAutopickOption + e_meeting_time_selector_get_autopick_option + (EMeetingTimeSelector *mts); +void e_meeting_time_selector_set_autopick_option + (EMeetingTimeSelector *mts, + EMeetingTimeSelectorAutopickOption autopick_option); + +void e_meeting_time_selector_attendee_set_send_meeting_to + (EMeetingTimeSelector *mts, + gint row, + gboolean send_meeting_to); + +void e_meeting_time_selector_set_read_only + (EMeetingTimeSelector *mts, + gboolean read_only); /* Clears all busy times for the given attendee. */ -void e_meeting_time_selector_attendee_clear_busy_periods (EMeetingTimeSelector *mts, - gint row); +void e_meeting_time_selector_attendee_clear_busy_periods + (EMeetingTimeSelector *mts, + gint row); /* Adds one busy time for the given attendee. */ -gboolean e_meeting_time_selector_attendee_add_busy_period (EMeetingTimeSelector *mts, - gint row, - gint start_year, - gint start_month, - gint start_day, - gint start_hour, - gint start_minute, - gint end_year, - gint end_month, - gint end_day, - gint end_hour, - gint end_minute, - EMeetingFreeBusyType busy_type); +gboolean e_meeting_time_selector_attendee_add_busy_period + (EMeetingTimeSelector *mts, + gint row, + gint start_year, + gint start_month, + gint start_day, + gint start_hour, + gint start_minute, + gint end_year, + gint end_month, + gint end_day, + gint end_hour, + gint end_minute, + EMeetingFreeBusyType busy_type); /* * INTERNAL ROUTINES - functions to communicate with the canvas items within @@ -381,34 +395,50 @@ gboolean e_meeting_time_selector_attendee_add_busy_period (EMeetingTimeSelector /* This returns the x pixel coordinates of the meeting start and end times, in the entire canvas scroll area. If it returns FALSE, then the meeting time isn't in the current scroll area (which shouldn't really happen). */ -gboolean e_meeting_time_selector_get_meeting_time_positions (EMeetingTimeSelector *mts, - gint *start_x, - gint *end_x); +gboolean e_meeting_time_selector_get_meeting_time_positions + (EMeetingTimeSelector *mts, + gint *start_x, + gint *end_x); -void e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts, - gint x); +void e_meeting_time_selector_drag_meeting_time + (EMeetingTimeSelector *mts, + gint x); -void e_meeting_time_selector_remove_timeout (EMeetingTimeSelector *mts); +void e_meeting_time_selector_remove_timeout + (EMeetingTimeSelector *mts); -void e_meeting_time_selector_fix_time_overflows (EMeetingTime*mtstime); +void e_meeting_time_selector_fix_time_overflows + (EMeetingTime*mtstime); -void e_meeting_time_selector_calculate_day_and_position (EMeetingTimeSelector *mts, - gint x, - GDate *date, - gint *day_position); -void e_meeting_time_selector_convert_day_position_to_hours_and_mins (EMeetingTimeSelector *mts, gint day_position, guint8 *hours, guint8 *minutes); -void e_meeting_time_selector_calculate_time (EMeetingTimeSelector *mts, - gint x, - EMeetingTime*time); -gint e_meeting_time_selector_calculate_time_position (EMeetingTimeSelector *mts, - EMeetingTime *mtstime); -void e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, gint row, gboolean all); +void e_meeting_time_selector_calculate_day_and_position + (EMeetingTimeSelector *mts, + gint x, + GDate *date, + gint *day_position); +void e_meeting_time_selector_convert_day_position_to_hours_and_mins + (EMeetingTimeSelector *mts, + gint day_position, + guint8 *hours, + guint8 *minutes); +void e_meeting_time_selector_calculate_time + (EMeetingTimeSelector *mts, + gint x, + EMeetingTime*time); +gint e_meeting_time_selector_calculate_time_position + (EMeetingTimeSelector *mts, + EMeetingTime *mtstime); +void e_meeting_time_selector_refresh_free_busy + (EMeetingTimeSelector *mts, + gint row, + gboolean all); /* Debugging function to dump information on all attendees. */ #ifdef E_MEETING_TIME_SELECTOR_DEBUG -void e_meeting_time_selector_dump (EMeetingTimeSelector *mts); -gchar * e_meeting_time_selector_dump_time (EMeetingTime*mtstime); -gchar * e_meeting_time_selector_dump_date (GDate *date); +void e_meeting_time_selector_dump (EMeetingTimeSelector *mts); +gchar * e_meeting_time_selector_dump_time + (EMeetingTime *mtstime); +gchar * e_meeting_time_selector_dump_date + (GDate *date); #endif /* E_MEETING_TIME_SELECTOR_DEBUG */ G_END_DECLS diff --git a/calendar/gui/ea-week-view.c b/calendar/gui/ea-week-view.c index 14bb456219..fcbae83cb7 100644 --- a/calendar/gui/ea-week-view.c +++ b/calendar/gui/ea-week-view.c @@ -147,7 +147,9 @@ ea_week_view_get_name (AtkObject *accessible) /* the child main item is always there */ --n_events; if (n_events >= 1) - event_str = g_strdup_printf (ngettext ("It has %d event.", "It has %d events.", n_events), n_events); + event_str = g_strdup_printf ( + ngettext ("It has %d event.", "It has %d events.", + n_events), n_events); else event_str = g_strdup (_("It has no events.")); @@ -280,7 +282,8 @@ ea_week_view_ref_child (AtkObject *accessible, gint index) if (index == 0) { /* index == 0 is the main item */ - atk_object = atk_gobject_accessible_for_object (G_OBJECT (week_view->main_canvas_item)); + atk_object = atk_gobject_accessible_for_object ( + G_OBJECT (week_view->main_canvas_item)); g_object_ref (atk_object); } else for (event_index = 0; event_index < max_count; ++event_index) { @@ -318,7 +321,11 @@ ea_week_view_ref_child (AtkObject *accessible, gint index) atk_object = ea_calendar_helpers_get_accessible_for (span->text_item); } else { - atk_object = ea_calendar_helpers_get_accessible_for (week_view->jump_buttons[current_day == -1 ? 0 : current_day]); + gint index; + + index = (current_day != -1) ? current_day : 0; + atk_object = ea_calendar_helpers_get_accessible_for ( + week_view->jump_buttons[index]); } g_object_ref (atk_object); break; diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 2f2bb4821d..38121c095c 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -127,8 +127,9 @@ struct _GnomeCalendarPrivate { time_t visible_end; gboolean updating; - /* If this is true list view uses range of showing the events as the dates selected in date navigator which is one month, else - it uses the date range set in search bar */ + /* If this is true, list view uses range of showing the events + * as the dates selected in date navigator which is one month, + * else it uses the date range set in search bar. */ gboolean lview_select_daten_range; /* used in update_todo_view, to prevent interleaving when called in separate thread */ @@ -162,7 +163,9 @@ static void gnome_calendar_goto_date (GnomeCalendar *gcal, static void gnome_calendar_update_date_navigator (GnomeCalendar *gcal); -static gboolean gnome_calendar_hpane_resized (GtkWidget *w, GdkEventButton *e, GnomeCalendar *gcal); +static gboolean gnome_calendar_hpane_resized (GtkWidget *widget, + GdkEventButton *e, + GnomeCalendar *gcal); static void update_todo_view (GnomeCalendar *gcal); static void update_memo_view (GnomeCalendar *gcal); @@ -768,8 +771,10 @@ dn_e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer data) continue; } - tag_calendar_by_comp (priv->date_navigator, comp, e_cal_view_get_client (query), NULL, - FALSE, TRUE); + tag_calendar_by_comp ( + priv->date_navigator, comp, + e_cal_view_get_client (query), + NULL, FALSE, TRUE); g_object_unref (comp); } } @@ -820,7 +825,11 @@ gnome_calendar_get_calendar_view (GnomeCalendar *gcal, } static void -get_times_for_views (GnomeCalendar *gcal, GnomeCalendarViewType view_type, time_t *start_time, time_t *end_time, time_t *select_time) +get_times_for_views (GnomeCalendar *gcal, + GnomeCalendarViewType view_type, + time_t *start_time, + time_t *end_time, + time_t *select_time) { GnomeCalendarPrivate *priv; ECalModel *model; @@ -918,7 +927,9 @@ 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 (!range_selected && (!E_WEEK_VIEW (priv->views[view_type])->multi_week_view || !E_WEEK_VIEW (priv->views[view_type])->month_scroll_by_week)) + if (!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, timezone); *start_time = time_week_begin_with_zone (*start_time, display_start, timezone); *end_time = time_add_week_with_zone (*start_time, shown, timezone); @@ -1248,19 +1259,25 @@ update_todo_view_async (struct _mupdate_todo_msg *msg) static gboolean update_todo_view_done (struct _mupdate_todo_msg *msg) { + EMemoTable *memo_table; + ETaskTable *task_table; + EShellView *shell_view; GnomeCalendar *gcal; - GnomeCalendarPrivate *priv; g_return_val_if_fail (msg != NULL, FALSE); gcal = msg->gcal; - priv = gcal->priv; - g_return_val_if_fail (priv->task_table != NULL, FALSE); - g_return_val_if_fail (priv->memo_table != NULL, FALSE); + g_return_val_if_fail (gcal->priv->task_table != NULL, FALSE); + g_return_val_if_fail (gcal->priv->memo_table != NULL, FALSE); - e_shell_view_unblock_update_actions (e_task_table_get_shell_view (E_TASK_TABLE (priv->task_table))); - e_shell_view_unblock_update_actions (e_memo_table_get_shell_view (E_MEMO_TABLE (priv->memo_table))); + task_table = E_TASK_TABLE (gcal->priv->task_table); + shell_view = e_task_table_get_shell_view (task_table); + e_shell_view_unblock_update_actions (shell_view); + + memo_table = E_MEMO_TABLE (gcal->priv->memo_table); + shell_view = e_memo_table_get_shell_view (memo_table); + e_shell_view_unblock_update_actions (shell_view); g_object_unref (msg->gcal); g_slice_free (struct _mupdate_todo_msg, msg); @@ -1271,6 +1288,9 @@ update_todo_view_done (struct _mupdate_todo_msg *msg) static void update_todo_view (GnomeCalendar *gcal) { + EMemoTable *memo_table; + ETaskTable *task_table; + EShellView *shell_view; struct _mupdate_todo_msg *msg; /* they are both or none anyway */ @@ -1282,8 +1302,13 @@ update_todo_view (GnomeCalendar *gcal) msg->header.done = (GSourceFunc) update_todo_view_done; msg->gcal = g_object_ref (gcal); - e_shell_view_block_update_actions (e_task_table_get_shell_view (E_TASK_TABLE (gcal->priv->task_table))); - e_shell_view_block_update_actions (e_memo_table_get_shell_view (E_MEMO_TABLE (gcal->priv->memo_table))); + task_table = E_TASK_TABLE (gcal->priv->task_table); + shell_view = e_task_table_get_shell_view (task_table); + e_shell_view_block_update_actions (shell_view); + + memo_table = E_MEMO_TABLE (gcal->priv->memo_table); + shell_view = e_memo_table_get_shell_view (memo_table); + e_shell_view_block_update_actions (shell_view); message_push ((Message *) msg); } @@ -1309,15 +1334,14 @@ update_memo_view (GnomeCalendar *gcal) iso_start = isodate_from_time_t (start); iso_end = isodate_from_time_t (end); - if (priv->memo_sexp) { - g_free (priv->memo_sexp); - } + g_free (priv->memo_sexp); - priv->memo_sexp = g_strdup_printf ("(and (or (not (has-start?)) (occur-in-time-range? (make-time \"%s\")" - " (make-time \"%s\"))" - " ) %s)", - iso_start, iso_end, - priv->sexp ? priv->sexp : ""); + priv->memo_sexp = g_strdup_printf ( + "(and (or (not (has-start?)) " + "(occur-in-time-range? (make-time \"%s\")" + " (make-time \"%s\"))) %s)", + iso_start, iso_end, + priv->sexp ? priv->sexp : ""); e_cal_model_set_search_query (model, priv->memo_sexp); @@ -1336,7 +1360,10 @@ process_completed_tasks (GnomeCalendar *gcal, gboolean config_changed) priv = gcal->priv; - e_calendar_table_process_completed_tasks (E_CALENDAR_TABLE (priv->todo), priv->clients_list[E_CAL_SOURCE_TYPE_TODO], config_changed); + e_calendar_table_process_completed_tasks ( + E_CALENDAR_TABLE (priv->todo), + priv->clients_list[E_CAL_SOURCE_TYPE_TODO], + config_changed); #endif } @@ -1398,11 +1425,15 @@ setup_widgets (GnomeCalendar *gcal) /* Timeout check to hide completed items */ #if 0 /* KILL-BONOBO */ - priv->update_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_todo_view_cb, gcal, NULL); + priv->update_timeout = g_timeout_add_full ( + G_PRIORITY_LOW, 60000, (GSourceFunc) + update_todo_view_cb, gcal, NULL); #endif /* The Marcus Bains line */ - priv->update_marcus_bains_line_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_marcus_bains_line_cb, gcal, NULL); + priv->update_marcus_bains_line_timeout = g_timeout_add_full ( + G_PRIORITY_LOW, 60000, (GSourceFunc) + update_marcus_bains_line_cb, gcal, NULL); /* update_memo_view (gcal); */ } @@ -1417,10 +1448,8 @@ gnome_calendar_init (GnomeCalendar *gcal) gcal->priv = priv; if (non_intrusive_error_table == NULL) - non_intrusive_error_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); - - if (non_intrusive_error_table == NULL) - non_intrusive_error_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); + non_intrusive_error_table = g_hash_table_new_full ( + g_str_hash, g_str_equal, g_free, g_object_unref); priv->todo_update_lock = g_mutex_new (); priv->dn_query_lock = g_mutex_new (); @@ -1637,7 +1666,9 @@ gnome_calendar_update_view_times (GnomeCalendar *gcal, model = gnome_calendar_get_model (gcal); - get_times_for_views (gcal, priv->current_view_type, &real_start_time, &end_time, &select_time); + get_times_for_views ( + gcal, priv->current_view_type, + &real_start_time, &end_time, &select_time); if (priv->current_view_type == GNOME_CAL_LIST_VIEW && !priv->lview_select_daten_range) return; @@ -1645,7 +1676,9 @@ gnome_calendar_update_view_times (GnomeCalendar *gcal, e_cal_model_set_time_range (model, real_start_time, end_time); if (select_time != 0 && select_time >= real_start_time && select_time <= end_time) - e_calendar_view_set_selected_time_range (priv->views[priv->current_view_type], select_time, select_time); + e_calendar_view_set_selected_time_range ( + priv->views[priv->current_view_type], + select_time, select_time); } static void @@ -2033,12 +2066,14 @@ gnome_calendar_new_task (GnomeCalendar *gcal, time_t *dtstart, time_t *dtend) dt.tzid = icaltimezone_get_tzid (e_cal_model_get_timezone (model)); if (dtstart) { - itt = icaltime_from_timet_with_zone (*dtstart, FALSE, e_cal_model_get_timezone (model)); + itt = icaltime_from_timet_with_zone ( + *dtstart, FALSE, e_cal_model_get_timezone (model)); e_cal_component_set_dtstart (comp, &dt); } if (dtend) { - itt = icaltime_from_timet_with_zone (*dtend, FALSE, e_cal_model_get_timezone (model)); + itt = icaltime_from_timet_with_zone ( + *dtend, FALSE, e_cal_model_get_timezone (model)); e_cal_component_set_due (comp, &dt); /* task uses 'due' not 'dtend' */ } @@ -2115,7 +2150,9 @@ gnome_calendar_update_date_navigator (GnomeCalendar *gcal) } static gboolean -gnome_calendar_hpane_resized (GtkWidget *w, GdkEventButton *e, GnomeCalendar *gcal) +gnome_calendar_hpane_resized (GtkWidget *widget, + GdkEventButton *event, + GnomeCalendar *gcal) { GnomeCalendarPrivate *priv; ECalendarView *view; @@ -2139,9 +2176,13 @@ gnome_calendar_hpane_resized (GtkWidget *w, GdkEventButton *e, GnomeCalendar *gc times_width = e_day_view_time_item_get_column_width ( E_DAY_VIEW_TIME_ITEM (E_DAY_VIEW (view)->time_canvas_item)); if (times_width < priv->hpane_pos - 20) - gtk_widget_set_size_request (E_DAY_VIEW (view)->time_canvas, times_width, -1); + gtk_widget_set_size_request ( + E_DAY_VIEW (view)->time_canvas, + times_width, -1); else - gtk_widget_set_size_request (E_DAY_VIEW (view)->time_canvas, priv->hpane_pos - 20, -1); + gtk_widget_set_size_request ( + E_DAY_VIEW (view)->time_canvas, + priv->hpane_pos - 20, -1); return FALSE; } @@ -2260,7 +2301,8 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) /* FIXME write occur-before and occur-after * sexp funcs so we don't have to use the max * gint */ - if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER)) { + if (!e_cal_get_static_capability ( + client, CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER)) { struct purge_data pd; pd.remove = TRUE; @@ -2279,7 +2321,8 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) const gchar *uid = icalcomponent_get_uid (m->data); GError *error = NULL; - if (e_cal_util_component_is_instance (m->data) || e_cal_util_component_has_recurrences (m->data)) { + if (e_cal_util_component_is_instance (m->data) || + e_cal_util_component_has_recurrences (m->data)) { gchar *rid = NULL; struct icaltimetype recur_id = icalcomponent_get_recurrenceid (m->data); diff --git a/capplet/anjal-settings-main.c b/capplet/anjal-settings-main.c index aa090e36fd..e789f91965 100644 --- a/capplet/anjal-settings-main.c +++ b/capplet/anjal-settings-main.c @@ -56,7 +56,7 @@ gboolean windowed = FALSE; gboolean anjal_icon_decoration = FALSE; gboolean default_app = FALSE; guint32 socket_id = 0; -MailCappletShell *main_window; +GtkWidget *main_window; static gchar **remaining_args; extern gchar *shell_moduledir; @@ -164,7 +164,7 @@ create_default_shell (void) { main_window = mail_capplet_shell_new(socket_id, FALSE, TRUE); if (!socket_id) - gtk_widget_show (GTK_WIDGET (main_window)); + gtk_widget_show (main_window); g_idle_add ((GSourceFunc) idle_cb, remaining_args); } @@ -254,8 +254,9 @@ main (gint argc, gchar *argv[]) create_default_shell (); - g_signal_connect (UNIQUE_APP(app), "message-received", - G_CALLBACK (mail_message_received_cb), main_window); + g_signal_connect ( + UNIQUE_APP(app), "message-received", + G_CALLBACK (mail_message_received_cb), main_window); if (windowed) anjal_icon_decoration = TRUE; diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 67a9781395..ba09088897 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -94,14 +94,24 @@ static GList *add_recipients (GList *list, const gchar *recips); static void handle_mailto (EMsgComposer *composer, const gchar *mailto); /* used by e_msg_composer_add_message_attachments () */ -static void add_attachments_from_multipart (EMsgComposer *composer, CamelMultipart *multipart, - gboolean just_inlines, gint depth); +static void add_attachments_from_multipart (EMsgComposer *composer, + CamelMultipart *multipart, + gboolean just_inlines, + gint depth); /* used by e_msg_composer_new_with_message () */ -static void handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, gint depth); -static void handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart, gint depth); -static void handle_multipart_encrypted (EMsgComposer *composer, CamelMimePart *multipart, gint depth); -static void handle_multipart_signed (EMsgComposer *composer, CamelMultipart *multipart, gint depth); +static void handle_multipart (EMsgComposer *composer, + CamelMultipart *multipart, + gint depth); +static void handle_multipart_alternative (EMsgComposer *composer, + CamelMultipart *multipart, + gint depth); +static void handle_multipart_encrypted (EMsgComposer *composer, + CamelMimePart *multipart, + gint depth); +static void handle_multipart_signed (EMsgComposer *composer, + CamelMultipart *multipart, + gint depth); static void msg_composer_drag_data_received (GtkWidget *widget, GdkDragContext *context, @@ -137,11 +147,14 @@ emcu_part_to_html (CamelMimePart *part, gssize *len, EMFormat *source) emfq = em_format_quote_new (NULL, (CamelStream *)mem, EM_FORMAT_QUOTE_KEEP_SIG); ((EMFormat *) emfq)->composer = TRUE; if (source) { - /* copy over things we can, other things are internal, perhaps need different api than 'clone' */ + /* Copy over things we can, other things are internal. + * XXX Perhaps need different api than 'clone'. */ if (source->default_charset) - em_format_set_default_charset((EMFormat *)emfq, source->default_charset); + em_format_set_default_charset ( + (EMFormat *) emfq, source->default_charset); if (source->charset) - em_format_set_default_charset((EMFormat *)emfq, source->charset); + em_format_set_default_charset ( + (EMFormat *) emfq, source->charset); } em_format_part((EMFormat *) emfq, (CamelStream *)mem, part); g_object_unref(emfq); @@ -192,7 +205,10 @@ emcu_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *tag, . button = gtk_dialog_run (mbox); if (promptkey) - gconf_client_set_bool(gconf, promptkey, !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check)), NULL); + gconf_client_set_bool ( + gconf, promptkey, + !gtk_toggle_button_get_active ( + GTK_TOGGLE_BUTTON (check)), NULL); gtk_widget_destroy((GtkWidget*) mbox); g_object_unref (gconf); @@ -302,7 +318,9 @@ best_encoding (GByteArray *buf, const gchar *charset) if (status == (gsize) -1 || status > 0) return -1; - if ((count == 0) && (buf->len < LINE_LEN) && !text_requires_quoted_printable ((const gchar *)buf->data, buf->len)) + if ((count == 0) && (buf->len < LINE_LEN) && + !text_requires_quoted_printable ( + (const gchar *) buf->data, buf->len)) return CAMEL_TRANSFER_ENCODING_7BIT; else if (count <= buf->len * 0.17) return CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE; @@ -311,7 +329,9 @@ best_encoding (GByteArray *buf, const gchar *charset) } static gchar * -best_charset (GByteArray *buf, const gchar *default_charset, CamelTransferEncoding *encoding) +best_charset (GByteArray *buf, + const gchar *default_charset, + CamelTransferEncoding *encoding) { gchar *charset; @@ -894,7 +914,11 @@ build_message (EMsgComposer *composer, /* Setup working recipient list if we're encrypting */ if (pgp_encrypt || smime_encrypt) { gint j; - const gchar *types[] = { CAMEL_RECIPIENT_TYPE_TO, CAMEL_RECIPIENT_TYPE_CC, CAMEL_RECIPIENT_TYPE_BCC }; + const gchar *types[] = { + CAMEL_RECIPIENT_TYPE_TO, + CAMEL_RECIPIENT_TYPE_CC, + CAMEL_RECIPIENT_TYPE_BCC + }; recipients = g_ptr_array_new (); for (i = 0; i < G_N_ELEMENTS (types); i++) { @@ -952,7 +976,8 @@ build_message (EMsgComposer *composer, if (pgp_encrypt) { CamelMimePart *npart = camel_mime_part_new (); - /* check to see if we should encrypt to self, NB gets removed immediately after use */ + /* Check to see if we should encrypt to self. + * NB gets removed immediately after use */ if (account && account->pgp_encrypt_to_self && pgp_userid) g_ptr_array_add (recipients, g_strdup (pgp_userid)); @@ -997,17 +1022,25 @@ build_message (EMsgComposer *composer, camel_mime_part_set_encoding (part, plain_encoding); g_object_unref (current); - if (smime_sign - && (account == NULL || account->smime_sign_key == NULL || account->smime_sign_key[0] == 0)) { - camel_exception_set (&ex, CAMEL_EXCEPTION_SYSTEM, - _("Cannot sign outgoing message: No signing certificate set for this account")); + if (smime_sign && (account == NULL || + account->smime_sign_key == NULL || + account->smime_sign_key[0] == 0)) { + camel_exception_set ( + &ex, CAMEL_EXCEPTION_SYSTEM, + _("Cannot sign outgoing message: " + "No signing certificate set for " + "this account")); goto exception; } - if (smime_encrypt - && (account == NULL || account->smime_sign_key == NULL || account->smime_sign_key[0] == 0)) { - camel_exception_set (&ex, CAMEL_EXCEPTION_SYSTEM, - _("Cannot encrypt outgoing message: No encryption certificate set for this account")); + if (smime_encrypt && (account == NULL || + account->smime_sign_key == NULL || + account->smime_sign_key[0] == 0)) { + camel_exception_set ( + &ex, CAMEL_EXCEPTION_SYSTEM, + _("Cannot encrypt outgoing message: " + "No encryption certificate set for " + "this account")); goto exception; } @@ -1018,14 +1051,25 @@ build_message (EMsgComposer *composer, /* if we're also encrypting, envelope-sign rather than clear-sign */ if (smime_encrypt) { - camel_smime_context_set_sign_mode ((CamelSMIMEContext *)cipher, CAMEL_SMIME_SIGN_ENVELOPED); - camel_smime_context_set_encrypt_key ((CamelSMIMEContext *)cipher, TRUE, account->smime_encrypt_key); - } else if (account && account->smime_encrypt_key && *account->smime_encrypt_key) { - camel_smime_context_set_encrypt_key ((CamelSMIMEContext *)cipher, TRUE, account->smime_encrypt_key); + camel_smime_context_set_sign_mode ( + (CamelSMIMEContext *) cipher, + CAMEL_SMIME_SIGN_ENVELOPED); + camel_smime_context_set_encrypt_key ( + (CamelSMIMEContext *) cipher, + TRUE, account->smime_encrypt_key); + } else if (account && + account->smime_encrypt_key && + *account->smime_encrypt_key) { + camel_smime_context_set_encrypt_key ( + (CamelSMIMEContext *) cipher, + TRUE, account->smime_encrypt_key); } camel_cipher_sign (cipher, account->smime_sign_key, - account_hash_algo_to_camel_hash (account ? e_account_get_string (account, E_ACCOUNT_SMIME_HASH_ALGORITHM) : NULL), + account_hash_algo_to_camel_hash ( + (account != NULL) ? + e_account_get_string (account, + E_ACCOUNT_SMIME_HASH_ALGORITHM) : NULL), part, npart, &ex); g_object_unref (cipher); @@ -1042,10 +1086,14 @@ build_message (EMsgComposer *composer, /* check to see if we should encrypt to self, NB removed after use */ if (account->smime_encrypt_to_self) - g_ptr_array_add (recipients, g_strdup (account->smime_encrypt_key)); + g_ptr_array_add ( + recipients, g_strdup ( + account->smime_encrypt_key)); cipher = camel_smime_context_new (session); - camel_smime_context_set_encrypt_key ((CamelSMIMEContext *)cipher, TRUE, account->smime_encrypt_key); + camel_smime_context_set_encrypt_key ( + (CamelSMIMEContext *) cipher, TRUE, + account->smime_encrypt_key); camel_cipher_encrypt (cipher, NULL, recipients, part, (CamelMimePart *)new, &ex); g_object_unref (cipher); @@ -1246,8 +1294,12 @@ add_signature_delim (void) #define CONVERT_SPACES CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES #define NO_SIGNATURE_TEXT \ - "<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature\" value=\"1\">-->" \ - "<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature_name\" value=\"uid:Noname\">--><BR>" + "<!--+GtkHTML:<DATA class=\"ClueFlow\" " \ + " key=\"signature\" " \ + " value=\"1\">-->" \ + "<!--+GtkHTML:<DATA class=\"ClueFlow\" " \ + " key=\"signature_name\" " \ + " value=\"uid:Noname\">--><BR>" static gchar * get_signature_html (EMsgComposer *composer) @@ -1292,7 +1344,9 @@ get_signature_html (EMsgComposer *composer) id = account->id; address = id->address ? camel_text_to_html (id->address, CONVERT_SPACES, 0) : NULL; name = id->name ? camel_text_to_html (id->name, CONVERT_SPACES, 0) : NULL; - organization = id->organization ? camel_text_to_html (id->organization, CONVERT_SPACES, 0) : NULL; + organization = + id->organization ? camel_text_to_html ( + id->organization, CONVERT_SPACES, 0) : NULL; text = g_strdup_printf ("%s%s%s%s%s%s%s%s%s", add_delim ? "-- \n<BR>" : "", @@ -1319,21 +1373,26 @@ get_signature_html (EMsgComposer *composer) if (signature) encoded_uid = encode_signature_uid (signature); - /* The signature dash convention ("-- \n") is specified in the - * "Son of RFC 1036": http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html, - * section 4.3.2. + /* The signature dash convention ("-- \n") is specified + * in the "Son of RFC 1036", section 4.3.2. + * http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html */ - html = g_strdup_printf ("<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature\" value=\"1\">-->" - "<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature_name\" value=\"uid:%s\">-->" - "<TABLE WIDTH=\"100%%\" CELLSPACING=\"0\" CELLPADDING=\"0\"><TR><TD>" - "%s%s%s%s" - "%s</TD></TR></TABLE>", - encoded_uid ? encoded_uid : "", - format_html ? "" : "<PRE>\n", - !add_delim ? "" : (!strncmp (sig_delim, text, strlen (sig_delim)) || strstr (text, sig_delim_ent)) ? "" : sig_delim, - text, - format_html ? "" : "</PRE>\n", - is_top_signature (composer) ? "<BR>" : ""); + html = g_strdup_printf ( + "<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature\" value=\"1\">-->" + "<!--+GtkHTML:<DATA class=\"ClueFlow\" key=\"signature_name\" value=\"uid:%s\">-->" + "<TABLE WIDTH=\"100%%\" CELLSPACING=\"0\" CELLPADDING=\"0\"><TR><TD>" + "%s%s%s%s" + "%s</TD></TR></TABLE>", + encoded_uid ? encoded_uid : "", + format_html ? "" : "<PRE>\n", + !add_delim ? "" : + (!strncmp ( + sig_delim, text, strlen (sig_delim)) || + strstr (text, sig_delim_ent)) + ? "" : sig_delim, + text, + format_html ? "" : "</PRE>\n", + is_top_signature (composer) ? "<BR>" : ""); g_free (text); g_free (encoded_uid); text = html; @@ -2298,8 +2357,10 @@ add_attachments_handle_mime_part (EMsgComposer *composer, composer, mime_part); } else if (related && camel_content_type_is (content_type, "image", "*")) { e_msg_composer_add_inline_image_from_mime_part (composer, mime_part); - } else if (camel_content_type_is (content_type, "text", "*") && camel_mime_part_get_filename (mime_part) == NULL) { - /* do nothing if this is a text/anything without filename, otherwise attach it too */ + } else if (camel_content_type_is (content_type, "text", "*") && + camel_mime_part_get_filename (mime_part) == NULL) { + /* Do nothing if this is a text/anything without a + * filename, otherwise attach it too. */ } else { e_msg_composer_attach (composer, mime_part); } @@ -2372,15 +2433,18 @@ handle_multipart_signed (EMsgComposer *composer, CamelContentType *content_type; CamelDataWrapper *content; CamelMimePart *mime_part; - GtkToggleAction *action = NULL; + GtkToggleAction *action; const gchar *protocol; - content_type = camel_data_wrapper_get_mime_type_field (CAMEL_DATA_WRAPPER (multipart)); + content = CAMEL_DATA_WRAPPER (multipart); + content_type = camel_data_wrapper_get_mime_type_field (content); protocol = camel_content_type_param (content_type, "protocol"); - if (protocol && g_ascii_strcasecmp (protocol, "application/pgp-signature") == 0) + if (protocol == NULL) + action = NULL; + else if (g_ascii_strcasecmp (protocol, "application/pgp-signature") == 0) action = GTK_TOGGLE_ACTION (ACTION (PGP_SIGN)); - else if (protocol && g_ascii_strcasecmp (protocol, "application/x-pkcs7-signature") == 0) + else if (g_ascii_strcasecmp (protocol, "application/x-pkcs7-signature") == 0) action = GTK_TOGGLE_ACTION (ACTION (SMIME_SIGN)); if (action) @@ -2393,7 +2457,6 @@ handle_multipart_signed (EMsgComposer *composer, return; content_type = camel_mime_part_get_content_type (mime_part); - content = camel_medium_get_content (CAMEL_MEDIUM (mime_part)); if (CAMEL_IS_MULTIPART (content)) { @@ -2405,18 +2468,26 @@ handle_multipart_signed (EMsgComposer *composer, here. */ if (CAMEL_IS_MULTIPART_SIGNED (content)) { - /* handle the signed content and configure the composer to sign outgoing messages */ + /* Handle the signed content and configure + * the composer to sign outgoing messages. */ handle_multipart_signed (composer, multipart, depth); + } else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) { - /* decrypt the encrypted content and configure the composer to encrypt outgoing messages */ + /* Decrypt the encrypted content and configure + * the composer to encrypt outgoing messages. */ handle_multipart_encrypted (composer, mime_part, depth); + } else if (camel_content_type_is (content_type, "multipart", "alternative")) { - /* this contains the text/plain and text/html versions of the message body */ - handle_multipart_alternative (composer, multipart, depth); + /* This contains the text/plain and text/html + * versions of the message body. */ + handle_multipart_alternative ( + composer, multipart, depth); + } else { - /* there must be attachments... */ + /* There must be attachments... */ handle_multipart (composer, multipart, depth); } + } else if (camel_content_type_is (content_type, "text", "*")) { gchar *html; gssize length; @@ -2480,18 +2551,27 @@ handle_multipart_encrypted (EMsgComposer *composer, here. */ if (CAMEL_IS_MULTIPART_SIGNED (content)) { - /* handle the signed content and configure the composer to sign outgoing messages */ - handle_multipart_signed (composer, content_multipart, depth); + /* Handle the signed content and configure the + * composer to sign outgoing messages. */ + handle_multipart_signed ( + composer, content_multipart, depth); + } else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) { - /* decrypt the encrypted content and configure the composer to encrypt outgoing messages */ + /* Decrypt the encrypted content and configure the + * composer to encrypt outgoing messages. */ handle_multipart_encrypted (composer, mime_part, depth); + } else if (camel_content_type_is (content_type, "multipart", "alternative")) { - /* this contains the text/plain and text/html versions of the message body */ - handle_multipart_alternative (composer, content_multipart, depth); + /* This contains the text/plain and text/html + * versions of the message body. */ + handle_multipart_alternative ( + composer, content_multipart, depth); + } else { - /* there must be attachments... */ + /* There must be attachments... */ handle_multipart (composer, content_multipart, depth); } + } else if (camel_content_type_is (content_type, "text", "*")) { gchar *html; gssize length; @@ -2535,15 +2615,22 @@ handle_multipart_alternative (EMsgComposer *composer, mp = CAMEL_MULTIPART (content); if (CAMEL_IS_MULTIPART_SIGNED (content)) { - /* handle the signed content and configure the composer to sign outgoing messages */ + /* Handle the signed content and configure + * the composer to sign outgoing messages. */ handle_multipart_signed (composer, mp, depth + 1); + } else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) { - /* decrypt the encrypted content and configure the composer to encrypt outgoing messages */ - handle_multipart_encrypted (composer, mime_part, depth + 1); + /* Decrypt the encrypted content and configure + * the composer to encrypt outgoing messages. */ + handle_multipart_encrypted ( + composer, mime_part, depth + 1); + } else { - /* depth doesn't matter so long as we don't pass 0 */ + /* Depth doesn't matter so long as we + * don't pass 0. */ handle_multipart (composer, mp, depth + 1); } + } else if (camel_content_type_is (content_type, "text", "html")) { /* text/html is preferable, so once we find it we're done... */ text_part = mime_part; @@ -2595,17 +2682,26 @@ handle_multipart (EMsgComposer *composer, mp = CAMEL_MULTIPART (content); if (CAMEL_IS_MULTIPART_SIGNED (content)) { - /* handle the signed content and configure the composer to sign outgoing messages */ + /* Handle the signed content and configure + * the composer to sign outgoing messages. */ handle_multipart_signed (composer, mp, depth + 1); + } else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) { - /* decrypt the encrypted content and configure the composer to encrypt outgoing messages */ - handle_multipart_encrypted (composer, mime_part, depth + 1); + /* Decrypt the encrypted content and configure + * the composer to encrypt outgoing messages. */ + handle_multipart_encrypted ( + composer, mime_part, depth + 1); + } else if (camel_content_type_is (content_type, "multipart", "alternative")) { - handle_multipart_alternative (composer, mp, depth + 1); + handle_multipart_alternative ( + composer, mp, depth + 1); + } else { - /* depth doesn't matter so long as we don't pass 0 */ + /* Depth doesn't matter so long as we + * don't pass 0. */ handle_multipart (composer, mp, depth + 1); } + } else if (depth == 0 && i == 0) { gchar *html; gssize length; @@ -2701,7 +2797,8 @@ e_msg_composer_new_with_message (CamelMimeMessage *message) } /* Restore the Account preference */ - account_name = (gchar *) camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Account"); + account_name = (gchar *) camel_medium_get_header ( + CAMEL_MEDIUM (message), "X-Evolution-Account"); if (account_name) { account_name = g_strdup (account_name); g_strstrip (account_name); @@ -2914,16 +3011,23 @@ e_msg_composer_new_with_message (CamelMimeMessage *message) content_type = camel_mime_part_get_content_type (CAMEL_MIME_PART (message)); if (CAMEL_IS_MULTIPART_SIGNED (content)) { - /* handle the signed content and configure the composer to sign outgoing messages */ + /* Handle the signed content and configure the + * composer to sign outgoing messages. */ handle_multipart_signed (composer, multipart, 0); + } else if (CAMEL_IS_MULTIPART_ENCRYPTED (content)) { - /* decrypt the encrypted content and configure the composer to encrypt outgoing messages */ - handle_multipart_encrypted (composer, CAMEL_MIME_PART (message), 0); + /* Decrypt the encrypted content and configure the + * composer to encrypt outgoing messages. */ + handle_multipart_encrypted ( + composer, CAMEL_MIME_PART (message), 0); + } else if (camel_content_type_is (content_type, "multipart", "alternative")) { - /* this contains the text/plain and text/html versions of the message body */ + /* This contains the text/plain and text/html + * versions of the message body. */ handle_multipart_alternative (composer, multipart, 0); + } else { - /* there must be attachments... */ + /* There must be attachments... */ handle_multipart (composer, multipart, 0); } } else { @@ -3328,7 +3432,9 @@ e_msg_composer_set_body (EMsgComposer *composer, table = e_msg_composer_get_header_table (composer); - buff = g_strconcat ("<b>(", _("The composer contains a non-text message body, which cannot be edited."), ")</b>", NULL); + buff = g_markup_printf_escaped ("<b>%s</b>", + _("The composer contains a non-text " + "message body, which cannot be edited.")); set_editor_text (composer, buff, FALSE); g_free (buff); gtkhtml_editor_set_html_mode (GTKHTML_EDITOR (composer), FALSE); diff --git a/doc/reference/shell/tmpl/e-poolv.sgml b/doc/reference/shell/tmpl/e-poolv.sgml index d143d30c9f..e58dc345ef 100644 --- a/doc/reference/shell/tmpl/e-poolv.sgml +++ b/doc/reference/shell/tmpl/e-poolv.sgml @@ -9,13 +9,11 @@ EPoolv </para> - <!-- ##### SECTION See_Also ##### --> <para> </para> - <!-- ##### SECTION Stability_Level ##### --> diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c index 3f651e99b4..22daa3baa3 100644 --- a/e-util/e-xml-utils.c +++ b/e-util/e-xml-utils.c @@ -49,8 +49,8 @@ */ xmlNode * e_xml_get_child_by_name_by_lang (const xmlNode *parent, - const xmlChar *child_name, - const gchar *lang) + const xmlChar *child_name, + const gchar *lang) { #ifdef G_OS_WIN32 gchar *freeme = NULL; @@ -94,9 +94,9 @@ e_xml_get_child_by_name_by_lang (const xmlNode *parent, static xmlNode * e_xml_get_child_by_name_by_lang_list_with_score (const xmlNode *parent, - const gchar *name, - const GList *lang_list, - gint *best_lang_score) + const gchar *name, + const GList *lang_list, + gint *best_lang_score) { xmlNodePtr best_node = NULL, node; @@ -133,14 +133,10 @@ e_xml_get_child_by_name_by_lang_list_with_score (const xmlNode *parent, return best_node; } -/* - * e_xml_get_child_by_name_by_lang_list: - * - */ xmlNode * e_xml_get_child_by_name_by_lang_list (const xmlNode *parent, - const gchar *name, - const GList *lang_list) + const gchar *name, + const GList *lang_list) { gint best_lang_score = INT_MAX; @@ -161,12 +157,9 @@ e_xml_get_child_by_name_by_lang_list (const xmlNode *parent, &best_lang_score); } -/* - * e_xml_get_child_by_name_no_lang - * - */ xmlNode * -e_xml_get_child_by_name_no_lang (const xmlNode *parent, const gchar *name) +e_xml_get_child_by_name_no_lang (const xmlNode *parent, + const gchar *name) { xmlNodePtr node; @@ -190,7 +183,8 @@ e_xml_get_child_by_name_no_lang (const xmlNode *parent, const gchar *name) } gint -e_xml_get_integer_prop_by_name (const xmlNode *parent, const xmlChar *prop_name) +e_xml_get_integer_prop_by_name (const xmlNode *parent, + const xmlChar *prop_name) { g_return_val_if_fail (parent != NULL, 0); g_return_val_if_fail (prop_name != NULL, 0); @@ -200,8 +194,8 @@ e_xml_get_integer_prop_by_name (const xmlNode *parent, const xmlChar *prop_name) gint e_xml_get_integer_prop_by_name_with_default (const xmlNode *parent, - const xmlChar *prop_name, - gint def) + const xmlChar *prop_name, + gint def) { xmlChar *prop; gint ret_val = def; @@ -219,8 +213,8 @@ e_xml_get_integer_prop_by_name_with_default (const xmlNode *parent, void e_xml_set_integer_prop_by_name (xmlNode *parent, - const xmlChar *prop_name, - gint value) + const xmlChar *prop_name, + gint value) { gchar *valuestr; @@ -233,7 +227,8 @@ e_xml_set_integer_prop_by_name (xmlNode *parent, } guint -e_xml_get_uint_prop_by_name (const xmlNode *parent, const xmlChar *prop_name) +e_xml_get_uint_prop_by_name (const xmlNode *parent, + const xmlChar *prop_name) { g_return_val_if_fail (parent != NULL, 0); g_return_val_if_fail (prop_name != NULL, 0); @@ -243,8 +238,8 @@ e_xml_get_uint_prop_by_name (const xmlNode *parent, const xmlChar *prop_name) guint e_xml_get_uint_prop_by_name_with_default (const xmlNode *parent, - const xmlChar *prop_name, - guint def) + const xmlChar *prop_name, + guint def) { xmlChar *prop; guint ret_val = def; @@ -262,8 +257,8 @@ e_xml_get_uint_prop_by_name_with_default (const xmlNode *parent, void e_xml_set_uint_prop_by_name (xmlNode *parent, - const xmlChar *prop_name, - guint value) + const xmlChar *prop_name, + guint value) { gchar *valuestr; @@ -277,7 +272,7 @@ e_xml_set_uint_prop_by_name (xmlNode *parent, gboolean e_xml_get_bool_prop_by_name (const xmlNode *parent, - const xmlChar *prop_name) + const xmlChar *prop_name) { g_return_val_if_fail (parent != NULL, 0); g_return_val_if_fail (prop_name != NULL, 0); @@ -288,9 +283,9 @@ e_xml_get_bool_prop_by_name (const xmlNode *parent, } gboolean -e_xml_get_bool_prop_by_name_with_default(const xmlNode *parent, - const xmlChar *prop_name, - gboolean def) +e_xml_get_bool_prop_by_name_with_default (const xmlNode *parent, + const xmlChar *prop_name, + gboolean def) { xmlChar *prop; gboolean ret_val = def; @@ -311,7 +306,9 @@ e_xml_get_bool_prop_by_name_with_default(const xmlNode *parent, } void -e_xml_set_bool_prop_by_name (xmlNode *parent, const xmlChar *prop_name, gboolean value) +e_xml_set_bool_prop_by_name (xmlNode *parent, + const xmlChar *prop_name, + gboolean value) { g_return_if_fail (parent != NULL); g_return_if_fail (prop_name != NULL); @@ -324,7 +321,8 @@ e_xml_set_bool_prop_by_name (xmlNode *parent, const xmlChar *prop_name, gboolean } gdouble -e_xml_get_double_prop_by_name (const xmlNode *parent, const xmlChar *prop_name) +e_xml_get_double_prop_by_name (const xmlNode *parent, + const xmlChar *prop_name) { g_return_val_if_fail (parent != NULL, 0); g_return_val_if_fail (prop_name != NULL, 0); @@ -333,7 +331,9 @@ e_xml_get_double_prop_by_name (const xmlNode *parent, const xmlChar *prop_name) } gdouble -e_xml_get_double_prop_by_name_with_default (const xmlNode *parent, const xmlChar *prop_name, gdouble def) +e_xml_get_double_prop_by_name_with_default (const xmlNode *parent, + const xmlChar *prop_name, + gdouble def) { xmlChar *prop; gdouble ret_val = def; @@ -350,7 +350,9 @@ e_xml_get_double_prop_by_name_with_default (const xmlNode *parent, const xmlChar } void -e_xml_set_double_prop_by_name(xmlNode *parent, const xmlChar *prop_name, gdouble value) +e_xml_set_double_prop_by_name (xmlNode *parent, + const xmlChar *prop_name, + gdouble value) { gchar buffer[E_ASCII_DTOSTR_BUF_SIZE]; gchar *format; @@ -379,7 +381,9 @@ e_xml_get_string_prop_by_name (const xmlNode *parent, const xmlChar *prop_name) } gchar * -e_xml_get_string_prop_by_name_with_default (const xmlNode *parent, const xmlChar *prop_name, const gchar *def) +e_xml_get_string_prop_by_name_with_default (const xmlNode *parent, + const xmlChar *prop_name, + const gchar *def) { xmlChar *prop; gchar *ret_val; @@ -398,7 +402,9 @@ e_xml_get_string_prop_by_name_with_default (const xmlNode *parent, const xmlChar } void -e_xml_set_string_prop_by_name (xmlNode *parent, const xmlChar *prop_name, const gchar *value) +e_xml_set_string_prop_by_name (xmlNode *parent, + const xmlChar *prop_name, + const gchar *value) { g_return_if_fail (parent != NULL); g_return_if_fail (prop_name != NULL); @@ -409,7 +415,8 @@ e_xml_set_string_prop_by_name (xmlNode *parent, const xmlChar *prop_name, const } gchar * -e_xml_get_translated_string_prop_by_name (const xmlNode *parent, const xmlChar *prop_name) +e_xml_get_translated_string_prop_by_name (const xmlNode *parent, + const xmlChar *prop_name) { xmlChar *prop; gchar *ret_val = NULL; diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 9476a05874..fb208687b2 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -2689,7 +2689,7 @@ section: camel_url_free (url); gtk_widget_show (w); - + return w; } diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c index ed3b62e0b1..e6cc75e63c 100644 --- a/mail/importers/pine-importer.c +++ b/mail/importers/pine-importer.c @@ -118,8 +118,10 @@ import_contact(EBook *book, gchar *line) addr[len-1] = 0; addrs = g_strsplit(addr+1, ",", 0); list = NULL; - /* So ... this api is just insane ... we set plain strings as the contact email if it - is a normal contact, but need to do this xml crap for mailing lists */ + /* XXX So ... this api is just insane ... we set + * plain strings as the contact email if it + * is a normal contact, but need to do this + * XML crap for mailing lists. */ for (i=0;addrs[i];i++) { EDestination *d; EVCardAttribute *attr; @@ -241,7 +243,7 @@ pine_import_exec(struct _pine_import_msg *m) } static void -pine_import_done(struct _pine_import_msg *m) +pine_import_done (struct _pine_import_msg *m) { printf("importing complete\n"); @@ -260,7 +262,7 @@ pine_import_done(struct _pine_import_msg *m) } static void -pine_import_free(struct _pine_import_msg *m) +pine_import_free (struct _pine_import_msg *m) { camel_operation_unref(m->status); @@ -274,7 +276,10 @@ pine_import_free(struct _pine_import_msg *m) } static void -pine_status(CamelOperation *op, const gchar *what, gint pc, gpointer data) +pine_status (CamelOperation *op, + const gchar *what, + gint pc, + gpointer data) { struct _pine_import_msg *importer = data; @@ -291,9 +296,8 @@ pine_status(CamelOperation *op, const gchar *what, gint pc, gpointer data) } static gboolean -pine_status_timeout(gpointer data) +pine_status_timeout (struct _pine_import_msg *importer) { - struct _pine_import_msg *importer = data; gint pc; gchar *what; @@ -304,7 +308,9 @@ pine_status_timeout(gpointer data) pc = importer->status_pc; g_mutex_unlock(importer->status_lock); - e_import_status(importer->import, (EImportTarget *)importer->target, what, pc); + e_import_status ( + importer->import, (EImportTarget *) + importer->target, what, pc); } return TRUE; @@ -319,7 +325,8 @@ static MailMsgInfo pine_import_info = { }; static gint -mail_importer_pine_import(EImport *ei, EImportTarget *target) +mail_importer_pine_import (EImport *ei, + EImportTarget *target) { struct _pine_import_msg *m; gint id; @@ -329,7 +336,8 @@ mail_importer_pine_import(EImport *ei, EImportTarget *target) m->import = ei; g_object_ref(m->import); m->target = target; - m->status_timeout_id = g_timeout_add(100, pine_status_timeout, m); + m->status_timeout_id = g_timeout_add ( + 100, (GSourceFunc) pine_status_timeout, m); m->status_lock = g_mutex_new(); m->status = camel_operation_new(pine_status, m); @@ -341,15 +349,29 @@ mail_importer_pine_import(EImport *ei, EImportTarget *target) } static void -checkbox_mail_toggle_cb(GtkToggleButton *tb, EImportTarget *target) +checkbox_mail_toggle_cb (GtkToggleButton *tb, + EImportTarget *target) { - g_datalist_set_data(&target->data, "pine-do-mail", GINT_TO_POINTER(gtk_toggle_button_get_active(tb))); + gboolean active; + + active = gtk_toggle_button_get_active (tb); + + g_datalist_set_data ( + &target->data, "pine-do-mail", + GINT_TO_POINTER (active)); } static void -checkbox_addr_toggle_cb(GtkToggleButton *tb, EImportTarget *target) +checkbox_addr_toggle_cb (GtkToggleButton *tb, + EImportTarget *target) { - g_datalist_set_data(&target->data, "pine-do-addr", GINT_TO_POINTER(gtk_toggle_button_get_active(tb))); + gboolean active; + + active = gtk_toggle_button_get_active (tb); + + g_datalist_set_data ( + &target->data, "pine-do-addr", + GINT_TO_POINTER (active)); } static GtkWidget * @@ -360,12 +382,18 @@ pine_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im) gboolean done_mail, done_addr; gconf = gconf_client_get_default (); - done_mail = gconf_client_get_bool (gconf, "/apps/evolution/importer/pine/mail", NULL); - done_addr = gconf_client_get_bool (gconf, "/apps/evolution/importer/pine/address", NULL); + done_mail = gconf_client_get_bool ( + gconf, "/apps/evolution/importer/pine/mail", NULL); + done_addr = gconf_client_get_bool ( + gconf, "/apps/evolution/importer/pine/address", NULL); g_object_unref(gconf); - g_datalist_set_data(&target->data, "pine-do-mail", GINT_TO_POINTER(!done_mail)); - g_datalist_set_data(&target->data, "pine-do-addr", GINT_TO_POINTER(!done_addr)); + g_datalist_set_data ( + &target->data, "pine-do-mail", + GINT_TO_POINTER (!done_mail)); + g_datalist_set_data ( + &target->data, "pine-do-addr", + GINT_TO_POINTER (!done_addr)); box = gtk_vbox_new(FALSE, 2); diff --git a/mail/mail-folder-cache.h b/mail/mail-folder-cache.h index d2c09d834a..55aaeb9651 100644 --- a/mail/mail-folder-cache.h +++ b/mail/mail-folder-cache.h @@ -59,7 +59,9 @@ typedef struct _MailFolderCachePrivate MailFolderCachePrivate; * The signature of a function to be registered as a callback for * mail_folder_cache_note_store() */ -typedef gboolean (*NoteDoneFunc)(CamelStore *store, CamelFolderInfo *info, gpointer data); +typedef gboolean (*NoteDoneFunc) (CamelStore *store, + CamelFolderInfo *info, + gpointer data); /** * MailFolderCache: diff --git a/modules/addressbook/e-book-shell-migrate.c b/modules/addressbook/e-book-shell-migrate.c index 5cc22a50d6..7440564380 100644 --- a/modules/addressbook/e-book-shell-migrate.c +++ b/modules/addressbook/e-book-shell-migrate.c @@ -96,9 +96,13 @@ create_groups (MigrationContext *context, group = E_SOURCE_GROUP (g->data); - if (!*on_this_computer && !strcmp (base_uri_proto, e_source_group_peek_base_uri (group))) + if (!*on_this_computer && + !strcmp (base_uri_proto, + e_source_group_peek_base_uri (group))) *on_this_computer = g_object_ref (group); - else if (!*on_ldap_servers && !strcmp (LDAP_BASE_URI, e_source_group_peek_base_uri (group))) + else if (!*on_ldap_servers && + !strcmp (LDAP_BASE_URI, + e_source_group_peek_base_uri (group))) *on_ldap_servers = g_object_ref (group); } } diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index e6dd1a267d..0d3a76a0fb 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -117,7 +117,12 @@ static DBusConnection *bus = NULL; static gboolean init_dbus (void); static void -send_dbus_message (const gchar *name, const gchar *data, guint new, const gchar *msg_uid, const gchar *msg_sender, const gchar *msg_subject) +send_dbus_message (const gchar *name, + const gchar *data, + guint new, + const gchar *msg_uid, + const gchar *msg_sender, + const gchar *msg_subject) { DBusMessage *message; @@ -210,7 +215,9 @@ static void new_notify_dbus (EMEventTargetFolder *t) { if (bus != NULL) - send_dbus_message ("Newmail", t->uri, t->new, t->msg_uid, t->msg_sender, t->msg_subject); + send_dbus_message ( + "Newmail", t->uri, t->new, t->msg_uid, + t->msg_sender, t->msg_subject); } static void @@ -343,7 +350,9 @@ do_properties (GtkMenuItem *item, gpointer user_data) if (!cfg) return; - text = g_strconcat ("<span size=\"x-large\">", _("Evolution's Mail Notification"), "</span>", NULL); + text = g_markup_printf_escaped ( + "<span size=\"x-large\">%s</span>", + _("Evolution's Mail Notification")); vbox = gtk_vbox_new (FALSE, 10); label = gtk_label_new (NULL); @@ -384,7 +393,10 @@ do_properties (GtkMenuItem *item, gpointer user_data) } static void -popup_menu_status (GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data) +popup_menu_status (GtkStatusIcon *status_icon, + guint button, + guint activate_time, + gpointer user_data) { GtkMenu *menu; GtkWidget *item; @@ -495,10 +507,12 @@ new_notify_status (EMEventTargetFolder *t) status_count = t->new; - /* To translators: '%d' is the count of mails received and '%s' is the name of the folder*/ - msg = g_strdup_printf (ngettext ("You have received %d new message\nin %s.", - "You have received %d new messages\nin %s.", - status_count), status_count, name); + /* Translators: '%d' is the count of mails received + * and '%s' is the name of the folder*/ + msg = g_strdup_printf (ngettext ( + "You have received %d new message\nin %s.", + "You have received %d new messages\nin %s.", + status_count), status_count, name); if (name != t->name) g_free (name); @@ -506,7 +520,8 @@ new_notify_status (EMEventTargetFolder *t) if (t->msg_sender) { gchar *tmp, *str; - /* To Translators: "From:" is preceding a new mail sender address, like "From: user@example.com" */ + /* Translators: "From:" is preceding a new mail + * sender address, like "From: user@example.com" */ str = g_strdup_printf (_("From: %s"), t->msg_sender); tmp = g_strconcat (msg, "\n", str, NULL); @@ -518,7 +533,8 @@ new_notify_status (EMEventTargetFolder *t) if (t->msg_subject) { gchar *tmp, *str; - /* To Translators: "Subject:" is preceding a new mail subject, like "Subject: It happened again" */ + /* Translators: "Subject:" is preceding a new mail + * subject, like "Subject: It happened again" */ str = g_strdup_printf (_("Subject: %s"), t->msg_subject); tmp = g_strconcat (msg, "\n", str, NULL); @@ -528,8 +544,10 @@ new_notify_status (EMEventTargetFolder *t) } } else { status_count += t->new; - msg = g_strdup_printf (ngettext ("You have received %d new message.", - "You have received %d new messages.", status_count), status_count); + msg = g_strdup_printf (ngettext ( + "You have received %d new message.", + "You have received %d new messages.", + status_count), status_count); } gtk_status_icon_set_tooltip_text (status_icon, msg); @@ -546,20 +564,30 @@ new_notify_status (EMEventTargetFolder *t) if (is_part_enabled (GCONF_KEY_STATUS_NOTIFICATION)) { safetext = g_markup_escape_text(msg, strlen(msg)); if (notify) { - notify_notification_update (notify, _("New email"), safetext, "mail-unread"); + notify_notification_update ( + notify, _("New email"), + safetext, "mail-unread"); } else { if (!notify_init ("evolution-mail-notification")) fprintf (stderr,"notify init error"); - notify = notify_notification_new (_("New email"), safetext, "mail-unread", NULL); - notify_notification_attach_to_status_icon (notify, status_icon); + notify = notify_notification_new ( + _("New email"), safetext, + "mail-unread", NULL); + notify_notification_attach_to_status_icon ( + notify, status_icon); /* Check if actions are supported */ if (can_support_actions ()) { - notify_notification_set_urgency (notify, NOTIFY_URGENCY_NORMAL); - notify_notification_set_timeout (notify, NOTIFY_EXPIRES_DEFAULT); - notify_notification_add_action(notify, "default", "Default", notifyActionCallback, NULL, NULL); - g_timeout_add (500, notification_callback, notify); + notify_notification_set_urgency ( + notify, NOTIFY_URGENCY_NORMAL); + notify_notification_set_timeout ( + notify, NOTIFY_EXPIRES_DEFAULT); + notify_notification_add_action ( + notify, "default", "Default", + notifyActionCallback, NULL, NULL); + g_timeout_add ( + 500, notification_callback, notify); } } g_free(safetext); @@ -778,8 +806,10 @@ new_notify_sound (EMEventTargetFolder *t) time (&last_newmail); /* just put it to the idle queue */ - if (data.notify_idle_id == 0 && (last_newmail - data.last_notify >= NOTIFY_THROTTLE)) - data.notify_idle_id = g_idle_add_full (G_PRIORITY_LOW, sound_notify_idle_cb, &data, NULL); + if (data.notify_idle_id == 0 && + (last_newmail - data.last_notify >= NOTIFY_THROTTLE)) + data.notify_idle_id = g_idle_add_full ( + G_PRIORITY_LOW, sound_notify_idle_cb, &data, NULL); } static void @@ -996,7 +1026,8 @@ org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t) { g_return_if_fail (t != NULL); - if (!enabled || !t->new || (!t->is_inbox && is_part_enabled (GCONF_KEY_NOTIFY_ONLY_INBOX))) + if (!enabled || !t->new || (!t->is_inbox && + is_part_enabled (GCONF_KEY_NOTIFY_ONLY_INBOX))) return; g_static_mutex_lock (&mlock); diff --git a/widgets/misc/e-selection-model-simple.c b/widgets/misc/e-selection-model-simple.c index b0b151dd6d..917d306ced 100644 --- a/widgets/misc/e-selection-model-simple.c +++ b/widgets/misc/e-selection-model-simple.c @@ -30,7 +30,9 @@ static gint esms_get_row_count (ESelectionModelArray *esma); -G_DEFINE_TYPE (ESelectionModelSimple, e_selection_model_simple, e_selection_model_array_get_type()) +G_DEFINE_TYPE ( + ESelectionModelSimple, e_selection_model_simple, + E_SELECTION_MODEL_ARRAY_TYPE) static void e_selection_model_simple_init (ESelectionModelSimple *selection) diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c index 974ead48c1..e4881ff755 100644 --- a/widgets/table/e-table-col.c +++ b/widgets/table/e-table-col.c @@ -79,7 +79,10 @@ etc_dispose (GObject *object) } static void -etc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) +etc_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { ETableCol *etc = E_TABLE_COL (object); @@ -93,7 +96,10 @@ etc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpe } static void -etc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) +etc_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) { ETableCol *etc = E_TABLE_COL (object); @@ -147,9 +153,9 @@ e_table_col_init (ETableCol *etc) * @priority: FIXME * * The ETableCol represents a column to be used inside an ETable. The - * ETableCol objects are inserted inside an ETableHeader (which is just a collection - * of ETableCols). The ETableHeader is the definition of the order in which - * columns are shown to the user. + * ETableCol objects are inserted inside an ETableHeader (which is just a + * collection of ETableCols). The ETableHeader is the definition of the + * order in which columns are shown to the user. * * The @text argument is the the text that will be shown as a header to the * user. @col_idx reflects where the data for this ETableCol object will @@ -157,11 +163,12 @@ e_table_col_init (ETableCol *etc) * of the columns being viewed (the ETableCols in the ETableHeader), the * column will always point to the same column inside the ETableModel. * - * The @ecell argument is an ECell object that needs to know how to render the - * data in the ETableModel for this specific row. + * The @ecell argument is an ECell object that needs to know how to + * render the data in the ETableModel for this specific row. * - * Data passed to @compare can be (if not %NULL) a cmp_cache, which can be accessed - * by @ref e_table_sorting_utils_add_to_cmp_cache and @ref e_table_sorting_utils_lookup_cmp_cache. + * Data passed to @compare can be (if not %NULL) a cmp_cache, which + * can be accessed by e_table_sorting_utils_add_to_cmp_cache() and + * e_table_sorting_utils_lookup_cmp_cache(). * * Returns: the newly created ETableCol object. */ diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c index e11510371a..c7cb5d8b57 100644 --- a/widgets/table/e-table-search.c +++ b/widgets/table/e-table-search.c @@ -50,10 +50,11 @@ enum { static guint e_table_search_signals [LAST_SIGNAL] = { 0, }; static gboolean -e_table_search_search (ETableSearch *e_table_search, gchar *string, ETableSearchFlags flags) +e_table_search_search (ETableSearch *e_table_search, + gchar *string, + ETableSearchFlags flags) { gboolean ret_val; - g_return_val_if_fail (e_table_search != NULL, FALSE); g_return_val_if_fail (E_IS_TABLE_SEARCH (e_table_search), FALSE); g_signal_emit (G_OBJECT (e_table_search), @@ -66,7 +67,6 @@ e_table_search_search (ETableSearch *e_table_search, gchar *string, ETableSearch static void e_table_search_accept (ETableSearch *e_table_search) { - g_return_if_fail (e_table_search != NULL); g_return_if_fail (E_IS_TABLE_SEARCH (e_table_search)); g_signal_emit (G_OBJECT (e_table_search), @@ -193,7 +193,8 @@ e_table_search_input_character (ETableSearch *ets, gunichar character) } if (character == ets->priv->last_character) { - if (ets->priv->search_string && e_table_search_search (ets, ets->priv->search_string, 0)) { + if (ets->priv->search_string && + e_table_search_search (ets, ets->priv->search_string, 0)) { add_timeout (ets); } } diff --git a/widgets/table/e-table-utils.c b/widgets/table/e-table-utils.c index f3bce34487..2f4939edcb 100644 --- a/widgets/table/e-table-utils.c +++ b/widgets/table/e-table-utils.c @@ -33,7 +33,9 @@ #include "e-table-header-utils.h" ETableHeader * -e_table_state_to_header (GtkWidget *widget, ETableHeader *full_header, ETableState *state) +e_table_state_to_header (GtkWidget *widget, + ETableHeader *full_header, + ETableState *state) { ETableHeader *nh; GtkStyle *style; @@ -172,7 +174,10 @@ check_col (ETableCol *col, gpointer user_data) } ETableCol * -e_table_util_calculate_current_search_col (ETableHeader *header, ETableHeader *full_header, ETableSortInfo *sort_info, gboolean always_search) +e_table_util_calculate_current_search_col (ETableHeader *header, + ETableHeader *full_header, + ETableSortInfo *sort_info, + gboolean always_search) { gint i; gint count; |