gui/window: Reuse calendar management dialog

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/712>
This commit is contained in:
Hari Rana
2026-03-24 16:14:47 +00:00
committed by Marge Bot
parent 8012dc4404
commit 98a993de4d
2 changed files with 6 additions and 2 deletions
+2
View File
@@ -366,6 +366,8 @@ $GcalEventEditorDialog event_editor {
remove-event => $on_event_editor_dialog_remove_event_cb(template) not-swapped; remove-event => $on_event_editor_dialog_remove_event_cb(template) not-swapped;
} }
$GcalCalendarManagementDialog calendar_management {}
menu menu { menu menu {
section { section {
item { item {
+4 -2
View File
@@ -117,6 +117,7 @@ struct _GcalWindow
GtkWidget *menu_button; GtkWidget *menu_button;
GcalEventEditorDialog *event_editor; GcalEventEditorDialog *event_editor;
GcalCalendarManagementDialog *calendar_management;
GtkWidget *import_dialog; GtkWidget *import_dialog;
GtkWidget *last_focused_widget; GtkWidget *last_focused_widget;
@@ -537,9 +538,8 @@ on_show_calendars_action_activated (GSimpleAction *action,
gpointer user_data) gpointer user_data)
{ {
GcalWindow *self = GCAL_WINDOW (user_data); GcalWindow *self = GCAL_WINDOW (user_data);
GcalCalendarManagementDialog *dialog = gcal_calendar_management_dialog_new ();
adw_dialog_present (ADW_DIALOG (dialog), GTK_WIDGET (self)); adw_dialog_present (ADW_DIALOG (self->calendar_management), GTK_WIDGET (self));
} }
static void static void
@@ -1335,6 +1335,7 @@ gcal_window_class_init (GcalWindowClass *klass)
g_type_ensure (GCAL_TYPE_CALENDAR_NAVIGATION_BUTTON); g_type_ensure (GCAL_TYPE_CALENDAR_NAVIGATION_BUTTON);
g_type_ensure (GCAL_TYPE_DATE_CHOOSER); g_type_ensure (GCAL_TYPE_DATE_CHOOSER);
g_type_ensure (GCAL_TYPE_EVENT_EDITOR_DIALOG); g_type_ensure (GCAL_TYPE_EVENT_EDITOR_DIALOG);
g_type_ensure (GCAL_TYPE_CALENDAR_MANAGEMENT_DIALOG);
g_type_ensure (GCAL_TYPE_MANAGER); g_type_ensure (GCAL_TYPE_MANAGER);
g_type_ensure (GCAL_TYPE_MONTH_VIEW); g_type_ensure (GCAL_TYPE_MONTH_VIEW);
g_type_ensure (GCAL_TYPE_QUICK_ADD_POPOVER); g_type_ensure (GCAL_TYPE_QUICK_ADD_POPOVER);
@@ -1383,6 +1384,7 @@ gcal_window_class_init (GcalWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, GcalWindow, calendars_list); gtk_widget_class_bind_template_child (widget_class, GcalWindow, calendars_list);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, date_chooser); gtk_widget_class_bind_template_child (widget_class, GcalWindow, date_chooser);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, event_editor); gtk_widget_class_bind_template_child (widget_class, GcalWindow, event_editor);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, calendar_management);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, header_bar); gtk_widget_class_bind_template_child (widget_class, GcalWindow, header_bar);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, menu_button); gtk_widget_class_bind_template_child (widget_class, GcalWindow, menu_button);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, month_view); gtk_widget_class_bind_template_child (widget_class, GcalWindow, month_view);