aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-source-config.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-09-08 00:31:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-09-08 07:08:54 +0800
commit3da4948c0fc1f2c21b163f0ec456b2d99c881258 (patch)
tree479d6153d31e03cb7a65990683b5271402e5ec29 /e-util/e-source-config.c
parent2e5031cb4538b4819e5fce5d717668c3445df80a (diff)
downloadgsoc2013-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/e-source-config.c')
-rw-r--r--e-util/e-source-config.c35
1 files changed, 20 insertions, 15 deletions
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