diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-09-08 00:31:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-09-08 07:08:54 +0800 |
commit | 3da4948c0fc1f2c21b163f0ec456b2d99c881258 (patch) | |
tree | 479d6153d31e03cb7a65990683b5271402e5ec29 /e-util | |
parent | 2e5031cb4538b4819e5fce5d717668c3445df80a (diff) | |
download | gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.gz gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.bz2 gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.lz gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.xz gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.zst gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.zip |
Miscellaneous cleanups.
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-alert-dialog.c | 14 | ||||
-rw-r--r-- | e-util/e-attachment-store.c | 32 | ||||
-rw-r--r-- | e-util/e-attachment-view.c | 46 | ||||
-rw-r--r-- | e-util/e-attachment.c | 40 | ||||
-rw-r--r-- | e-util/e-contact-store.c | 4 | ||||
-rw-r--r-- | e-util/e-file-request.c | 3 | ||||
-rw-r--r-- | e-util/e-mail-signature-editor.c | 15 | ||||
-rw-r--r-- | e-util/e-mail-signature-preview.c | 16 | ||||
-rw-r--r-- | e-util/e-misc-utils.c | 14 | ||||
-rw-r--r-- | e-util/e-name-selector-dialog.c | 35 | ||||
-rw-r--r-- | e-util/e-name-selector.c | 16 | ||||
-rw-r--r-- | e-util/e-source-config.c | 35 | ||||
-rw-r--r-- | e-util/e-tree.c | 10 | ||||
-rw-r--r-- | e-util/e-web-view.c | 6 |
14 files changed, 165 insertions, 121 deletions
diff --git a/e-util/e-alert-dialog.c b/e-util/e-alert-dialog.c index 8b495c17db..2803687ea4 100644 --- a/e-util/e-alert-dialog.c +++ b/e-util/e-alert-dialog.c @@ -160,7 +160,8 @@ alert_dialog_constructed (GObject *object) if (!actions) { GtkAction *action; - /* Make sure there is at least one action, thus the dialog can be closed. */ + /* Make sure there is at least one action, + * thus the dialog can be closed. */ action = gtk_action_new ( "alert-response-0", _("_Dismiss"), NULL, NULL); e_alert_add_action (alert, action, GTK_RESPONSE_CLOSE); @@ -344,19 +345,20 @@ e_alert_run_dialog (GtkWindow *parent, dialog = e_alert_dialog_new (parent, alert); - if (parent) { + if (parent != NULL) { gtk_window_set_urgency_hint (parent, TRUE); - signal_id = g_signal_connect (dialog, "focus-in-event", G_CALLBACK (dialog_focus_in_event_cb), parent); + signal_id = g_signal_connect ( + dialog, "focus-in-event", + G_CALLBACK (dialog_focus_in_event_cb), parent); } else { gtk_window_set_urgency_hint (GTK_WINDOW (dialog), TRUE); } response = gtk_dialog_run (GTK_DIALOG (dialog)); - if (parent) { + if (signal_id > 0) { gtk_window_set_urgency_hint (parent, FALSE); - if (signal_id) - g_signal_handler_disconnect (dialog, signal_id); + g_signal_handler_disconnect (dialog, signal_id); } gtk_widget_destroy (dialog); diff --git a/e-util/e-attachment-store.c b/e-util/e-attachment-store.c index 08d7dc49e8..3720baf16b 100644 --- a/e-util/e-attachment-store.c +++ b/e-util/e-attachment-store.c @@ -1079,6 +1079,7 @@ attachment_store_move_file (SaveContext *save_context, { gchar *tmpl; gchar *path; + GError *local_error = NULL; g_return_if_fail (save_context != NULL); g_return_if_fail (source != NULL); @@ -1109,12 +1110,16 @@ attachment_store_move_file (SaveContext *save_context, g_file_move ( destination, save_context->trash_directory, - G_FILE_COPY_NONE, NULL, NULL, NULL, error); + G_FILE_COPY_NONE, NULL, NULL, + NULL, &local_error); - if (*error != NULL && !g_error_matches (*error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) - return; + if (g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) + g_clear_error (&local_error); - g_clear_error (error); + if (local_error != NULL) { + g_propagate_error (error, local_error); + return; + } /* Now we can move the file from the temporary directory * to the user-specified destination. */ @@ -1143,19 +1148,23 @@ attachment_store_save_cb (EAttachment *attachment, if (file != NULL) { /* Assemble the file's final URI from its basename. */ + GFile *source = NULL; + GFile *destination = NULL; gchar *basename; gchar *uri; - GFile *source = NULL, *destination = NULL; + const gchar *prefix; basename = g_file_get_basename (file); g_object_unref (file); - source = g_file_get_child (save_context->fresh_directory, basename); + source = g_file_get_child ( + save_context->fresh_directory, basename); - if (save_context->filename_prefix && *save_context->filename_prefix) { - gchar *tmp = basename; + prefix = save_context->filename_prefix; - basename = g_strconcat (save_context->filename_prefix, basename, NULL); + if (prefix != NULL && *prefix != '\0') { + gchar *tmp = basename; + basename = g_strconcat (prefix, basename, NULL); g_free (tmp); } @@ -1164,9 +1173,10 @@ attachment_store_save_cb (EAttachment *attachment, uri = g_file_get_uri (destination); /* move them file-by-file */ - attachment_store_move_file (save_context, source, destination, &error); + attachment_store_move_file ( + save_context, source, destination, &error); - if (!error) + if (error == NULL) save_context->uris[save_context->index++] = uri; g_object_unref (source); diff --git a/e-util/e-attachment-view.c b/e-util/e-attachment-view.c index 994f7ba2e1..383fc12e21 100644 --- a/e-util/e-attachment-view.c +++ b/e-util/e-attachment-view.c @@ -661,27 +661,6 @@ attachment_view_uris (EAttachmentView *view, gtk_drag_finish (drag_context, TRUE, FALSE, time); } -static gboolean -executable_is_evolution (const gchar *app_executable) -{ - const gchar *dash; - const gchar *evo_name; - - g_return_val_if_fail (app_executable != NULL, FALSE); - - dash = strrchr (app_executable, G_DIR_SEPARATOR); - if (dash) - app_executable = dash + 1; - - #ifdef G_OS_WIN32 - evo_name = "evolution.exe"; - #else - evo_name = "evolution"; - #endif - - return g_ascii_strcasecmp (app_executable, evo_name) == 0; -} - static void attachment_view_update_actions (EAttachmentView *view) { @@ -784,23 +763,27 @@ attachment_view_update_actions (EAttachmentView *view) GAppInfo *app_info = iter->data; GtkAction *action; GIcon *app_icon; - const gchar *app_executable; + const gchar *app_id; const gchar *app_name; gchar *action_tooltip; gchar *action_label; gchar *action_name; - app_executable = g_app_info_get_executable (app_info); + app_id = g_app_info_get_id (app_info); + app_icon = g_app_info_get_icon (app_info); + app_name = g_app_info_get_name (app_info); - /* skip evolution from the list */ - if (executable_is_evolution (app_executable)) + if (app_id == NULL) continue; - app_icon = g_app_info_get_icon (app_info); - app_name = g_app_info_get_name (app_info); + /* Don't list 'Open With "Evolution"'. */ + if (g_str_equal (app_id, "evolution.desktop")) + continue; + + action_name = g_strdup_printf ("open-with-%s", app_id); - action_name = g_strdup_printf ("open-with-%s", app_executable); - action_label = g_strdup_printf (_("Open With \"%s\""), app_name); + action_label = g_strdup_printf ( + _("Open With \"%s\""), app_name); action_tooltip = g_strdup_printf ( _("Open this attachment in %s"), app_name); @@ -1163,6 +1146,7 @@ e_attachment_view_open_path (EAttachmentView *view, EAttachment *attachment; GtkTreeModel *model; GtkTreeIter iter; + gboolean iter_valid; gpointer parent; gint column_id; @@ -1173,7 +1157,9 @@ e_attachment_view_open_path (EAttachmentView *view, store = e_attachment_view_get_store (view); model = GTK_TREE_MODEL (store); - g_return_if_fail (gtk_tree_model_get_iter (model, &iter, path)); + iter_valid = gtk_tree_model_get_iter (model, &iter, path); + g_return_if_fail (iter_valid); + gtk_tree_model_get (model, &iter, column_id, &attachment, -1); parent = gtk_widget_get_toplevel (GTK_WIDGET (view)); diff --git a/e-util/e-attachment.c b/e-util/e-attachment.c index bfde09d900..bad4e0b460 100644 --- a/e-util/e-attachment.c +++ b/e-util/e-attachment.c @@ -559,11 +559,6 @@ attachment_set_saving (EAttachment *attachment, attachment->priv->percent = 0; attachment->priv->saving = saving; attachment->priv->last_percent_notify = 0; - - /* g_object_freeze_notify (G_OBJECT (attachment)); - g_object_notify (G_OBJECT (attachment), "percent"); - g_object_notify (G_OBJECT (attachment), "saving"); - g_object_thaw_notify (G_OBJECT (attachment)); */ } static void @@ -585,10 +580,8 @@ attachment_progress_cb (goffset current_num_bytes, new_percent = (current_num_bytes * 100) / total_num_bytes; - if (new_percent != attachment->priv->percent) { + if (new_percent != attachment->priv->percent) attachment->priv->percent = new_percent; - /* g_object_notify (G_OBJECT (attachment), "percent"); */ - } } static gboolean @@ -1827,13 +1820,13 @@ attachment_load_finish (LoadContext *load_context) load_context->mime_part = mime_part; g_simple_async_result_set_op_res_gpointer ( - simple, load_context, (GDestroyNotify) attachment_load_context_free); + simple, load_context, + (GDestroyNotify) attachment_load_context_free); g_simple_async_result_complete (simple); - /* make sure it's freed on operation end */ - load_context->simple = NULL; - g_object_unref (simple); + /* Make sure it's freed on operation end. */ + g_clear_object (&load_context->simple); } static void @@ -2077,7 +2070,9 @@ attachment_load_from_mime_part_thread (GSimpleAsyncResult *simple, } } else { decoded_string = camel_header_decode_string (string, "UTF-8"); - if (decoded_string && *decoded_string && !g_str_equal (decoded_string, string)) { + if (decoded_string != NULL && + *decoded_string != '\0' && + !g_str_equal (decoded_string, string)) { string = decoded_string; } else { g_free (decoded_string); @@ -2105,9 +2100,8 @@ attachment_load_from_mime_part_thread (GSimpleAsyncResult *simple, load_context->mime_part = g_object_ref (mime_part); - /* make sure it's freed on operation end */ - g_object_unref (load_context->simple); - load_context->simple = NULL; + /* Make sure it's freed on operation end. */ + g_clear_object (&load_context->simple); g_simple_async_result_set_op_res_gpointer ( simple, load_context, @@ -2290,7 +2284,8 @@ e_attachment_load (EAttachment *attachment, closure = e_async_closure_new (); - e_attachment_load_async (attachment, e_async_closure_callback, closure); + e_attachment_load_async ( + attachment, e_async_closure_callback, closure); result = e_async_closure_wait (closure); @@ -2597,7 +2592,9 @@ e_attachment_open (EAttachment *attachment, closure = e_async_closure_new (); - e_attachment_open_async (attachment, app_info, e_async_closure_callback, closure); + e_attachment_open_async ( + attachment, app_info, + e_async_closure_callback, closure); result = e_async_closure_wait (closure); @@ -3142,11 +3139,14 @@ e_attachment_save (EAttachment *attachment, closure = e_async_closure_new (); - e_attachment_save_async (attachment, in_destination, e_async_closure_callback, closure); + e_attachment_save_async ( + attachment, in_destination, + e_async_closure_callback, closure); result = e_async_closure_wait (closure); - *out_destination = e_attachment_save_finish (attachment, result, error); + *out_destination = + e_attachment_save_finish (attachment, result, error); e_async_closure_free (closure); diff --git a/e-util/e-contact-store.c b/e-util/e-contact-store.c index 8e34c20546..2b9f326b62 100644 --- a/e-util/e-contact-store.c +++ b/e-util/e-contact-store.c @@ -858,8 +858,8 @@ client_view_ready_cb (GObject *source_object, book_client = E_BOOK_CLIENT (source_object); g_return_if_fail (book_client != NULL); - if (!e_book_client_get_view_finish (book_client, result, &client_view, NULL)) - client_view = NULL; + e_book_client_get_view_finish ( + book_client, result, &client_view, NULL); source_idx = find_contact_source_by_client (contact_store, book_client); if (source_idx >= 0) { diff --git a/e-util/e-file-request.c b/e-util/e-file-request.c index 4ec56d2829..8cce9cacbb 100644 --- a/e-util/e-file-request.c +++ b/e-util/e-file-request.c @@ -55,7 +55,8 @@ handle_file_request (GSimpleAsyncResult *res, if (g_file_get_contents (uri->path, &contents, &length, NULL)) { - request->priv->content_type = g_content_type_guess (uri->path, NULL, 0, NULL); + request->priv->content_type = + g_content_type_guess (uri->path, NULL, 0, NULL); request->priv->content_length = length; stream = g_memory_input_stream_new_from_data ( diff --git a/e-util/e-mail-signature-editor.c b/e-util/e-mail-signature-editor.c index da5e3389e0..d27fec570c 100644 --- a/e-util/e-mail-signature-editor.c +++ b/e-util/e-mail-signature-editor.c @@ -157,11 +157,16 @@ mail_signature_editor_loaded_cb (GObject *object, gtkhtml_editor_insert_text ( GTKHTML_EDITOR (editor), contents); - gtkhtml_editor_run_command (GTKHTML_EDITOR (editor), "cursor-position-save"); - gtkhtml_editor_run_command (GTKHTML_EDITOR (editor), "select-all"); - gtkhtml_editor_run_command (GTKHTML_EDITOR (editor), "style-pre"); - gtkhtml_editor_run_command (GTKHTML_EDITOR (editor), "unselect-all"); - gtkhtml_editor_run_command (GTKHTML_EDITOR (editor), "cursor-position-restore"); + gtkhtml_editor_run_command ( + GTKHTML_EDITOR (editor), "cursor-position-save"); + gtkhtml_editor_run_command ( + GTKHTML_EDITOR (editor), "select-all"); + gtkhtml_editor_run_command ( + GTKHTML_EDITOR (editor), "style-pre"); + gtkhtml_editor_run_command ( + GTKHTML_EDITOR (editor), "unselect-all"); + gtkhtml_editor_run_command ( + GTKHTML_EDITOR (editor), "cursor-position-restore"); } g_free (contents); diff --git a/e-util/e-mail-signature-preview.c b/e-util/e-mail-signature-preview.c index 2ccfa55c8b..d5e809f778 100644 --- a/e-util/e-mail-signature-preview.c +++ b/e-util/e-mail-signature-preview.c @@ -59,7 +59,9 @@ G_DEFINE_TYPE ( static void replace_local_image_links (WebKitDOMElement *element) { - if (!element) + WebKitDOMElement *child; + + if (element == NULL) return; if (WEBKIT_DOM_IS_HTML_IMAGE_ELEMENT (element)) { @@ -90,11 +92,13 @@ replace_local_image_links (WebKitDOMElement *element) replace_local_image_links (WEBKIT_DOM_ELEMENT (frame_document)); } - replace_local_image_links (webkit_dom_element_get_first_element_child (element)); + child = webkit_dom_element_get_first_element_child (element); + replace_local_image_links (child); - while (element = webkit_dom_element_get_next_element_sibling (element), element) { + do { + element = webkit_dom_element_get_next_element_sibling (element); replace_local_image_links (element); - } + } while (element != NULL); } static void @@ -362,7 +366,9 @@ e_mail_signature_preview_init (EMailSignaturePreview *preview) { preview->priv = E_MAIL_SIGNATURE_PREVIEW_GET_PRIVATE (preview); - g_signal_connect (preview, "document-load-finished", G_CALLBACK (signature_preview_document_loaded_cb), NULL); + g_signal_connect ( + preview, "document-load-finished", + G_CALLBACK (signature_preview_document_loaded_cb), NULL); } GtkWidget * diff --git a/e-util/e-misc-utils.c b/e-util/e-misc-utils.c index 59e6e67eb2..ae034d6a3b 100644 --- a/e-util/e-misc-utils.c +++ b/e-util/e-misc-utils.c @@ -363,12 +363,20 @@ e_restore_window (GtkWindow *window, data->premax_height = height; monitor = gdk_screen_get_monitor_at_point (screen, x, y); - if (monitor < 0 || monitor >= gdk_screen_get_n_monitors (screen)) + if (monitor < 0) monitor = 0; - gdk_screen_get_monitor_workarea (screen, monitor, &monitor_area); + if (monitor >= gdk_screen_get_n_monitors (screen)) + monitor = 0; + + gdk_screen_get_monitor_workarea ( + screen, monitor, &monitor_area); + + gtk_window_resize ( + window, + monitor_area.width, + monitor_area.height); - gtk_window_resize (window, monitor_area.width, monitor_area.height); gtk_window_maximize (window); } } diff --git a/e-util/e-name-selector-dialog.c b/e-util/e-name-selector-dialog.c index d986f11c3a..be1ba5a9c4 100644 --- a/e-util/e-name-selector-dialog.c +++ b/e-util/e-name-selector-dialog.c @@ -148,17 +148,6 @@ name_selector_dialog_populate_categories (ENameSelectorDialog *name_selector_dia } static void -name_selector_dialog_realize_cb (ENameSelectorDialog *name_selector_dialog, - gpointer user_data) -{ - g_return_if_fail (E_IS_NAME_SELECTOR_DIALOG (name_selector_dialog)); - - source_changed ( - name_selector_dialog, - E_CLIENT_COMBO_BOX (name_selector_dialog->priv->client_combo)); -} - -static void name_selector_dialog_set_client_cache (ENameSelectorDialog *name_selector_dialog, EClientCache *client_cache) { @@ -589,15 +578,32 @@ name_selector_dialog_constructed (GObject *object) _("Select Contacts from Address Book")); gtk_widget_grab_focus (search); - g_signal_connect (object, "realize", G_CALLBACK (name_selector_dialog_realize_cb), NULL); - e_extensible_load_extensions (E_EXTENSIBLE (object)); } static void +name_selector_dialog_realize (GtkWidget *widget) +{ + ENameSelectorDialog *name_selector_dialog; + GtkWidget *client_combo; + + /* Chain up to parent's realize() method. */ + GTK_WIDGET_CLASS (e_name_selector_dialog_parent_class)-> + realize (widget); + + name_selector_dialog = E_NAME_SELECTOR_DIALOG (widget); + client_combo = name_selector_dialog->priv->client_combo; + + source_changed ( + name_selector_dialog, + E_CLIENT_COMBO_BOX (client_combo)); +} + +static void e_name_selector_dialog_class_init (ENameSelectorDialogClass *class) { GObjectClass *object_class; + GtkWidgetClass *widget_class; g_type_class_add_private (class, sizeof (ENameSelectorDialogPrivate)); @@ -608,6 +614,9 @@ e_name_selector_dialog_class_init (ENameSelectorDialogClass *class) object_class->finalize = name_selector_dialog_finalize; object_class->constructed = name_selector_dialog_constructed; + widget_class = GTK_WIDGET_CLASS (class); + widget_class->realize = name_selector_dialog_realize; + /** * ENameSelectorDialog:client-cache: * diff --git a/e-util/e-name-selector.c b/e-util/e-name-selector.c index 9f2f48cea8..3c5340c37c 100644 --- a/e-util/e-name-selector.c +++ b/e-util/e-name-selector.c @@ -100,6 +100,7 @@ name_selector_get_client_cb (GObject *source_object, GArray *sections; SourceBook source_book; guint ii; + gboolean ignore_error; GError *error = NULL; client = e_client_cache_get_client_finish ( @@ -110,11 +111,18 @@ name_selector_get_client_cb (GObject *source_object, ((client != NULL) && (error == NULL)) || ((client == NULL) && (error != NULL))); + ignore_error = + g_error_matches ( + error, E_CLIENT_ERROR, + E_CLIENT_ERROR_REPOSITORY_OFFLINE) || + g_error_matches ( + error, E_CLIENT_ERROR, + E_CLIENT_ERROR_OFFLINE_UNAVAILABLE) || + g_error_matches ( + error, G_IO_ERROR, G_IO_ERROR_CANCELLED); + if (error != NULL) { - if (!g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_REPOSITORY_OFFLINE) - && !g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_OFFLINE_UNAVAILABLE) - && !g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) - && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + if (!ignore_error) g_warning ("%s: %s", G_STRFUNC, error->message); g_error_free (error); goto exit; diff --git a/e-util/e-source-config.c b/e-util/e-source-config.c index ba75b7c8bb..c56eb65071 100644 --- a/e-util/e-source-config.c +++ b/e-util/e-source-config.c @@ -174,6 +174,7 @@ source_config_add_candidate (ESourceConfig *config, GtkBox *backend_box; GtkLabel *type_label; GtkComboBoxText *type_combo; + GtkWidget *widget; ESource *parent_source; ESourceRegistry *registry; const gchar *display_name; @@ -194,8 +195,9 @@ source_config_add_candidate (ESourceConfig *config, candidate->scratch_source = g_object_ref (scratch_source); /* Do not show the page here. */ - candidate->page = g_object_ref_sink (gtk_box_new (GTK_ORIENTATION_VERTICAL, 6)); - gtk_box_pack_start (backend_box, candidate->page, FALSE, FALSE, 0); + widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); + gtk_box_pack_start (backend_box, widget, FALSE, FALSE, 0); + candidate->page = g_object_ref_sink (widget); g_ptr_array_add (config->priv->candidates, candidate); @@ -1385,8 +1387,7 @@ void e_source_config_add_secure_connection_for_webdav (ESourceConfig *config, ESource *scratch_source) { - GtkWidget *widget1; - GtkWidget *widget2; + GtkWidget *widget; ESourceExtension *extension; ESourceAuthentication *authentication_extension; const gchar *extension_name; @@ -1399,18 +1400,19 @@ e_source_config_add_secure_connection_for_webdav (ESourceConfig *config, extension = e_source_get_extension (scratch_source, extension_name); label = _("Use a secure connection"); - widget1 = gtk_check_button_new_with_label (label); - e_source_config_insert_widget (config, scratch_source, NULL, widget1); - gtk_widget_show (widget1); + widget = gtk_check_button_new_with_label (label); + e_source_config_insert_widget (config, scratch_source, NULL, widget); + gtk_widget_show (widget); g_object_bind_property ( extension, "secure", - widget1, "active", + widget, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); extension_name = E_SOURCE_EXTENSION_AUTHENTICATION; - authentication_extension = e_source_get_extension (scratch_source, extension_name); + authentication_extension = + e_source_get_extension (scratch_source, extension_name); g_object_bind_property_full ( extension, "secure", @@ -1422,19 +1424,22 @@ e_source_config_add_secure_connection_for_webdav (ESourceConfig *config, extension_name = E_SOURCE_EXTENSION_WEBDAV_BACKEND; extension = e_source_get_extension (scratch_source, extension_name); - widget2 = gtk_button_new_with_mnemonic (_("Unset _trust for SSL certificate")); - gtk_widget_set_margin_left (widget2, 24); - e_source_config_insert_widget (config, scratch_source, NULL, widget2); - gtk_widget_show (widget2); + widget = gtk_button_new_with_mnemonic ( + _("Unset _trust for SSL certificate")); + gtk_widget_set_margin_left (widget, 24); + e_source_config_insert_widget (config, scratch_source, NULL, widget); + gtk_widget_show (widget); g_object_bind_property_full ( extension, "ssl-trust", - widget2, "sensitive", + widget, "sensitive", G_BINDING_SYNC_CREATE, webdav_source_ssl_trust_to_sensitive_cb, NULL, NULL, NULL); - g_signal_connect (widget2, "clicked", G_CALLBACK (webdav_unset_ssl_trust_clicked_cb), extension); + g_signal_connect ( + widget, "clicked", + G_CALLBACK (webdav_unset_ssl_trust_clicked_cb), extension); } void diff --git a/e-util/e-tree.c b/e-util/e-tree.c index 208b2687f2..60f1d272ab 100644 --- a/e-util/e-tree.c +++ b/e-util/e-tree.c @@ -1245,8 +1245,8 @@ table_canvas_focus_event_cb (GtkWidget *widget, static void e_tree_table_canvas_scrolled_cb (GtkAdjustment *vadjustment, - GParamSpec *param, - ETree *tree) + GParamSpec *param, + ETree *tree) { g_return_if_fail (E_IS_TREE (tree)); @@ -1272,7 +1272,8 @@ et_setup_table_canvas_vadjustment (ETree *tree) if (vadjustment) { tree->priv->table_canvas_vadjustment = g_object_ref (vadjustment); - g_signal_connect (vadjustment, "notify::value", + g_signal_connect ( + vadjustment, "notify::value", G_CALLBACK (e_tree_table_canvas_scrolled_cb), tree); } } @@ -1324,7 +1325,8 @@ e_tree_setup_table (ETree *tree) G_CALLBACK (tree_canvas_reflow), tree); et_setup_table_canvas_vadjustment (tree); - g_signal_connect_swapped (tree->priv->table_canvas, "notify::vadjustment", + g_signal_connect_swapped ( + tree->priv->table_canvas, "notify::vadjustment", G_CALLBACK (et_setup_table_canvas_vadjustment), tree); widget = GTK_WIDGET (tree->priv->table_canvas); diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c index bc0b2648ce..4257152ca8 100644 --- a/e-util/e-web-view.c +++ b/e-util/e-web-view.c @@ -2220,9 +2220,11 @@ e_web_view_add_highlight (EWebView *web_view, &web_view->priv->highlights, g_strdup (highlight)); - webkit_web_view_mark_text_matches (WEBKIT_WEB_VIEW (web_view), highlight, FALSE, 0); + webkit_web_view_mark_text_matches ( + WEBKIT_WEB_VIEW (web_view), highlight, FALSE, 0); - webkit_web_view_set_highlight_text_matches (WEBKIT_WEB_VIEW (web_view), TRUE); + webkit_web_view_set_highlight_text_matches ( + WEBKIT_WEB_VIEW (web_view), TRUE); } void |