[gnome-calendar] window: set the source to be edited
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] window: set the source to be edited
- Date: Mon, 25 May 2015 16:47:09 +0000 (UTC)
commit 557ec083dacb8a76a47f48df7eeb5b6232eb93c6
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 a3dd681..2d990df 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -878,11 +878,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]