[epiphany/wip/sync: 28/52] prefs-dialog: Set initial sync when collection is disabled



commit a9e53eb12465be7c86ac780fe89a96cc67576d37
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date:   Wed May 31 18:09:45 2017 +0300

    prefs-dialog: Set initial sync when collection is disabled

 src/prefs-dialog.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 3342da8..b032ea0 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -184,11 +184,15 @@ sync_collection_toggled_cb (GtkToggleButton *button,
     manager = EPHY_SYNCHRONIZABLE_MANAGER (ephy_shell_get_password_manager (ephy_shell_get_default ()));
   else if (GTK_WIDGET (button) == dialog->sync_history_checkbutton)
     manager = EPHY_SYNCHRONIZABLE_MANAGER (ephy_shell_get_history_manager (ephy_shell_get_default ()));
+  else
+    g_assert_not_reached ();
 
-  if (gtk_toggle_button_get_active (button))
+  if (gtk_toggle_button_get_active (button)) {
     ephy_sync_service_register_manager (dialog->sync_service, manager);
-  else
+  } else {
     ephy_sync_service_unregister_manager (dialog->sync_service, manager);
+    ephy_synchronizable_manager_set_is_initial_sync (manager, TRUE);
+  }
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]