source-dialog: Rename to GcalCalendarManagementDialog

parent c0720d00
......@@ -2,6 +2,7 @@
<gresources>
<gresource prefix="/org/gnome/calendar">
<file alias="alarm-row.ui" compressed="true">ui/alarm-row.ui</file>
<file alias="calendar-management-dialog.ui" compressed="true">ui/calendar-management-dialog.ui</file>
<file alias="calendar-popover.ui" compressed="true">ui/calendar-popover.ui</file>
<file alias="calendar-row.ui" compressed="true">ui/calendar-row.ui</file>
<file alias="date-chooser.ui" compressed="true">ui/date-chooser.ui</file>
......@@ -15,7 +16,6 @@
<file alias="online-account-row.ui" compressed="true">ui/online-account-row.ui</file>
<file alias="quick-add-popover.ui" compressed="true">ui/quick-add-popover.ui</file>
<file alias="search-popover.ui" compressed="true">ui/search-popover.ui</file>
<file alias="source-dialog.ui" compressed="true">ui/source-dialog.ui</file>
<file alias="time-selector.ui" compressed="true">ui/time-selector.ui</file>
<file alias="weather-settings.ui" compressed="true">ui/weather-settings.ui</file>
<file alias="week-header.ui" compressed="true">ui/week-header.ui</file>
......
......@@ -83,6 +83,7 @@ gresource = files('calendar.gresource.xml')
resource_data = files(
'theme/Adwaita.css',
'ui/alarm-row.ui',
'ui/calendar-management-dialog.ui',
'ui/calendar-row.ui',
'ui/date-chooser.ui',
'ui/date-selector.ui',
......@@ -95,7 +96,6 @@ resource_data = files(
'ui/multi-choice.ui',
'ui/quick-add-popover.ui',
'ui/search-popover.ui',
'ui/source-dialog.ui',
'ui/time-selector.ui',
'ui/weather-settings.ui',
'ui/week-header.ui',
......
......@@ -2,7 +2,7 @@
<!-- Generated with glade 3.18.1 -->
<interface>
<requires lib="gtk+" version="3.15"/>
<template class="GcalSourceDialog" parent="GtkDialog">
<template class="GcalCalendarManagementDialog" parent="GtkDialog">
<property name="width_request">450</property>
<property name="can_focus">False</property>
<property name="border_width">0</property>
......@@ -12,7 +12,7 @@
<property name="modal">True</property>
<property name="destroy_with_parent">True</property>
<property name="modal">True</property>
<signal name="response" handler="response_signal" object="GcalSourceDialog" swapped="no"/>
<signal name="response" handler="response_signal" object="GcalCalendarManagementDialog" swapped="no"/>
<child internal-child="vbox">
<object class="GtkBox" id="vbox">
<property name="orientation">vertical</property>
......@@ -26,7 +26,7 @@
<property name="halign">center</property>
<property name="valign">start</property>
<property name="transition_duration">100</property>
<signal name="notify::child-revealed" handler="notification_child_revealed_changed" object="GcalSourceDialog" swapped="no"/>
<signal name="notify::child-revealed" handler="notification_child_revealed_changed" object="GcalCalendarManagementDialog" swapped="no"/>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
......@@ -55,7 +55,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<signal name="clicked" handler="undo_remove_action" object="GcalSourceDialog" swapped="no"/>
<signal name="clicked" handler="undo_remove_action" object="GcalCalendarManagementDialog" swapped="no"/>
<style>
<class name="text-button"/>
</style>
......@@ -72,7 +72,7 @@
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="focus_on_click">False</property>
<signal name="clicked" handler="hide_notification" object="GcalSourceDialog" swapped="yes"/>
<signal name="clicked" handler="hide_notification" object="GcalCalendarManagementDialog" swapped="yes"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
......@@ -105,7 +105,7 @@
<property name="vexpand">True</property>
<property name="vhomogeneous">False</property>
<property name="transition_type">crossfade</property>
<signal name="notify::visible-child-name" handler="stack_visible_child_name_changed" object="GcalSourceDialog" swapped="no"/>
<signal name="notify::visible-child-name" handler="stack_visible_child_name_changed" object="GcalCalendarManagementDialog" swapped="no"/>
<child>
<object class="GtkScrolledWindow" id="main_scrolledwindow">
<property name="visible">True</property>
......@@ -150,7 +150,7 @@
<object class="GtkListBox" id="calendars_listbox">
<property name="visible">True</property>
<property name="selection_mode">none</property>
<signal name="row-activated" handler="calendar_listbox_row_activated" object="GcalSourceDialog" swapped="no"/>
<signal name="row-activated" handler="calendar_listbox_row_activated" object="GcalCalendarManagementDialog" swapped="no"/>
<style>
<class name="calendars-list"/>
</style>
......@@ -223,7 +223,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="draw_indicator">True</property>
<signal name="notify::active" handler="default_check_toggled" object="GcalSourceDialog" swapped="no"/>
<signal name="notify::active" handler="default_check_toggled" object="GcalCalendarManagementDialog" swapped="no"/>
<child>
<object class="GtkLabel" id="default_check_label">
<property name="visible">True</property>
......@@ -249,7 +249,7 @@
<property name="margin_top">6</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<signal name="clicked" handler="remove_button_clicked" object="GcalSourceDialog" swapped="no"/>
<signal name="clicked" handler="remove_button_clicked" object="GcalCalendarManagementDialog" swapped="no"/>
<style>
<class name="destructive-action"/>
</style>
......@@ -265,7 +265,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="draw_indicator">True</property>
<signal name="notify::active" handler="calendar_visible_check_toggled" object="GcalSourceDialog" swapped="no"/>
<signal name="notify::active" handler="calendar_visible_check_toggled" object="GcalCalendarManagementDialog" swapped="no"/>
<child>
<object class="GtkLabel" id="display_calendar_check_label">
<property name="visible">True</property>
......@@ -285,7 +285,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">start</property>
<signal name="color-set" handler="color_set" object="GcalSourceDialog" swapped="no"/>
<signal name="color-set" handler="color_set" object="GcalCalendarManagementDialog" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -297,7 +297,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<signal name="notify::text" handler="name_entry_text_changed" object="GcalSourceDialog" swapped="no"/>
<signal name="notify::text" handler="name_entry_text_changed" object="GcalCalendarManagementDialog" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -377,7 +377,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="settings_button_clicked" object="GcalSourceDialog" swapped="no"/>
<signal name="clicked" handler="settings_button_clicked" object="GcalCalendarManagementDialog" swapped="no"/>
</object>
<packing>
<property name="position">1</property>
......@@ -421,7 +421,7 @@
<property name="use_markup">True</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
<signal name="activate-link" handler="description_label_link_activated" object="GcalSourceDialog" swapped="no"/>
<signal name="activate-link" handler="description_label_link_activated" object="GcalCalendarManagementDialog" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -448,8 +448,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<signal name="notify::text" handler="url_entry_text_changed" object="GcalSourceDialog" swapped="no"/>
<signal name="activate" handler="calendar_address_activated" object="GcalSourceDialog" swapped="no"/>
<signal name="notify::text" handler="url_entry_text_changed" object="GcalCalendarManagementDialog" swapped="no"/>
<signal name="activate" handler="calendar_address_activated" object="GcalCalendarManagementDialog" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -537,7 +537,7 @@
<object class="GtkButton" id="back_button">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="back_button_clicked" object="GcalSourceDialog" swapped="no"/>
<signal name="clicked" handler="back_button_clicked" object="GcalCalendarManagementDialog" swapped="no"/>
<child>
<object class="GtkImage" id="back_button_image">
<property name="visible">True</property>
......@@ -551,7 +551,7 @@
<property name="label" translatable="yes">Cancel</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="cancel_button_clicked" object="GcalSourceDialog" swapped="no"/>
<signal name="clicked" handler="cancel_button_clicked" object="GcalCalendarManagementDialog" swapped="no"/>
</object>
<packing>
<property name="position">2</property>
......@@ -563,7 +563,7 @@
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="add_button_clicked" object="GcalSourceDialog" swapped="no"/>
<signal name="clicked" handler="add_button_clicked" object="GcalCalendarManagementDialog" swapped="no"/>
<style>
<class name="suggested-action"/>
</style>
......@@ -578,7 +578,7 @@
</template>
<object class="GtkDialog" id="credentials_dialog">
<property name="type_hint">dialog</property>
<property name="transient_for">GcalSourceDialog</property>
<property name="transient_for">GcalCalendarManagementDialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="credentials-dialog-vbox1">
<property name="orientation">vertical</property>
......@@ -659,7 +659,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="credential_button_clicked" object="GcalSourceDialog" swapped="no"/>
<signal name="clicked" handler="credential_button_clicked" object="GcalCalendarManagementDialog" swapped="no"/>
</object>
</child>
<child>
......@@ -668,7 +668,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="credential_button_clicked" object="GcalSourceDialog" swapped="no"/>
<signal name="clicked" handler="credential_button_clicked" object="GcalCalendarManagementDialog" swapped="no"/>
<style>
<class name="suggested-action"/>
</style>
......
......@@ -282,7 +282,7 @@
<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="GcalSourceDialog" id="source_dialog">
<object class="GcalCalendarManagementDialog" id="calendar_management_dialog">
<property name="visible">False</property>
<property name="transient_for">GcalWindow</property>
<signal name="delete-event" handler="gtk_widget_hide_on_delete" object="GcalWindow" swapped="no" />
......
......@@ -4,6 +4,7 @@ data/appdata/org.gnome.Calendar.appdata.xml.in
data/org.gnome.Calendar.desktop.in
data/org.gnome.calendar.gschema.xml.in
data/ui/alarm-row.ui
data/ui/calendar-management-dialog.ui
data/ui/calendar-popover.ui
data/ui/edit-dialog.ui
data/ui/help-overlay.ui
......@@ -12,7 +13,6 @@ data/ui/month-popover.ui
data/ui/month-view.ui
data/ui/quick-add-popover.ui
data/ui/search-popover.ui
data/ui/source-dialog.ui
data/ui/time-selector.ui
data/ui/weather-settings.ui
data/ui/window.ui
......@@ -20,7 +20,7 @@ data/ui/year-view.ui
src/main.c
src/core/gcal-event.c
src/core/gcal-manager.c
src/gui/calendar-management/gcal-source-dialog.c
src/gui/calendar-management/gcal-calendar-management-dialog.c
src/gui/gcal-application.c
src/gui/gcal-date-selector.c
src/gui/gcal-edit-dialog.c
......
......@@ -17,8 +17,7 @@
*/
#ifndef GCAL_SOURCE_DIALOG_H
#define GCAL_SOURCE_DIALOG_H
#pragma once
#include <glib-object.h>
#include "gcal-application.h"
......@@ -31,33 +30,34 @@ G_BEGIN_DECLS
#define GCAL_RESPONSE_REMOVE_SOURCE 2
#define GCAL_TYPE_SOURCE_DIALOG (gcal_source_dialog_get_type())
#define GCAL_TYPE_CALENDAR_MANAGEMENT_DIALOG (gcal_calendar_management_dialog_get_type())
G_DECLARE_FINAL_TYPE (GcalSourceDialog, gcal_source_dialog, GCAL, SOURCE_DIALOG, GtkDialog)
G_DECLARE_FINAL_TYPE (GcalCalendarManagementDialog,
gcal_calendar_management_dialog,
GCAL, CALENDAR_MANAGEMENT_DIALOG,
GtkDialog)
/**
* GcalSourceDialogMode:
* @GCAL_SOURCE_DIALOG_MODE_CREATE: creating a new calendar
* @GCAL_SOURCE_DIALOG_MODE_CREATE_WEB: creating a new web-based calendar
* @GCAL_SOURCE_DIALOG_MODE_EDIT: editing an existing calendar
* @GCAL_SOURCE_DIALOG_MODE_NORMAL: showing the list of calendars and online accounts
* GcalCalendarManagementDialogMode:
* @GCAL_CALENDAR_MANAGEMENT_MODE_CREATE: creating a new calendar
* @GCAL_CALENDAR_MANAGEMENT_MODE_CREATE_WEB: creating a new web-based calendar
* @GCAL_CALENDAR_MANAGEMENT_MODE_EDIT: editing an existing calendar
* @GCAL_CALENDAR_MANAGEMENT_MODE_NORMAL: showing the list of calendars and online accounts
*
* The current action of the #GcalSourceDialog
* The current action of the #GcalCalendarManagementDialog
*/
typedef enum
{
GCAL_SOURCE_DIALOG_MODE_CREATE,
GCAL_SOURCE_DIALOG_MODE_CREATE_WEB,
GCAL_SOURCE_DIALOG_MODE_EDIT,
GCAL_SOURCE_DIALOG_MODE_NORMAL
} GcalSourceDialogMode;
GCAL_CALENDAR_MANAGEMENT_MODE_CREATE,
GCAL_CALENDAR_MANAGEMENT_MODE_CREATE_WEB,
GCAL_CALENDAR_MANAGEMENT_MODE_EDIT,
GCAL_CALENDAR_MANAGEMENT_MODE_NORMAL
} GcalCalendarManagementDialogMode;
void gcal_source_dialog_set_mode (GcalSourceDialog *dialog,
GcalSourceDialogMode mode);
void gcal_calendar_management_dialog_set_mode (GcalCalendarManagementDialog *dialog,
GcalCalendarManagementDialogMode mode);
void gcal_source_dialog_set_source (GcalSourceDialog *dialog,
ESource *source);
void gcal_calendar_management_dialog_set_source (GcalCalendarManagementDialog *dialog,
ESource *source);
G_END_DECLS
#endif /* GCAL_SOURCE_DIALOG_H */
......@@ -19,6 +19,7 @@
#define G_LOG_DOMAIN "GcalWindow"
#include "gcal-calendar-management-dialog.h"
#include "gcal-calendar-popover.h"
#include "gcal-debug.h"
#include "gcal-edit-dialog.h"
......@@ -28,7 +29,6 @@
#include "gcal-month-view.h"
#include "gcal-quick-add-popover.h"
#include "gcal-search-button.h"
#include "gcal-source-dialog.h"
#include "gcal-view.h"
#include "gcal-weather-settings.h"
#include "gcal-week-view.h"
......@@ -138,7 +138,7 @@ struct _GcalWindow
/* calendar management */
GtkWidget *calendar_popover;
GtkWidget *source_dialog;
GtkWidget *calendar_management_dialog;
gint open_edit_dialog_timeout_id;
......@@ -314,11 +314,12 @@ on_show_calendars_action_activated (GSimpleAction *action,
{
GcalWindow *window = GCAL_WINDOW (user_data);
gcal_source_dialog_set_mode (GCAL_SOURCE_DIALOG (window->source_dialog), GCAL_SOURCE_DIALOG_MODE_NORMAL);
gcal_calendar_management_dialog_set_mode (GCAL_CALENDAR_MANAGEMENT_DIALOG (window->calendar_management_dialog),
GCAL_CALENDAR_MANAGEMENT_MODE_NORMAL);
gtk_widget_hide (window->calendar_popover);
gtk_widget_show (window->source_dialog);
gtk_widget_show (window->calendar_management_dialog);
}
static void
......@@ -874,7 +875,7 @@ gcal_window_constructed (GObject *object)
*/
g_object_bind_property (self, "context", self->calendar_popover, "context", G_BINDING_DEFAULT);
g_object_bind_property (self, "context", self->weather_settings, "context", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
g_object_bind_property (self, "context", self->source_dialog, "context", G_BINDING_DEFAULT);
g_object_bind_property (self, "context", self->calendar_management_dialog, "context", G_BINDING_DEFAULT);
g_object_bind_property (self, "context", self->week_view, "context", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
g_object_bind_property (self, "context", self->month_view, "context", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
g_object_bind_property (self, "context", self->year_view, "context", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
......@@ -990,13 +991,13 @@ gcal_window_class_init (GcalWindowClass *klass)
GObjectClass *object_class;
GtkWidgetClass *widget_class;
g_type_ensure (GCAL_TYPE_CALENDAR_MANAGEMENT_DIALOG);
g_type_ensure (GCAL_TYPE_CALENDAR_POPOVER);
g_type_ensure (GCAL_TYPE_EDIT_DIALOG);
g_type_ensure (GCAL_TYPE_MANAGER);
g_type_ensure (GCAL_TYPE_MONTH_VIEW);
g_type_ensure (GCAL_TYPE_QUICK_ADD_POPOVER);
g_type_ensure (GCAL_TYPE_SEARCH_BUTTON);
g_type_ensure (GCAL_TYPE_SOURCE_DIALOG);
g_type_ensure (GCAL_TYPE_WEATHER_SETTINGS);
g_type_ensure (GCAL_TYPE_WEEK_VIEW);
g_type_ensure (GCAL_TYPE_YEAR_VIEW);
......@@ -1052,7 +1053,7 @@ gcal_window_class_init (GcalWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, GcalWindow, month_view);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, quick_add_popover);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, search_button);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, source_dialog);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, calendar_management_dialog);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, today_button);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, views_overlay);
gtk_widget_class_bind_template_child (widget_class, GcalWindow, views_stack);
......
......@@ -102,7 +102,7 @@ sources = files(
'core/gcal-shell-search-provider.c',
'core/gcal-timer.c',
'core/gcal-time-zone-monitor.c',
'gui/calendar-management/gcal-source-dialog.c',
'gui/calendar-management/gcal-calendar-management-dialog.c',
'gui/gcal-application.c',
'gui/gcal-calendar-popover.c',
'gui/gcal-date-chooser.c',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment