window: show sources dialog
This commit is contained in:
committed by
Erick Pérez Castellanos
parent
3ef048c2a0
commit
6dccbfe431
@@ -364,6 +364,7 @@
|
|||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="relief">none</property>
|
<property name="relief">none</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
<signal name="clicked" handler="open_source_dialog" object="GcalWindow" swapped="no" />
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="add_button_box">
|
<object class="GtkBox" id="add_button_box">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
|||||||
@@ -196,6 +196,9 @@ static void remove_source (GcalManager *m
|
|||||||
ESource *source,
|
ESource *source,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
|
static void show_source_dialog (GtkButton *button,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
static void on_calendar_toggled (GObject *object,
|
static void on_calendar_toggled (GObject *object,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
@@ -852,6 +855,15 @@ remove_source (GcalManager *manager,
|
|||||||
g_hash_table_remove (priv->calendar_source_to_row, source);
|
g_hash_table_remove (priv->calendar_source_to_row, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
show_source_dialog (GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
GcalWindowPrivate *priv = gcal_window_get_instance_private (GCAL_WINDOW (user_data));
|
||||||
|
|
||||||
|
gtk_window_present (GTK_WINDOW (priv->source_dialog));
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_calendar_toggled (GObject *object,
|
on_calendar_toggled (GObject *object,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
@@ -1313,6 +1325,8 @@ gcal_window_class_init(GcalWindowClass *klass)
|
|||||||
gtk_widget_class_bind_template_child_private (widget_class, GcalWindow, notification_action_button);
|
gtk_widget_class_bind_template_child_private (widget_class, GcalWindow, notification_action_button);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GcalWindow, notification_close_button);
|
gtk_widget_class_bind_template_child_private (widget_class, GcalWindow, notification_close_button);
|
||||||
|
|
||||||
|
gtk_widget_class_bind_template_callback (widget_class, show_source_dialog);
|
||||||
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, key_pressed);
|
gtk_widget_class_bind_template_callback (widget_class, key_pressed);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, search_toggled);
|
gtk_widget_class_bind_template_callback (widget_class, search_toggled);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, search_changed);
|
gtk_widget_class_bind_template_callback (widget_class, search_changed);
|
||||||
|
|||||||
Reference in New Issue
Block a user