[gnome-maps/wip/mlundblad/remove-fb-checkin-support: 4/8] checkInDialog: Remove Facebook support




commit fc630c60802fec615b34cba7ca04e50c9d6527fd
Author: Marcus Lundblad <ml update uu se>
Date:   Fri Jun 11 23:31:42 2021 +0200

    checkInDialog: Remove Facebook support
    
    Since the API implemented in libgfbgraph
    is no longer supported by Facebook, and
    the Facebook login in gnome-online-accounts
    is no longer working we'll drop this support
    for the time being.

 data/ui/check-in-dialog.ui | 69 ----------------------------------------------
 src/checkInDialog.js       | 17 ++----------
 2 files changed, 3 insertions(+), 83 deletions(-)
---
diff --git a/data/ui/check-in-dialog.ui b/data/ui/check-in-dialog.ui
index 3bc239ce..026f3679 100644
--- a/data/ui/check-in-dialog.ui
+++ b/data/ui/check-in-dialog.ui
@@ -217,49 +217,6 @@
                   <object class="GtkGrid" id="messageOptionsGrid">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkGrid" id="facebookOptionsGrid">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <property name="column_spacing">10</property>
-                        <child>
-                          <object class="GtkLabel" id="facebookOptionsPrivacyLabel">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes">Visibility</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkComboBox" id="facebookOptionsPrivacyComboBox">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="hexpand">True</property>
-                            <property name="model">facebookOptionsPrivacyListStore</property>
-                            <property name="active">0</property>
-                            <property name="id_column">0</property>
-                            <child>
-                              <object class="GtkCellRendererText" 
id="facebookOptionsPrivacyComboBoxCellRendererText"/>
-                              <attributes>
-                                <attribute name="text">1</attribute>
-                              </attributes>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">0</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
-                      </packing>
-                    </child>
                     <child>
                       <object class="GtkGrid" id="foursquareOptionsGrid">
                         <property name="visible">True</property>
@@ -388,32 +345,6 @@
       <class name="maps-check-in"/>
     </style>
   </template>
-  <object class="GtkListStore" id="facebookOptionsPrivacyListStore">
-    <columns>
-      <!-- column-name id -->
-      <column type="gchararray"/>
-      <!-- column-name name -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0">EVERYONE</col>
-        <col id="1" translatable="yes">Everyone</col>
-      </row>
-      <row>
-        <col id="0">FRIENDS_OF_FRIENDS</col>
-        <col id="1" translatable="yes">Friends of friends</col>
-      </row>
-      <row>
-        <col id="0">ALL_FRIENDS</col>
-        <col id="1" translatable="yes">Just friends</col>
-      </row>
-      <row>
-        <col id="0">SELF</col>
-        <col id="1" translatable="yes">Just me</col>
-      </row>
-    </data>
-  </object>
   <object class="GtkListStore" id="foursquareOptionsPrivacyListStore">
     <columns>
       <!-- column-name id -->
diff --git a/src/checkInDialog.js b/src/checkInDialog.js
index 7b65cf27..7ace6a7a 100644
--- a/src/checkInDialog.js
+++ b/src/checkInDialog.js
@@ -51,8 +51,6 @@ var CheckInDialog = GObject.registerClass({
                         'messageInfoLabel',
                         'messageInfoAccountImage',
                         'messageTextView',
-                        'facebookOptionsGrid',
-                        'facebookOptionsPrivacyComboBox',
                         'foursquareOptionsGrid',
                         'foursquareOptionsPrivacyComboBox',
                         'foursquareOptionsBroadcastFacebookCheckButton',
@@ -101,10 +99,6 @@ var CheckInDialog = GObject.registerClass({
         this._placeListBox = new SocialPlaceListBox.SocialPlaceListBox({ visible: true });
         this._placeScrolledWindow.add(this._placeListBox);
 
-        Application.settings.bind('checkin-facebook-privacy',
-                                  this._facebookOptionsPrivacyComboBox,
-                                  'active_id', Gio.SettingsBindFlags.DEFAULT);
-
         Application.settings.bind('checkin-foursquare-privacy',
                                   this._foursquareOptionsPrivacyComboBox,
                                   'active_id', Gio.SettingsBindFlags.DEFAULT);
@@ -197,9 +191,7 @@ var CheckInDialog = GObject.registerClass({
                 this._placeListBox.matches = matches;
 
                 if (this._matchPlace) {
-                    if (this._account.get_account().provider_type === 'facebook')
-                        this._placeNotFoundLabel.label = _("Maps cannot find the place to check in to with 
Facebook. Please select one from this list.");
-                    else if (this._account.get_account().provider_type === 'foursquare')
+                    if (this._account.get_account().provider_type === 'foursquare')
                         this._placeNotFoundLabel.label = _("Maps cannot find the place to check in to with 
Foursquare. Please select one from this list.");
                 } else
                     this._placeNotFoundInfoBar.hide();
@@ -230,8 +222,7 @@ var CheckInDialog = GObject.registerClass({
                                                                                             
this._checkIn.place.name));
         this._messageInfoAccountImage.gicon = Gio.Icon.new_for_string(account.provider_icon);
 
-        let optionsGrids = { 'facebook': this._facebookOptionsGrid,
-                             'foursquare': this._foursquareOptionsGrid };
+        let optionsGrids = { 'foursquare': this._foursquareOptionsGrid };
 
         for (let provider in optionsGrids)
             if (provider === account.provider_type)
@@ -249,9 +240,7 @@ var CheckInDialog = GObject.registerClass({
         let message = this._messageTextView.buffer.text;
         let privacy;
 
-        if (this._account.get_account().provider_type === 'facebook')
-            privacy = this._facebookOptionsPrivacyComboBox.active_id;
-        else if (this._account.get_account().provider_type === 'foursquare')
+        if (this._account.get_account().provider_type === 'foursquare')
             privacy = this._foursquareOptionsPrivacyComboBox.active_id;
 
         let broadcastFacebook = this._foursquareOptionsBroadcastFacebookCheckButton.active;


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