diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-10-04 00:08:28 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-10-04 01:29:20 +0800 |
commit | 9675f18d915fcbae59dd4b32b8a2ff36b3d27cc1 (patch) | |
tree | aa1d53c8cedef6dc09455fbadd4b63216f9b7228 | |
parent | c9c3c3be92f3dbf133a5b1b42fb55905a1060d0e (diff) | |
download | gsoc2013-evolution-9675f18d915fcbae59dd4b32b8a2ff36b3d27cc1.tar gsoc2013-evolution-9675f18d915fcbae59dd4b32b8a2ff36b3d27cc1.tar.gz gsoc2013-evolution-9675f18d915fcbae59dd4b32b8a2ff36b3d27cc1.tar.bz2 gsoc2013-evolution-9675f18d915fcbae59dd4b32b8a2ff36b3d27cc1.tar.lz gsoc2013-evolution-9675f18d915fcbae59dd4b32b8a2ff36b3d27cc1.tar.xz gsoc2013-evolution-9675f18d915fcbae59dd4b32b8a2ff36b3d27cc1.tar.zst gsoc2013-evolution-9675f18d915fcbae59dd4b32b8a2ff36b3d27cc1.zip |
Coding style and whitespace cleanup.
23 files changed, 158 insertions, 102 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index 47d7e3a3d6..ea0bb6b206 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -133,7 +133,9 @@ e_contact_editor_fullname_get_property (GObject *object, static void e_contact_editor_fullname_dispose (GObject *object) { - EContactEditorFullname *e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object); + EContactEditorFullname *e_contact_editor_fullname; + + e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object); if (e_contact_editor_fullname->builder) { g_object_unref (e_contact_editor_fullname->builder); diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c index 5d42ff7a00..246eebc9ee 100644 --- a/addressbook/importers/evolution-ldif-importer.c +++ b/addressbook/importers/evolution-ldif-importer.c @@ -480,9 +480,11 @@ ldif_import_contacts (gpointer d) ones till the end */ if (gci->state == 0) { - while (count < 50 && (contact = getNextLDIFEntry (gci->dn_contact_hash, gci->file))) { + while (count < 50 && (contact = getNextLDIFEntry ( + gci->dn_contact_hash, gci->file))) { if (e_contact_get (contact, E_CONTACT_IS_LIST)) { - gci->list_contacts = g_slist_prepend (gci->list_contacts, contact); + gci->list_contacts = g_slist_prepend ( + gci->list_contacts, contact); } else { add_to_notes (contact, E_CONTACT_OFFICE); add_to_notes (contact, E_CONTACT_SPOUSE); diff --git a/e-util/e-alert.c b/e-util/e-alert.c index 65ab57bd8f..ced83ddc0e 100644 --- a/e-util/e-alert.c +++ b/e-util/e-alert.c @@ -488,7 +488,6 @@ alert_finalize (GObject *object) G_OBJECT_CLASS (e_alert_parent_class)->finalize (object); } - static void e_alert_class_init (EAlertClass *class) { diff --git a/e-util/e-alert.h b/e-util/e-alert.h index 7b07970361..fe705c5036 100644 --- a/e-util/e-alert.h +++ b/e-util/e-alert.h @@ -30,7 +30,7 @@ /* Standard GObject macros */ #define E_TYPE_ALERT \ - (e_alert_get_type()) + (e_alert_get_type ()) #define E_ALERT(obj) \ (G_TYPE_CHECK_INSTANCE_CAST \ ((obj), E_TYPE_ALERT, EAlert)) diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c index 1bab909ef2..3d8ae70f8f 100644 --- a/mail/e-mail-notebook-view.c +++ b/mail/e-mail-notebook-view.c @@ -1107,7 +1107,8 @@ mail_notebook_view_set_folder (EMailReader *reader, priv->tab_picker)), FALSE); - tab = (EMailTab *)e_mail_tab_new_full (camel_folder_get_full_name (folder), NULL, 1); + tab = (EMailTab *) e_mail_tab_new_full ( + camel_folder_get_full_name (folder), NULL, 1); g_object_set_data ((GObject *)tab, "page", priv->current_view); g_object_set_data ((GObject *)priv->current_view, "page", tab); g_object_set_data ((GObject *)priv->current_view, "tab", tab); diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c index 47faf57c91..5a3f3adaf6 100644 --- a/mail/em-filter-rule.c +++ b/mail/em-filter-rule.c @@ -581,11 +581,13 @@ get_widget (EFilterRule *fr, ERuleContext *rc) hadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0 ,1.0, 1.0); vadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0 ,1.0, 1.0); - scrolledwindow = gtk_scrolled_window_new (GTK_ADJUSTMENT (hadj), GTK_ADJUSTMENT (vadj)); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - - gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwindow), parts); + scrolledwindow = gtk_scrolled_window_new ( + GTK_ADJUSTMENT (hadj), GTK_ADJUSTMENT (vadj)); + gtk_scrolled_window_set_policy ( + GTK_SCROLLED_WINDOW (scrolledwindow), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_add_with_viewport ( + GTK_SCROLLED_WINDOW (scrolledwindow), parts); gtk_box_pack_start (GTK_BOX (inframe), scrolledwindow, TRUE, TRUE, 0); diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c index c8a8c903a1..66fa0944cd 100644 --- a/mail/em-format-hook.c +++ b/mail/em-format-hook.c @@ -261,18 +261,28 @@ em_format_hook_get_type (void) if (!type) { static const GTypeInfo info = { - sizeof (EMFormatHookClass), NULL, NULL, (GClassInitFunc) emfh_class_init, NULL, NULL, - sizeof (EMFormatHook), 0, (GInstanceInitFunc) NULL, + sizeof (EMFormatHookClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) emfh_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (EMFormatHook), + 0, /* n_preallocs */ + (GInstanceInitFunc) NULL, + NULL /* value_table */ }; - emfh_parent_class = g_type_class_ref (e_plugin_hook_get_type ()); - type = g_type_register_static(e_plugin_hook_get_type(), "EMFormatHook", &info, 0); + emfh_parent_class = g_type_class_ref (E_TYPE_PLUGIN_HOOK); + type = g_type_register_static ( + E_TYPE_PLUGIN_HOOK, "EMFormatHook", &info, 0); } return type; } -void em_format_hook_register_type (GType type) +void +em_format_hook_register_type (GType type) { EMFormatClass *klass; diff --git a/mail/mail-mt.h b/mail/mail-mt.h index 57b79ed5a4..7a9efb94e4 100644 --- a/mail/mail-mt.h +++ b/mail/mail-mt.h @@ -85,7 +85,9 @@ gchar *mail_get_password (CamelService *service, const gchar *prompt, void mail_mt_set_backend (gchar *backend); -/* Call a function in the gui thread, wait for it to return, type is the marshaller to use */ +/* Call a function in the GUI thread, wait for it to return, type is + * the marshaller to use. FIXME This thing is horrible, please put + * it out of its misery. */ typedef enum { MAIL_CALL_p_p, MAIL_CALL_p_pp, diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index 3ae662a82f..61f2f639c9 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -148,16 +148,16 @@ cal_shell_sidebar_backend_error_cb (ECalShellSidebar *cal_shell_sidebar, EShellView *shell_view; EShellWindow *shell_window; EShellSidebar *shell_sidebar; + ESourceGroup *source_group; + ESource *source; GtkWidget *dialog; - const gchar *cal_name; - const gchar *cal_group; shell_sidebar = E_SHELL_SIDEBAR (cal_shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); shell_window = e_shell_view_get_shell_window (shell_view); - cal_name = e_source_peek_name ( e_cal_get_source ( client )); - cal_group = e_source_group_peek_name ( e_source_peek_group( e_cal_get_source ( client))); + source = e_cal_get_source (client); + source_group = e_source_peek_group (source); /* Translators: This string is displayed in a message dialog when * our connection to the calendar service detects an @@ -170,7 +170,8 @@ cal_shell_sidebar_backend_error_cb (ECalShellSidebar *cal_shell_sidebar, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Error on %s: %s\n%s"), - cal_group, cal_name, message); + e_source_group_peek_name (source_group), + e_source_peek_name (source), message); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index f9985f5f6a..6aafdc82a6 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -63,7 +63,10 @@ cal_shell_view_execute_search (EShellView *shell_view) EActionComboBox *combo_box; GnomeCalendar *calendar; ECalendar *date_navigator; + ECalModel *model; GtkRadioAction *action; + icaltimezone *timezone; + struct icaltimetype current_time; time_t start_range; time_t end_range; time_t now_time; @@ -83,7 +86,10 @@ cal_shell_view_execute_search (EShellView *shell_view) searchbar = e_cal_shell_content_get_searchbar (cal_shell_content); calendar = e_cal_shell_content_get_calendar (cal_shell_content); - now_time = time_day_begin (icaltime_as_timet (icaltime_current_time_with_zone (e_cal_model_get_timezone (gnome_calendar_get_model (calendar))))); + model = gnome_calendar_get_model (calendar); + timezone = e_cal_model_get_timezone (model); + current_time = icaltime_current_time_with_zone (timezone); + now_time = time_day_begin (icaltime_as_timet (current_time)); action = GTK_RADIO_ACTION (ACTION (CALENDAR_SEARCH_ANY_FIELD_CONTAINS)); value = gtk_radio_action_get_current_value (action); diff --git a/modules/calendar/e-task-shell-view.c b/modules/calendar/e-task-shell-view.c index 3bf0eb67f1..b4c6c7db0b 100644 --- a/modules/calendar/e-task-shell-view.c +++ b/modules/calendar/e-task-shell-view.c @@ -104,6 +104,8 @@ task_shell_view_execute_search (EShellView *shell_view) ETaskTable *task_table; EWebView *web_view; ECalModel *model; + icaltimezone *timezone; + struct icaltimetype current_time; time_t start_range; time_t end_range; time_t now_time; @@ -121,7 +123,9 @@ task_shell_view_execute_search (EShellView *shell_view) task_shell_content = E_TASK_SHELL_CONTENT (shell_content); task_table = e_task_shell_content_get_task_table (task_shell_content); model = e_task_table_get_model (task_table); - now_time = time_day_begin (icaltime_as_timet (icaltime_current_time_with_zone (e_cal_model_get_timezone (model)))); + timezone = e_cal_model_get_timezone (model); + current_time = icaltime_current_time_with_zone (timezone); + now_time = time_day_begin (icaltime_as_timet (current_time)); action = GTK_RADIO_ACTION (ACTION (TASK_SEARCH_ANY_FIELD_CONTAINS)); value = gtk_radio_action_get_current_value (action); diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c index 6b6b530b90..817b2db79d 100644 --- a/modules/mail/e-mail-shell-view.c +++ b/modules/mail/e-mail-shell-view.c @@ -672,13 +672,15 @@ current_account: GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; - + store = NULL; tree_view = GTK_TREE_VIEW (folder_tree); selection = gtk_tree_view_get_selection (tree_view); if (gtk_tree_selection_get_selected (selection, &model, &iter)) - gtk_tree_model_get (model, &iter, COL_POINTER_CAMEL_STORE, &store, -1); + gtk_tree_model_get ( + model, &iter, + COL_POINTER_CAMEL_STORE, &store, -1); } list = NULL; /* list of CamelFolders */ @@ -686,7 +688,10 @@ current_account: if (store) { CamelFolderInfo *root, *fi; - root = camel_store_get_folder_info_sync (store, NULL, CAMEL_STORE_FOLDER_INFO_RECURSIVE, NULL, NULL); + /* FIXME This call blocks the main loop. */ + root = camel_store_get_folder_info_sync ( + store, NULL, + CAMEL_STORE_FOLDER_INFO_RECURSIVE, NULL, NULL); fi = root; while (fi) { CamelFolderInfo *next; @@ -694,7 +699,9 @@ current_account: if ((fi->flags & CAMEL_FOLDER_NOSELECT) == 0) { CamelFolder *fldr; - fldr = camel_store_get_folder_sync (store, fi->full_name, 0, NULL, NULL); + /* FIXME This call blocks the main loop. */ + fldr = camel_store_get_folder_sync ( + store, fi->full_name, 0, NULL, NULL); if (fldr) list = g_list_prepend (list, fldr); } diff --git a/modules/windows-sens/evolution-windows-sens.c b/modules/windows-sens/evolution-windows-sens.c index 536ff06ff4..e0f70de4e5 100644 --- a/modules/windows-sens/evolution-windows-sens.c +++ b/modules/windows-sens/evolution-windows-sens.c @@ -551,9 +551,9 @@ windows_sens_constructed (GObject *object) IsNetworkAlive_t pIsNetworkAlive = NULL; - char *buf = NULL; - char dummy; - int n, k; + gchar *buf = NULL; + gchar dummy; + gint n, k; HMODULE hDLL = NULL; n = GetSystemDirectory (&dummy, 0); @@ -563,7 +563,7 @@ windows_sens_constructed (GObject *object) buf = g_malloc (n + 1 + strlen (SENSAPI_DLL)); k = GetSystemDirectory (buf, n); - + if (k == 0 || k > n) goto cleanup; diff --git a/plugins/groupwise-features/share-folder-common.c b/plugins/groupwise-features/share-folder-common.c index e4d8dc30c7..387c960b27 100644 --- a/plugins/groupwise-features/share-folder-common.c +++ b/plugins/groupwise-features/share-folder-common.c @@ -93,7 +93,7 @@ shared_folder_commit (EPlugin *ep, EConfigTarget *tget) { EMConfigTargetFolder *target = (EMConfigTargetFolder *)tget->config->target; CamelStore *parent_store; - EMFolderTreeModel *model = em_folder_tree_model_new(); /*mail_component_peek_tree_model (mail_component_peek ());*/ + EMFolderTreeModel *model = em_folder_tree_model_new (); /*mail_component_peek_tree_model (mail_component_peek ());*/ parent_store = camel_folder_get_parent_store (target->folder); diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c index f964c643ee..26bcb90337 100644 --- a/plugins/groupwise-features/status-track.c +++ b/plugins/groupwise-features/status-track.c @@ -252,7 +252,9 @@ gw_track_message_status_cb (GtkAction *action, g_string_free (label, TRUE); gtk_label_set_selectable (detail, TRUE); gtk_label_set_use_markup (detail, TRUE); - gtk_table_attach (table, GTK_WIDGET (detail) , 1, 2, row, row+1, GTK_FILL, 0, 0, 0); + gtk_table_attach ( + table, GTK_WIDGET (detail), + 1, 2, row, row + 1, GTK_FILL, 0, 0, 0); row++; } } diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c index 38c49c895d..7f2ee1ea04 100644 --- a/plugins/mail-to-task/mail-to-task.c +++ b/plugins/mail-to-task/mail-to-task.c @@ -324,7 +324,7 @@ set_attachments (ECal *client, ECalComponent *comp, CamelMimeMessage *message) e_cal_component_get_uid (comp, &comp_uid); local_store = e_cal_get_local_attachment_store (client); path = g_build_path ("/", local_store, comp_uid, NULL); - + destination = g_file_new_for_path (path); g_free (path); diff --git a/shell/main.c b/shell/main.c index a24e618ef0..efface344e 100644 --- a/shell/main.c +++ b/shell/main.c @@ -455,7 +455,9 @@ main (gint argc, gchar **argv) typedef BOOL (WINAPI *t_SetDllDirectoryA) (LPCSTR lpPathName); t_SetDllDirectoryA p_SetDllDirectoryA; - p_SetDllDirectoryA = GetProcAddress (GetModuleHandle ("kernel32.dll"), "SetDllDirectoryA"); + p_SetDllDirectoryA = GetProcAddress ( + GetModuleHandle ("kernel32.dll"), + "SetDllDirectoryA"); if (p_SetDllDirectoryA) (*p_SetDllDirectoryA) (""); } @@ -464,9 +466,13 @@ main (gint argc, gchar **argv) typedef BOOL (WINAPI *t_SetProcessDEPPolicy) (DWORD dwFlags); t_SetProcessDEPPolicy p_SetProcessDEPPolicy; - p_SetProcessDEPPolicy = GetProcAddress (GetModuleHandle ("kernel32.dll"), "SetProcessDEPPolicy"); + p_SetProcessDEPPolicy = GetProcAddress ( + GetModuleHandle ("kernel32.dll"), + "SetProcessDEPPolicy"); if (p_SetProcessDEPPolicy) - (*p_SetProcessDEPPolicy) (PROCESS_DEP_ENABLE|PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION); + (*p_SetProcessDEPPolicy) ( + PROCESS_DEP_ENABLE | + PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION); } #endif diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c index 7fb3ea6215..6076bcd4b6 100644 --- a/smime/lib/e-cert-db.c +++ b/smime/lib/e-cert-db.c @@ -937,23 +937,22 @@ handle_ca_cert_download (ECertDB *cert_db, GList *certs, GError **error) &trust); /* If we aren't logged into the token, then what *should* - happen is the above call should fail, and we should - authenticate and then try again. But see NSS bug #595861. - With NSS 3.12.6 at least, the above call will fail, but - it *will* have added the cert to the database, with - random trust bits. We have to authenticate and then set - the trust bits correctly. And calling - CERT_AddTempCertToPerm() again doesn't work either -- it'll - fail even though it arguably ought to succeed (which is - probably another NSS bug). - So if we get SEC_ERROR_TOKEN_NOT_LOGGED_IN, we first try - CERT_ChangeCertTrust(), and if that doesn't work we hope - we're on a fixed version of NSS and we try calling - CERT_AddTempCertToPerm() again instead. - */ + * happen is the above call should fail, and we should + * authenticate and then try again. But see NSS bug #595861. + * With NSS 3.12.6 at least, the above call will fail, but + * it *will* have added the cert to the database, with + * random trust bits. We have to authenticate and then set + * the trust bits correctly. And calling + * CERT_AddTempCertToPerm() again doesn't work either -- it'll + * fail even though it arguably ought to succeed (which is + * probably another NSS bug). + * So if we get SEC_ERROR_TOKEN_NOT_LOGGED_IN, we first try + * CERT_ChangeCertTrust(), and if that doesn't work we hope + * we're on a fixed version of NSS and we try calling + * CERT_AddTempCertToPerm() again instead. */ if (srv != SECSuccess && PORT_GetError () == SEC_ERROR_TOKEN_NOT_LOGGED_IN && - e_cert_db_login_to_slot (NULL, PK11_GetInternalKeySlot())) { + e_cert_db_login_to_slot (NULL, PK11_GetInternalKeySlot ())) { srv = CERT_ChangeCertTrust (CERT_GetDefaultCertDB (), tmpCert, &trust); if (srv != SECSuccess) @@ -996,7 +995,7 @@ handle_ca_cert_download (ECertDB *cert_db, GList *certs, GError **error) return TRUE; } } -gboolean e_cert_db_change_cert_trust(CERTCertificate *cert, CERTCertTrust *trust) +gboolean e_cert_db_change_cert_trust (CERTCertificate *cert, CERTCertTrust *trust) { SECStatus srv; @@ -1004,20 +1003,19 @@ gboolean e_cert_db_change_cert_trust(CERTCertificate *cert, CERTCertTrust *trust cert, trust); if (srv != SECSuccess && PORT_GetError () == SEC_ERROR_TOKEN_NOT_LOGGED_IN && - e_cert_db_login_to_slot (NULL, PK11_GetInternalKeySlot())) + e_cert_db_login_to_slot (NULL, PK11_GetInternalKeySlot ())) srv = CERT_ChangeCertTrust (CERT_GetDefaultCertDB (), cert, trust); if (srv != SECSuccess) { - glong err = PORT_GetError(); + glong err = PORT_GetError (); g_warning ("CERT_ChangeCertTrust() failed: %s\n", - nss_error_to_string(err)); + nss_error_to_string (err)); return FALSE; } return TRUE; } - /* deleting certificates */ gboolean e_cert_db_delete_cert (ECertDB *certdb, @@ -1035,16 +1033,16 @@ e_cert_db_delete_cert (ECertDB *certdb, cert = e_cert_get_internal_cert (ecert); if (cert->slot && e_cert_get_cert_type (ecert) != E_CERT_USER) { /* To delete a cert of a slot (builtin, most likely), mark it as - completely untrusted. This way we keep a copy cached in the - local database, and next time we try to load it off of the - external token/slot, we'll know not to trust it. We don't - want to do that with user certs, because a user may re-store - the cert onto the card again at which point we *will* want to - trust that cert if it chains up properly. */ + * completely untrusted. This way we keep a copy cached in the + * local database, and next time we try to load it off of the + * external token/slot, we'll know not to trust it. We don't + * want to do that with user certs, because a user may re-store + * the cert onto the card again at which point we *will* want to + * trust that cert if it chains up properly. */ CERTCertTrust trust; e_cert_trust_init_with_values (&trust, 0, 0, 0); - return e_cert_db_change_cert_trust(cert, &trust); + return e_cert_db_change_cert_trust (cert, &trust); } return TRUE; diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c index 2274fd8c78..38a1080992 100644 --- a/widgets/menus/gal-define-views-model.c +++ b/widgets/menus/gal-define-views-model.c @@ -205,7 +205,8 @@ gal_define_views_model_append (GalDefineViewsModel *model, e_table_model_pre_change (etm); gal_view_collection_append (model->collection, view); - e_table_model_row_inserted (etm, gal_view_collection_get_count (model->collection) - 1); + e_table_model_row_inserted ( + etm, gal_view_collection_get_count (model->collection) - 1); } static void @@ -315,5 +316,6 @@ gal_define_views_model_copy_view (GalDefineViewsModel *model, ETableModel *etm = E_TABLE_MODEL (model); e_table_model_pre_change (etm); gal_view_collection_copy_view (model->collection, n); - e_table_model_row_inserted (etm, gal_view_collection_get_count (model->collection) - 1); + e_table_model_row_inserted ( + etm, gal_view_collection_get_count (model->collection) - 1); } diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index a2b7be785c..c3d44c777a 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -1239,13 +1239,13 @@ e_table_group_container_print_page (EPrintable *ep, pango_font_description_free (desc); while (1) { - child_height = e_printable_height(child_printable, context, width,yd, quantize); + child_height = e_printable_height (child_printable, context, width,yd, quantize); if (child_height < 0) child_height = -child_height; if (yd < 2 * TEXT_AREA_HEIGHT + 20 + child_height ) { cairo_show_page (cr); - cairo_translate(cr, -2 * TEXT_AREA_HEIGHT, -TEXT_AREA_HEIGHT); + cairo_translate (cr, -2 * TEXT_AREA_HEIGHT, -TEXT_AREA_HEIGHT); break; } @@ -1288,10 +1288,10 @@ e_table_group_container_print_page (EPrintable *ep, e_printable_print_page (child_printable, context, width-2 * TEXT_AREA_HEIGHT, child_margin, quantize); yd -= child_height + TEXT_AREA_HEIGHT; - if (e_printable_data_left (child_printable)){ + if (e_printable_data_left (child_printable)) { cairo_restore (cr); - cairo_translate(cr, -2 * TEXT_AREA_HEIGHT, -TEXT_AREA_HEIGHT); - break; + cairo_translate (cr, -2 * TEXT_AREA_HEIGHT, -TEXT_AREA_HEIGHT); + break; } child = child->next; @@ -1303,11 +1303,11 @@ e_table_group_container_print_page (EPrintable *ep, child_node = child->data; if (child_printable) g_object_unref (child_printable); - - child_printable = e_table_group_get_printable(child_node->child); - cairo_restore(cr); - cairo_translate(cr, -2 * TEXT_AREA_HEIGHT, child_height + child_margin + 20); - + + child_printable = e_table_group_get_printable (child_node->child); + cairo_restore (cr); + cairo_translate (cr, -2 * TEXT_AREA_HEIGHT, child_height + child_margin + 20); + if (child_printable) g_object_ref (child_printable); e_printable_reset (child_printable); diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c index 3e63af004d..a111999ba9 100644 --- a/widgets/table/e-table-group-leaf.c +++ b/widgets/table/e-table-group-leaf.c @@ -112,24 +112,26 @@ etgl_dispose (GObject *object) static void e_table_group_leaf_construct (GnomeCanvasGroup *parent, - ETableGroupLeaf *etgl, - ETableHeader *full_header, - ETableHeader *header, - ETableModel *model, - ETableSortInfo *sort_info) + ETableGroupLeaf *etgl, + ETableHeader *full_header, + ETableHeader *header, + ETableModel *model, + ETableSortInfo *sort_info) { - etgl->is_grouped = e_table_sort_info_grouping_get_count (sort_info) > 0 ? TRUE : FALSE; + etgl->is_grouped = + (e_table_sort_info_grouping_get_count (sort_info) > 0); if (etgl->is_grouped) - etgl->ets = E_TABLE_SUBSET (e_table_sorted_variable_new (model, - full_header, - sort_info)); + etgl->ets = E_TABLE_SUBSET ( + e_table_sorted_variable_new ( + model, full_header, sort_info)); else - etgl->ets = E_TABLE_SUBSET (e_table_sorted_new (model, - full_header, - sort_info)); + etgl->ets = E_TABLE_SUBSET ( + e_table_sorted_new ( + model, full_header, sort_info)); - e_table_group_construct (parent, E_TABLE_GROUP (etgl), full_header, header, model); + e_table_group_construct ( + parent, E_TABLE_GROUP (etgl), full_header, header, model); } /** @@ -146,11 +148,11 @@ e_table_group_leaf_construct (GnomeCanvasGroup *parent, * Returns: The new %ETableGroupLeaf. */ ETableGroup * -e_table_group_leaf_new (GnomeCanvasGroup *parent, - ETableHeader *full_header, - ETableHeader *header, - ETableModel *model, - ETableSortInfo *sort_info) +e_table_group_leaf_new (GnomeCanvasGroup *parent, + ETableHeader *full_header, + ETableHeader *header, + ETableModel *model, + ETableSortInfo *sort_info) { ETableGroupLeaf *etgl; @@ -316,7 +318,8 @@ etgl_add (ETableGroup *etg, gint row) ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg); if (E_IS_TABLE_SUBSET_VARIABLE (etgl->ets)) { - e_table_subset_variable_add (E_TABLE_SUBSET_VARIABLE (etgl->ets), row); + e_table_subset_variable_add ( + E_TABLE_SUBSET_VARIABLE (etgl->ets), row); } } @@ -326,7 +329,8 @@ etgl_add_array (ETableGroup *etg, const gint *array, gint count) ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg); if (E_IS_TABLE_SUBSET_VARIABLE (etgl->ets)) { - e_table_subset_variable_add_array (E_TABLE_SUBSET_VARIABLE (etgl->ets), array, count); + e_table_subset_variable_add_array ( + E_TABLE_SUBSET_VARIABLE (etgl->ets), array, count); } } @@ -336,7 +340,8 @@ etgl_add_all (ETableGroup *etg) ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg); if (E_IS_TABLE_SUBSET_VARIABLE (etgl->ets)) { - e_table_subset_variable_add_all (E_TABLE_SUBSET_VARIABLE (etgl->ets)); + e_table_subset_variable_add_all ( + E_TABLE_SUBSET_VARIABLE (etgl->ets)); } } @@ -346,7 +351,8 @@ etgl_remove (ETableGroup *etg, gint row) ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg); if (E_IS_TABLE_SUBSET_VARIABLE (etgl->ets)) { - return e_table_subset_variable_remove (E_TABLE_SUBSET_VARIABLE (etgl->ets), row); + return e_table_subset_variable_remove ( + E_TABLE_SUBSET_VARIABLE (etgl->ets), row); } return FALSE; } diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 23640b2d9f..47983f6da8 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -1257,7 +1257,9 @@ click_to_add_event (ETableClickToAdd *etcta, GdkEventKey *key, ETable *etable) focus_first_etable_item (etable->group); else gtk_widget_child_focus ( - gtk_widget_get_toplevel (GTK_WIDGET (etable->table_canvas)), GTK_DIR_TAB_FORWARD); + gtk_widget_get_toplevel ( + GTK_WIDGET (etable->table_canvas)), + GTK_DIR_TAB_FORWARD); break; } } diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index 67e29a84be..2ea35ed6c0 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -3036,12 +3036,16 @@ e_text_insert (EText *text, const gchar *string) } } *j = 0; - e_text_model_insert_length (text->model, text->selection_start, new_string, utf8len); + e_text_model_insert_length ( + text->model, text->selection_start, + new_string, utf8len); g_free (new_string); } else { utf8len = g_utf8_strlen (string, -1); - e_text_model_insert_length (text->model, text->selection_start, string, utf8len); + e_text_model_insert_length ( + text->model, text->selection_start, + string, utf8len); } } } |