aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-19 06:50:55 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-01-19 06:50:55 +0800
commit2878a355805ec60f521ea8816a738a0ae0a75893 (patch)
tree8b1f11a299b795e3d20b893f54bb7da23feb7bc0 /modules
parentd6ce64dc1925f5efb9fdfbc503400b7def2e7cfb (diff)
downloadgsoc2013-evolution-2878a355805ec60f521ea8816a738a0ae0a75893.tar
gsoc2013-evolution-2878a355805ec60f521ea8816a738a0ae0a75893.tar.gz
gsoc2013-evolution-2878a355805ec60f521ea8816a738a0ae0a75893.tar.bz2
gsoc2013-evolution-2878a355805ec60f521ea8816a738a0ae0a75893.tar.lz
gsoc2013-evolution-2878a355805ec60f521ea8816a738a0ae0a75893.tar.xz
gsoc2013-evolution-2878a355805ec60f521ea8816a738a0ae0a75893.tar.zst
gsoc2013-evolution-2878a355805ec60f521ea8816a738a0ae0a75893.zip
Use e_source_selector_get_source_by_path().
Allows Evolution to not have to know the ESource column number in ESourceSelector tree models. Backported from "account-mgmt" branch.
Diffstat (limited to 'modules')
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c9
-rw-r--r--modules/calendar/e-memo-shell-sidebar.c9
-rw-r--r--modules/calendar/e-task-shell-sidebar.c9
3 files changed, 3 insertions, 24 deletions
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index 45bb5a37fb..1af16b3b8e 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -325,15 +325,8 @@ cal_shell_sidebar_row_changed_cb (ECalShellSidebar *cal_shell_sidebar,
ESourceSelector *selector;
ESource *source;
- /* XXX ESourceSelector's underlying tree store has only one
- * column: ESource objects. While we're not supposed to
- * know this, listening for "row-changed" signals from
- * the model is easier to deal with than the selector's
- * "selection-changed" signal, which doesn't tell you
- * _which_ row changed. */
-
selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar);
- gtk_tree_model_get (tree_model, tree_iter, 0, &source, -1);
+ source = e_source_selector_get_source_by_path (selector, tree_path);
/* XXX This signal gets emitted a lot while the model is being
* rebuilt, during which time we won't get a valid ESource.
diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c
index c22cff35dc..31304948f9 100644
--- a/modules/calendar/e-memo-shell-sidebar.c
+++ b/modules/calendar/e-memo-shell-sidebar.c
@@ -333,15 +333,8 @@ memo_shell_sidebar_row_changed_cb (EMemoShellSidebar *memo_shell_sidebar,
ESourceSelector *selector;
ESource *source;
- /* XXX ESourceSelector's underlying tree store has only one
- * column: ESource objects. While we're not supposed to
- * know this, listening for "row-changed" signals from
- * the model is easier to deal with than the selector's
- * "selection-changed" signal, which doesn't tell you
- * _which_ row changed. */
-
selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar);
- gtk_tree_model_get (tree_model, tree_iter, 0, &source, -1);
+ source = e_source_selector_get_source_by_path (selector, tree_path);
/* XXX This signal gets emitted a lot while the model is being
* rebuilt, during which time we won't get a valid ESource.
diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c
index a688da41cd..e00159026c 100644
--- a/modules/calendar/e-task-shell-sidebar.c
+++ b/modules/calendar/e-task-shell-sidebar.c
@@ -333,15 +333,8 @@ task_shell_sidebar_row_changed_cb (ETaskShellSidebar *task_shell_sidebar,
ESourceSelector *selector;
ESource *source;
- /* XXX ESourceSelector's underlying tree store has only one
- * column: ESource objects. While we're not supposed to
- * know this, listening for "row-changed" signals from
- * the model is easier to deal with than the selector's
- * "selection-changed" signal, which doesn't tell you
- * _which_ row changed. */
-
selector = e_task_shell_sidebar_get_selector (task_shell_sidebar);
- gtk_tree_model_get (tree_model, tree_iter, 0, &source, -1);
+ source = e_source_selector_get_source_by_path (selector, tree_path);
/* XXX This signal gets emitted a lot while the model is being
* rebuilt, during which time we won't get a valid ESource.