[gnome-games/wip/exalm/developers: 1/3] ui: Remove Developers view



commit 88ed07f6560503debe83912ca2574eede47e19b8
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Wed May 1 20:22:01 2019 +0500

    ui: Remove Developers view
    
    It has never been working well, and doesn't work at all since thegamesdb
    shut down its legacy API. Let's just remove it rather than have an always-
    empty view.prominently featured in collection.

 data/ui/collection-box.ui       | 10 -----
 src/meson.build                 |  2 -
 src/ui/collection-box.vala      | 18 +-------
 src/ui/developer-list-item.vala | 32 --------------
 src/ui/developers-view.vala     | 92 -----------------------------------------
 5 files changed, 1 insertion(+), 153 deletions(-)
---
diff --git a/data/ui/collection-box.ui b/data/ui/collection-box.ui
index c926e3b0..3fc090bd 100644
--- a/data/ui/collection-box.ui
+++ b/data/ui/collection-box.ui
@@ -43,16 +43,6 @@
                 <property name="title" translatable="yes">Games</property>
               </packing>
             </child>
-            <child>
-              <object class="GamesDevelopersView" id="developer_view">
-                <property name="visible">True</property>
-                <signal name="game-activated" handler="on_game_activated"/>
-              </object>
-              <packing>
-                <property name="name">developer</property>
-                <property name="title" translatable="yes">Developers</property>
-              </packing>
-            </child>
             <child>
               <object class="GamesPlatformsView" id="platform_view">
                 <property name="visible">True</property>
diff --git a/src/meson.build b/src/meson.build
index 85a7d379..d54fc23d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -135,8 +135,6 @@ vala_sources = [
   'ui/collection-icon-view.vala',
   'ui/collection-header-bar.vala',
   'ui/collection-view.vala',
-  'ui/developer-list-item.vala',
-  'ui/developers-view.vala',
   'ui/display-box.vala',
   'ui/display-header-bar.vala',
   'ui/display-view.vala',
diff --git a/src/ui/collection-box.vala b/src/ui/collection-box.vala
index 181d7386..1371afca 100644
--- a/src/ui/collection-box.vala
+++ b/src/ui/collection-box.vala
@@ -19,8 +19,6 @@ private class Games.CollectionBox : Gtk.Box {
        [GtkChild]
        private CollectionIconView collection_view;
        [GtkChild]
-       private DevelopersView developer_view;
-       [GtkChild]
        private PlatformsView platform_view;
        [GtkChild (name = "viewstack")]
        private Gtk.Stack _viewstack;
@@ -41,7 +39,6 @@ private class Games.CollectionBox : Gtk.Box {
        }
 
        private Binding collection_binding;
-       private Binding developer_collection_binding;
        private Binding platform_collection_binding;
        private Binding search_binding;
        private Binding loading_notification_binding;
@@ -54,9 +51,6 @@ private class Games.CollectionBox : Gtk.Box {
                collection_binding = bind_property ("collection", collection_view, "model",
                                                    BindingFlags.BIDIRECTIONAL);
 
-               developer_collection_binding = bind_property ("collection", developer_view,
-                                                             "model", BindingFlags.BIDIRECTIONAL);
-
                platform_collection_binding = bind_property ("collection", platform_view,
                                                             "model", BindingFlags.BIDIRECTIONAL);
 
@@ -106,8 +100,6 @@ private class Games.CollectionBox : Gtk.Box {
                default:
                        if (viewstack.visible_child == platform_view)
                                return platform_view.gamepad_button_press_event (event);
-                       else if (viewstack.visible_child == developer_view)
-                               return developer_view.gamepad_button_press_event (event);
                        else
                                return collection_view.gamepad_button_press_event (event);
                }
@@ -119,8 +111,6 @@ private class Games.CollectionBox : Gtk.Box {
 
                if (viewstack.visible_child == platform_view)
                        return platform_view.gamepad_button_release_event (event);
-               else if (viewstack.visible_child == developer_view)
-                       return developer_view.gamepad_button_release_event (event);
                else
                        return collection_view.gamepad_button_release_event (event);
        }
@@ -131,8 +121,6 @@ private class Games.CollectionBox : Gtk.Box {
 
                if (viewstack.visible_child == platform_view)
                        return platform_view.gamepad_absolute_axis_event (event);
-               else if (viewstack.visible_child == developer_view)
-                       return developer_view.gamepad_absolute_axis_event (event);
                else
                        return collection_view.gamepad_absolute_axis_event (event);
        }
@@ -151,8 +139,6 @@ private class Games.CollectionBox : Gtk.Box {
        private void on_visible_child_changed () {
                if (viewstack.visible_child == platform_view)
                        platform_view.filtering_text = search_bar.text;
-               else if (viewstack.visible_child == developer_view)
-                       developer_view.filtering_text = search_bar.text;
                else {
                        collection_view.filtering_text = search_bar.text;
                        collection_view.reset_scroll_position ();
@@ -163,12 +149,10 @@ private class Games.CollectionBox : Gtk.Box {
        private void on_search_text_notify () {
                if (viewstack.visible_child == platform_view)
                        platform_view.filtering_text = search_bar.text;
-               else if (viewstack.visible_child == developer_view)
-                       developer_view.filtering_text = search_bar.text;
                else
                        collection_view.filtering_text = search_bar.text;
 
-               // Changing the filtering_text for the Developer|PlatformView might
+               // Changing the filtering_text for the PlatformView might
                // cause the currently selected sidebar row to become empty and therefore
                // hidden. In this case the first visible row will become selected and
                // this causes the search bar to lose focus so we have to regrab it here


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