[gtksourceview/wip/chergert/gsv-gtk4: 161/197] widget: fix uses of removed and renamed properties



commit e955eb1dd462b70010c2d5d8d1584690eb9cefac
Author: Christian Hergert <chergert redhat com>
Date:   Tue Mar 17 13:07:34 2020 -0700

    widget: fix uses of removed and renamed properties

 gtksourceview/gtksourcecompletion.c               |  5 ++++-
 gtksourceview/gtksourcecompletion.ui              | 12 ++++++------
 gtksourceview/gtksourcecompletioninfo.c           | 12 ++++++++++--
 gtksourceview/gtksourcemap.c                      |  3 ++-
 gtksourceview/gtksourcestyleschemechooserwidget.c |  8 ++++++--
 tests/test-completion.ui                          | 10 ++++++++--
 tests/test-search.ui                              |  5 ++++-
 tests/test-space-drawing.c                        |  5 ++++-
 8 files changed, 44 insertions(+), 16 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index f2cae662..c690467c 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -2152,7 +2152,10 @@ init_main_window (GtkSourceCompletion *completion,
        completion->bottom_bar = GTK_WIDGET (gtk_builder_get_object (builder, "bottom_bar"));
 
        g_object_set (completion->main_window,
-                     "margin", 0,
+                     "margin-top", 0,
+                     "margin-bottom", 0,
+                     "margin-start", 0,
+                     "margin-end", 0,
                      NULL);
 
        g_signal_connect_swapped (completion->main_window,
diff --git a/gtksourceview/gtksourcecompletion.ui b/gtksourceview/gtksourcecompletion.ui
index 2a2fce81..389bdd9b 100644
--- a/gtksourceview/gtksourcecompletion.ui
+++ b/gtksourceview/gtksourcecompletion.ui
@@ -24,11 +24,7 @@ along with this library; if not, see <http://www.gnu.org/licenses/>.
 <interface>
   <requires lib="gtk+" version="3.0"/>
   <object class="GtkSourceCompletionInfo" id="main_window">
-    <property name="type">popup</property>
-    <property name="type_hint">combo</property>
     <property name="resizable">False</property>
-    <property name="accept_focus">False</property>
-    <property name="focus_on_map">False</property>
     <property name="decorated">False</property>
     <property name="mnemonics-visible">True</property>
     <child>
@@ -50,7 +46,8 @@ along with this library; if not, see <http://www.gnu.org/licenses/>.
                 <property name="headers_visible">False</property>
                 <property name="enable_search">False</property>
                 <property name="show_expanders">False</property>
-                <property name="expand">True</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
                 <child>
                   <object class="GtkTreeViewColumn" id="tree_view_column_icon">
                     <child>
@@ -104,7 +101,10 @@ along with this library; if not, see <http://www.gnu.org/licenses/>.
             <child>
               <object class="GtkLabel" id="selection_label">
                 <property name="visible">True</property>
-                <property name="margin">6</property>
+                <property name="margin-top">6</property>
+                <property name="margin-bottom">6</property>
+                <property name="margin-end">6</property>
+                <property name="margin-start">6</property>
                 <layout>
                   <property name="left_attach">2</property>
                 </layout>
diff --git a/gtksourceview/gtksourcecompletioninfo.c b/gtksourceview/gtksourcecompletioninfo.c
index 44c567c0..239b0bde 100644
--- a/gtksourceview/gtksourcecompletioninfo.c
+++ b/gtksourceview/gtksourcecompletioninfo.c
@@ -127,7 +127,12 @@ gtk_source_completion_info_init (GtkSourceCompletionInfo *info)
        gtk_window_set_title (GTK_WINDOW (info), _("Completion Info"));
        gtk_widget_set_name (GTK_WIDGET (info), "gtk-tooltip");
 
-       g_object_set (info, "margin", 1, NULL);
+       g_object_set (info,
+                     "margin-top", 1,
+                     "margin-bottom", 1,
+                     "margin-start", 1,
+                     "margin-end", 1,
+                     NULL);
 }
 
 static void
@@ -255,7 +260,10 @@ GtkSourceCompletionInfo *
 gtk_source_completion_info_new (void)
 {
        return g_object_new (GTK_SOURCE_TYPE_COMPLETION_INFO,
-                            "margin", 3,
+                            "margin-top", 3,
+                            "margin-bottom", 3,
+                            "margin-start", 3,
+                            "margin-end", 3,
                             NULL);
 }
 
diff --git a/gtksourceview/gtksourcemap.c b/gtksourceview/gtksourcemap.c
index d6eb3f45..8379a195 100644
--- a/gtksourceview/gtksourcemap.c
+++ b/gtksourceview/gtksourcemap.c
@@ -1100,7 +1100,8 @@ gtk_source_map_init (GtkSourceMap *map)
                      "auto-indent", FALSE,
                      "can-focus", FALSE,
                      "editable", FALSE,
-                     "expand", FALSE,
+                     "hexpand", FALSE,
+                     "vexpand", FALSE,
                      "monospace", TRUE,
                      "show-right-margin", FALSE,
                      "visible", TRUE,
diff --git a/gtksourceview/gtksourcestyleschemechooserwidget.c 
b/gtksourceview/gtksourcestyleschemechooserwidget.c
index 9c5797f3..de8bf6e3 100644
--- a/gtksourceview/gtksourcestyleschemechooserwidget.c
+++ b/gtksourceview/gtksourcestyleschemechooserwidget.c
@@ -167,13 +167,17 @@ make_row (GtkSourceStyleScheme *scheme,
                             "visible", TRUE,
                             "right-margin-position", 30,
                             "show-right-margin", TRUE,
-                            "margin", 2,
+                            "margin-top", 2,
+                            "margin-bottom", 2,
+                            "margin-start", 2,
+                            "margin-end", 2,
                             NULL);
        gtk_container_add (GTK_CONTAINER (overlay), view);
 
        label = g_object_new (GTK_TYPE_LABEL,
                              "can-focus", FALSE,
-                             "expand", TRUE,
+                             "hexpand", TRUE,
+                             "vexpand", TRUE,
                              "selectable", FALSE,
                              NULL);
        gtk_overlay_add_overlay (GTK_OVERLAY (overlay), label);
diff --git a/tests/test-completion.ui b/tests/test-completion.ui
index a3f3f515..865ff2ed 100644
--- a/tests/test-completion.ui
+++ b/tests/test-completion.ui
@@ -16,7 +16,10 @@
     <property name="visible">1</property>
     <child>
       <object class="GtkGrid" id="grid1">
-        <property name="margin">6</property>
+        <property name="margin-top">6</property>
+        <property name="margin-bottom">6</property>
+        <property name="margin-start">6</property>
+        <property name="margin-end">6</property>
         <property name="column_spacing">10</property>
         <child>
           <object class="GtkGrid" id="grid2">
@@ -259,7 +262,10 @@
                     <property name="remember_info_visibility">True</property>
                     <child internal-child="info_window">
                       <object class="GtkSourceCompletionInfo">
-                        <property name="margin">3</property>
+                        <property name="margin-top">3</property>
+                        <property name="margin-bottom">3</property>
+                        <property name="margin-start">3</property>
+                        <property name="margin-end">3</property>
                       </object>
                     </child>
                   </object>
diff --git a/tests/test-search.ui b/tests/test-search.ui
index fd63ca77..0c72f678 100644
--- a/tests/test-search.ui
+++ b/tests/test-search.ui
@@ -17,7 +17,10 @@
     <property name="icon_size">1</property>
   </object>
   <template class="TestSearch" parent="GtkGrid">
-    <property name="margin">6</property>
+    <property name="margin-top">6</property>
+    <property name="margin-bottom">6</property>
+    <property name="margin-start">6</property>
+    <property name="margin-end">6</property>
     <property name="row_spacing">6</property>
     <child>
       <object class="GtkScrolledWindow" id="scrolledwindow1">
diff --git a/tests/test-space-drawing.c b/tests/test-space-drawing.c
index f872267a..52e6412f 100644
--- a/tests/test-space-drawing.c
+++ b/tests/test-space-drawing.c
@@ -106,7 +106,10 @@ create_window (void)
 
        gtk_grid_set_row_spacing (GTK_GRID (panel_grid), 6);
        g_object_set (panel_grid,
-                     "margin", 6,
+                     "margin-top", 6,
+                     "margin-bottom", 6,
+                     "margin-start", 6,
+                     "margin-end", 6,
                      NULL);
 
        matrix_checkbutton = gtk_check_button_new_with_label ("GtkSourceSpaceDrawer enable-matrix");


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