aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-02-15 20:21:19 +0800
committerMilan Crha <mcrha@redhat.com>2012-02-15 20:22:07 +0800
commit0b8999bfe5e93cfbcbb6771105fd53231883f795 (patch)
treea670259812eb6dfd1b0751ea15dfaecdcd0c195b /widgets
parent9111ea71c2d29e754e659e628853843503cf7358 (diff)
downloadgsoc2013-evolution-0b8999bfe5e93cfbcbb6771105fd53231883f795.tar
gsoc2013-evolution-0b8999bfe5e93cfbcbb6771105fd53231883f795.tar.gz
gsoc2013-evolution-0b8999bfe5e93cfbcbb6771105fd53231883f795.tar.bz2
gsoc2013-evolution-0b8999bfe5e93cfbcbb6771105fd53231883f795.tar.lz
gsoc2013-evolution-0b8999bfe5e93cfbcbb6771105fd53231883f795.tar.xz
gsoc2013-evolution-0b8999bfe5e93cfbcbb6771105fd53231883f795.tar.zst
gsoc2013-evolution-0b8999bfe5e93cfbcbb6771105fd53231883f795.zip
Bug #670073 - Non-working help button in Preferences dialog
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/e-preferences-window.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/widgets/misc/e-preferences-window.c b/widgets/misc/e-preferences-window.c
index 5b329ebb27..c246abba13 100644
--- a/widgets/misc/e-preferences-window.c
+++ b/widgets/misc/e-preferences-window.c
@@ -127,9 +127,37 @@ preferences_window_load_pixbuf (const gchar *icon_name)
}
static void
-preferences_window_help_clicked_cb (GtkWindow *window)
+preferences_window_help_clicked_cb (EPreferencesWindow *window)
{
- e_display_help (window, "config-prefs");
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GList *list;
+ gchar *page = NULL;
+
+ g_return_if_fail (window != NULL);
+
+ model = GTK_TREE_MODEL (window->priv->filter);
+ list = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (window->priv->icon_view));
+ if (list != NULL) {
+ gtk_tree_model_get_iter (model, &iter, list->data);
+ gtk_tree_model_get (model, &iter, COLUMN_ID, &page, -1);
+ } else if (gtk_tree_model_get_iter_first (model, &iter)) {
+ gint page_index, current_index;
+
+ current_index = gtk_notebook_get_current_page (GTK_NOTEBOOK (window->priv->notebook));
+ do {
+ gtk_tree_model_get (model, &iter, COLUMN_PAGE, &page_index, -1);
+
+ if (page_index == current_index) {
+ gtk_tree_model_get (model, &iter, COLUMN_ID, &page, -1);
+ break;
+ }
+ } while (gtk_tree_model_iter_next (model, &iter));
+ }
+
+ e_display_help (GTK_WINDOW (window), page ? page : "index");
+
+ g_free (page);
}
static void