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



commit 466dd59c4016aac52a7a807bf465350a36a64d0f
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 f0cc739..dcb6383 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]