[gnome-software: 26/110] Remove shadow type




commit 0dd120c0f4016cd2b5e2c15bea84ba1276ccced4
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sun Aug 22 18:34:03 2021 -0300

    Remove shadow type
    
    This API was dropped in GTK4, and there is no replacement.

 src/gs-app-details-page.c  | 25 -------------------------
 src/gs-app-details-page.ui |  1 -
 src/gs-category-page.ui    |  1 -
 src/gs-common.c            |  2 --
 src/gs-details-page.ui     |  1 -
 src/gs-extras-page.ui      |  1 -
 src/gs-installed-page.ui   |  1 -
 src/gs-moderate-page.ui    |  1 -
 src/gs-overview-page.ui    |  1 -
 src/gs-removal-dialog.ui   |  1 -
 src/gs-review-dialog.ui    |  1 -
 src/gs-search-page.ui      |  1 -
 src/gs-updates-page.ui     |  1 -
 13 files changed, 38 deletions(-)
---
diff --git a/src/gs-app-details-page.c b/src/gs-app-details-page.c
index 641dbbfc9..0114fe4a9 100644
--- a/src/gs-app-details-page.c
+++ b/src/gs-app-details-page.c
@@ -297,24 +297,6 @@ back_clicked_cb (GtkWidget *widget, GsAppDetailsPage *page)
        g_signal_emit (page, signals[SIGNAL_BACK_CLICKED], 0);
 }
 
-static void
-scrollbar_mapped_cb (GtkWidget *sb, GtkScrolledWindow *swin)
-{
-       GtkWidget *frame;
-
-       frame = gtk_bin_get_child (GTK_BIN (gtk_bin_get_child (GTK_BIN (swin))));
-
-       if (gtk_widget_get_mapped (GTK_WIDGET (sb))) {
-               gtk_scrolled_window_set_shadow_type (swin, GTK_SHADOW_IN);
-               if (GTK_IS_FRAME (frame))
-                       gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
-       } else {
-               if (GTK_IS_FRAME (frame))
-                       gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
-               gtk_scrolled_window_set_shadow_type (swin, GTK_SHADOW_NONE);
-       }
-}
-
 static void
 gs_app_details_page_dispose (GObject *object)
 {
@@ -364,14 +346,7 @@ gs_app_details_page_set_property (GObject *object, guint prop_id, const GValue *
 static void
 gs_app_details_page_init (GsAppDetailsPage *page)
 {
-       GtkWidget *scrollbar;
-
        gtk_widget_init_template (GTK_WIDGET (page));
-
-       scrollbar = gtk_scrolled_window_get_vscrollbar (GTK_SCROLLED_WINDOW (page->scrolledwindow_details));
-       g_signal_connect (scrollbar, "map", G_CALLBACK (scrollbar_mapped_cb), page->scrolledwindow_details);
-       g_signal_connect (scrollbar, "unmap", G_CALLBACK (scrollbar_mapped_cb), page->scrolledwindow_details);
-
 }
 
 static void
diff --git a/src/gs-app-details-page.ui b/src/gs-app-details-page.ui
index 6fe690846..85ce25464 100644
--- a/src/gs-app-details-page.ui
+++ b/src/gs-app-details-page.ui
@@ -130,7 +130,6 @@
             <property name="vexpand">True</property>
             <property name="hscrollbar_policy">never</property>
             <property name="vscrollbar_policy">automatic</property>
-            <property name="shadow_type">none</property>
             <child>
               <object class="GtkLabel" id="label_details">
                 <property name="visible">True</property>
diff --git a/src/gs-category-page.ui b/src/gs-category-page.ui
index f504aaa51..0346fb73b 100644
--- a/src/gs-category-page.ui
+++ b/src/gs-category-page.ui
@@ -6,7 +6,6 @@
     <child>
       <object class="GtkScrolledWindow" id="scrolledwindow_category">
         <property name="visible">True</property>
-        <property name="shadow_type">none</property>
         <property name="hscrollbar_policy">never</property>
         <property name="vscrollbar_policy">automatic</property>
         <child>
diff --git a/src/gs-common.c b/src/gs-common.c
index 17bbdb33f..730d4f0ed 100644
--- a/src/gs-common.c
+++ b/src/gs-common.c
@@ -508,8 +508,6 @@ insert_details_widget (GtkMessageDialog *dialog, const gchar *details)
        gtk_box_append (GTK_BOX (message_area), label);
 
        sw = gtk_scrolled_window_new (NULL, NULL);
-       gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
-                                            GTK_SHADOW_IN);
        gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
                                        GTK_POLICY_NEVER,
                                        GTK_POLICY_AUTOMATIC);
diff --git a/src/gs-details-page.ui b/src/gs-details-page.ui
index c8b21d39f..120f089d3 100644
--- a/src/gs-details-page.ui
+++ b/src/gs-details-page.ui
@@ -51,7 +51,6 @@
         <child>
           <object class="GtkScrolledWindow" id="scrolledwindow_details">
             <property name="visible">True</property>
-            <property name="shadow_type">none</property>
             <property name="can_focus">True</property>
             <property name="hscrollbar_policy">automatic</property>
             <property name="vscrollbar_policy">automatic</property>
diff --git a/src/gs-extras-page.ui b/src/gs-extras-page.ui
index c11aa9c74..a4c2e6074 100644
--- a/src/gs-extras-page.ui
+++ b/src/gs-extras-page.ui
@@ -44,7 +44,6 @@
             <property name="can_focus">True</property>
             <property name="hscrollbar_policy">never</property>
             <property name="vscrollbar_policy">automatic</property>
-            <property name="shadow_type">none</property>
             <child>
               <object class="AdwClamp">
                 <property name="visible">True</property>
diff --git a/src/gs-installed-page.ui b/src/gs-installed-page.ui
index b82cfc5c6..74241f573 100644
--- a/src/gs-installed-page.ui
+++ b/src/gs-installed-page.ui
@@ -35,7 +35,6 @@
                 <property name="hscrollbar_policy">never</property>
                 <property name="vscrollbar_policy">automatic</property>
                 <property name="vexpand">True</property>
-                <property name="shadow_type">none</property>
                 <style>
                   <class name="list-page"/>
                 </style>
diff --git a/src/gs-moderate-page.ui b/src/gs-moderate-page.ui
index 9a6dbfd4d..b82315d7e 100644
--- a/src/gs-moderate-page.ui
+++ b/src/gs-moderate-page.ui
@@ -35,7 +35,6 @@
                 <property name="hscrollbar_policy">never</property>
                 <property name="vscrollbar_policy">automatic</property>
                 <property name="vexpand">True</property>
-                <property name="shadow_type">none</property>
                 <child>
                   <object class="AdwClamp">
                     <property name="visible">True</property>
diff --git a/src/gs-overview-page.ui b/src/gs-overview-page.ui
index 4aa91822d..82ea6b4f7 100644
--- a/src/gs-overview-page.ui
+++ b/src/gs-overview-page.ui
@@ -64,7 +64,6 @@
                 <property name="can_focus">True</property>
                 <property name="hscrollbar_policy">never</property>
                 <property name="vscrollbar_policy">automatic</property>
-                <property name="shadow_type">none</property>
                 <child>
                   <object class="GtkViewport" id="viewport_overview">
                     <property name="visible">True</property>
diff --git a/src/gs-removal-dialog.ui b/src/gs-removal-dialog.ui
index cbba2c893..ce7e2778a 100644
--- a/src/gs-removal-dialog.ui
+++ b/src/gs-removal-dialog.ui
@@ -6,7 +6,6 @@
     <property name="min_content_height">160</property>
     <property name="hscrollbar_policy">never</property>
     <property name="vscrollbar_policy">automatic</property>
-    <property name="shadow_type">none</property>
     <child>
       <object class="GtkListBox" id="listbox">
         <property name="halign">fill</property>
diff --git a/src/gs-review-dialog.ui b/src/gs-review-dialog.ui
index c79ee53b5..9d43a0912 100644
--- a/src/gs-review-dialog.ui
+++ b/src/gs-review-dialog.ui
@@ -166,7 +166,6 @@
                     <property name="can_focus">True</property>
                     <property name="hscrollbar_policy">automatic</property>
                     <property name="vscrollbar_policy">automatic</property>
-                    <property name="shadow_type">in</property>
                     <property name="vexpand">True</property>
                     <child>
                       <object class="GtkTextView" id="text_view">
diff --git a/src/gs-search-page.ui b/src/gs-search-page.ui
index 9e5696389..467ec24d5 100644
--- a/src/gs-search-page.ui
+++ b/src/gs-search-page.ui
@@ -48,7 +48,6 @@
             <property name="can_focus">True</property>
             <property name="hscrollbar_policy">never</property>
             <property name="vscrollbar_policy">automatic</property>
-            <property name="shadow_type">none</property>
             <style>
               <class name="list-page"/>
             </style>
diff --git a/src/gs-updates-page.ui b/src/gs-updates-page.ui
index 7288abcb0..d51c9e68b 100644
--- a/src/gs-updates-page.ui
+++ b/src/gs-updates-page.ui
@@ -127,7 +127,6 @@
                 <property name="can_focus">True</property>
                 <property name="hscrollbar_policy">never</property>
                 <property name="vscrollbar_policy">automatic</property>
-                <property name="shadow_type">none</property>
                 <style>
                   <class name="list-page"/>
                 </style>


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