[epiphany/wip/sync: 13/15] prefs-dialog: Connect signals after binding settings
- From: Gabriel Ivașcu <gabrielivascu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/sync: 13/15] prefs-dialog: Connect signals after binding settings
- Date: Fri, 2 Jun 2017 17:19:43 +0000 (UTC)
commit 7629da639f1b05edae327c70787de55d91209398
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date: Wed May 31 18:44:12 2017 +0300
prefs-dialog: Connect signals after binding settings
This way we avoid signal callbacks being unnecessarily called at page setup.
src/prefs-dialog.c | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index dcb6383..560248b 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -1678,25 +1678,6 @@ setup_sync_page (PrefsDialog *dialog)
g_free (user);
}
- g_signal_connect_object (dialog->sync_service, "sync-secrets-store-finished",
- G_CALLBACK (sync_secrets_store_finished_cb),
- dialog, 0);
- g_signal_connect_object (dialog->sync_service, "sync-sign-in-error",
- G_CALLBACK (sync_sign_in_error_cb),
- dialog, 0);
- g_signal_connect_object (dialog->sync_service, "sync-finished",
- G_CALLBACK (sync_finished_cb),
- dialog, 0);
- g_signal_connect_object (dialog->sync_bookmarks_checkbutton, "toggled",
- G_CALLBACK (sync_collection_toggled_cb),
- dialog, 0);
- g_signal_connect_object (dialog->sync_passwords_checkbutton, "toggled",
- G_CALLBACK (sync_collection_toggled_cb),
- dialog, 0);
- g_signal_connect_object (dialog->sync_history_checkbutton, "toggled",
- G_CALLBACK (sync_collection_toggled_cb),
- dialog, 0);
-
g_settings_bind (sync_settings,
EPHY_PREFS_SYNC_WITH_FIREFOX,
dialog->sync_with_firefox_checkbutton,
@@ -1753,6 +1734,25 @@ setup_sync_page (PrefsDialog *dialog)
sync_frequency_set_mapping,
GINT_TO_POINTER (60),
NULL);
+
+ g_signal_connect_object (dialog->sync_service, "sync-secrets-store-finished",
+ G_CALLBACK (sync_secrets_store_finished_cb),
+ dialog, 0);
+ g_signal_connect_object (dialog->sync_service, "sync-sign-in-error",
+ G_CALLBACK (sync_sign_in_error_cb),
+ dialog, 0);
+ g_signal_connect_object (dialog->sync_service, "sync-finished",
+ G_CALLBACK (sync_finished_cb),
+ dialog, 0);
+ g_signal_connect_object (dialog->sync_bookmarks_checkbutton, "toggled",
+ G_CALLBACK (sync_collection_toggled_cb),
+ dialog, 0);
+ g_signal_connect_object (dialog->sync_passwords_checkbutton, "toggled",
+ G_CALLBACK (sync_collection_toggled_cb),
+ dialog, 0);
+ g_signal_connect_object (dialog->sync_history_checkbutton, "toggled",
+ G_CALLBACK (sync_collection_toggled_cb),
+ dialog, 0);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]