event-editor: Turn into an AdwDialog
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
|
||||
struct _GcalEventEditorDialog
|
||||
{
|
||||
AdwWindow parent;
|
||||
AdwDialog parent;
|
||||
|
||||
GtkWidget *cancel_button;
|
||||
GtkWidget *delete_button;
|
||||
@@ -85,7 +85,7 @@ struct _GcalEventEditorDialog
|
||||
gboolean writable;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GcalEventEditorDialog, gcal_event_editor_dialog, ADW_TYPE_WINDOW)
|
||||
G_DEFINE_TYPE (GcalEventEditorDialog, gcal_event_editor_dialog, ADW_TYPE_DIALOG)
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -542,7 +542,7 @@ gcal_event_editor_dialog_finalize (GObject *object)
|
||||
}
|
||||
|
||||
static void
|
||||
gcal_event_editor_dialog_constructed (GObject* object)
|
||||
gcal_event_editor_dialog_constructed (GObject *object)
|
||||
{
|
||||
const GActionEntry action_entries[] =
|
||||
{
|
||||
@@ -556,7 +556,7 @@ gcal_event_editor_dialog_constructed (GObject* object)
|
||||
/* chaining up */
|
||||
G_OBJECT_CLASS (gcal_event_editor_dialog_parent_class)->constructed (object);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (object), "");
|
||||
adw_dialog_set_title (ADW_DIALOG (object), "");
|
||||
|
||||
/* Actions */
|
||||
self->action_group = g_simple_action_group_new ();
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GCAL_TYPE_EVENT_EDITOR_DIALOG (gcal_event_editor_dialog_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GcalEventEditorDialog, gcal_event_editor_dialog, GCAL, EVENT_EDITOR_DIALOG, AdwWindow);
|
||||
G_DECLARE_FINAL_TYPE (GcalEventEditorDialog, gcal_event_editor_dialog, GCAL, EVENT_EDITOR_DIALOG, AdwDialog);
|
||||
|
||||
GtkWidget* gcal_event_editor_dialog_new (void);
|
||||
|
||||
|
||||
@@ -1,21 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GcalEventEditorDialog" parent="AdwWindow">
|
||||
<property name="modal">True</property>
|
||||
<property name="default-width">700</property>
|
||||
<property name="default-height">1000</property>
|
||||
<property name="destroy-with-parent">True</property>
|
||||
<property name="hide-on-close">True</property>
|
||||
<child>
|
||||
<object class="GtkShortcutController">
|
||||
<child>
|
||||
<object class="GtkShortcut">
|
||||
<property name="trigger">Escape</property>
|
||||
<property name="action">action(window.close)</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<template class="GcalEventEditorDialog" parent="AdwDialog">
|
||||
<property name="content-width">700</property>
|
||||
<property name="content-height">1000</property>
|
||||
|
||||
<child>
|
||||
<object class="AdwToolbarView">
|
||||
|
||||
Reference in New Issue
Block a user