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



commit 12101b152c7dd50242358943ba05703b0267643b
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 e2984b0..a22a1ea 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]