[gnome-games/wip/exalm/gtk4: 4/30] fixme: Remove libhandy



commit 27b4bef158b512b4f554f409dcc2663c26dde835
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Sep 18 00:25:40 2018 +0500

    fixme: Remove libhandy
    
    Libhandy isn't available for GTK4 yet, so remove it for now and replace
    with stubs.

 data/ui/application-window.ui           |  2 +-
 data/ui/preferences-page-controllers.ui |  7 ++++---
 data/ui/preferences-page-plugins.ui     |  7 ++++---
 data/ui/preferences-page-video.ui       |  7 ++++---
 data/ui/preferences-window.ui           |  2 +-
 flatpak/org.gnome.Games.json            | 16 ----------------
 meson.build                             |  2 --
 src/main.vala                           |  3 ---
 src/meson.build                         |  1 -
 src/ui/preferences-window.vala          |  8 --------
 10 files changed, 14 insertions(+), 41 deletions(-)
---
diff --git a/data/ui/application-window.ui b/data/ui/application-window.ui
index bf0f68de..a40d4a44 100644
--- a/data/ui/application-window.ui
+++ b/data/ui/application-window.ui
@@ -35,7 +35,7 @@
       </object>
     </child>
     <child type="titlebar">
-      <object class="HdyTitleBar">
+      <object class="GtkBox">
         <property name="visible">True</property>
         <child>
           <object class="GtkStack" id="header_bar">
diff --git a/data/ui/preferences-page-controllers.ui b/data/ui/preferences-page-controllers.ui
index a0d8c3ec..835d0818 100644
--- a/data/ui/preferences-page-controllers.ui
+++ b/data/ui/preferences-page-controllers.ui
@@ -10,17 +10,18 @@
           <object class="GtkViewport">
             <property name="visible">True</property>
             <child>
-              <object class="HdyColumn">
+              <object class="GtkBox">
                 <property name="visible">True</property>
                 <property name="expand">True</property>
-                <property name="maximum_width">600</property>
-                <property name="linear-growth-width">300</property>
+                <property name="width-request">600</property>
+                <property name="halign">center</property>
                 <child>
                   <object class="GtkBox">
                     <property name="visible">True</property>
                     <property name="orientation">vertical</property>
                     <property name="margin">12</property>
                     <property name="spacing">12</property>
+                    <property name="hexpand">True</property>
                     <child>
                       <object class="GtkLabel" id="gamepads_label">
                         <property name="visible">True</property>
diff --git a/data/ui/preferences-page-plugins.ui b/data/ui/preferences-page-plugins.ui
index f3c1ea5e..30557756 100644
--- a/data/ui/preferences-page-plugins.ui
+++ b/data/ui/preferences-page-plugins.ui
@@ -11,17 +11,18 @@
           <object class="GtkViewport">
             <property name="visible">true</property>
             <child>
-              <object class="HdyColumn">
+              <object class="GtkBox">
                 <property name="visible">True</property>
                 <property name="expand">True</property>
-                <property name="maximum_width">600</property>
-                <property name="linear-growth-width">300</property>
+                <property name="width-request">600</property>
+                <property name="halign">center</property>
                 <child>
                   <object class="GtkBox">
                     <property name="visible">True</property>
                     <property name="orientation">vertical</property>
                     <property name="margin">12</property>
                     <property name="spacing">12</property>
+                    <property name="hexpand">True</property>
                     <child>
                       <object class="GtkFrame">
                         <property name="visible">true</property>
diff --git a/data/ui/preferences-page-video.ui b/data/ui/preferences-page-video.ui
index be65929d..bd26e7ca 100644
--- a/data/ui/preferences-page-video.ui
+++ b/data/ui/preferences-page-video.ui
@@ -10,17 +10,18 @@
           <object class="GtkViewport">
             <property name="visible">True</property>
             <child>
-              <object class="HdyColumn">
+              <object class="GtkBox">
                 <property name="visible">True</property>
                 <property name="expand">True</property>
-                <property name="maximum_width">600</property>
-                <property name="linear-growth-width">300</property>
+                <property name="width-request">600</property>
+                <property name="halign">center</property>
                 <child>
                   <object class="GtkBox">
                     <property name="visible">True</property>
                     <property name="orientation">vertical</property>
                     <property name="margin">12</property>
                     <property name="spacing">12</property>
+                    <property name="hexpand">True</property>
                     <child>
                       <object class="GtkLabel">
                         <property name="visible">True</property>
diff --git a/data/ui/preferences-window.ui b/data/ui/preferences-window.ui
index 3e10d978..aea9b2df 100644
--- a/data/ui/preferences-window.ui
+++ b/data/ui/preferences-window.ui
@@ -8,7 +8,7 @@
     <property name="default-height">500</property>
     <property name="window-position">GTK_WIN_POS_CENTER_ON_PARENT</property>
     <child type="titlebar">
-      <object class="HdyTitleBar" id="titlebar">
+      <object class="GtkBox" id="titlebar">
         <property name="visible">True</property>
         <child>
           <object class="GtkStack" id="titlebar_stack">
diff --git a/flatpak/org.gnome.Games.json b/flatpak/org.gnome.Games.json
index 10f3a633..9947d479 100644
--- a/flatpak/org.gnome.Games.json
+++ b/flatpak/org.gnome.Games.json
@@ -181,22 +181,6 @@
                 }
             ]
         },
-        {
-            "name" : "libhandy",
-            "buildsystem" : "meson",
-            "config-opts" : [
-                "--libdir=lib",
-                "-Dtests=false",
-                "-Dexamples=false",
-                "-Dglade_catalog=false"
-            ],
-            "sources" : [
-                {
-                    "type" : "git",
-                    "url" : "https://source.puri.sm/Librem5/libhandy.git";
-                }
-            ]
-        },
         {
             "name" : "manette",
             "buildsystem" : "meson",
diff --git a/meson.build b/meson.build
index 147ad074..33f912a6 100644
--- a/meson.build
+++ b/meson.build
@@ -36,7 +36,6 @@ gio_dep = dependency ('gio-2.0', version: '>=' + glib_min_version)
 glib_dep = dependency ('glib-2.0', version: '>=' + glib_min_version)
 grilo_dep = dependency ('grilo-0.3')
 gtk_dep = dependency ('gtk+-3.0')
-handy_dep = dependency ('libhandy-0.0')
 manette_dep = dependency ('manette-0.2', version: '>=' + manette_min_version)
 retro_gtk_dep = dependency ('retro-gtk-0.14', version: '>=' + retro_gtk_min_version)
 rsvg_dep = dependency ('librsvg-2.0')
@@ -75,7 +74,6 @@ srcinc = include_directories('src')
 add_project_arguments (
   '-DGETTEXT_PACKAGE="' + meson.project_name () + '"',
   '-DRETRO_GTK_USE_UNSTABLE_API',
-  '-DHANDY_USE_UNSTABLE_API',
   language: 'c'
 )
 
diff --git a/src/main.vala b/src/main.vala
index 7aa30afe..accb61fa 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -7,9 +7,6 @@ int main (string[] args) {
 
        Grl.init (ref args);
 
-       typeof (Hdy.Column).ensure ();
-       typeof (Hdy.TitleBar).ensure ();
-
        var app = new Games.Application ();
        var result = app.run (args);
 
diff --git a/src/meson.build b/src/meson.build
index 9a886051..bc9b1317 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -196,7 +196,6 @@ vala_sources = [
 
 dependencies = [
   config_dep,
-  handy_dep,
   gio_dep,
   glib_dep,
   grilo_dep,
diff --git a/src/ui/preferences-window.vala b/src/ui/preferences-window.vala
index 54d86c48..b8141ae7 100644
--- a/src/ui/preferences-window.vala
+++ b/src/ui/preferences-window.vala
@@ -2,8 +2,6 @@
 
 [GtkTemplate (ui = "/org/gnome/Games/ui/preferences-window.ui")]
 private class Games.PreferencesWindow : Gtk.Window {
-       [GtkChild]
-       private Hdy.TitleBar titlebar;
        [GtkChild]
        private Gtk.Stack titlebar_stack;
        [GtkChild]
@@ -28,7 +26,6 @@ private class Games.PreferencesWindow : Gtk.Window {
                                previous_subpage = subpage;
                                main_stack.visible_child = content_box;
                                titlebar_stack.visible_child = titlebar_box;
-                               selection_mode_binding.unbind ();
                        }
 
                        if (value != null) {
@@ -37,10 +34,6 @@ private class Games.PreferencesWindow : Gtk.Window {
                                main_stack.add (value);
                                main_stack.visible_child = value;
 
-                               selection_mode_binding = value.bind_property ("request-selection-mode",
-                                                                             titlebar, "selection-mode",
-                                                                             BindingFlags.SYNC_CREATE);
-
                                titlebar_stack.add (header_bar);
                                titlebar_stack.visible_child = header_bar;
                        }
@@ -53,7 +46,6 @@ private class Games.PreferencesWindow : Gtk.Window {
        private PreferencesSubpage previous_subpage;
 
        private Binding subpage_binding;
-       private Binding selection_mode_binding;
 
        public PreferencesWindow () {
                stack.notify["visible-child-name"].connect (visible_child_changed);


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