[epiphany] Remove Firefox Sync from Preferences



commit 84ffc1bc71340e702e44afbc83e7da3e40d3c4bb
Author: Yetizone <andreii lisita gmail com>
Date:   Mon Sep 28 19:15:51 2020 +0300

    Remove Firefox Sync from Preferences
    
    Move SyncedTabsDialog source files from src/preferences to src
    Remove unused class PrefsSyncPage

 lib/sync/ephy-sync-service.c               |   8 +-
 src/meson.build                            |   3 +-
 src/preferences/ephy-prefs-dialog.c        |  10 -
 src/preferences/prefs-sync-page.c          | 795 -----------------------------
 src/preferences/prefs-sync-page.h          |  34 --
 src/resources/epiphany.gresource.xml       |   1 -
 src/resources/gtk/prefs-dialog.ui          |   3 -
 src/resources/gtk/prefs-sync-page.ui       | 198 -------
 src/{preferences => }/synced-tabs-dialog.c |   0
 src/{preferences => }/synced-tabs-dialog.h |   0
 10 files changed, 5 insertions(+), 1047 deletions(-)
---
diff --git a/lib/sync/ephy-sync-service.c b/lib/sync/ephy-sync-service.c
index b7f5600b8..7a38bab92 100644
--- a/lib/sync/ephy-sync-service.c
+++ b/lib/sync/ephy-sync-service.c
@@ -860,7 +860,7 @@ get_storage_credentials_cb (SoupSession *session,
 
 out_error:
   message = _("Failed to obtain storage credentials.");
-  suggestion = _("Please visit Preferences and sign in again to continue syncing.");
+  suggestion = _("Please visit Firefox Sync and sign in again to continue syncing.");
 
   if (self->is_signing_in)
     ephy_sync_service_report_sign_in_error (self, message, NULL, TRUE);
@@ -968,7 +968,7 @@ get_signed_certificate_cb (SoupSession *session,
    */
   if (json_object_get_int_member (json, "errno") == 110) {
     message = _("The password of your Firefox account seems to have been changed.");
-    suggestion = _("Please visit Preferences and sign in with the new password to continue syncing.");
+    suggestion = _("Please visit Firefox Sync and sign in with the new password to continue syncing.");
     ephy_sync_service_sign_out (self);
   }
 
@@ -977,7 +977,7 @@ get_signed_certificate_cb (SoupSession *session,
 
 out_error:
   message = message ? message : _("Failed to obtain signed certificate.");
-  suggestion = suggestion ? suggestion : _("Please visit Preferences and sign in again to continue 
syncing.");
+  suggestion = suggestion ? suggestion : _("Please visit Firefox Sync and sign in again to continue 
syncing.");
 
   if (self->is_signing_in)
     ephy_sync_service_report_sign_in_error (self, message, NULL, TRUE);
@@ -1752,7 +1752,7 @@ load_secrets_cb (GObject         *source_object,
   goto out_no_error;
 
 out_error:
-  suggestion = _("Please visit Preferences and sign in again to continue syncing.");
+  suggestion = _("Please visit Firefox Sync and sign in again to continue syncing.");
   ephy_notification_show (ephy_notification_new (message, suggestion));
   /* Reset the sync user so that it will be considered signed-out
    * when the preferences dialog is opened. */
diff --git a/src/meson.build b/src/meson.build
index 09697cafa..667cd4fdc 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -54,9 +54,8 @@ libephymain_sources = [
   'preferences/prefs-appearance-page.c',
   'preferences/prefs-general-page.c',
   'preferences/prefs-privacy-page.c',
-  'preferences/prefs-sync-page.c',
-  'preferences/synced-tabs-dialog.c',
   'preferences/webapp-additional-urls-dialog.c',
+  'synced-tabs-dialog.c',
   'window-commands.c',
   compile_schemas,
   enums
diff --git a/src/preferences/ephy-prefs-dialog.c b/src/preferences/ephy-prefs-dialog.c
index c771e2780..7efddfe52 100644
--- a/src/preferences/ephy-prefs-dialog.c
+++ b/src/preferences/ephy-prefs-dialog.c
@@ -29,13 +29,11 @@
 #include "ephy-prefs-dialog.h"
 #include "passwords-view.h"
 #include "prefs-general-page.h"
-#include "prefs-sync-page.h"
 
 struct _EphyPrefsDialog {
   HdyPreferencesWindow parent_instance;
 
   PrefsGeneralPage *general_page;
-  PrefsSyncPage *sync_page;
 
   GtkWidget *active_data_view;
 };
@@ -118,7 +116,6 @@ ephy_prefs_dialog_class_init (EphyPrefsDialogClass *klass)
                                                "/org/gnome/epiphany/gtk/prefs-dialog.ui");
 
   gtk_widget_class_bind_template_child (widget_class, EphyPrefsDialog, general_page);
-  gtk_widget_class_bind_template_child (widget_class, EphyPrefsDialog, sync_page);
 
   /* Template file callbacks */
   gtk_widget_class_bind_template_callback (widget_class, on_key_press_event);
@@ -130,15 +127,8 @@ ephy_prefs_dialog_class_init (EphyPrefsDialogClass *klass)
 static void
 ephy_prefs_dialog_init (EphyPrefsDialog *dialog)
 {
-  EphyEmbedShellMode mode = ephy_embed_shell_get_mode (ephy_embed_shell_get_default ());
-
   gtk_widget_init_template (GTK_WIDGET (dialog));
   gtk_window_set_icon_name (GTK_WINDOW (dialog), APPLICATION_ID);
 
-  if (mode == EPHY_EMBED_SHELL_MODE_BROWSER)
-    prefs_sync_page_setup (dialog->sync_page);
-  else
-    gtk_container_remove (GTK_CONTAINER (dialog), GTK_WIDGET (dialog->sync_page));
-
   ephy_gui_ensure_window_group (GTK_WINDOW (dialog));
 }
diff --git a/src/resources/epiphany.gresource.xml b/src/resources/epiphany.gresource.xml
index 1a2466c16..138894596 100644
--- a/src/resources/epiphany.gresource.xml
+++ b/src/resources/epiphany.gresource.xml
@@ -37,7 +37,6 @@
     <file preprocess="xml-stripblanks" compressed="true">gtk/prefs-general-page.ui</file>
     <file preprocess="xml-stripblanks" compressed="true">gtk/prefs-lang-dialog.ui</file>
     <file preprocess="xml-stripblanks" compressed="true">gtk/prefs-privacy-page.ui</file>
-    <file preprocess="xml-stripblanks" compressed="true">gtk/prefs-sync-page.ui</file>
     <file preprocess="xml-stripblanks" compressed="true">gtk/synced-tabs-dialog.ui</file>
     <file preprocess="xml-stripblanks" compressed="true">gtk/shortcuts-dialog.ui</file>
     <file preprocess="xml-stripblanks" compressed="true">gtk/tab-label.ui</file>
diff --git a/src/resources/gtk/prefs-dialog.ui b/src/resources/gtk/prefs-dialog.ui
index 85a932187..9556fbbe5 100644
--- a/src/resources/gtk/prefs-dialog.ui
+++ b/src/resources/gtk/prefs-dialog.ui
@@ -24,8 +24,5 @@
     <child>
       <object class="PrefsAppearancePage"/>
     </child>
-    <child>
-      <object class="PrefsSyncPage" id="sync_page"/>
-    </child>
   </template>
 </interface>
diff --git a/src/preferences/synced-tabs-dialog.c b/src/synced-tabs-dialog.c
similarity index 100%
rename from src/preferences/synced-tabs-dialog.c
rename to src/synced-tabs-dialog.c
diff --git a/src/preferences/synced-tabs-dialog.h b/src/synced-tabs-dialog.h
similarity index 100%
rename from src/preferences/synced-tabs-dialog.h
rename to src/synced-tabs-dialog.h


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