[evolution] Bug #670073 - Non-working help button in Preferences dialog
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #670073 - Non-working help button in Preferences dialog
- Date: Wed, 15 Feb 2012 12:22:34 +0000 (UTC)
commit 0b8999bfe5e93cfbcbb6771105fd53231883f795
Author: Milan Crha <mcrha redhat com>
Date: Wed Feb 15 13:21:19 2012 +0100
Bug #670073 - Non-working help button in Preferences dialog
widgets/misc/e-preferences-window.c | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/widgets/misc/e-preferences-window.c b/widgets/misc/e-preferences-window.c
index 5b329eb..c246abb 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]