new-calendar-page: add callback for new calendar color chooser
The color chosen in the new calendar page is currently ignored when creating a new calendar, as described in #681. Added a callback similar to that used for the name text entry, allowing new calendars to be created with the chosen color. Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/681
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
1f08a10db8
commit
a93ae8778a
@@ -478,6 +478,14 @@ on_local_calendar_name_entry_text_changed_cb (GtkEntry *entry,
|
||||
update_local_source (self);
|
||||
}
|
||||
|
||||
static void
|
||||
on_local_calendar_color_button_color_changed_cb (GtkColorChooser *chooser,
|
||||
GParamSpec *pspec,
|
||||
GcalNewCalendarPage *self)
|
||||
{
|
||||
update_local_source (self);
|
||||
}
|
||||
|
||||
static void
|
||||
on_web_description_label_link_activated_cb (GtkLabel *label,
|
||||
gchar *uri,
|
||||
@@ -653,6 +661,7 @@ gcal_new_calendar_page_class_init (GcalNewCalendarPageClass *klass)
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_credential_entry_activate_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_file_chooser_button_file_set_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_local_calendar_name_entry_text_changed_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_local_calendar_color_button_color_changed_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_url_entry_text_changed_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_web_description_label_link_activated_cb);
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
<child>
|
||||
<object class="GtkColorButton" id="local_calendar_color_button">
|
||||
<property name="visible">True</property>
|
||||
<signal name="notify::color" handler="on_local_calendar_color_button_color_changed_cb" object="GcalNewCalendarPage" swapped="no" />
|
||||
</object>
|
||||
</child>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user