diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-02-19 08:35:59 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-02-19 09:44:24 +0800 |
commit | fcb29478f605deb787c62fc7567c5c7f897585bb (patch) | |
tree | ec765625b528f38d34c0b1795abb588227b1d95b | |
parent | 1b25ab52f7709a0eae7493fb933fa62376ead288 (diff) | |
download | gsoc2013-evolution-fcb29478f605deb787c62fc7567c5c7f897585bb.tar.gz gsoc2013-evolution-fcb29478f605deb787c62fc7567c5c7f897585bb.tar.zst gsoc2013-evolution-fcb29478f605deb787c62fc7567c5c7f897585bb.zip |
Coding style and whitespace cleanup.
23 files changed, 82 insertions, 41 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index 6dfa981463..84224178b5 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -105,14 +105,17 @@ addressbook_value_at (ETableModel *etc, gint col, gint row) { EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etc); EAddressbookTableAdapterPrivate *priv = adapter->priv; + EContact *contact; const gchar *value; if (col >= COLS || row >= e_addressbook_model_contact_count (priv->model)) return NULL; - value = e_contact_get_const ((EContact*)e_addressbook_model_contact_at (priv->model, row), col); + contact = e_addressbook_model_contact_at (priv->model, row); + value = e_contact_get_const (contact, col); - if (value && *value && (col == E_CONTACT_EMAIL_1 || col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3)) { + if (value && *value && (col == E_CONTACT_EMAIL_1 || + col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3)) { gchar *val = g_hash_table_lookup (priv->emails, value); if (val) { @@ -165,7 +168,9 @@ addressbook_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer va e_table_model_pre_change (etc); - if (col == E_CONTACT_EMAIL_1 || col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3) { + if (col == E_CONTACT_EMAIL_1 || + col == E_CONTACT_EMAIL_2 || + col == E_CONTACT_EMAIL_3) { const gchar *old_value = e_contact_get_const (contact, col); /* remove old value from cache and use new one */ @@ -218,6 +223,7 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row) EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER (etm); EAddressbookTableAdapterPrivate *priv = adapter->priv; EContact *contact; + EBook *book; gint col; contact = e_contact_new (); @@ -227,7 +233,8 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row) e_contact_set (contact, col, (gpointer) val); } - eab_merging_book_add_contact (e_addressbook_model_get_book (priv->model), contact, NULL, NULL); + book = e_addressbook_model_get_book (priv->model); + eab_merging_book_add_contact (book, contact, NULL, NULL); g_object_unref (contact); } @@ -322,7 +329,9 @@ remove_contacts (EAddressbookModel *model, e_table_model_pre_change (E_TABLE_MODEL (adapter)); if (count == 1) - e_table_model_rows_deleted (E_TABLE_MODEL (adapter), g_array_index (indices, gint, 0), 1); + e_table_model_rows_deleted ( + E_TABLE_MODEL (adapter), + g_array_index (indices, gint, 0), 1); else e_table_model_changed (E_TABLE_MODEL (adapter)); } diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 0012f8ae56..47052f443a 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -454,7 +454,6 @@ render_contact_block (GString *buffer, EContact *contact) const gchar *nl; gchar *nick=NULL; - accum = g_string_new (""); nl = ""; @@ -1170,7 +1169,7 @@ eab_contact_display_class_init (EABContactDisplayClass *class) g_object_class_install_property ( object_class, PROP_ORIENTATION, - g_param_spec_int( + g_param_spec_int ( "orientation", NULL, NULL, diff --git a/addressbook/gui/widgets/eab-contact-display.h b/addressbook/gui/widgets/eab-contact-display.h index 4c8c8ef177..e74a65cb38 100644 --- a/addressbook/gui/widgets/eab-contact-display.h +++ b/addressbook/gui/widgets/eab-contact-display.h @@ -87,9 +87,11 @@ EABContactDisplayMode eab_contact_display_get_mode (EABContactDisplay *display); void eab_contact_display_set_mode (EABContactDisplay *display, EABContactDisplayMode mode); - -GtkOrientation eab_contact_display_get_orientation (EABContactDisplay *display); -void eab_contact_display_set_orientation (EABContactDisplay *display, GtkOrientation orientation); +GtkOrientation eab_contact_display_get_orientation + (EABContactDisplay *display); +void eab_contact_display_set_orientation + (EABContactDisplay *display, + GtkOrientation orientation); G_END_DECLS diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c index 0169901c1f..14c30a29e7 100644 --- a/calendar/gui/alarm-notify/alarm-notify-dialog.c +++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c @@ -280,7 +280,7 @@ notified_alarms_dialog_new (void) an->dismiss_btn = e_builder_get_widget (an->builder, "dismiss-button"); edit_btn = e_builder_get_widget (an->builder, "edit-button"); - if (!(an->dialog && an->treeview + if (!(an->dialog && an->treeview && an->snooze_time_min && an->snooze_time_hrs && an->snooze_time_days && an->description && an->location && edit_btn && snooze_btn && an->dismiss_btn)) { g_warning ("alarm_notify_dialog(): Could not find all widgets in alarm-notify.ui file!"); diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 846be18152..769263e88a 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -2645,7 +2645,9 @@ comp_editor_append_widget (CompEditor *editor, if (add) { gtk_notebook_append_page (priv->notebook, page, label_widget); - gtk_container_child_set (GTK_CONTAINER (priv->notebook), page, "tab-fill", FALSE, "tab-expand", FALSE, NULL); + gtk_container_child_set ( + GTK_CONTAINER (priv->notebook), page, + "tab-fill", FALSE, "tab-expand", FALSE, NULL); } /* Listen for when the page is mapped/unmapped so we can @@ -2708,8 +2710,11 @@ comp_editor_append_page (CompEditor *editor, priv->pages = g_list_append (priv->pages, page); if (add) { - gtk_notebook_append_page (priv->notebook, page_widget, label_widget); - gtk_container_child_set (GTK_CONTAINER (priv->notebook), page_widget, "tab-fill", FALSE, "tab-expand", FALSE, NULL); + gtk_notebook_append_page ( + priv->notebook, page_widget, label_widget); + gtk_container_child_set ( + GTK_CONTAINER (priv->notebook), page_widget, + "tab-fill", FALSE, "tab-expand", FALSE, NULL); } /* Listen for things happening on the page */ diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c index 08f4458cff..cb5ded6b17 100644 --- a/capplet/settings/mail-account-view.c +++ b/capplet/settings/mail-account-view.c @@ -765,7 +765,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) #define PACK_IN_BOX(wid,child1,child2,num1,num2) { GtkWidget *tbox; tbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start ((GtkBox *)tbox, child1, FALSE, FALSE, num1); gtk_box_pack_start ((GtkBox *)tbox, child2, FALSE, FALSE, num2); gtk_widget_show_all (tbox); gtk_box_pack_start ((GtkBox *)wid, tbox, FALSE, FALSE, 0); } mav->priv->gmail_link = gtk_link_button_new ("https://mail.google.com/mail/?ui=2&shva=1#settings/fwdandpop"); - PACK_IN_BOX(page->box,mav->priv->gmail_info_label,mav->priv->gmail_link, 24, 0); + PACK_IN_BOX (page->box,mav->priv->gmail_info_label,mav->priv->gmail_link, 24, 0); #undef PACK_IN_BOX } else if (mav->original == NULL && (g_strrstr(account->source->url, "yahoo.") || diff --git a/e-util/e-alert-dialog.c b/e-util/e-alert-dialog.c index f714574b01..e9fea52052 100644 --- a/e-util/e-alert-dialog.c +++ b/e-util/e-alert-dialog.c @@ -121,6 +121,7 @@ alert_dialog_constructed (GObject *object) GList *actions; const gchar *primary, *secondary; gint min_width = -1, prefer_width = -1; + gint height; /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (e_alert_dialog_parent_class)->constructed (object); @@ -219,9 +220,14 @@ alert_dialog_constructed (GObject *object) widget = GTK_WIDGET (dialog); - gtk_widget_get_preferred_width_for_height (widget, gtk_widget_get_allocated_height (widget), &min_width, &prefer_width); + height = gtk_widget_get_allocated_height (widget); + gtk_widget_get_preferred_width_for_height ( + widget, height, &min_width, &prefer_width); if (min_width < prefer_width) - gtk_window_set_default_size (GTK_WINDOW (dialog), MIN ((min_width + prefer_width) / 2, min_width * 5 / 4), -1); + gtk_window_set_default_size ( + GTK_WINDOW (dialog), MIN ( + (min_width + prefer_width) / 2, + min_width * 5 / 4), -1); pango_attr_list_unref (list); } diff --git a/e-util/e-util.h b/e-util/e-util.h index 2c1cc8ea5e..554c9300b1 100644 --- a/e-util/e-util.h +++ b/e-util/e-util.h @@ -140,7 +140,7 @@ gchar * e_util_guess_mime_type (const gchar *filename, GSList * e_util_get_category_filter_options (void); -GList * e_util_get_searchable_categories(void); +GList * e_util_get_searchable_categories (void); void e_util_set_source_combo_box_list (GtkWidget *source_combo_box, diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c index 3d4657a560..fbe673d4c0 100644 --- a/libgnomecanvas/gnome-canvas-pixbuf.c +++ b/libgnomecanvas/gnome-canvas-pixbuf.c @@ -206,7 +206,7 @@ recompute_bounding_box (GnomeCanvasPixbuf *gcp) GnomeCanvasItem *item; GnomeCanvasPixbufPrivate *priv; cairo_matrix_t i2c; - double x1, x2, y1, y2; + gdouble x1, x2, y1, y2; item = GNOME_CANVAS_ITEM (gcp); priv = gcp->priv; diff --git a/libgnomecanvas/gnome-canvas-util.c b/libgnomecanvas/gnome-canvas-util.c index 5ca5979442..569a22e672 100644 --- a/libgnomecanvas/gnome-canvas-util.c +++ b/libgnomecanvas/gnome-canvas-util.c @@ -119,8 +119,8 @@ void gnome_canvas_matrix_transform_rect (const cairo_matrix_t *matrix, double *x1, double *y1, double *x2, double *y2) { - double maxx, maxy, minx, miny; - double tmpx, tmpy; + gdouble maxx, maxy, minx, miny; + gdouble tmpx, tmpy; tmpx = *x1; tmpy = *y1; diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c index b313c84af8..8be48a95a7 100644 --- a/libgnomecanvas/gnome-canvas.c +++ b/libgnomecanvas/gnome-canvas.c @@ -1373,7 +1373,7 @@ gnome_canvas_group_update (GnomeCanvasItem *item, GnomeCanvasGroup *group; GList *list; GnomeCanvasItem *i; - double x1, y1, x2, y2; + gdouble x1, y1, x2, y2; group = GNOME_CANVAS_GROUP (item); @@ -3226,7 +3226,7 @@ void gnome_canvas_c2w (GnomeCanvas *canvas, gint cx, gint cy, gdouble *wx, gdouble *wy) { cairo_matrix_t c2w; - double x, y; + gdouble x, y; g_return_if_fail (GNOME_IS_CANVAS (canvas)); diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c index 7a62c8bfc3..b8fd00312d 100644 --- a/mail/e-mail-paned-view.c +++ b/mail/e-mail-paned-view.c @@ -780,7 +780,10 @@ mail_paned_view_update_view_instance (EMailView *view) orientable = GTK_ORIENTABLE (view); orientation = gtk_orientable_get_orientation (orientable); - show_vertical_view = (orientation == GTK_ORIENTATION_HORIZONTAL) && !e_shell_settings_get_boolean (shell_settings, "mail-global-view-setting"); + show_vertical_view = + (orientation == GTK_ORIENTATION_HORIZONTAL) && + !e_shell_settings_get_boolean ( + shell_settings, "mail-global-view-setting"); if (show_vertical_view) { gchar *filename; diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index a56b514227..3f5a056ee6 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -2941,10 +2941,12 @@ static void mail_reader_update_actions (EMailReader *reader, guint32 state) { +#if 0 EShell *shell; EMailBackend *backend; EShellBackend *shell_backend; EShellSettings *shell_settings; +#endif GtkAction *action; const gchar *action_name; gboolean sensitive; @@ -2971,15 +2973,15 @@ mail_reader_update_actions (EMailReader *reader, gboolean first_message_selected = FALSE; gboolean last_message_selected = FALSE; +#if 0 /* XXX Lockdown keys have moved to gsettings-desktop-schemas, + * so disable lockdown integration until we're ready for + * GSettings. */ backend = e_mail_reader_get_backend (reader); shell_backend = E_SHELL_BACKEND (backend); shell = e_shell_backend_get_shell (shell_backend); shell_settings = e_shell_get_shell_settings (shell); -#if 0 /* XXX Lockdown keys have moved to gsettings-desktop-schemas, - * so disable lockdown integration until we're ready for - * GSettings. */ #ifndef G_OS_WIN32 disable_printing = e_shell_settings_get_boolean ( shell_settings, "disable-printing"); diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c index baaf3eac53..3a94e66a23 100644 --- a/mail/em-subscription-editor.c +++ b/mail/em-subscription-editor.c @@ -842,7 +842,9 @@ subscription_editor_add_account (EMSubscriptionEditor *editor, gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); gtk_notebook_append_page (GTK_NOTEBOOK (container), widget, NULL); - gtk_container_child_set (GTK_CONTAINER (container), widget, "tab-fill", FALSE, "tab-expand", FALSE, NULL); + gtk_container_child_set ( + GTK_CONTAINER (container), widget, + "tab-fill", FALSE, "tab-expand", FALSE, NULL); gtk_widget_show (widget); container = widget; diff --git a/modules/addressbook/e-book-shell-content.c b/modules/addressbook/e-book-shell-content.c index a2f7f9cddd..b4bd8d2ac3 100644 --- a/modules/addressbook/e-book-shell-content.c +++ b/modules/addressbook/e-book-shell-content.c @@ -272,7 +272,6 @@ book_shell_content_constructed (GObject *object) widget, "orientation", G_BINDING_SYNC_CREATE); - e_shell_configure_web_view (shell, E_WEB_VIEW (widget)); gtk_widget_show (widget); diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index 601b8e0c25..d5096c6185 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -117,11 +117,17 @@ action_mail_folder_new_cb (GtkAction *action, view_name = e_shell_window_get_active_view (shell_window); if (g_strcmp0 (view_name, BACKEND_NAME) != 0) { EShellBackend *mail_backend; + EShell *shell; - mail_backend = e_shell_get_backend_by_name (e_shell_window_get_shell (shell_window), BACKEND_NAME); + shell = e_shell_window_get_shell (shell_window); + + mail_backend = + e_shell_get_backend_by_name (shell, BACKEND_NAME); g_return_if_fail (mail_backend != NULL); - mail_session = e_mail_backend_get_session (E_MAIL_BACKEND (mail_backend)); + mail_session = + e_mail_backend_get_session ( + E_MAIL_BACKEND (mail_backend)); g_return_if_fail (mail_session != NULL); goto exit; diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index e0a445abdd..2836b1bd09 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -381,6 +381,7 @@ action_mail_folder_new_cb (GtkAction *action, { EShellView *shell_view; EShellWindow *shell_window; + EMailSession *session; EMailShellSidebar *mail_shell_sidebar; CamelFolderInfo *folder_info; EMFolderTree *folder_tree; @@ -391,10 +392,13 @@ action_mail_folder_new_cb (GtkAction *action, mail_shell_sidebar = mail_shell_view->priv->mail_shell_sidebar; folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar); folder_info = em_folder_tree_get_selected_folder_info (folder_tree); + session = em_folder_tree_get_session (folder_tree); g_return_if_fail (folder_info != NULL); em_folder_utils_create_folder ( - folder_info, folder_tree, em_folder_tree_get_session (folder_tree), GTK_WINDOW (shell_window)); + folder_info, folder_tree, session, + GTK_WINDOW (shell_window)); + camel_folder_info_free (folder_info); } diff --git a/plugins/face/face.c b/plugins/face/face.c index 576a5acfb8..8f50f16d68 100644 --- a/plugins/face/face.c +++ b/plugins/face/face.c @@ -365,7 +365,7 @@ get_cfg_widget (void) gtk_box_pack_start (GTK_BOX (vbox), butt, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), img, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox), img, FALSE, FALSE, 0); gtk_widget_show_all (vbox); diff --git a/plugins/tnef-attachments/tnef-plugin.c b/plugins/tnef-attachments/tnef-plugin.c index 1324535328..977189edb4 100644 --- a/plugins/tnef-attachments/tnef-plugin.c +++ b/plugins/tnef-attachments/tnef-plugin.c @@ -68,7 +68,7 @@ guchar getRruleCount (guchar a, guchar b); guchar getRruleMonthNum (guchar a, guchar b); gchar * getRruleDayname (guchar a); -static gchar* +static gchar * sanitize_filename (const gchar *filename) { gchar * sanitized_name; @@ -409,7 +409,7 @@ void saveVCard (TNEFStruct *tnef, const gchar *tmpdir) { if ((vl = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_DISPLAY_NAME))) == MAPI_UNDEFINED) { if ((vl=MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_COMPANY_NAME))) == MAPI_UNDEFINED) { if (tnef->subject.size > 0) { - file = sanitize_filename (tnef->subject.data); + file = sanitize_filename (tnef->subject.data); if (!file) return; absfilename = g_strconcat (file, ".vcard", NULL); @@ -1124,7 +1124,7 @@ void saveVTask (TNEFStruct *tnef, const gchar *tmpdir) { variableLength *filename; gint index; gchar *ifilename; - gchar *absfilename, *file; + gchar *absfilename, *file; gchar *charptr, *charptr2; dtr thedate; FILE *fptr; diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c index 327033d514..b1de7119a8 100644 --- a/shell/e-shell-utils.c +++ b/shell/e-shell-utils.c @@ -65,6 +65,9 @@ void e_shell_configure_web_view (EShell *shell, EWebView *web_view) { +#if 0 /* XXX Lockdown keys have moved to gsettings-desktop-scheams, + * so disable lockdown integration until we're ready for + * GSettings. */ EShellSettings *shell_settings; g_return_if_fail (E_IS_SHELL (shell)); @@ -72,9 +75,6 @@ e_shell_configure_web_view (EShell *shell, shell_settings = e_shell_get_shell_settings (shell); -#if 0 /* XXX Lockdown keys have moved to gsettings-desktop-scheams, - * so disable lockdown integration until we're ready for - * GSettings. */ #ifndef G_OS_WIN32 g_object_bind_property ( shell_settings, "disable-printing", diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index 6dcba975bc..db2bf069a9 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -261,7 +261,9 @@ void e_shell_window_private_constructed (EShellWindow *shell_window) { EShellWindowPrivate *priv = shell_window->priv; +#if 0 EShellSettings *shell_settings; +#endif EShell *shell; GConfBridge *bridge; GtkAction *action; @@ -282,7 +284,9 @@ e_shell_window_private_constructed (EShellWindow *shell_window) window = GTK_WINDOW (shell_window); shell = e_shell_window_get_shell (shell_window); +#if 0 shell_settings = e_shell_get_shell_settings (shell); +#endif ui_manager = e_shell_window_get_ui_manager (shell_window); e_shell_configure_ui_manager (shell, E_UI_MANAGER (ui_manager)); diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 1c7f4a2c54..897bae1948 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -176,7 +176,7 @@ ethi_update (GnomeCanvasItem *item, gint flags) { ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item); - double x1, y1, x2, y2; + gdouble x1, y1, x2, y2; if (GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update) GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update ( diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 51e3c9fecd..2276bb58c8 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -477,7 +477,7 @@ static void eti_update (GnomeCanvasItem *item, const cairo_matrix_t *i2c, gint flags) { ETableItem *eti = E_TABLE_ITEM (item); - double x1, x2, y1, y2; + gdouble x1, x2, y1, y2; if (GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->update) (*GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->update)(item, i2c, flags); |