[epiphany/wip/sync: 40/74] prefs-dialog: Connect signals after binding settings
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/sync: 40/74] prefs-dialog: Connect signals after binding settings
- Date: Sun, 6 Aug 2017 14:30:27 +0000 (UTC)
commit a95d61d0af47e3c3a2b4e9d288ec2d5acd4b928d
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 91042c3..2713fcb 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -1699,25 +1699,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,
@@ -1774,6 +1755,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]