diff options
53 files changed, 560 insertions, 295 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 91fdb16e4b..43df184598 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1264,7 +1264,8 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete) widget = gtk_bin_get_child (GTK_BIN (view)); if (GAL_IS_VIEW_MINICARD (gal_view)) { - card_view = e_minicard_view_widget_get_view (E_MINICARD_VIEW_WIDGET(view->priv->object)); + card_view = e_minicard_view_widget_get_view ( + E_MINICARD_VIEW_WIDGET (view->priv->object)); selection_model = e_addressbook_view_get_selection_model (view); row = e_selection_model_cursor_row (selection_model); } @@ -1408,25 +1409,29 @@ e_addressbook_view_stop (EAddressbookView *view) } static void -view_transfer_contacts (EAddressbookView *view, gboolean delete_from_source, gboolean all) +view_transfer_contacts (EAddressbookView *view, + gboolean delete_from_source, + gboolean all) { EBook *book; GList *contacts = NULL; - GtkWindow *parent_window; + GtkWindow *parent; book = e_addressbook_model_get_book (view->priv->model); if (all) { - EBookQuery *query = e_book_query_any_field_contains(""); - e_book_get_contacts(book, query, &contacts, NULL); - e_book_query_unref(query); - } - else { + EBookQuery *query; + + query = e_book_query_any_field_contains (""); + e_book_get_contacts (book, query, &contacts, NULL); + e_book_query_unref (query); + } else { contacts = e_addressbook_view_get_selected (view); } - parent_window = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))); - eab_transfer_contacts (book, contacts, delete_from_source, parent_window); + parent = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))); + eab_transfer_contacts (book, contacts, delete_from_source, parent); + g_object_unref(book); } @@ -1443,7 +1448,11 @@ e_addressbook_view_move_to_folder (EAddressbookView *view, gboolean all) } void -e_addressbook_view_set_search (EAddressbookView *view, gint filter_id, gint search_id, const gchar *search_text, EFilterRule *advanced_search) +e_addressbook_view_set_search (EAddressbookView *view, + gint filter_id, + gint search_id, + const gchar *search_text, + EFilterRule *advanced_search) { EAddressbookViewPrivate *priv; @@ -1460,12 +1469,21 @@ e_addressbook_view_set_search (EAddressbookView *view, gint filter_id, gint sear priv->filter_id = filter_id; priv->search_id = search_id; priv->search_text = g_strdup (search_text); - priv->advanced_search = advanced_search ? e_filter_rule_clone (advanced_search) : NULL; + + if (advanced_search != NULL) + priv->advanced_search = e_filter_rule_clone (advanced_search); + else + priv->advanced_search = NULL; } -/* free returned values for search_text and advanced_search, if not NULL, as these are new copies */ +/* Free returned values for search_text and advanced_search, + * if not NULL, as these are new copies. */ void -e_addressbook_view_get_search (EAddressbookView *view, gint *filter_id, gint *search_id, gchar **search_text, EFilterRule **advanced_search) +e_addressbook_view_get_search (EAddressbookView *view, + gint *filter_id, + gint *search_id, + gchar **search_text, + EFilterRule **advanced_search) { EAddressbookViewPrivate *priv; @@ -1481,5 +1499,9 @@ e_addressbook_view_get_search (EAddressbookView *view, gint *filter_id, gint *se *filter_id = priv->filter_id; *search_id = priv->search_id; *search_text = g_strdup (priv->search_text); - *advanced_search = priv->advanced_search ? e_filter_rule_clone (priv->advanced_search) : NULL; + + if (priv->advanced_search != NULL) + *advanced_search = e_filter_rule_clone (priv->advanced_search); + else + *advanced_search = NULL; } diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c index 231d799957..0fd7d09129 100644 --- a/addressbook/importers/evolution-csv-importer.c +++ b/addressbook/importers/evolution-csv-importer.c @@ -696,7 +696,9 @@ csv_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im) e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (selector), primary); g_object_unref (source_list); - g_signal_connect (selector, "primary_selection_changed", G_CALLBACK (primary_selection_changed_cb), target); + g_signal_connect ( + selector, "primary_selection_changed", + G_CALLBACK (primary_selection_changed_cb), target); gtk_widget_show_all (vbox); diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c index 1e6461a631..5f5c40ee13 100644 --- a/addressbook/importers/evolution-ldif-importer.c +++ b/addressbook/importers/evolution-ldif-importer.c @@ -306,11 +306,15 @@ parseLine (LDIFImporter *gci, EContact *contact, /* handle objectclass/dn/member out here */ if (!field_handled) { if (!g_ascii_strcasecmp (ptr, "dn")) - g_hash_table_insert (gci->dn_contact_hash, g_strdup(ldif_value->str), contact); - else if (!g_ascii_strcasecmp (ptr, "objectclass") && !g_ascii_strcasecmp (ldif_value->str, "groupofnames")) { - e_contact_set (contact, E_CONTACT_IS_LIST, GINT_TO_POINTER (TRUE)); - } - else if (!g_ascii_strcasecmp (ptr, "member")) { + g_hash_table_insert ( + gci->dn_contact_hash, + g_strdup (ldif_value->str), contact); + else if (!g_ascii_strcasecmp (ptr, "objectclass") && + !g_ascii_strcasecmp (ldif_value->str, "groupofnames")) { + e_contact_set ( + contact, E_CONTACT_IS_LIST, + GINT_TO_POINTER (TRUE)); + } else if (!g_ascii_strcasecmp (ptr, "member")) { GList *email; email = e_contact_get (contact, E_CONTACT_EMAIL); @@ -326,8 +330,8 @@ parseLine (LDIFImporter *gci, EContact *contact, *colon = ':'; g_string_free (ldif_value, TRUE); - } - else { + + } else { g_warning ("unrecognized entry %s", ptr); return FALSE; } @@ -508,7 +512,9 @@ ldif_import_contacts(gpointer d) ldif_import_done(gci); return FALSE; } else { - e_import_status(gci->import, gci->target, _("Importing..."), ftell(gci->file) * 100 / gci->size); + e_import_status ( + gci->import, gci->target, _("Importing..."), + ftell (gci->file) * 100 / gci->size); return TRUE; } } @@ -542,12 +548,17 @@ ldif_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im) if (primary == NULL) { primary = e_source_list_peek_source_any (source_list); g_object_ref(primary); - g_datalist_set_data_full(&target->data, "ldif-source", primary, g_object_unref); + g_datalist_set_data_full ( + &target->data, "ldif-source", primary, + (GDestroyNotify) g_object_unref); } - e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (selector), primary); + e_source_selector_set_primary_selection ( + E_SOURCE_SELECTOR (selector), primary); g_object_unref (source_list); - g_signal_connect (selector, "primary_selection_changed", G_CALLBACK (primary_selection_changed_cb), target); + g_signal_connect ( + selector, "primary_selection_changed", + G_CALLBACK (primary_selection_changed_cb), target); gtk_widget_show_all (vbox); diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index cc55b97769..07b13d2122 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -546,8 +546,10 @@ load_contacts (EContactPrintContext *ctxt) e_flag_free (book_view_started); - g_signal_handlers_disconnect_by_func (book_view, G_CALLBACK (contacts_added), ctxt); - g_signal_handlers_disconnect_by_func (book_view, G_CALLBACK (sequence_complete), book_view_started); + g_signal_handlers_disconnect_by_func ( + book_view, G_CALLBACK (contacts_added), ctxt); + g_signal_handlers_disconnect_by_func ( + book_view, G_CALLBACK (sequence_complete), book_view_started); } static void diff --git a/addressbook/util/addressbook.c b/addressbook/util/addressbook.c index d49f19bd7a..b394319c0f 100644 --- a/addressbook/util/addressbook.c +++ b/addressbook/util/addressbook.c @@ -331,7 +331,10 @@ addressbook_load_default_book (EBookCallback cb, gpointer closure) book = e_book_new_default_addressbook (NULL); if (!book) - load_source_cb (NULL, E_BOOK_ERROR_OTHER_ERROR, load_source_data); /* XXX we should just use a GError and it's error code here */ + /* XXX We should just use a GError and its error code here. */ + load_source_cb ( + NULL, E_BOOK_ERROR_OTHER_ERROR, load_source_data); else - e_book_async_open (book, FALSE, default_book_cb, load_source_data); + e_book_async_open ( + book, FALSE, default_book_cb, load_source_data); } diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c index c487d94503..9b37501ffc 100644 --- a/calendar/gui/alarm-notify/alarm.c +++ b/calendar/gui/alarm-notify/alarm.c @@ -157,7 +157,8 @@ setup_timeout (void) } -/* Used from g_list_insert_sorted(); compares the trigger times of two AlarmRecord structures. */ +/* Used from g_list_insert_sorted(); compares the + * trigger times of two AlarmRecord structures. */ static gint compare_alarm_by_time (gconstpointer a, gconstpointer b) { diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h index a7ed224fcb..3ad9565de3 100644 --- a/calendar/gui/e-calendar-view.h +++ b/calendar/gui/e-calendar-view.h @@ -98,7 +98,9 @@ struct _ECalendarView { }; typedef struct { - ECalendarViewEvent * (* get_view_event) (ECalendarView *view, gint day, gint event_num); + ECalendarViewEvent * (*get_view_event) (ECalendarView *view, + gint day, + gint event_num); ECalendarView *cal_view; gint day; gint event_num; diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c index fea2697344..7f6709ba7a 100644 --- a/calendar/gui/e-meeting-attendee.c +++ b/calendar/gui/e-meeting-attendee.c @@ -629,7 +629,8 @@ e_meeting_attendee_get_edit_level (EMeetingAttendee *ia) } void -e_meeting_attendee_set_edit_level (EMeetingAttendee *ia, EMeetingAttendeeEditLevel level) +e_meeting_attendee_set_edit_level (EMeetingAttendee *ia, + EMeetingAttendeeEditLevel level) { EMeetingAttendeePrivate *priv; @@ -706,7 +707,8 @@ e_meeting_attendee_get_has_calendar_info (EMeetingAttendee *ia) } void -e_meeting_attendee_set_has_calendar_info (EMeetingAttendee *ia, gboolean has_calendar_info) +e_meeting_attendee_set_has_calendar_info (EMeetingAttendee *ia, + gboolean has_calendar_info) { EMeetingAttendeePrivate *priv; @@ -901,8 +903,11 @@ e_meeting_attendee_add_busy_period (EMeetingAttendee *ia, g_array_append_val (priv->busy_periods, period); - period_in_days = g_date_get_julian (&period.end.date) - g_date_get_julian (&period.start.date) + 1; - priv->longest_period_in_days = MAX (priv->longest_period_in_days, period_in_days); + period_in_days = + g_date_get_julian (&period.end.date) - + g_date_get_julian (&period.start.date) + 1; + priv->longest_period_in_days = + MAX (priv->longest_period_in_days, period_in_days); done: priv->has_calendar_info = TRUE; diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c index 8461734164..94174efc3b 100644 --- a/calendar/gui/e-memo-table.c +++ b/calendar/gui/e-memo-table.c @@ -84,8 +84,6 @@ enum { LAST_SIGNAL }; -static struct tm e_memo_table_get_current_time (ECellDateEdit *ecde, gpointer data); - static gpointer parent_class; static guint signals[LAST_SIGNAL]; @@ -133,6 +131,37 @@ memo_table_emit_user_created (EMemoTable *memo_table) g_signal_emit (memo_table, signal_id, 0); } +/* Returns the current time, for the ECellDateEdit items. + FIXME: Should probably use the timezone of the item rather than the + current timezone, though that may be difficult to get from here. */ +static struct tm +memo_table_get_current_time (ECellDateEdit *ecde, + gpointer user_data) +{ + EMemoTable *memo_table = user_data; + ECalModel *model; + icaltimezone *zone; + struct tm tmp_tm = { 0 }; + struct icaltimetype tt; + + /* Get the current timezone. */ + model = e_memo_table_get_model (memo_table); + zone = e_cal_model_get_timezone (model); + + tt = icaltime_from_timet_with_zone (time (NULL), FALSE, zone); + + /* Now copy it to the struct tm and return it. */ + tmp_tm.tm_year = tt.year - 1900; + tmp_tm.tm_mon = tt.month - 1; + tmp_tm.tm_mday = tt.day; + tmp_tm.tm_hour = tt.hour; + tmp_tm.tm_min = tt.minute; + tmp_tm.tm_sec = tt.second; + tmp_tm.tm_isdst = -1; + + return tmp_tm; +} + static gint memo_table_date_compare_cb (gconstpointer a, gconstpointer b) @@ -364,7 +393,7 @@ memo_table_constructed (GObject *object) e_cell_date_edit_set_get_time_callback ( E_CELL_DATE_EDIT (popup_cell), - e_memo_table_get_current_time, memo_table, NULL); + memo_table_get_current_time, memo_table, NULL); /* Sorting */ e_table_extras_add_compare ( @@ -515,11 +544,15 @@ memo_table_query_tooltip (GtkWidget *widget, if (ptr) { ptr++; - /* To Translators: It will display "Organizer: NameOfTheUser <email@ofuser.com>" */ - tmp = g_strdup_printf (_("Organizer: %s <%s>"), organizer.cn, ptr); + /* Translators: It will display + * "Organizer: NameOfTheUser <email@ofuser.com>" */ + tmp = g_strdup_printf ( + _("Organizer: %s <%s>"), organizer.cn, ptr); } else { - /* With SunOne accounts, there may be no ':' in organiser.value */ - tmp = g_strdup_printf (_("Organizer: %s"), organizer.cn); + /* With SunOne accounts, there may be no ':' in + * organizer.value */ + tmp = g_strdup_printf ( + _("Organizer: %s"), organizer.cn); } l = gtk_label_new (tmp); @@ -535,7 +568,9 @@ memo_table_query_tooltip (GtkWidget *widget, default_zone = e_cal_model_get_timezone (model); if (dtstart.tzid) { - zone = icalcomponent_get_timezone (e_cal_component_get_icalcomponent (new_comp), dtstart.tzid); + zone = icalcomponent_get_timezone ( + e_cal_component_get_icalcomponent (new_comp), + dtstart.tzid); if (!zone) e_cal_get_timezone ( comp_data->client, dtstart.tzid, &zone, NULL); @@ -1186,11 +1221,13 @@ e_memo_table_delete_selected (EMemoTable *memo_table) if (comp_data) { comp = e_cal_component_new (); - e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp)); + e_cal_component_set_icalcomponent ( + comp, icalcomponent_new_clone (comp_data->icalcomp)); } - if (delete_component_dialog (comp, FALSE, n_selected, E_CAL_COMPONENT_JOURNAL, - GTK_WIDGET (memo_table))) + if (delete_component_dialog ( + comp, FALSE, n_selected, E_CAL_COMPONENT_JOURNAL, + GTK_WIDGET (memo_table))) delete_selected_components (memo_table); /* free memory */ @@ -1220,33 +1257,3 @@ e_memo_table_get_selected (EMemoTable *memo_table) return closure.objects; } - -/* Returns the current time, for the ECellDateEdit items. - FIXME: Should probably use the timezone of the item rather than the - current timezone, though that may be difficult to get from here. */ -static struct tm -e_memo_table_get_current_time (ECellDateEdit *ecde, gpointer data) -{ - EMemoTable *memo_table = data; - ECalModel *model; - icaltimezone *zone; - struct tm tmp_tm = { 0 }; - struct icaltimetype tt; - - /* Get the current timezone. */ - model = e_memo_table_get_model (memo_table); - zone = e_cal_model_get_timezone (model); - - tt = icaltime_from_timet_with_zone (time (NULL), FALSE, zone); - - /* Now copy it to the struct tm and return it. */ - tmp_tm.tm_year = tt.year - 1900; - tmp_tm.tm_mon = tt.month - 1; - tmp_tm.tm_mday = tt.day; - tmp_tm.tm_hour = tt.hour; - tmp_tm.tm_min = tt.minute; - tmp_tm.tm_sec = tt.second; - tmp_tm.tm_isdst = -1; - - return tmp_tm; -} diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c index 27a8fdb28a..04b77311d6 100644 --- a/calendar/gui/e-week-view-main-item.c +++ b/calendar/gui/e-week-view-main-item.c @@ -243,20 +243,25 @@ week_view_main_item_draw_day (EWeekViewMainItem *main_item, cairo_save (cr); if (selected) { - gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_DATES_SELECTED]); + gdk_cairo_set_source_color ( + cr, &week_view->colors[E_WEEK_VIEW_COLOR_DATES_SELECTED]); } else if (week_view->multi_week_view) { if (today) { - gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_TODAY]); + gdk_cairo_set_source_color ( + cr, &week_view->colors[E_WEEK_VIEW_COLOR_TODAY]); } else { - gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_DATES]); + gdk_cairo_set_source_color ( + cr, &week_view->colors[E_WEEK_VIEW_COLOR_DATES]); } } else { - gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_DATES]); + gdk_cairo_set_source_color ( + cr, &week_view->colors[E_WEEK_VIEW_COLOR_DATES]); } if (today) { - g_date_strftime (buffer, sizeof (buffer), - format_string ? format_string : "<b>%d</b>", date); + g_date_strftime ( + buffer, sizeof (buffer), + format_string ? format_string : "<b>%d</b>", date); pango_cairo_update_context (cr, pango_context); layout = pango_cairo_create_layout (cr); pango_layout_set_font_description (layout, font_desc); @@ -284,7 +289,8 @@ week_view_main_item_draw_day (EWeekViewMainItem *main_item, /* Draw the line under the date. */ if (!week_view->multi_week_view) { cairo_save (cr); - gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_GRID]); + gdk_cairo_set_source_color ( + cr, &week_view->colors[E_WEEK_VIEW_COLOR_GRID]); cairo_set_line_width (cr, 0.7); cairo_move_to (cr, x + E_WEEK_VIEW_DATE_LINE_L_PAD, line_y); cairo_line_to (cr, right_edge, line_y); diff --git a/calendar/gui/ea-cal-view.c b/calendar/gui/ea-cal-view.c index bca4710260..2a1c128059 100644 --- a/calendar/gui/ea-cal-view.c +++ b/calendar/gui/ea-cal-view.c @@ -34,9 +34,11 @@ static AtkObject* ea_cal_view_get_parent (AtkObject *accessible); static void ea_cal_view_real_initialize (AtkObject *accessible, gpointer data); static void ea_cal_view_event_changed_cb (ECalendarView *cal_view, - ECalendarViewEvent *event, gpointer data); + ECalendarViewEvent *event, + gpointer data); static void ea_cal_view_event_added_cb (ECalendarView *cal_view, - ECalendarViewEvent *event, gpointer data); + ECalendarViewEvent *event, + gpointer data); static gboolean idle_dates_changed (gpointer data); static void ea_cal_view_dates_change_cb (GnomeCalendar *gcal, gpointer data); diff --git a/calendar/gui/ea-day-view-cell.c b/calendar/gui/ea-day-view-cell.c index 2d42a47fc6..0b0b7a75c5 100644 --- a/calendar/gui/ea-day-view-cell.c +++ b/calendar/gui/ea-day-view-cell.c @@ -283,7 +283,9 @@ ea_day_view_cell_get_parent (AtkObject *accessible) return NULL; cell = E_DAY_VIEW_CELL (g_obj); - return atk_gobject_accessible_for_object (G_OBJECT (cell->day_view->main_canvas_item)); + + return atk_gobject_accessible_for_object ( + G_OBJECT (cell->day_view->main_canvas_item)); } static gint diff --git a/calendar/gui/ea-gnome-calendar.c b/calendar/gui/ea-gnome-calendar.c index 58ecad70fd..ad7d108c25 100644 --- a/calendar/gui/ea-gnome-calendar.c +++ b/calendar/gui/ea-gnome-calendar.c @@ -31,8 +31,6 @@ static void ea_gnome_calendar_class_init (EaGnomeCalendarClass *klass); -static G_CONST_RETURN gchar * ea_gnome_calendar_get_name (AtkObject *accessible); -static G_CONST_RETURN gchar * ea_gnome_calendar_get_description (AtkObject *accessible); static gint ea_gnome_calendar_get_n_children (AtkObject* obj); static AtkObject * ea_gnome_calendar_ref_child (AtkObject *obj, gint i); @@ -40,6 +38,22 @@ static void ea_gcal_dates_change_cb (GnomeCalendar *gcal, gpointer data); static gpointer parent_class = NULL; +static G_CONST_RETURN gchar * +ea_gnome_calendar_get_name (AtkObject *accessible) +{ + if (accessible->name) + return accessible->name; + return _("Gnome Calendar"); +} + +static G_CONST_RETURN gchar * +ea_gnome_calendar_get_description (AtkObject *accessible) +{ + if (accessible->description) + return accessible->description; + return _("Gnome Calendar"); +} + GType ea_gnome_calendar_get_type (void) { @@ -237,22 +251,6 @@ ea_gnome_calendar_get_label_description (GnomeCalendar *gcal) return buffer; } -static G_CONST_RETURN gchar * -ea_gnome_calendar_get_name (AtkObject *accessible) -{ - if (accessible->name) - return accessible->name; - return _("Gnome Calendar"); -} - -static G_CONST_RETURN gchar * -ea_gnome_calendar_get_description (AtkObject *accessible) -{ - if (accessible->description) - return accessible->description; - return _("Gnome Calendar"); -} - static gint ea_gnome_calendar_get_n_children (AtkObject* obj) { diff --git a/calendar/gui/ea-jump-button.c b/calendar/gui/ea-jump-button.c index a6775ade55..67c7eebc58 100644 --- a/calendar/gui/ea-jump-button.c +++ b/calendar/gui/ea-jump-button.c @@ -74,7 +74,8 @@ ea_jump_button_get_type (void) /* * Figure out the size of the class and instance - * we are run-time deriving from (atk object for GNOME_TYPE_CANVAS_ITEM, in this case) + * we are run-time deriving from (atk object for + * GNOME_TYPE_CANVAS_ITEM, in this case) */ factory = atk_registry_get_factory (atk_get_default_registry (), diff --git a/calendar/gui/ea-week-view-main-item.c b/calendar/gui/ea-week-view-main-item.c index 22ce67ca82..e7749f6a70 100644 --- a/calendar/gui/ea-week-view-main-item.c +++ b/calendar/gui/ea-week-view-main-item.c @@ -805,8 +805,10 @@ table_interface_is_row_selected (AtkTable *table, return FALSE; if ((row < 0)&&(row + 1 > week_view->weeks_shown )) return FALSE; - if (((week_view->selection_start_day < row*7)&&(week_view->selection_end_day<row*7)) - ||((week_view->selection_start_day > row*7+6)&&(week_view->selection_end_day > row*7+6))) + if (((week_view->selection_start_day < row * 7) && + (week_view->selection_end_day < row * 7)) || + ((week_view->selection_start_day > row * 7 + 6) && + (week_view->selection_end_day > row * 7 + 6))) return FALSE; else return TRUE; @@ -817,7 +819,8 @@ table_interface_is_selected (AtkTable *table, gint row, gint column) { - return table_interface_is_row_selected (table, row) && table_interface_is_column_selected(table, column); + return table_interface_is_row_selected (table, row) && + table_interface_is_column_selected (table, column); } static gboolean diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c index bd7cce7ab6..2a6942acd8 100644 --- a/composer/e-composer-header.c +++ b/composer/e-composer-header.c @@ -116,20 +116,26 @@ composer_header_constructor (GType type, header->priv->action_label = gtk_label_new (NULL); header->action_widget = gtk_button_new (); box = gtk_hbox_new (FALSE, 0); - tmp = gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON); + tmp = gtk_image_new_from_stock ( + GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON); header->priv->add_icon = tmp; gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3); - tmp = gtk_image_new_from_stock(GTK_STOCK_REMOVE, GTK_ICON_SIZE_BUTTON); + tmp = gtk_image_new_from_stock ( + GTK_STOCK_REMOVE, GTK_ICON_SIZE_BUTTON); header->priv->remove_icon = tmp; gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3); tmp = gtk_label_new (NULL); - str = g_strdup_printf ("<span>%s %s</span>", _("Show"), header->priv->addaction_text); + str = g_strdup_printf ( + "<span>%s %s</span>", _("Show"), + header->priv->addaction_text); gtk_label_set_markup((GtkLabel *)tmp, str); g_free (str); header->priv->show_label = tmp; gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3); tmp = gtk_label_new (NULL); - str = g_strdup_printf ("<span>%s %s</span>", _("Hide"), header->priv->addaction_text); + str = g_strdup_printf ( + "<span>%s %s</span>", _("Hide"), + header->priv->addaction_text); gtk_label_set_markup((GtkLabel *)tmp, str); header->priv->hide_label = tmp; gtk_box_pack_start((GtkBox *)box, tmp, FALSE, FALSE, 3); diff --git a/doc/reference/shell/tmpl/e-shell-searchbar.sgml b/doc/reference/shell/tmpl/e-shell-searchbar.sgml index a491daf40a..aeedaf3f35 100644 --- a/doc/reference/shell/tmpl/e-shell-searchbar.sgml +++ b/doc/reference/shell/tmpl/e-shell-searchbar.sgml @@ -33,6 +33,11 @@ EShellSearchbar </para> +<!-- ##### ARG EShellSearchbar:label-visible ##### --> +<para> + +</para> + <!-- ##### ARG EShellSearchbar:scope-combo-box ##### --> <para> diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c index 83517197fd..e557388352 100644 --- a/e-util/e-pilot-map.c +++ b/e-util/e-pilot-map.c @@ -53,7 +53,11 @@ typedef struct } EPilotMapWriteData; static void -real_e_pilot_map_insert (EPilotMap *map, guint32 pid, const gchar *uid, gboolean archived, gboolean touch) +real_e_pilot_map_insert (EPilotMap *map, + guint32 pid, + const gchar *uid, + gboolean archived, + gboolean touch) { gchar *new_uid; guint32 *new_pid = NULL; @@ -371,7 +375,9 @@ e_pilot_map_write (const gchar *filename, EPilotMap *map) g_warning ("Pilot map file could not be created\n"); return -1; } - xmlDocSetRootElement (doc, xmlNewDocNode(doc, NULL, (const guchar *)"PilotMap", NULL)); + xmlDocSetRootElement ( + doc, xmlNewDocNode ( + doc, NULL, (const guchar *)"PilotMap", NULL)); map->since = time (NULL); map_set_node_timet (xmlDocGetRootElement (doc), "timestamp", map->since); diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c index dff49d4e3f..82437e8bb4 100644 --- a/e-util/e-plugin.c +++ b/e-util/e-plugin.c @@ -163,7 +163,10 @@ ep_construct (EPlugin *ep, xmlNodePtr root) gchar *class = e_plugin_xml_prop(node, "class"); if (class == NULL) { - g_warning("Plugin '%s' load failed in '%s', missing class property for hook", ep->id, ep->path); + g_warning ( + "Plugin '%s' load failed in '%s', " + "missing class property for hook", + ep->id, ep->path); goto fail; } @@ -382,7 +385,8 @@ ep_load_plugin(xmlNodePtr root, struct _plugin_doc *pdoc) return NULL; } - /* If we can't find a plugin, add it to a pending list which is checked when a new type is registered */ + /* If we can't find a plugin, add it to a pending list + * which is checked when a new type is registered. */ class = g_hash_table_lookup(ep_types, prop); if (class == NULL) { pd(printf("Delaying loading of plugin '%s' unknown type '%s'\n", id, prop)); @@ -991,7 +995,9 @@ e_plugin_hook_enable (EPluginHook *eph, gint state) * integer values of the corresponding string id's stored in the @map. **/ guint32 -e_plugin_hook_mask(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const gchar *prop) +e_plugin_hook_mask (xmlNodePtr root, + const struct _EPluginHookTargetKey *map, + const gchar *prop) { gchar *val, *p, *start, c; guint32 mask = 0; @@ -1042,7 +1048,9 @@ e_plugin_hook_mask(xmlNodePtr root, const struct _EPluginHookTargetKey *map, con * integer value, if not, then ~0. **/ guint32 -e_plugin_hook_id(xmlNodePtr root, const struct _EPluginHookTargetKey *map, const gchar *prop) +e_plugin_hook_id (xmlNodePtr root, + const struct _EPluginHookTargetKey *map, + const gchar *prop) { gchar *val; gint i; diff --git a/e-util/e-unicode.c b/e-util/e-unicode.c index 84c0a1d7b8..88f6d0605a 100644 --- a/e-util/e-unicode.c +++ b/e-util/e-unicode.c @@ -281,7 +281,8 @@ e_unicode_get_utf8 (const gchar *text, gunichar *out) } gchar * -e_xml_get_translated_utf8_string_prop_by_name (const xmlNode *parent, const xmlChar *prop_name) +e_xml_get_translated_utf8_string_prop_by_name (const xmlNode *parent, + const xmlChar *prop_name) { xmlChar *prop; gchar *ret_val = NULL; diff --git a/e-util/gconf-bridge.c b/e-util/gconf-bridge.c index 8405c682ff..7f35d0b404 100644 --- a/e-util/gconf-bridge.c +++ b/e-util/gconf-bridge.c @@ -70,7 +70,7 @@ typedef struct { GtkWindow *window; gulong configure_event_id; - gulong window_state_event_id; + gulong window_state_event_id; gulong unmap_id; guint sync_timeout_id; } WindowBinding; @@ -551,41 +551,55 @@ gconf_bridge_bind_property_full (GConfBridge *bridge, } static void -prop_binding_block_cb (gpointer hkey, PropBinding *binding, const gchar *key) +prop_binding_block_cb (gpointer hkey, + PropBinding *binding, + const gchar *key) { - g_return_if_fail (binding != NULL); - g_return_if_fail (key != NULL); + g_return_if_fail (binding != NULL); + g_return_if_fail (key != NULL); - if (binding->type == BINDING_PROP && binding->key && g_ascii_strcasecmp (binding->key, key) == 0) - g_signal_handler_block (binding->object, binding->prop_notify_id); + if (binding->type == BINDING_PROP && binding->key && + g_ascii_strcasecmp (binding->key, key) == 0) + g_signal_handler_block ( + binding->object, binding->prop_notify_id); } static void -prop_binding_unblock_cb (gpointer hkey, PropBinding *binding, const gchar *key) +prop_binding_unblock_cb (gpointer hkey, + PropBinding *binding, + const gchar *key) { - g_return_if_fail (binding != NULL); - g_return_if_fail (key != NULL); + g_return_if_fail (binding != NULL); + g_return_if_fail (key != NULL); - if (binding->type == BINDING_PROP && binding->key && g_ascii_strcasecmp (binding->key, key) == 0) - g_signal_handler_unblock (binding->object, binding->prop_notify_id); + if (binding->type == BINDING_PROP && binding->key && + g_ascii_strcasecmp (binding->key, key) == 0) + g_signal_handler_unblock ( + binding->object, binding->prop_notify_id); } void -gconf_bridge_block_property_bindings (GConfBridge *bridge, const gchar *key) +gconf_bridge_block_property_bindings (GConfBridge *bridge, + const gchar *key) { g_return_if_fail (bridge != NULL); g_return_if_fail (key != NULL); - g_hash_table_foreach (bridge->bindings, (GHFunc) prop_binding_block_cb, (gpointer)key); + g_hash_table_foreach ( + bridge->bindings, (GHFunc) + prop_binding_block_cb, (gpointer)key); } void -gconf_bridge_unblock_property_bindings (GConfBridge *bridge, const gchar *key) +gconf_bridge_unblock_property_bindings (GConfBridge *bridge, + const gchar *key) { g_return_if_fail (bridge != NULL); g_return_if_fail (key != NULL); - g_hash_table_foreach (bridge->bindings, (GHFunc) prop_binding_unblock_cb, (gpointer)key); + g_hash_table_foreach ( + bridge->bindings, (GHFunc) + prop_binding_unblock_cb, (gpointer)key); } /* Unbinds a property binding */ @@ -687,16 +701,16 @@ window_binding_configure_event_cb (GtkWindow *window, GdkEventConfigure *event, WindowBinding *binding) { - /* re-postpone by cancel of the previous request */ - if (binding->sync_timeout_id > 0) - g_source_remove (binding->sync_timeout_id); + /* re-postpone by cancel of the previous request */ + if (binding->sync_timeout_id > 0) + g_source_remove (binding->sync_timeout_id); - /* Schedule a sync */ - binding->sync_timeout_id = g_timeout_add_seconds (WINDOW_BINDING_SYNC_DELAY, - (GSourceFunc) window_binding_perform_scheduled_sync, - binding); + /* Schedule a sync */ + binding->sync_timeout_id = g_timeout_add_seconds (WINDOW_BINDING_SYNC_DELAY, + (GSourceFunc) window_binding_perform_scheduled_sync, + binding); - return FALSE; + return FALSE; } /* Called when the window state is being changed */ @@ -897,7 +911,7 @@ window_binding_unbind (WindowBinding *binding) g_signal_handler_disconnect (binding->window, binding->configure_event_id); g_signal_handler_disconnect (binding->window, - binding->window_state_event_id); + binding->window_state_event_id); g_signal_handler_disconnect (binding->window, binding->unmap_id); @@ -1276,7 +1290,7 @@ error_handler (GConfClient *client, gtk_widget_destroy (dlg); shown_dialog = TRUE; - } + } } /** diff --git a/filter/e-filter-int.c b/filter/e-filter-int.c index f3fef9dc89..d9d7b1f357 100644 --- a/filter/e-filter-int.c +++ b/filter/e-filter-int.c @@ -119,7 +119,9 @@ filter_int_xml_decode (EFilterElement *element, filter_int->type = g_strdup (type); xmlFree (type); - intval = (gchar *)xmlGetProp (node, (xmlChar *)(filter_int->type ? filter_int->type : "integer")); + intval = (gchar *)xmlGetProp ( + node, (xmlChar *) (filter_int->type ? + filter_int->type : "integer")); if (intval) { filter_int->val = atoi (intval); xmlFree (intval); diff --git a/filter/e-rule-context.c b/filter/e-rule-context.c index 96bc845500..9abe7599e6 100644 --- a/filter/e-rule-context.c +++ b/filter/e-rule-context.c @@ -201,8 +201,11 @@ rule_context_load (ERuleContext *context, systemdoc = e_xml_parse_file (system); if (systemdoc == NULL) { - gchar * err_msg = g_strdup_printf("Unable to load system rules '%s': %s", - system, g_strerror(errno)); + gchar * err_msg; + + err_msg = g_strdup_printf ( + "Unable to load system rules '%s': %s", + system, g_strerror (errno)); g_warning ("%s: %s", G_STRFUNC, err_msg); rule_context_set_error(context, err_msg); /* no need to free err_msg here */ @@ -211,8 +214,11 @@ rule_context_load (ERuleContext *context, root = xmlDocGetRootElement (systemdoc); if (root == NULL || strcmp ((gchar *)root->name, "filterdescription")) { - gchar * err_msg = g_strdup_printf ("Unable to load system rules '%s': Invalid format", - system); + gchar * err_msg; + + err_msg = g_strdup_printf ( + "Unable to load system rules '%s': " + "Invalid format", system); g_warning ("%s: %s", G_STRFUNC, err_msg); rule_context_set_error(context, err_msg); /* no need to free err_msg here */ @@ -447,9 +453,9 @@ rule_context_new_element (ERuleContext *context, return (EFilterElement *) e_filter_int_new (); } else if (!strcmp (type, "regex")) { return (EFilterElement *) e_filter_input_new_type_name (type); - }else if (!strcmp (type, "completedpercent")) { - return (EFilterElement *) e_filter_int_new_type ("completedpercent", 0,100); - + } else if (!strcmp (type, "completedpercent")) { + return (EFilterElement *) e_filter_int_new_type ( + "completedpercent", 0,100); } else { g_warning ("Unknown filter type '%s'", type); return NULL; @@ -768,7 +774,8 @@ e_rule_context_add_rule (ERuleContext *context, } } -/* add a rule, with a gui, asking for confirmation first ... optionally save to path */ +/* Add a rule, with a gui, asking for confirmation first, + * and optionally save to path. */ void e_rule_context_add_rule_gui (ERuleContext *context, EFilterRule *rule, diff --git a/mail/e-mail-store.c b/mail/e-mail-store.c index 2cc03ad23c..f088b9f805 100644 --- a/mail/e-mail-store.c +++ b/mail/e-mail-store.c @@ -147,9 +147,13 @@ mail_store_note_store_cb (CamelStore *store, if (!store_info->removed) { /* This keeps message counters up-to-date. */ if (store_info->vtrash != NULL) - mail_folder_cache_note_folder (mail_folder_cache_get_default (), store_info->vtrash); + mail_folder_cache_note_folder ( + mail_folder_cache_get_default (), + store_info->vtrash); if (store_info->vjunk != NULL) - mail_folder_cache_note_folder (mail_folder_cache_get_default (), store_info->vjunk); + mail_folder_cache_note_folder ( + mail_folder_cache_get_default (), + store_info->vjunk); } store_info_unref (store_info); diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c index aa72175111..09c0ee15b1 100644 --- a/mail/em-filter-rule.c +++ b/mail/em-filter-rule.c @@ -331,7 +331,9 @@ part_combobox_changed (GtkComboBox *combobox, struct _part_data *data) gint index, i; index = gtk_combo_box_get_active (combobox); - for (i = 0, part = em_filter_context_next_action (data->f, part); part && i < index; i++, part = em_filter_context_next_action (data->f, part)) { + for (i = 0, part = em_filter_context_next_action (data->f, part); + part && i < index; + i++, part = em_filter_context_next_action (data->f, part)) { /* traverse until reached index */ } @@ -557,8 +559,9 @@ get_widget(EFilterRule *fr, ERuleContext *rc) hbox = gtk_hbox_new(FALSE, 3); add = gtk_button_new_with_mnemonic (_("Add Ac_tion")); - gtk_button_set_image (GTK_BUTTON (add), gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON)); - /* gtk_button_set_relief(GTK_BUTTON(add), GTK_RELIEF_NONE); */ + gtk_button_set_image ( + GTK_BUTTON (add), gtk_image_new_from_stock ( + GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON)); g_signal_connect(add, "clicked", G_CALLBACK(more_parts), data); gtk_box_pack_start(GTK_BOX(hbox), add, FALSE, FALSE, 0); diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index c0840434c1..c79b4b4707 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -209,7 +209,9 @@ account_changed_cb (EAccountList *accounts, if (!(provider->flags & CAMEL_PROVIDER_IS_STORAGE)) return; - if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex))) { + store = (CamelStore *) camel_session_get_service ( + session, uri, CAMEL_PROVIDER_STORE, &ex); + if (store == NULL) { camel_exception_clear (&ex); return; } @@ -601,7 +603,8 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, tree_store = GTK_TREE_STORE (model); if (!fully_loaded) - load = fi->child == NULL && !(fi->flags & (CAMEL_FOLDER_NOCHILDREN | CAMEL_FOLDER_NOINFERIORS)); + load = (fi->child == NULL) && !(fi->flags & + (CAMEL_FOLDER_NOCHILDREN | CAMEL_FOLDER_NOINFERIORS)); path = gtk_tree_model_get_path (GTK_TREE_MODEL (model), iter); uri_row = gtk_tree_row_reference_new (GTK_TREE_MODEL (model), path); @@ -613,12 +616,14 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, g_hash_table_insert ( si->full_hash, g_strdup (fi->full_name), path_row); - /* HACK: if we have the folder, and its the outbox folder, we need the total count, not unread */ - /* HACK2: We do the same to the draft folder */ - /* This is duplicated in mail-folder-cache too, should perhaps be functionised */ + /* XXX If we have the folder, and its the Outbox folder, we need + * the total count, not unread. We do the same for Drafts. */ + + /* XXX This is duplicated in mail-folder-cache too, should perhaps + * be functionised. */ unread = fi->unread; - if (mail_folder_cache_get_folder_from_uri(mail_folder_cache_get_default (), - fi->uri, &folder) && folder) { + if (mail_folder_cache_get_folder_from_uri ( + mail_folder_cache_get_default (), fi->uri, &folder) && folder) { is_drafts = em_utils_folder_is_drafts (folder, fi->uri); if (is_drafts || em_utils_folder_is_outbox (folder, fi->uri)) { @@ -637,7 +642,8 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, camel_object_unref(folder); } - /* TODO: maybe this should be handled by mail_get_folderinfo (except em-folder-tree doesn't use it, duh) */ + /* TODO Maybe this should be handled by mail_get_folderinfo + * (except em-folder-tree doesn't use it, duh) */ flags = fi->flags; name = fi->name; if (si->store == e_mail_local_get_store ()) { @@ -700,8 +706,12 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, COL_BOOL_IS_DRAFT, is_drafts, -1); - target = em_event_target_new_custom_icon (em_event_peek(), tree_store, iter, fi->full_name, EM_EVENT_CUSTOM_ICON); - e_event_emit ((EEvent *)em_event_peek (), "folder.customicon", (EEventTarget *) target); + target = em_event_target_new_custom_icon ( + em_event_peek (), tree_store, iter, + fi->full_name, EM_EVENT_CUSTOM_ICON); + e_event_emit ( + (EEvent *) em_event_peek (), "folder.customicon", + (EEventTarget *) target); if (unread != ~0) gtk_tree_store_set ( diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c index c2d45a25f6..e18da4535d 100644 --- a/mail/importers/elm-importer.c +++ b/mail/importers/elm-importer.c @@ -302,7 +302,9 @@ mail_importer_elm_import(EImport *ei, EImportTarget *target) static void checkbox_toggle_cb (GtkToggleButton *tb, EImportTarget *target) { - g_datalist_set_data(&target->data, "elm-do-mail", GINT_TO_POINTER(gtk_toggle_button_get_active(tb))); + g_datalist_set_data ( + &target->data, "elm-do-mail", + GINT_TO_POINTER (gtk_toggle_button_get_active (tb))); } static GtkWidget * @@ -313,10 +315,12 @@ elm_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im) gboolean done_mail; gconf = gconf_client_get_default (); - done_mail = gconf_client_get_bool (gconf, "/apps/evolution/importer/elm/mail", NULL); + done_mail = gconf_client_get_bool ( + gconf, "/apps/evolution/importer/elm/mail", NULL); g_object_unref(gconf); - g_datalist_set_data(&target->data, "elm-do-mail", GINT_TO_POINTER(!done_mail)); + g_datalist_set_data ( + &target->data, "elm-do-mail", GINT_TO_POINTER(!done_mail)); box = gtk_vbox_new(FALSE, 2); diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c index 01129471ae..2cd8c9864f 100644 --- a/mail/importers/evolution-mbox-importer.c +++ b/mail/importers/evolution-mbox-importer.c @@ -230,7 +230,9 @@ mbox_import(EImport *ei, EImportTarget *target, EImportImporter *im) importer->cancel = camel_operation_new(mbox_status, importer); filename = g_filename_from_uri(((EImportTargetURI *)target)->uri_src, NULL, NULL); - mail_importer_import_mbox(filename, ((EImportTargetURI *)target)->uri_dest, importer->cancel, mbox_import_done, importer); + mail_importer_import_mbox ( + filename, ((EImportTargetURI *)target)->uri_dest, + importer->cancel, mbox_import_done, importer); g_free(filename); } diff --git a/mail/mail-session.c b/mail/mail-session.c index 0341b5f050..a985aef6b8 100644 --- a/mail/mail-session.c +++ b/mail/mail-session.c @@ -428,7 +428,6 @@ lookup_addressbook(CamelSession *session, const gchar *name) static gboolean alert_user(CamelSession *session, CamelSessionAlertType type, const gchar *prompt, gboolean cancel) { - MailSession *mail_session = MAIL_SESSION (session); struct _user_message_msg *m; gboolean result = TRUE; diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c index 84fb5458ae..067613e0c5 100644 --- a/modules/calendar/e-memo-shell-backend.c +++ b/modules/calendar/e-memo-shell-backend.c @@ -96,16 +96,18 @@ memo_shell_backend_ensure_sources (EShellBackend *shell_backend) g_free (filename); if (strlen (base_uri) > 7) { - /* compare only file:// part. If user home dir name changes we do not want to create - one more group */ + /* Compare only file:// part. If user home dir name + * changes we do not want to create one more group. */ base_uri_seventh = base_uri[7]; base_uri[7] = 0; } else { base_uri_seventh = -1; } - on_this_computer = e_source_list_ensure_group (priv->source_list, _("On This Computer"), base_uri, TRUE); - e_source_list_ensure_group (priv->source_list, _("On The Web"), WEB_BASE_URI, FALSE); + on_this_computer = e_source_list_ensure_group ( + priv->source_list, _("On This Computer"), base_uri, TRUE); + e_source_list_ensure_group ( + priv->source_list, _("On The Web"), WEB_BASE_URI, FALSE); if (base_uri_seventh != -1) { base_uri[7] = base_uri_seventh; diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c index 7a0fdaf8af..7891a5add2 100644 --- a/modules/calendar/e-memo-shell-view-actions.c +++ b/modules/calendar/e-memo-shell-view-actions.c @@ -251,16 +251,24 @@ action_memo_list_properties_cb (GtkAction *action, static void action_memo_list_refresh_cb (GtkAction *action, - EMemoShellView *memo_shell_view) + EMemoShellView *memo_shell_view) { + EMemoShellContent *memo_shell_content; + EMemoShellSidebar *memo_shell_sidebar; + ESourceSelector *selector; ECal *client; ECalModel *model; ESource *source; gchar *uri; GError *error = NULL; - model = e_memo_shell_content_get_memo_model (memo_shell_view->priv->memo_shell_content); - source = e_source_selector_peek_primary_selection (e_memo_shell_sidebar_get_selector (memo_shell_view->priv->memo_shell_sidebar)); + memo_shell_content = memo_shell_view->priv->memo_shell_content; + memo_shell_sidebar = memo_shell_view->priv->memo_shell_sidebar; + + model = e_memo_shell_content_get_memo_model (memo_shell_content); + selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar); + + source = e_source_selector_peek_primary_selection (selector); g_return_if_fail (E_IS_SOURCE (source)); uri = e_source_get_uri (source); @@ -273,7 +281,10 @@ action_memo_list_refresh_cb (GtkAction *action, g_return_if_fail (e_cal_get_refresh_supported (client)); if (!e_cal_refresh (client, &error) && error) { - g_warning ("%s: Failed to refresh '%s', %s\n", G_STRFUNC, e_source_peek_name (source), error->message); + g_warning ( + "%s: Failed to refresh '%s', %s\n", + G_STRFUNC, e_source_peek_name (source), + error->message); g_error_free (error); } } @@ -483,10 +494,12 @@ action_memo_save_as_cb (GtkAction *action, comp_data = list->data; g_slist_free (list); - /* To Translators: Default filename part saving a memo to a file when no summary is filed, the '.ics' extension is concatenated to it */ + /* Translators: Default filename part saving a memo to a file when + * no summary is filed, the '.ics' extension is concatenated to it. */ string = icalcomp_suggest_filename (comp_data->icalcomp, _("memo")); file = e_shell_run_save_dialog ( - shell, _("Save as iCalendar"), string, "*.ics:text/calendar", NULL, NULL); + shell, _("Save as iCalendar"), string, + "*.ics:text/calendar", NULL, NULL); g_free (string); if (file == NULL) return; diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c index c17f73d044..d20a359e7d 100644 --- a/modules/calendar/e-task-shell-backend.c +++ b/modules/calendar/e-task-shell-backend.c @@ -99,16 +99,18 @@ task_shell_backend_ensure_sources (EShellBackend *shell_backend) g_free (filename); if (strlen (base_uri) > 7) { - /* compare only file:// part. If user home dir name changes we do not want to create - one more group */ + /* Compare only file:// part. If user home dir name + * changes we do not want to create one more group. */ base_uri_seventh = base_uri[7]; base_uri[7] = 0; } else { base_uri_seventh = -1; } - on_this_computer = e_source_list_ensure_group (priv->source_list, _("On This Computer"), base_uri, TRUE); - e_source_list_ensure_group (priv->source_list, _("On The Web"), WEB_BASE_URI, FALSE); + on_this_computer = e_source_list_ensure_group ( + priv->source_list, _("On This Computer"), base_uri, TRUE); + e_source_list_ensure_group ( + priv->source_list, _("On The Web"), WEB_BASE_URI, FALSE); if (base_uri_seventh != -1) { base_uri[7] = base_uri_seventh; diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c index bd0b3cbe48..f216750005 100644 --- a/modules/mail/e-mail-shell-view.c +++ b/modules/mail/e-mail-shell-view.c @@ -365,7 +365,10 @@ filter: } static void -has_unread_mail (GtkTreeModel *model, GtkTreeIter *parent, gboolean is_root, gboolean *has_unread) +has_unread_mail (GtkTreeModel *model, + GtkTreeIter *parent, + gboolean is_root, + gboolean *has_unread) { guint unread = 0; GtkTreeIter iter, child; @@ -472,6 +475,7 @@ mail_shell_view_update_actions (EShellView *shell_view) uri = em_folder_tree_get_selected_uri (folder_tree); if (uri != NULL) { + GtkTreeRowReference *reference; EMFolderTreeModel *model; const gchar *folder_uri; @@ -495,16 +499,18 @@ mail_shell_view_update_actions (EShellView *shell_view) account != NULL && account->parent_uid != NULL; model = em_folder_tree_model_get_default (); - if (model) { - GtkTreeRowReference *reference = em_folder_tree_model_lookup_uri (model, uri); - if (reference != NULL) { - GtkTreePath *path = gtk_tree_row_reference_get_path (reference); - GtkTreeIter iter; - - gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path); - has_unread_mail (GTK_TREE_MODEL (model), &iter, TRUE, &folder_has_unread_rec); - gtk_tree_path_free (path); - } + reference = em_folder_tree_model_lookup_uri (model, uri); + if (reference != NULL) { + GtkTreePath *path; + GtkTreeIter iter; + + path = gtk_tree_row_reference_get_path (reference); + gtk_tree_model_get_iter ( + GTK_TREE_MODEL (model), &iter, path); + has_unread_mail ( + GTK_TREE_MODEL (model), &iter, + TRUE, &folder_has_unread_rec); + gtk_tree_path_free (path); } g_free (uri); diff --git a/plugins/save-calendar/save-calendar.c b/plugins/save-calendar/save-calendar.c index 677bca5825..212a439877 100644 --- a/plugins/save-calendar/save-calendar.c +++ b/plugins/save-calendar/save-calendar.c @@ -237,10 +237,16 @@ open_for_writing (GtkWindow *parent, const gchar *uri, GError **error) fostream = g_file_create (file, G_FILE_CREATE_NONE, NULL, &err); if (err && err->code == G_IO_ERROR_EXISTS) { + gint response; g_clear_error (&err); - if (e_alert_run_dialog_for_args (parent, E_ALERT_ASK_FILE_EXISTS_OVERWRITE, uri, NULL) == GTK_RESPONSE_OK) { - fostream = g_file_replace (file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &err); + response = e_alert_run_dialog_for_args ( + parent, E_ALERT_ASK_FILE_EXISTS_OVERWRITE, + uri, NULL); + if (response == GTK_RESPONSE_OK) { + fostream = g_file_replace ( + file, NULL, FALSE, G_FILE_CREATE_NONE, + NULL, &err); if (err && fostream) { g_object_unref (fostream); diff --git a/smime/lib/e-asn1-object.c b/smime/lib/e-asn1-object.c index e8c51b6a24..7f69802ab6 100644 --- a/smime/lib/e-asn1-object.c +++ b/smime/lib/e-asn1-object.c @@ -122,7 +122,8 @@ e_asn1_object_get_type (void) (GInstanceInitFunc) e_asn1_object_init, }; - asn1_object_type = g_type_register_static (PARENT_TYPE, "EASN1Object", &asn1_object_info, 0); + asn1_object_type = g_type_register_static ( + PARENT_TYPE, "EASN1Object", &asn1_object_info, 0); } return asn1_object_type; diff --git a/smime/lib/e-cert.c b/smime/lib/e-cert.c index db4104859e..1b16d238a8 100644 --- a/smime/lib/e-cert.c +++ b/smime/lib/e-cert.c @@ -212,7 +212,8 @@ e_cert_populate (ECert *cert) cert->priv->cn = CERT_GetCommonName (&c->subject); cert->priv->issuer_cn = CERT_GetCommonName (&c->issuer); - if (SECSuccess == CERT_GetCertTimes (c, &cert->priv->issued_on, &cert->priv->expires_on)) { + if (SECSuccess == CERT_GetCertTimes ( + c, &cert->priv->issued_on, &cert->priv->expires_on)) { PRExplodedTime explodedTime; struct tm exploded_tm; gchar buf[32]; @@ -723,7 +724,8 @@ process_sec_algorithm_id (SECAlgorithmID *algID, get_oid_text (&algID->algorithm, &text); - if (!algID->parameters.len || algID->parameters.data[0] == E_ASN1_OBJECT_TYPE_NULL) { + if (!algID->parameters.len || + algID->parameters.data[0] == E_ASN1_OBJECT_TYPE_NULL) { e_asn1_object_set_display_value (sequence, text); e_asn1_object_set_valid_container (sequence, FALSE); } else { @@ -1130,7 +1132,8 @@ create_tbs_certificate_asn1_struct (ECert *cert, EASN1Object **seq) e_asn1_object_append_child (sequence, subitem); g_object_unref (subitem); - if (!process_subject_public_key_info (&cert->priv->cert->subjectPublicKeyInfo, sequence)) + if (!process_subject_public_key_info ( + &cert->priv->cert->subjectPublicKeyInfo, sequence)) return FALSE; /* Is there an issuerUniqueID? */ @@ -1200,14 +1203,17 @@ create_asn1_struct (ECert *cert) e_asn1_object_append_child (cert->priv->asn1, sequence); g_object_unref (sequence); - if (!process_sec_algorithm_id (&cert->priv->cert->signatureWrap.signatureAlgorithm, &sequence)) + if (!process_sec_algorithm_id ( + &cert->priv->cert->signatureWrap.signatureAlgorithm, &sequence)) return FALSE; - e_asn1_object_set_display_name (sequence, _("Certificate Signature Algorithm")); + e_asn1_object_set_display_name ( + sequence, _("Certificate Signature Algorithm")); e_asn1_object_append_child (cert->priv->asn1, sequence); g_object_unref (sequence); sequence = e_asn1_object_new (); - e_asn1_object_set_display_name (sequence, _("Certificate Signature Value")); + e_asn1_object_set_display_name ( + sequence, _("Certificate Signature Value")); /* The signatureWrap is encoded as a bit string. The function ProcessRawBytes expects the diff --git a/smime/lib/e-pkcs12.c b/smime/lib/e-pkcs12.c index 52fa966f76..3a2122bb0f 100644 --- a/smime/lib/e-pkcs12.c +++ b/smime/lib/e-pkcs12.c @@ -246,7 +246,9 @@ import_from_file_helper (EPKCS12 *pkcs12, PK11SlotInfo *slot, *aWantRetry = FALSE; passwd.data = NULL; - rv = prompt_for_password (_("PKCS12 File Password"), _("Enter password for PKCS12 file:"), &passwd); + rv = prompt_for_password ( + _("PKCS12 File Password"), + _("Enter password for PKCS12 file:"), &passwd); if (!rv) goto finish; if (passwd.data == NULL) { handle_error (PKCS12_USER_CANCELED); @@ -332,7 +334,10 @@ e_pkcs12_import_from_file (EPKCS12 *pkcs12, const gchar *path, GError **error) } gboolean -e_pkcs12_export_to_file (EPKCS12 *pkcs12, const gchar *path, GList *certs, GError **error) +e_pkcs12_export_to_file (EPKCS12 *pkcs12, + const gchar *path, + GList *certs, + GError **error) { return FALSE; } diff --git a/widgets/menus/gal-view-etable.c b/widgets/menus/gal-view-etable.c index d12f4ae792..b264524c71 100644 --- a/widgets/menus/gal-view-etable.c +++ b/widgets/menus/gal-view-etable.c @@ -198,7 +198,11 @@ GalView * gal_view_etable_new (ETableSpecification *spec, const gchar *title) { - return gal_view_etable_construct (g_object_new (GAL_VIEW_ETABLE_TYPE, NULL), spec, title); + GalViewEtable *view; + + view = g_object_new (GAL_VIEW_ETABLE_TYPE, NULL); + + return gal_view_etable_construct (view, spec, title); } /** diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c index f8b93f9fc2..a8cef68835 100644 --- a/widgets/misc/e-attachment.c +++ b/widgets/misc/e-attachment.c @@ -402,7 +402,7 @@ attachment_update_progress_columns (EAttachment *attachment) void e_attachment_set_file_info (EAttachment *attachment, - GFileInfo *file_info) + GFileInfo *file_info) { GtkTreeRowReference *reference; GIcon *icon; diff --git a/widgets/misc/e-attachment.h b/widgets/misc/e-attachment.h index d2a31c45af..a6dff74661 100644 --- a/widgets/misc/e-attachment.h +++ b/widgets/misc/e-attachment.h @@ -81,8 +81,8 @@ GFile * e_attachment_get_file (EAttachment *attachment); void e_attachment_set_file (EAttachment *attachment, GFile *file); GFileInfo * e_attachment_get_file_info (EAttachment *attachment); -void e_attachment_set_file_info (EAttachment *attachment, GFileInfo *file_info); - +void e_attachment_set_file_info (EAttachment *attachment, + GFileInfo *file_info); gboolean e_attachment_get_loading (EAttachment *attachment); CamelMimePart * e_attachment_get_mime_part (EAttachment *attachment); void e_attachment_set_mime_part (EAttachment *attachment, diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c index e9aacfa8b9..920e83d3a3 100644 --- a/widgets/misc/e-calendar.c +++ b/widgets/misc/e-calendar.c @@ -587,7 +587,10 @@ e_calendar_focus (GtkWidget *widget, GtkDirectionType direction) /* get current focused item, if e-calendar has had focus */ if (GTK_WIDGET_HAS_FOCUS (widget) || e_calendar_button_has_focus (cal)) - for (index = 0; canvas->focused_item && index < E_CALENDAR_FOCUS_CHILDREN_NUM; ++index) { + for (index = 0; index < E_CALENDAR_FOCUS_CHILDREN_NUM; ++index) { + if (canvas->focused_item == NULL) + break; + if (children[index] == canvas->focused_item) { focused_index = index; break; diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c index 04c163ef06..898fe0628a 100644 --- a/widgets/misc/e-canvas-background.c +++ b/widgets/misc/e-canvas-background.c @@ -365,7 +365,12 @@ ecb_unrealize (GnomeCanvasItem *item) } static void -ecb_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height) +ecb_draw (GnomeCanvasItem *item, + GdkDrawable *drawable, + gint x, + gint y, + gint width, + gint height) { ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item); gint x1, x2, y1, y2; @@ -421,12 +426,15 @@ ecb_point (GnomeCanvasItem *item, double x, double y, gint cx, gint cy, } static void -ecb_style_set (ECanvasBackground *ecb, GtkStyle *previous_style) +ecb_style_set (ECanvasBackground *ecb, + GtkStyle *previous_style) { GnomeCanvasItem *item = GNOME_CANVAS_ITEM (ecb); if (GTK_WIDGET_REALIZED (item->canvas)) { - gdk_gc_set_foreground (ecb->priv->gc, >K_WIDGET(item->canvas)->style->base[GTK_STATE_NORMAL]); + gdk_gc_set_foreground ( + ecb->priv->gc, >K_WIDGET(item->canvas)-> + style->base[GTK_STATE_NORMAL]); gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ecb)); } } diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c index 975018ef27..a16bcefaf8 100644 --- a/widgets/misc/e-dateedit.c +++ b/widgets/misc/e-dateedit.c @@ -586,12 +586,14 @@ create_children (EDateEdit *dedit) "widget \"*.e-dateedit-timecombo\" style \"e-dateedit-timecombo-style\""); time_store = gtk_list_store_new (1, G_TYPE_STRING); - priv->time_combo = gtk_combo_box_entry_new_with_model (GTK_TREE_MODEL (time_store), 0); + priv->time_combo = gtk_combo_box_entry_new_with_model ( + GTK_TREE_MODEL (time_store), 0); g_object_unref (time_store); - /* We need to make sure labels are right-aligned, since we want digits to line up, - * and with a nonproportional font, the width of a space != width of a digit. - * Technically, only 12-hour format needs this, but we do it always, for consistency. */ + /* We need to make sure labels are right-aligned, since we want + * digits to line up, and with a nonproportional font, the width + * of a space != width of a digit. Technically, only 12-hour + * format needs this, but we do it always, for consistency. */ g_object_set (GTK_BIN (priv->time_combo)->child, "xalign", 1.0, NULL); cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (priv->time_combo)); if (cells) { @@ -1412,16 +1414,18 @@ position_date_popup (EDateEdit *dedit) gtk_widget_size_request (dedit->priv->date_button, &button_req); bwidth = button_req.width; - gtk_widget_size_request (gtk_widget_get_parent (dedit->priv->date_button), &button_req); + gtk_widget_size_request ( + gtk_widget_get_parent (dedit->priv->date_button), &button_req); bheight = button_req.height; - gtk_widget_translate_coordinates (dedit->priv->date_button, - gtk_widget_get_toplevel (dedit->priv->date_button), - bwidth - cal_req.width, bheight, - &x, &y); + gtk_widget_translate_coordinates ( + dedit->priv->date_button, + gtk_widget_get_toplevel (dedit->priv->date_button), + bwidth - cal_req.width, bheight, &x, &y); - gdk_window_get_origin (gtk_widget_get_toplevel (dedit->priv->date_button)->window, - &win_x, &win_y); + gdk_window_get_origin ( + gtk_widget_get_toplevel (dedit->priv->date_button)->window, + &win_x, &win_y); x += win_x; y += win_y; @@ -1592,8 +1596,8 @@ rebuild_time_popup (EDateEdit *dedit) for (hour = priv->lower_hour; hour <= priv->upper_hour; hour++) { - /* We don't want to display midnight at the end, since that is - really in the next day. */ + /* We don't want to display midnight at the end, + * since that is really in the next day. */ if (hour == 24) break; @@ -1605,14 +1609,22 @@ rebuild_time_popup (EDateEdit *dedit) tmp_tm.tm_min = min; if (priv->use_24_hour_format) - /* This is a strftime() format. %H = hour (0-23), %M = minute. */ - e_time_format_time (&tmp_tm, 1, 0, buffer, sizeof (buffer)); + /* This is a strftime() format. + * %H = hour (0-23), %M = minute. */ + e_time_format_time ( + &tmp_tm, 1, 0, + buffer, sizeof (buffer)); else - /* This is a strftime() format. %I = hour (1-12), %M = minute, %p = am/pm string. */ - e_time_format_time (&tmp_tm, 0, 0, buffer, sizeof (buffer)); - - /* For 12-hour am/pm format, we want space padding, not zero padding. This - * can be done with strftime's %l, but it's a potentially unportable extension. */ + /* This is a strftime() format. + * %I = hour (1-12), %M = minute, + * %p = am/pm string. */ + e_time_format_time ( + &tmp_tm, 0, 0, + buffer, sizeof (buffer)); + + /* For 12-hour am/pm format, we want space padding, + * not zero padding. This can be done with strftime's + * %l, but it's a potentially unportable extension. */ if (!priv->use_24_hour_format && buffer[0] == '0') buffer[0] = ' '; @@ -1635,8 +1647,9 @@ e_date_edit_parse_date (EDateEdit *dedit, time_t t = time (NULL); struct tm *today_tm = localtime (&t); - /* it was only 2 digit year in dedit and it was interpreted as in the future, - but we don't want it as this, so decrease by 100 years to last century */ + /* It was only 2 digit year in dedit and it was interpreted as + * in the future, but we don't want it as this, so decrease by + * 100 years to last century. */ if (date_tm->tm_year > today_tm->tm_year) date_tm->tm_year -= 100; } @@ -1674,7 +1687,8 @@ field_set_to_none (const gchar *text) while (n = (gint)((guchar)*pos), isspace (n)) pos++; - /* Translators: "None" for date field of a date edit, shown when there is no date set */ + /* Translators: "None" for date field of a date edit, shown when + * there is no date set. */ none_string = C_("date", "None"); if (*pos == '\0' || !strncmp (pos, none_string, strlen (none_string))) @@ -1798,15 +1812,23 @@ on_date_entry_focus_out (GtkEntry *entry, "%s", _("Invalid Date Value")); gtk_dialog_run (GTK_DIALOG(msg_dialog)); gtk_widget_destroy (msg_dialog); - e_date_edit_get_date (dedit,&tmp_tm.tm_year,&tmp_tm.tm_mon,&tmp_tm.tm_mday); - e_date_edit_set_date (dedit,tmp_tm.tm_year,tmp_tm.tm_mon,tmp_tm.tm_mday); + e_date_edit_get_date ( + dedit, &tmp_tm.tm_year, + &tmp_tm.tm_mon, &tmp_tm.tm_mday); + e_date_edit_set_date ( + dedit, tmp_tm.tm_year, + tmp_tm.tm_mon, tmp_tm.tm_mday); gtk_widget_grab_focus (GTK_WIDGET (entry)); return FALSE; - } else if (e_date_edit_get_date (dedit,&tmp_tm.tm_year,&tmp_tm.tm_mon,&tmp_tm.tm_mday)) { - e_date_edit_set_date (dedit,tmp_tm.tm_year,tmp_tm.tm_mon,tmp_tm.tm_mday); + } else if (e_date_edit_get_date ( + dedit, &tmp_tm.tm_year, &tmp_tm.tm_mon, &tmp_tm.tm_mday)) { + + e_date_edit_set_date ( + dedit,tmp_tm.tm_year,tmp_tm.tm_mon,tmp_tm.tm_mday); if (dedit->priv->has_been_changed) { - /* the previous one didn't emit changed signal, but we want it even here, thus doing itself */ + /* The previous one didn't emit changed signal, + * but we want it even here, thus doing itself. */ g_signal_emit (dedit, signals [CHANGED], 0); dedit->priv->has_been_changed = FALSE; } diff --git a/widgets/misc/e-import-assistant.c b/widgets/misc/e-import-assistant.c index 4e61799512..bf2396efb2 100644 --- a/widgets/misc/e-import-assistant.c +++ b/widgets/misc/e-import-assistant.c @@ -685,7 +685,9 @@ prepare_file_page (GtkAssistant *assistant, } static GtkWidget * -create_importer_control (EImport *import, EImportTarget *target, EImportImporter *importer) +create_importer_control (EImport *import, + EImportTarget *target, + EImportImporter *importer) { GtkWidget *control; @@ -730,6 +732,7 @@ prepare_progress_page (GtkAssistant *assistant, EImportAssistantPrivate *priv; EImportCompleteFunc done = NULL; ImportSelectionPage *page; + gboolean intelligent_import; gboolean is_simple = FALSE; priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant); @@ -741,11 +744,14 @@ prepare_progress_page (GtkAssistant *assistant, g_object_get (G_OBJECT (assistant), "is-simple", &is_simple, NULL); + intelligent_import = gtk_toggle_button_get_active ( + GTK_TOGGLE_BUTTON (priv->type_page.intelligent)); + if (is_simple) { priv->import_importer = priv->simple_page.importer; priv->import_target = (EImportTarget *)priv->simple_page.target; done = import_simple_done; - } else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->type_page.intelligent))) { + } else if (intelligent_import) { page->current = page->importers; if (page->current) { priv->import_target = (EImportTarget *) page->target; @@ -793,7 +799,8 @@ simple_filetype_changed_cb (GtkComboBox *combo_box, GtkAssistant *assistant) if (page->control) gtk_widget_destroy (page->control); - control = create_importer_control (priv->import, (EImportTarget *)page->target, page->importer); + control = create_importer_control ( + priv->import, (EImportTarget *)page->target, page->importer); page->control = gtk_alignment_new (0.0, 0.0, 1.0, 1.0); gtk_widget_show (page->control); gtk_container_add (GTK_CONTAINER (page->control), control); @@ -1349,7 +1356,8 @@ e_import_assistant_new_simple (GtkWindow *parent, return NULL; } - /* FIXME Implement the 'preview' mode, probably by adding a new function to an importer */ + /* FIXME Implement the 'preview' mode, probably + * by adding a new function to an importer */ return assistant; } diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c index 433e706968..46cf081584 100644 --- a/widgets/misc/e-selection-model.c +++ b/widgets/misc/e-selection-model.c @@ -80,7 +80,10 @@ esm_dispose (GObject *object) } static void -esm_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) +esm_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) { ESelectionModel *esm = E_SELECTION_MODEL (object); @@ -100,14 +103,19 @@ esm_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *psp } static void -esm_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) +esm_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { ESelectionModel *esm = E_SELECTION_MODEL (object); switch (prop_id) { case PROP_SORTER: drop_sorter(esm); - add_sorter(esm, g_value_get_object (value) ? E_SORTER(g_value_get_object(value)) : NULL); + add_sorter ( + esm, g_value_get_object (value) ? + E_SORTER (g_value_get_object (value)) : NULL); break; case PROP_SELECTION_MODE: diff --git a/widgets/misc/ea-calendar-item.c b/widgets/misc/ea-calendar-item.c index 9dcb83449c..82c118bf82 100644 --- a/widgets/misc/ea-calendar-item.c +++ b/widgets/misc/ea-calendar-item.c @@ -284,23 +284,32 @@ ea_calendar_item_get_name (AtkObject *accessible) g_return_val_if_fail (E_IS_CALENDAR_ITEM (g_obj), NULL); calitem = E_CALENDAR_ITEM (g_obj); - if (e_calendar_item_get_date_range (calitem, - &start_year, &start_month, &start_day, - &end_year, &end_month, &end_day)) { - - day_start.tm_year = start_year - 1900; - day_start.tm_mon = start_month; - day_start.tm_mday = start_day; - day_start.tm_isdst = -1; - e_utf8_strftime (buffer_start, sizeof (buffer_start), _("%d %B %Y"), &day_start); - - day_end.tm_year = end_year - 1900; - day_end.tm_mon = end_month; - day_end.tm_mday = end_day; - day_end.tm_isdst = -1; - e_utf8_strftime (buffer_end, sizeof (buffer_end), _("%d %B %Y"), &day_end); - - name_str = g_strdup_printf (_("Calendar: from %s to %s"), buffer_start, buffer_end); + if (e_calendar_item_get_date_range ( + calitem, + &start_year, &start_month, &start_day, + &end_year, &end_month, &end_day)) { + + day_start.tm_year = start_year - 1900; + day_start.tm_mon = start_month; + day_start.tm_mday = start_day; + day_start.tm_isdst = -1; + + e_utf8_strftime ( + buffer_start, sizeof (buffer_start), + _("%d %B %Y"), &day_start); + + day_end.tm_year = end_year - 1900; + day_end.tm_mon = end_month; + day_end.tm_mday = end_day; + day_end.tm_isdst = -1; + + e_utf8_strftime ( + buffer_end, sizeof (buffer_end), + _("%d %B %Y"), &day_end); + + name_str = g_strdup_printf ( + _("Calendar: from %s to %s"), + buffer_start, buffer_end); } #if 0 diff --git a/widgets/misc/test-dateedit.c b/widgets/misc/test-dateedit.c index c7b973904a..79ca726c3e 100644 --- a/widgets/misc/test-dateedit.c +++ b/widgets/misc/test-dateedit.c @@ -200,7 +200,10 @@ static void on_toggle_24_hour_clicked (GtkWidget *button, EDateEdit *dedit) { - e_date_edit_set_use_24_hour_format (dedit, !e_date_edit_get_use_24_hour_format (dedit)); + gboolean use_24_hour_format; + + use_24_hour_format = e_date_edit_get_use_24_hour_format (dedit); + e_date_edit_set_use_24_hour_format (dedit, !use_24_hour_format); } #if 0 diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c index cf90909d6f..666f556ec3 100644 --- a/widgets/table/e-cell-pixbuf.c +++ b/widgets/table/e-cell-pixbuf.c @@ -99,7 +99,8 @@ pixbuf_kill_view (ECellView *ecell_view) ECellPixbufView *pixbuf_view = (ECellPixbufView *) ecell_view; if (pixbuf_view->cell_view.kill_view_cb) - (pixbuf_view->cell_view.kill_view_cb)(ecell_view, pixbuf_view->cell_view.kill_view_cb_data); + pixbuf_view->cell_view.kill_view_cb ( + ecell_view, pixbuf_view->cell_view.kill_view_cb_data); if (pixbuf_view->cell_view.kill_view_cb_data) g_list_free(pixbuf_view->cell_view.kill_view_cb_data); diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index 2f682bb442..a5b0aac0af 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -228,7 +228,8 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, * @x: X insertion point for the string. * @y: Y insertion point for the string's baseline. * @layout: the PangoLayout to draw. - * @str: the string we're drawing, passed in so we can change the layout if it needs eliding. + * @str: the string we're drawing, passed in so we can change the layout if + * it needs eliding. * @max_width: Maximum width in which the string must fit. * @center: Whether to center the string in the available area if it does fit. * diff --git a/widgets/table/e-table-memory-callbacks.c b/widgets/table/e-table-memory-callbacks.c index d39a396c64..e37c1aab88 100644 --- a/widgets/table/e-table-memory-callbacks.c +++ b/widgets/table/e-table-memory-callbacks.c @@ -171,15 +171,16 @@ e_table_memory_callbacks_init (ETableMemoryCalbacks *etmc) * @value_to_string: * @data: closure pointer. * - * This initializes a new ETableMemoryCalbacksModel object. ETableMemoryCalbacksModel is - * an implementaiton of the abstract class ETableModel. The ETableMemoryCalbacksModel - * is designed to allow people to easily create ETableModels without having - * to create a new GType derived from ETableModel every time they need one. + * This initializes a new ETableMemoryCalbacksModel object. + * ETableMemoryCalbacksModel is an implementaiton of the abstract class + * ETableModel. The ETableMemoryCalbacksModel is designed to allow people + * to easily create ETableModels without having to create a new GType + * derived from ETableModel every time they need one. * - * Instead, ETableMemoryCalbacksModel uses a setup based in callback functions, every - * callback function signature mimics the signature of each ETableModel method - * and passes the extra @data pointer to each one of the method to provide them - * with any context they might want to use. + * Instead, ETableMemoryCalbacksModel uses a setup based in callback + * functions, every callback function signature mimics the signature of + * each ETableModel method and passes the extra @data pointer to each one + * of the method to provide them with any context they might want to use. * * Returns: An ETableMemoryCalbacksModel object (which is also an ETableModel * object). diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c index 9f24f30d28..86694eccac 100644 --- a/widgets/table/e-table-state.c +++ b/widgets/table/e-table-state.c @@ -245,21 +245,27 @@ e_table_state_save_to_node (ETableState *state, xmlNode *node; if (parent) - node = xmlNewChild (parent, NULL, (const guchar *)"ETableState", NULL); + node = xmlNewChild ( + parent, NULL, (const guchar *) "ETableState", NULL); else - node = xmlNewNode (NULL, (const guchar *)"ETableState"); + node = xmlNewNode (NULL, (const guchar *) "ETableState"); - e_xml_set_double_prop_by_name(node, (const guchar *)"state-version", STATE_VERSION); + e_xml_set_double_prop_by_name ( + node, (const guchar *)"state-version", STATE_VERSION); for (i = 0; i < state->col_count; i++) { gint column = state->columns[i]; double expansion = state->expansions[i]; xmlNode *new_node; - new_node = xmlNewChild(node, NULL, (const guchar *)"column", NULL); - e_xml_set_integer_prop_by_name (new_node, (const guchar *)"source", column); + new_node = xmlNewChild ( + node, NULL, (const guchar *) "column", NULL); + e_xml_set_integer_prop_by_name ( + new_node, (const guchar *) "source", column); if (expansion >= -1) - e_xml_set_double_prop_by_name(new_node, (const guchar *)"expansion", expansion); + e_xml_set_double_prop_by_name ( + new_node, (const guchar *) + "expansion", expansion); } e_table_sort_info_save_to_node(state->sort_info, node); diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c index 8cd2f06cb9..b40dda8e3e 100644 --- a/widgets/table/e-tree-memory.c +++ b/widgets/table/e-tree-memory.c @@ -65,7 +65,11 @@ struct ETreeMemoryPath { struct ETreeMemoryPriv { ETreeMemoryPath *root; - gboolean expanded_default; /* whether nodes are created expanded or collapsed by default */ + + /* whether nodes are created expanded + * or collapsed by default */ + gboolean expanded_default; + gint frozen; GFunc destroy_func; gpointer destroy_user_data; @@ -97,7 +101,9 @@ e_tree_memory_path_depth (ETreeMemoryPath *path) } static void -e_tree_memory_path_insert (ETreeMemoryPath *parent, gint position, ETreeMemoryPath *child) +e_tree_memory_path_insert (ETreeMemoryPath *parent, + gint position, + ETreeMemoryPath *child) { g_return_if_fail (position <= parent->num_children && position >= -1); @@ -522,9 +528,14 @@ e_tree_memory_node_insert (ETreeMemory *tree_model, return new_path; } -ETreePath e_tree_memory_node_insert_id (ETreeMemory *etree, ETreePath parent, gint position, gpointer node_data, gchar *id) +ETreePath +e_tree_memory_node_insert_id (ETreeMemory *etree, + ETreePath parent, + gint position, + gpointer node_data, + gchar *id) { - return e_tree_memory_node_insert(etree, parent, position, node_data); + return e_tree_memory_node_insert (etree, parent, position, node_data); } /** diff --git a/widgets/table/gal-a11y-e-cell.c b/widgets/table/gal-a11y-e-cell.c index 211afa401c..65f08f22d3 100644 --- a/widgets/table/gal-a11y-e-cell.c +++ b/widgets/table/gal-a11y-e-cell.c @@ -35,7 +35,6 @@ #include "gal-a11y-e-cell-vbox.h" #include "gal-a11y-e-table-item.h" -#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yECellClass)) static GObjectClass *parent_class; #define PARENT_TYPE (atk_object_get_type ()) @@ -209,8 +208,10 @@ gal_a11y_e_cell_grab_focus (AtkComponent *component) atk_selection_clear_selection (ATK_SELECTION (a11yTableItem)); atk_selection_add_selection (ATK_SELECTION (a11yTableItem), index); - gtk_widget_grab_focus (GTK_WIDGET (GNOME_CANVAS_ITEM (a11y->item)->canvas)); - toplevel = gtk_widget_get_toplevel (GTK_WIDGET (GNOME_CANVAS_ITEM (a11y->item)->canvas)); + gtk_widget_grab_focus ( + GTK_WIDGET (GNOME_CANVAS_ITEM (a11y->item)->canvas)); + toplevel = gtk_widget_get_toplevel ( + GTK_WIDGET (GNOME_CANVAS_ITEM (a11y->item)->canvas)); if (toplevel && GTK_WIDGET_TOPLEVEL (toplevel)) gtk_window_present (GTK_WINDOW (toplevel)); |