[gnome-control-center/sharing-consistency-tweaks: 2/3] sharing: Make Network list an AdwPreferencesGroup
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/sharing-consistency-tweaks: 2/3] sharing: Make Network list an AdwPreferencesGroup
- Date: Thu, 24 Feb 2022 02:12:04 +0000 (UTC)
commit a4f2842b2aec7e44320a812a68820d88a1e79f94
Author: Christopher Davis <christopherdavis gnome org>
Date: Wed Feb 23 15:04:05 2022 -0800
sharing: Make Network list an AdwPreferencesGroup
panels/sharing/cc-sharing-networks.c | 5 ++---
panels/sharing/cc-sharing-networks.h | 3 ++-
panels/sharing/cc-sharing-networks.ui | 31 +++++++++----------------------
3 files changed, 13 insertions(+), 26 deletions(-)
---
diff --git a/panels/sharing/cc-sharing-networks.c b/panels/sharing/cc-sharing-networks.c
index c7beac1fb..060b059db 100644
--- a/panels/sharing/cc-sharing-networks.c
+++ b/panels/sharing/cc-sharing-networks.c
@@ -19,7 +19,6 @@
#include "config.h"
-#include <adwaita.h>
#include <gio/gio.h>
#include <glib/gi18n.h>
@@ -28,7 +27,7 @@
#include "gsd-sharing-enums.h"
struct _CcSharingNetworks {
- GtkBox parent_instance;
+ AdwPreferencesGroup parent_instance;
GtkWidget *listbox;
@@ -46,7 +45,7 @@ struct _CcSharingNetworks {
};
-G_DEFINE_TYPE (CcSharingNetworks, cc_sharing_networks, GTK_TYPE_BOX)
+G_DEFINE_TYPE (CcSharingNetworks, cc_sharing_networks, ADW_TYPE_PREFERENCES_GROUP)
enum {
PROP_0,
diff --git a/panels/sharing/cc-sharing-networks.h b/panels/sharing/cc-sharing-networks.h
index f44567ebf..359cb9bd5 100644
--- a/panels/sharing/cc-sharing-networks.h
+++ b/panels/sharing/cc-sharing-networks.h
@@ -19,12 +19,13 @@
#pragma once
+#include <adwaita.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define CC_TYPE_SHARING_NETWORKS (cc_sharing_networks_get_type ())
-G_DECLARE_FINAL_TYPE (CcSharingNetworks, cc_sharing_networks, CC, SHARING_NETWORKS, GtkBox)
+G_DECLARE_FINAL_TYPE (CcSharingNetworks, cc_sharing_networks, CC, SHARING_NETWORKS, AdwPreferencesGroup)
typedef enum {
CC_SHARING_STATUS_UNSET,
diff --git a/panels/sharing/cc-sharing-networks.ui b/panels/sharing/cc-sharing-networks.ui
index 5703441df..c5a3c5fd2 100644
--- a/panels/sharing/cc-sharing-networks.ui
+++ b/panels/sharing/cc-sharing-networks.ui
@@ -2,29 +2,16 @@
<!-- Generated with glade 3.18.1 -->
<interface>
<requires lib="gtk+" version="3.10"/>
- <template class="CcSharingNetworks" parent="GtkBox">
- <property name="margin_start">0</property>
- <property name="margin_end">0</property>
- <property name="margin_top">12</property>
- <property name="margin_bottom">12</property>
- <property name="spacing">12</property>
- <property name="orientation">vertical</property>
+ <template class="CcSharingNetworks" parent="AdwPreferencesGroup">
+ <property name="title" translatable="yes">Networks</property>
<child>
- <object class="GtkLabel" id="label15">
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Networks</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- <child>
- <object class="GtkFrame" id="shared-networks-frame">
- <property name="hexpand">True</property>
- <child>
- <object class="GtkListBox" id="listbox">
- </object>
- </child>
+ <object class="GtkListBox" id="listbox">
+ <accessibility>
+ <relation name="labelled-by">CcSharingNetworks</relation>
+ </accessibility>
+ <style>
+ <class name="boxed-list"/>
+ </style>
</object>
</child>
</template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]