[gnome-calendar/calendar-editor] window: set the source to be edited
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/calendar-editor] window: set the source to be edited
- Date: Mon, 9 Feb 2015 15:58:44 +0000 (UTC)
commit f2cce20f41546facab71d7db919ac2acc09ff282
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Feb 9 13:58:36 2015 -0200
window: set the source to be edited
src/gcal-window.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 28c9c8d..d93c7eb 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -835,11 +835,32 @@ source_row_activated (GtkListBox *listbox,
gpointer user_data)
{
GcalWindowPrivate *priv = gcal_window_get_instance_private (GCAL_WINDOW (user_data));
+ ESource *source;
+ GList *l, *aux;
+
+ l = g_hash_table_get_keys (priv->calendar_source_to_row);
+
+ for (aux = l; aux != NULL; aux = aux->next)
+ {
+ GtkWidget *current_row;
+
+ current_row = g_hash_table_lookup (priv->calendar_source_to_row, aux->data);
+
+ /* Enable/disable the toggled calendar */
+ if (current_row == row)
+ {
+ source = aux->data;
+ break;
+ }
+ }
gcal_source_dialog_set_mode (GCAL_SOURCE_DIALOG (priv->source_dialog), GCAL_SOURCE_DIALOG_MODE_EDIT);
+ gcal_source_dialog_set_source (GCAL_SOURCE_DIALOG (priv->source_dialog), source);
gtk_dialog_run (GTK_DIALOG (priv->source_dialog));
gtk_widget_hide (priv->source_dialog);
+
+ g_list_free (l);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]