[gnome-control-center] notifications-dialog: Make dialog adaptive
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] notifications-dialog: Make dialog adaptive
- Date: Fri, 26 Jul 2019 01:19:47 +0000 (UTC)
commit ed6ddf162a1affca66728377ce73fadf2dcb32ce
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Wed Jul 17 19:14:57 2019 +0530
notifications-dialog: Make dialog adaptive
panels/notifications/cc-app-notifications-dialog.c | 4 ++--
panels/notifications/cc-app-notifications-dialog.h | 5 ++++-
panels/notifications/cc-app-notifications-dialog.ui | 5 ++---
3 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/panels/notifications/cc-app-notifications-dialog.c
b/panels/notifications/cc-app-notifications-dialog.c
index 4d8ffddb9..c7850f321 100644
--- a/panels/notifications/cc-app-notifications-dialog.c
+++ b/panels/notifications/cc-app-notifications-dialog.c
@@ -49,7 +49,7 @@ static void update_sound_switch (CcAppNotificationsDialog *dialog);
static void update_notification_switch (CcAppNotificationsDialog *dialog);
struct _CcAppNotificationsDialog {
- GtkDialog parent;
+ HdyDialog parent;
GSettings *settings;
GSettings *master_settings;
@@ -65,7 +65,7 @@ struct _CcAppNotificationsDialog {
GtkWidget *lock_screen_content_switch;
};
-G_DEFINE_TYPE (CcAppNotificationsDialog, cc_app_notifications_dialog, GTK_TYPE_DIALOG)
+G_DEFINE_TYPE (CcAppNotificationsDialog, cc_app_notifications_dialog, HDY_TYPE_DIALOG)
static void
on_perm_store_set_done (GObject *source_object,
diff --git a/panels/notifications/cc-app-notifications-dialog.h
b/panels/notifications/cc-app-notifications-dialog.h
index 99b1e3800..3cb1a3b5a 100644
--- a/panels/notifications/cc-app-notifications-dialog.h
+++ b/panels/notifications/cc-app-notifications-dialog.h
@@ -20,11 +20,14 @@
#pragma once
#include <gtk/gtk.h>
+#define HANDY_USE_UNSTABLE_API
+#include <handy.h>
+#undef HANDY_USE_UNSTABLE_API
G_BEGIN_DECLS
#define CC_TYPE_APP_NOTIFICATIONS_DIALOG (cc_app_notifications_dialog_get_type ())
-G_DECLARE_FINAL_TYPE (CcAppNotificationsDialog, cc_app_notifications_dialog, CC, APP_NOTIFICATIONS_DIALOG,
GtkDialog)
+G_DECLARE_FINAL_TYPE (CcAppNotificationsDialog, cc_app_notifications_dialog, CC, APP_NOTIFICATIONS_DIALOG,
HdyDialog)
CcAppNotificationsDialog *cc_app_notifications_dialog_new (const gchar *app_id,
const gchar *title,
diff --git a/panels/notifications/cc-app-notifications-dialog.ui
b/panels/notifications/cc-app-notifications-dialog.ui
index 95a11a9e7..b3c8f49dc 100644
--- a/panels/notifications/cc-app-notifications-dialog.ui
+++ b/panels/notifications/cc-app-notifications-dialog.ui
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <template class="CcAppNotificationsDialog" parent="GtkDialog">
- <property name="width_request">450</property>
+ <template class="CcAppNotificationsDialog" parent="HdyDialog">
+ <property name="width_request">360</property>
<property name="can_focus">False</property>
- <property name="resizable">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<signal name="response" handler="gtk_widget_destroy" swapped="no"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]