[gnome-calendar/wip/gbsneto/calendar-popover] window: toggle calendar visibility when selecting the row
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/wip/gbsneto/calendar-popover] window: toggle calendar visibility when selecting the row
- Date: Fri, 8 Jul 2016 23:23:11 +0000 (UTC)
commit 8e83ada9a7b83dd61bae62a0ef3d4097783cbc0e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Jul 8 20:22:41 2016 -0300
window: toggle calendar visibility when selecting the row
Instead of opening the calendar for editing, toggle its visibility
when clicking the listbox row.
src/gcal-window.c | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index d99c4cb..369880c 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]