window: toggle calendar visibility when selecting the row

Instead of opening the calendar for editing, toggle its visibility
when clicking the listbox row.
This commit is contained in:
Georges Basile Stavracas Neto
2016-07-08 20:59:03 -03:00
parent 33d9901c49
commit 3d033e1f5f
+4 -13
View File
@@ -910,21 +910,12 @@ source_row_activated (GtkListBox *listbox,
GtkListBoxRow *row,
gpointer user_data)
{
GcalWindow *window;
ESource *source;
GtkWidget *check;
window = GCAL_WINDOW (user_data);
source = g_object_get_data (G_OBJECT (row), "source");
check = g_object_get_data (G_OBJECT (row), "check");
if (source == NULL)
return;
gcal_source_dialog_set_source (GCAL_SOURCE_DIALOG (window->source_dialog), source);
gcal_source_dialog_set_mode (GCAL_SOURCE_DIALOG (window->source_dialog), GCAL_SOURCE_DIALOG_MODE_EDIT);
gtk_widget_hide (window->calendar_popover);
gtk_widget_show (window->source_dialog);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check),
!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)));
}
static void