[krb5-auth-dialog] prefs: Switch to AdwPreferencesDialog
- From: Guido Günther <guidog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [krb5-auth-dialog] prefs: Switch to AdwPreferencesDialog
- Date: Fri, 21 Oct 2022 08:55:38 +0000 (UTC)
commit 23ae24499e0c338d1d67fe96dde2951c983263f2
Author: Guido Günther <agx sigxcpu org>
Date: Thu Oct 20 17:00:12 2022 +0200
prefs: Switch to AdwPreferencesDialog
src/ka-preferences.c | 4 ++--
src/ka-preferences.h | 3 ++-
src/resources/ui/ka-preferences.ui | 5 +++--
3 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/ka-preferences.c b/src/ka-preferences.c
index dd16d37..f059193 100644
--- a/src/ka-preferences.c
+++ b/src/ka-preferences.c
@@ -28,7 +28,7 @@
#define PKINIT_FILE "FILE:"
struct _KaPreferences {
- GtkDialog parent;
+ AdwPreferencesWindow parent;
GtkWidget *dialog;
GtkWidget *notebook;
@@ -48,7 +48,7 @@ struct _KaPreferences {
KaApplet *applet;
};
-G_DEFINE_FINAL_TYPE (KaPreferences, ka_preferences, GTK_TYPE_DIALOG);
+G_DEFINE_FINAL_TYPE (KaPreferences, ka_preferences, ADW_TYPE_PREFERENCES_WINDOW);
enum {
PROP_0,
diff --git a/src/ka-preferences.h b/src/ka-preferences.h
index 23061d5..3a4dc0f 100644
--- a/src/ka-preferences.h
+++ b/src/ka-preferences.h
@@ -3,6 +3,7 @@
#ifndef KA_PREFERENCES_H
#define KA_PREFERENCES_H
+#include <adwaita.h>
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
@@ -13,7 +14,7 @@
G_BEGIN_DECLS
#define KA_TYPE_PREFERENCES (ka_preferences_get_type ())
-G_DECLARE_FINAL_TYPE (KaPreferences, ka_preferences, KA, PREFERENCES, GtkDialog)
+G_DECLARE_FINAL_TYPE (KaPreferences, ka_preferences, KA, PREFERENCES, AdwPreferencesWindow)
KaPreferences* ka_preferences_new (KaApplet *applet);
void ka_preferences_run (KaPreferences *self);
diff --git a/src/resources/ui/ka-preferences.ui b/src/resources/ui/ka-preferences.ui
index ff1eed0..c2fe424 100644
--- a/src/resources/ui/ka-preferences.ui
+++ b/src/resources/ui/ka-preferences.ui
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
+ <requires lib="libadwaita" version="1.0"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
- <template class="KaPreferences" parent="GtkDialog">
+ <template class="KaPreferences" parent="AdwPreferencesWindow">
<property name="hide-on-close">True</property>
<property name="margin-bottom">5</property>
<property name="margin-end">5</property>
<property name="margin-start">5</property>
<property name="margin-top">5</property>
- <child internal-child="content_area">
+ <child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]