From 0f7f4cfe38b3c4cd83efbe9922ae15c5aee00317 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 30 Aug 2009 00:48:57 -0400 Subject: Coding style and whitespace cleanup. --- calendar/gui/alarm-notify/alarm-queue.c | 2 +- calendar/gui/alarm-notify/config-data.c | 2 +- calendar/gui/dialogs/comp-editor.c | 10 +++++----- calendar/gui/dialogs/comp-editor.h | 3 ++- calendar/gui/dialogs/event-page.c | 2 +- calendar/gui/e-cal-list-view.c | 1 - calendar/gui/e-cal-model.c | 2 +- calendar/gui/e-cal-model.h | 2 +- calendar/gui/e-memo-table.h | 2 +- calendar/gui/e-week-view-event-item.c | 8 +++----- calendar/gui/e-week-view.c | 2 +- e-util/e-datetime-format.c | 7 +++---- plugins/groupwise-features/install-shared.c | 2 +- plugins/mail-notification/mail-notification.c | 18 ++++++++++-------- plugins/mail-to-task/mail-to-task.c | 6 +++--- shell/e-shell-importer.c | 2 +- widgets/misc/e-attachment.c | 2 +- 17 files changed, 36 insertions(+), 37 deletions(-) diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 8d272764bd..ef6e77d386 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -1654,7 +1654,7 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa, flag = 1; ca_context_play ( ca_gtk_context_get(), 0, - CA_PROP_MEDIA_FILENAME, filename, NULL); + CA_PROP_MEDIA_FILENAME, filename, NULL); } g_free (filename); diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c index c66819f0c4..db2322945b 100644 --- a/calendar/gui/alarm-notify/config-data.c +++ b/calendar/gui/alarm-notify/config-data.c @@ -267,7 +267,7 @@ config_data_set_last_notification_time (ECal *cal, time_t t) ESource *source = e_cal_get_source (cal); if (source) { GTimeVal tmval = {0}; - char *as_text; + gchar *as_text; tmval.tv_sec = (glong) t; as_text = g_time_val_to_iso8601 (&tmval); diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index cb3ff42438..8995b0eddc 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -1630,7 +1630,7 @@ comp_editor_init (CompEditor *editor) priv->is_group_item = FALSE; priv->ui_manager = gtk_ui_manager_new (); - + if (comp_lite) gtk_window_set_default_size ((GtkWindow *) editor, 800, 450); gtk_window_add_accel_group ( @@ -1721,7 +1721,7 @@ comp_editor_init (CompEditor *editor) if (comp_lite) { GtkWidget *tmp, *tmp1, *tmp_box, *cont; GtkWidget *combo; - + e_attachment_paned_set_expanded (E_ATTACHMENT_PANED (widget), TRUE); e_attachment_paned_set_expanded (E_ATTACHMENT_PANED (widget), FALSE); @@ -1738,7 +1738,7 @@ comp_editor_init (CompEditor *editor) tmp1 = gtk_label_new_with_mnemonic (_("Save")); gtk_box_pack_start ((GtkBox *)tmp, tmp1, FALSE, FALSE, 3); gtk_widget_show_all(tmp); - + combo = gtk_ui_manager_get_widget (priv->ui_manager, "/main-toolbar/save"); gtk_widget_reparent (combo, tmp_box); gtk_box_set_child_packing ((GtkBox *)tmp_box, combo, FALSE, FALSE, 6, GTK_PACK_END); @@ -1746,11 +1746,11 @@ comp_editor_init (CompEditor *editor) combo = gtk_bin_get_child ((GtkBin *)combo); gtk_container_remove((GtkContainer *)combo, gtk_bin_get_child ((GtkBin *)combo)); gtk_container_add((GtkContainer *)combo, tmp); - gtk_button_set_relief ((GtkButton *)combo, GTK_RELIEF_NORMAL); + gtk_button_set_relief ((GtkButton *)combo, GTK_RELIEF_NORMAL); gtk_widget_show(tmp_box); gtk_box_pack_end (GTK_BOX (cont), tmp_box, FALSE, FALSE, 4); - + } container = e_attachment_paned_get_content_area ( E_ATTACHMENT_PANED (priv->attachment_view)); diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h index 157343bcac..454f02b2e6 100644 --- a/calendar/gui/dialogs/comp-editor.h +++ b/calendar/gui/dialogs/comp-editor.h @@ -156,8 +156,9 @@ GtkWidget * comp_editor_get_managed_widget (CompEditor *editor, const gchar *widget_path); CompEditor * comp_editor_find_instance (const gchar *uid); -void comp_editor_set_lite (gboolean status); +void comp_editor_set_lite (gboolean status); gboolean comp_editor_get_lite (void); + G_END_DECLS #endif diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 07e74bc11f..5a9b8ec47a 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -2167,7 +2167,7 @@ get_widgets (EventPage *epage) gtk_widget_hide (priv->invite); else gtk_widget_hide (priv->invite_label); - + priv->add = GW ("add-attendee"); priv->remove = GW ("remove-attendee"); priv->edit = GW ("edit-attendee"); diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c index f8c15b02ff..42e7f941eb 100644 --- a/calendar/gui/e-cal-list-view.c +++ b/calendar/gui/e-cal-list-view.c @@ -270,7 +270,6 @@ setup_e_table (ECalListView *cal_list_view) e_table_extras_add_compare (extras, "date-compare", date_compare_cb); - /* set proper format component for a default 'date' cell renderer */ cell = e_table_extras_get_cell (extras, "date"); e_cell_date_set_format_component (E_CELL_DATE (cell), "calendar"); diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 133f3a9234..c582b0fb78 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -1888,7 +1888,7 @@ free_comp_id (gpointer id) static void process_event (ECalView *query, GList *objects, ECalModel *model, - void (*process_fn) (ECalView *query, GList *objects, ECalModel *model), + void (*process_fn) (ECalView *query, GList *objects, ECalModel *model), gboolean *in, GList **save_list, gpointer (*copy_fn) (gpointer data), void (*free_fn)(gpointer data)) { gboolean skip = FALSE; diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h index f3a23da8ad..c5fffd3cd6 100644 --- a/calendar/gui/e-cal-model.h +++ b/calendar/gui/e-cal-model.h @@ -231,7 +231,7 @@ ECalModelComponent * (ECalModel *model, const ECalComponentId *id); gchar * e_cal_model_date_value_to_string(ECalModel *model, - const void *value); + gconstpointer value); ECalModelComponent * e_cal_model_copy_component_data (ECalModelComponent *comp_data); void e_cal_model_free_component_data (ECalModelComponent *comp_data); diff --git a/calendar/gui/e-memo-table.h b/calendar/gui/e-memo-table.h index 0bb79694b0..d7f1857374 100644 --- a/calendar/gui/e-memo-table.h +++ b/calendar/gui/e-memo-table.h @@ -99,7 +99,7 @@ ECalModel * e_memo_table_get_model (EMemoTable *memo_table); ETable * e_memo_table_get_table (EMemoTable *memo_table); EShellView * e_memo_table_get_shell_view (EMemoTable *memo_table); icaltimezone * e_memo_table_get_timezone (EMemoTable *memo_table); -void e_memo_table_set_timezone (EMemoTable *memo_table, +void e_memo_table_set_timezone (EMemoTable *memo_table, icaltimezone *timezone); gboolean e_memo_table_get_use_24_hour_format (EMemoTable *memo_table); diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index 2cb699f2d0..dc31e20696 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -311,7 +311,7 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item, gdk_region_destroy (draw_region); return; } - + cr = gdk_cairo_create (drawable); gradient = calendar_config_get_display_events_gradient (); @@ -469,7 +469,6 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item, rect_w -= 2; } - /* Here we draw the border around the event */ cx0 = rect_x; @@ -501,7 +500,7 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item, cairo_save (cr); draw_curved_rectangle (cr, cx0, cy0, rect_width, rect_height, radius); - if (gradient){ + if (gradient) { pat = cairo_pattern_create_linear (rect_x + 2, y1 + 1, rect_x + 2, y2 - 7.25); cairo_pattern_add_color_stop_rgba (pat, 1, red/cc, green/cc, blue/cc, 0.8); cairo_pattern_add_color_stop_rgba (pat, 0, red/cc, green/cc, blue/cc, 0.4); @@ -784,7 +783,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, icon_x -= icon_x_inc * num_icons; #define draw_pixbuf(pf) \ - if (can_draw_in_region (draw_region, icon_x, icon_y, \ + if (can_draw_in_region (draw_region, icon_x, icon_y, \ E_WEEK_VIEW_ICON_WIDTH, E_WEEK_VIEW_ICON_HEIGHT)) { \ cairo_save (cr); \ gdk_cairo_set_source_pixbuf (cr, pf, icon_x, icon_y); \ @@ -794,7 +793,6 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem, \ icon_x += icon_x_inc; - if (draw_reminder_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) { draw_pixbuf (week_view->reminder_icon); } diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index c090acc115..d4043ff4fe 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2662,7 +2662,7 @@ e_week_view_add_event (ECalComponent *comp, g_print ("\tday_starts[0]: %s", ctime (&add_event_data->week_view->day_starts[0])); g_print ("\tday_starts[%d]: %s\n", num_days, ctime (&add_event_data->week_view->day_starts[num_days])); }*/ - + g_return_val_if_fail (start <= end, TRUE); g_return_val_if_fail (start < add_event_data->week_view->day_starts[num_days], TRUE); g_return_val_if_fail (end > add_event_data->week_view->day_starts[0], TRUE); diff --git a/e-util/e-datetime-format.c b/e-util/e-datetime-format.c index c6900ff8ca..6dff77f2ee 100644 --- a/e-util/e-datetime-format.c +++ b/e-util/e-datetime-format.c @@ -153,7 +153,7 @@ static void set_format_internal (const gchar *key, const gchar *fmt, GKeyFile *keyfile) { ensure_loaded (); - + g_return_if_fail (key != NULL); g_return_if_fail (key2fmt != NULL); g_return_if_fail (keyfile != NULL); @@ -256,7 +256,7 @@ format_internal (const gchar *key, DTFormatKind kind, time_t tvalue, struct tm * g_string_append (use_fmt, ad); else if (g_ascii_isspace (fmt [i + 3])) i++; - + g_free (ad); } } @@ -322,7 +322,7 @@ fill_combo_formats (GtkWidget *combo, const gchar *key, DTFormatKind kind) }; const gchar **items = NULL; - int i, idx = 0; + gint i, idx = 0; const gchar *fmt; g_return_if_fail (GTK_IS_COMBO_BOX_ENTRY (combo)); @@ -431,7 +431,6 @@ gen_key (const gchar *component, const gchar *part, DTFormatKind kind) g_return_val_if_fail (component != NULL, NULL); g_return_val_if_fail (*component != 0, NULL); - switch (kind) { case DTFormatKindDate: kind_str = "Date"; diff --git a/plugins/groupwise-features/install-shared.c b/plugins/groupwise-features/install-shared.c index 1725835b5f..a208116f0a 100644 --- a/plugins/groupwise-features/install-shared.c +++ b/plugins/groupwise-features/install-shared.c @@ -220,7 +220,7 @@ org_gnome_popup_wizard (EPlugin *ep, EMEventTargetMessage *target) "%s\n\n\n" "Click 'Apply' to install the shared folder\n\n"), name, name, content->buffer->data); - + page = gtk_label_new (start_message); gtk_label_set_line_wrap (GTK_LABEL (page), TRUE); gtk_misc_set_alignment (GTK_MISC (page), 0.0, 0.0); diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index 07483e7e06..f6272ba873 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -395,7 +395,7 @@ can_support_actions (void) caps = notify_get_server_caps (); if (caps != NULL) { for (c = caps; c != NULL; c = c->next) { - if (strcmp ((char*)c->data, "actions") == 0) { + if (strcmp ((gchar *)c->data, "actions") == 0) { supports_actions = TRUE; break; } @@ -460,7 +460,7 @@ new_notify_status (EMEventTargetFolder *t) 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); - } + } } } #endif @@ -630,7 +630,7 @@ sound_play_cb (GtkWidget *widget, gpointer data) file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (scw->filechooser)); do_play_sound (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (scw->beep)), - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (scw->use_theme)), + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (scw->use_theme)), file); g_free (file); } @@ -651,7 +651,7 @@ sound_notify_idle_cb (gpointer user_data) client = gconf_client_get_default (); file = gconf_client_get_string (client, GCONF_KEY_SOUND_FILE, NULL); - + do_play_sound (is_part_enabled (GCONF_KEY_SOUND_BEEP), is_part_enabled (GCONF_KEY_SOUND_USE_THEME), file); @@ -690,11 +690,13 @@ read_notify_sound (EMEventTargetMessage *t) static void enable_sound (gint enable) { - if (enable){ + if (enable) { ca_context_create(&mailnotification); - ca_context_change_props(mailnotification, - CA_PROP_APPLICATION_NAME, "mailnotification Plugin", - NULL); + ca_context_change_props( + mailnotification, + CA_PROP_APPLICATION_NAME, + "mailnotification Plugin", + NULL); } else ca_context_destroy(mailnotification); diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c index 1afbd31d24..1b8ad64768 100644 --- a/plugins/mail-to-task/mail-to-task.c +++ b/plugins/mail-to-task/mail-to-task.c @@ -361,7 +361,7 @@ do_ask (const gchar *text, gboolean is_create_edit_add) { gint res; GtkWidget *dialog = gtk_message_dialog_new (NULL, - GTK_DIALOG_MODAL, + GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, is_create_edit_add ? GTK_BUTTONS_NONE : GTK_BUTTONS_YES_NO, "%s", text); @@ -506,7 +506,7 @@ do_manage_comp_idle (GSList *manage_comp_datas) const gchar *ask = get_question_edit_old (source_type); if (ask) { - char *msg = g_strdup_printf (ask, icalcomponent_get_summary (mc->stored_comp) ? icalcomponent_get_summary (mc->stored_comp) : _("[No Summary]")); + gchar *msg = g_strdup_printf (ask, icalcomponent_get_summary (mc->stored_comp) ? icalcomponent_get_summary (mc->stored_comp) : _("[No Summary]")); gint chosen; chosen = do_ask (msg, TRUE); @@ -555,7 +555,7 @@ do_manage_comp_idle (GSList *manage_comp_datas) const gchar *ask = NULL; can = FALSE; - + if (with_old == g_slist_length (manage_comp_datas)) { ask = get_question_create_new_n (source_type, with_old); } else { diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c index 01f67af470..aba3546443 100644 --- a/shell/e-shell-importer.c +++ b/shell/e-shell-importer.c @@ -417,7 +417,7 @@ import_assistant_cancel (GtkAssistant *assistant, ImportData *data) { if (data->import_dialog) gtk_dialog_response (GTK_DIALOG (data->import_dialog), GTK_RESPONSE_CANCEL); - else + else gtk_widget_destroy (GTK_WIDGET (data->assistant)); } diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c index 85979679c5..44bf29c202 100644 --- a/widgets/misc/e-attachment.c +++ b/widgets/misc/e-attachment.c @@ -108,7 +108,7 @@ create_system_thumbnail (EAttachment *attachment, GIcon **icon) { GFile *file; gchar *thumbnail = NULL; - + g_return_val_if_fail (attachment != NULL, FALSE); g_return_val_if_fail (icon != NULL, FALSE); -- cgit v1.2.3