[gnome-bluetooth] lib: Drop BluetoothHdyColumn for AdwClamp



commit 94b9977ca331a6ffbc67a6e94b4d590fb3f3a3b7
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Oct 27 12:08:57 2021 -0300

    lib: Drop BluetoothHdyColumn for AdwClamp
    
    Remove the in-tree widget, and replace the type ensure with
    ADW_TYPE_CLAMP.

 .gitlab-ci.yml                  |   1 +
 lib/bluetooth-hdy-column.c      | 368 ----------------------------------------
 lib/bluetooth-hdy-column.h      |  21 ---
 lib/bluetooth-settings-widget.c |   4 +-
 lib/meson.build                 |   2 +-
 lib/settings.ui                 |   2 +-
 meson.build                     |   1 +
 7 files changed, 6 insertions(+), 393 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 862fccd1..cea8074a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,6 +5,7 @@ variables:
     gtk-doc
     gobject-introspection-devel
     gtk4-devel
+    libadwaita-devel
     systemd-devel
     gsound-devel
     libnotify-devel
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index e343fe8e..673dcd1e 100644
--- a/lib/bluetooth-settings-widget.c
+++ b/lib/bluetooth-settings-widget.c
@@ -22,6 +22,7 @@
 #include <config.h>
 #endif
 
+#include <adwaita.h>
 #include <gtk/gtk.h>
 
 #include <glib/gi18n-lib.h>
@@ -37,7 +38,6 @@
 #include "bluetooth-settings-row.h"
 #include "bluetooth-settings-obexpush.h"
 #include "bluetooth-pairing-dialog.h"
-#include "bluetooth-hdy-column.h"
 #include "pin.h"
 
 #define BLUETOOTH_SETTINGS_WIDGET_GET_PRIVATE(obj) \
@@ -1928,7 +1928,7 @@ bluetooth_settings_widget_init (BluetoothSettingsWidget *self)
        /* This ensures the BluetoothHdyColumn type is known by GtkBuilder when
         * loading the UI template.
         */
-       g_type_ensure (BLUETOOTH_TYPE_HDY_COLUMN);
+       g_type_ensure (ADW_TYPE_CLAMP);
 
        priv->cancellable = g_cancellable_new ();
        priv->debug = g_getenv ("BLUETOOTH_DEBUG") != NULL;
diff --git a/lib/meson.build b/lib/meson.build
index a30c0e9b..7ea744a8 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -16,7 +16,6 @@ install_headers(
 sources = files(
   'bluetooth-agent.c',
   'bluetooth-client.c',
-  'bluetooth-hdy-column.c',
   'bluetooth-pairing-dialog.c',
   'bluetooth-settings-obexpush.c',
   'bluetooth-settings-row.c',
@@ -62,6 +61,7 @@ built_sources += gnome.gdbus_codegen(
 deps = [
   gio_dep,
   gtk_dep,
+  libadwaita_dep,
 ]
 
 private_deps = [
diff --git a/lib/settings.ui b/lib/settings.ui
index 61946bb9..bced51ef 100644
--- a/lib/settings.ui
+++ b/lib/settings.ui
@@ -379,7 +379,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <child>
-          <object class="BluetoothHdyColumn">
+          <object class="AdwClamp">
             <property name="visible">True</property>
             <property name="maximum_width">600</property>
             <property name="linear_growth_width">400</property>
diff --git a/meson.build b/meson.build
index 9044648d..eabe73e1 100644
--- a/meson.build
+++ b/meson.build
@@ -101,6 +101,7 @@ gio_dep = dependency('gio-2.0', version: '>= 2.44')
 gio_unix_dep = dependency('gio-unix-2.0')
 gtk_dep = dependency('gtk4', version: '>= 4.4')
 gsound_dep = dependency('gsound')
+libadwaita_dep = dependency('libadwaita-1')
 libnotify_dep = dependency('libnotify', version: '>= 0.7.0')
 libudev_dep = dependency('libudev')
 


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