[gnome-software/1424-updates-page-clicking-os-updates-generates-runtime-warning] gs-os-update-page: Remove the 'Back' button



commit 312061d91df9de53c72be537054425a1d3df1d87
Author: Milan Crha <mcrha redhat com>
Date:   Thu Sep 9 19:22:16 2021 +0200

    gs-os-update-page: Remove the 'Back' button
    
    There's nowhere to go back from this page, it can be just closed.

 src/gs-os-update-page.c  | 23 -----------------------
 src/gs-os-update-page.ui | 23 -----------------------
 2 files changed, 46 deletions(-)
---
diff --git a/src/gs-os-update-page.c b/src/gs-os-update-page.c
index eac6e08ac..f43e57454 100644
--- a/src/gs-os-update-page.c
+++ b/src/gs-os-update-page.c
@@ -39,7 +39,6 @@ typedef enum {
 } GsOsUpdatePageProperty;
 
 enum {
-       SIGNAL_BACK_CLICKED,
        SIGNAL_APP_ACTIVATED,
        SIGNAL_LAST
 };
@@ -430,12 +429,6 @@ gs_os_update_page_set_app (GsOsUpdatePage *page, GsApp *app)
        g_object_notify_by_pspec (G_OBJECT (page), obj_props[PROP_APP]);
 }
 
-static void
-back_clicked_cb (GtkWidget *widget, GsOsUpdatePage *page)
-{
-       g_signal_emit (page, signals[SIGNAL_BACK_CLICKED], 0);
-}
-
 static void
 gs_os_update_page_dispose (GObject *object)
 {
@@ -506,21 +499,6 @@ gs_os_update_page_class_init (GsOsUpdatePageClass *klass)
 
        g_object_class_install_properties (object_class, G_N_ELEMENTS (obj_props), obj_props);
 
-       /**
-        * GsOsUpdatePage:back-clicked:
-        * @app: a #GsApp
-        *
-        * Emitted when the back button got activated and the #GsUpdateDialog
-        * containing this page is expected to go back.
-        *
-        * Since: 41
-        */
-       signals[SIGNAL_BACK_CLICKED] =
-               g_signal_new ("back-clicked",
-                             G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST,
-                             0, NULL, NULL, g_cclosure_marshal_generic,
-                             G_TYPE_NONE, 0);
-
        /**
         * GsOsUpdatePage:app-activated:
         * @app: a #GsApp
@@ -542,7 +520,6 @@ gs_os_update_page_class_init (GsOsUpdatePageClass *klass)
        gtk_widget_class_bind_template_child (widget_class, GsOsUpdatePage, box);
        gtk_widget_class_bind_template_child (widget_class, GsOsUpdatePage, group);
        gtk_widget_class_bind_template_child (widget_class, GsOsUpdatePage, header_bar);
-       gtk_widget_class_bind_template_callback (widget_class, back_clicked_cb);
 }
 
 /**
diff --git a/src/gs-os-update-page.ui b/src/gs-os-update-page.ui
index 6abf6a29f..8868bfacf 100644
--- a/src/gs-os-update-page.ui
+++ b/src/gs-os-update-page.ui
@@ -8,29 +8,6 @@
       <object class="HdyHeaderBar" id="header_bar">
         <property name="show_close_button">True</property>
         <property name="visible">True</property>
-        <child>
-          <object class="GtkButton">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="receives_default">True</property>
-            <signal name="clicked" handler="back_clicked_cb"/>
-            <style>
-              <class name="image-button"/>
-            </style>
-            <child internal-child="accessible">
-              <object class="AtkObject">
-                <property name="accessible-name" translatable="yes">Go back</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkImage">
-                <property name="visible">True</property>
-                <property name="icon_name">go-previous-symbolic</property>
-                <property name="icon_size">1</property>
-              </object>
-            </child>
-          </object>
-        </child>
       </object>
     </child>
     <child>


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