Event Editor: cleanup
This commit is contained in:
@@ -60,8 +60,6 @@ struct _GcalEventEditorDialog
|
|||||||
GcalEventEditorSection *schedule_section;
|
GcalEventEditorSection *schedule_section;
|
||||||
GtkWidget *source_label;
|
GtkWidget *source_label;
|
||||||
GcalEventEditorSection *summary_section;
|
GcalEventEditorSection *summary_section;
|
||||||
GtkWidget *titlebar;
|
|
||||||
GtkWidget *title_label;
|
|
||||||
|
|
||||||
|
|
||||||
GcalEventEditorSection *sections[4];
|
GcalEventEditorSection *sections[4];
|
||||||
@@ -602,8 +600,6 @@ gcal_event_editor_dialog_class_init (GcalEventEditorDialogClass *klass)
|
|||||||
gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, reminders_section);
|
gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, reminders_section);
|
||||||
gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, schedule_section);
|
gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, schedule_section);
|
||||||
gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, summary_section);
|
gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, summary_section);
|
||||||
gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, titlebar);
|
|
||||||
gtk_widget_class_bind_template_child (widget_class, GcalEventEditorDialog, title_label);
|
|
||||||
|
|
||||||
|
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
@@ -687,11 +683,13 @@ gcal_event_editor_dialog_set_event (GcalEventEditorDialog *self,
|
|||||||
if (self->sources_menu != NULL)
|
if (self->sources_menu != NULL)
|
||||||
g_menu_remove_all (self->sources_menu);
|
g_menu_remove_all (self->sources_menu);
|
||||||
|
|
||||||
/* dialog titlebar's title */
|
/* dialog's title */
|
||||||
if (new_event)
|
if (new_event)
|
||||||
gtk_label_set_label (GTK_LABEL (self->title_label), _("New Event"));
|
adw_dialog_set_title (ADW_DIALOG (self), _("New Event"));
|
||||||
|
else if (gcal_calendar_is_read_only (calendar))
|
||||||
|
adw_dialog_set_title (ADW_DIALOG (self), _("Event Details"));
|
||||||
else
|
else
|
||||||
gtk_label_set_label (GTK_LABEL (self->title_label), _("Edit Event"));
|
adw_dialog_set_title (ADW_DIALOG (self), _("Edit Event"));
|
||||||
|
|
||||||
g_list_store_remove_all (self->read_only_calendar_model);
|
g_list_store_remove_all (self->read_only_calendar_model);
|
||||||
if (gcal_calendar_is_read_only (calendar))
|
if (gcal_calendar_is_read_only (calendar))
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="AdwToolbarView">
|
<object class="AdwToolbarView">
|
||||||
<child type="top">
|
<child type="top">
|
||||||
<object class="GtkHeaderBar" id="titlebar">
|
<object class="AdwHeaderBar">
|
||||||
<property name="show-title-buttons">False</property>
|
<property name="show-start-title-buttons">False</property>
|
||||||
|
<property name="show-end-title-buttons">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="cancel_button">
|
<object class="GtkButton" id="cancel_button">
|
||||||
<property name="use-underline">True</property>
|
<property name="use-underline">True</property>
|
||||||
@@ -16,15 +17,6 @@
|
|||||||
<signal name="clicked" handler="on_cancel_button_clicked_cb" object="GcalEventEditorDialog" swapped="no"/>
|
<signal name="clicked" handler="on_cancel_button_clicked_cb" object="GcalEventEditorDialog" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child type="title">
|
|
||||||
<object class="GtkLabel" id="title_label">
|
|
||||||
<property name="ellipsize">middle</property>
|
|
||||||
<property name="max_width_chars">40</property>
|
|
||||||
<style>
|
|
||||||
<class name="title"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child type="end">
|
<child type="end">
|
||||||
<object class="GtkButton" id="done_button">
|
<object class="GtkButton" id="done_button">
|
||||||
<property name="use-underline">True</property>
|
<property name="use-underline">True</property>
|
||||||
|
|||||||
Reference in New Issue
Block a user