calendar-management: Make it an AdwDialog
So it can behave like a bottom sheet when collapsed.
This commit is contained in:
@@ -53,7 +53,7 @@ typedef enum
|
||||
|
||||
struct _GcalCalendarManagementDialog
|
||||
{
|
||||
AdwWindow parent;
|
||||
AdwDialog parent;
|
||||
|
||||
AdwNavigationView *navigation_view;
|
||||
|
||||
@@ -73,7 +73,7 @@ static void on_page_switched_cb (GcalCalendarMa
|
||||
GcalCalendar *calendar,
|
||||
GcalCalendarManagementDialog *self);
|
||||
|
||||
G_DEFINE_TYPE (GcalCalendarManagementDialog, gcal_calendar_management_dialog, ADW_TYPE_WINDOW)
|
||||
G_DEFINE_TYPE (GcalCalendarManagementDialog, gcal_calendar_management_dialog, ADW_TYPE_DIALOG)
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
@@ -34,6 +34,6 @@ G_BEGIN_DECLS
|
||||
G_DECLARE_FINAL_TYPE (GcalCalendarManagementDialog,
|
||||
gcal_calendar_management_dialog,
|
||||
GCAL, CALENDAR_MANAGEMENT_DIALOG,
|
||||
AdwWindow)
|
||||
AdwDialog)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GcalCalendarManagementDialog" parent="AdwWindow">
|
||||
<template class="GcalCalendarManagementDialog" parent="AdwDialog">
|
||||
<property name="title" translatable="yes">Calendar Settings</property>
|
||||
<property name="width-request">360</property>
|
||||
<property name="default-width">500</property>
|
||||
<property name="default-height">600</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="hide-on-close">True</property>
|
||||
<property name="content-width">500</property>
|
||||
<property name="content-height">600</property>
|
||||
<child>
|
||||
<object class="AdwNavigationView" id="navigation_view">
|
||||
<signal name="popped" handler="on_navigation_view_popped_cb" object="GcalCalendarManagementDialog" swapped="no" />
|
||||
|
||||
@@ -343,9 +343,9 @@ on_show_calendars_action_activated (GSimpleAction *action,
|
||||
GVariant *param,
|
||||
gpointer user_data)
|
||||
{
|
||||
GcalWindow *window = GCAL_WINDOW (user_data);
|
||||
GcalWindow *self = GCAL_WINDOW (user_data);
|
||||
|
||||
gtk_widget_set_visible (window->calendar_management_dialog, TRUE);
|
||||
adw_dialog_present (ADW_DIALOG (self->calendar_management_dialog), GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -308,10 +308,9 @@
|
||||
<signal name="edit-event" handler="edit_event" object="GcalWindow" swapped="no"/>
|
||||
<signal name="closed" handler="close_new_event_widget" object="GcalWindow" swapped="no"/>
|
||||
</object>
|
||||
<object class="GcalCalendarManagementDialog" id="calendar_management_dialog">
|
||||
<property name="visible">False</property>
|
||||
<property name="transient_for">GcalWindow</property>
|
||||
</object>
|
||||
|
||||
<object class="GcalCalendarManagementDialog" id="calendar_management_dialog" />
|
||||
|
||||
<object class="GcalEventEditorDialog" id="event_editor">
|
||||
<property name="visible">False</property>
|
||||
<property name="transient_for">GcalWindow</property>
|
||||
|
||||
Reference in New Issue
Block a user