notifications-dialog: Make dialog adaptive
This commit is contained in:
parent
6df43c5b4f
commit
ed6ddf162a
3 changed files with 8 additions and 6 deletions
|
@ -49,7 +49,7 @@ static void update_sound_switch (CcAppNotificationsDialog *dialog);
|
||||||
static void update_notification_switch (CcAppNotificationsDialog *dialog);
|
static void update_notification_switch (CcAppNotificationsDialog *dialog);
|
||||||
|
|
||||||
struct _CcAppNotificationsDialog {
|
struct _CcAppNotificationsDialog {
|
||||||
GtkDialog parent;
|
HdyDialog parent;
|
||||||
|
|
||||||
GSettings *settings;
|
GSettings *settings;
|
||||||
GSettings *master_settings;
|
GSettings *master_settings;
|
||||||
|
@ -65,7 +65,7 @@ struct _CcAppNotificationsDialog {
|
||||||
GtkWidget *lock_screen_content_switch;
|
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
|
static void
|
||||||
on_perm_store_set_done (GObject *source_object,
|
on_perm_store_set_done (GObject *source_object,
|
||||||
|
|
|
@ -20,11 +20,14 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#define HANDY_USE_UNSTABLE_API
|
||||||
|
#include <handy.h>
|
||||||
|
#undef HANDY_USE_UNSTABLE_API
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define CC_TYPE_APP_NOTIFICATIONS_DIALOG (cc_app_notifications_dialog_get_type ())
|
#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,
|
CcAppNotificationsDialog *cc_app_notifications_dialog_new (const gchar *app_id,
|
||||||
const gchar *title,
|
const gchar *title,
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<interface>
|
<interface>
|
||||||
<template class="CcAppNotificationsDialog" parent="GtkDialog">
|
<template class="CcAppNotificationsDialog" parent="HdyDialog">
|
||||||
<property name="width_request">450</property>
|
<property name="width_request">360</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="resizable">False</property>
|
|
||||||
<property name="modal">True</property>
|
<property name="modal">True</property>
|
||||||
<property name="type_hint">dialog</property>
|
<property name="type_hint">dialog</property>
|
||||||
<signal name="response" handler="gtk_widget_destroy" swapped="no"/>
|
<signal name="response" handler="gtk_widget_destroy" swapped="no"/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue