[balsa/gtk3] Replace "ghelp:" help URIs by "help:" URIs



commit 8f241316bdb45c7adf7fdfe0db23d5eba272c61d
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Wed May 1 19:44:56 2013 -0400

    Replace "ghelp:" help URIs by "help:" URIs
    
        * libbalsa/identity.c (help_ident_cb):
        * libbalsa/smtp-server.c (smtp_server_response):
        * src/address-book-config.c (help_button_cb):
        * src/filter-edit-callbacks.c (condition_dialog_response),
        (fe_dialog_response):
        * src/filter-run-callbacks.c (fr_dialog_response):
        * src/folder-conf.c (folder_conf_response):
        * src/main-window.c:
        * src/pref-manager.c (balsa_help_pbox_display):
        * src/toolbar-prefs.c (tp_dialog_response_cb):

 ChangeLog                   |   15 +++++++++++++++
 libbalsa/identity.c         |    2 +-
 libbalsa/smtp-server.c      |    3 ++-
 src/address-book-config.c   |    2 +-
 src/filter-edit-callbacks.c |    4 ++--
 src/filter-run-callbacks.c  |    2 +-
 src/folder-conf.c           |    2 +-
 src/main-window.c           |    6 +++---
 src/pref-manager.c          |   24 +++++++++++++++++-------
 src/toolbar-prefs.c         |    2 +-
 10 files changed, 44 insertions(+), 18 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ce1a4e2..8bf0d1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2013-05-01  Peter Bloomfield
+
+       Replace "ghelp:" help URIs by "help:" URIs
+
+       * libbalsa/identity.c (help_ident_cb):
+       * libbalsa/smtp-server.c (smtp_server_response):
+       * src/address-book-config.c (help_button_cb):
+       * src/filter-edit-callbacks.c (condition_dialog_response),
+       (fe_dialog_response):
+       * src/filter-run-callbacks.c (fr_dialog_response):
+       * src/folder-conf.c (folder_conf_response):
+       * src/main-window.c:
+       * src/pref-manager.c (balsa_help_pbox_display):
+       * src/toolbar-prefs.c (tp_dialog_response_cb):
+
 2013-04-30  Peter Bloomfield
 
        * configure.ac: fix broken NetworkManager-glib logic.
diff --git a/libbalsa/identity.c b/libbalsa/identity.c
index 1bb4546..bb8d880 100644
--- a/libbalsa/identity.c
+++ b/libbalsa/identity.c
@@ -1670,7 +1670,7 @@ help_ident_cb(GtkWidget * widget)
     GError *err = NULL;
 
     screen = gtk_widget_get_screen(widget);
-    gtk_show_uri(screen, "ghelp:balsa?identities",
+    gtk_show_uri(screen, "help:balsa/identities",
                  gtk_get_current_event_time(), &err);
 
     if (err) {
diff --git a/libbalsa/smtp-server.c b/libbalsa/smtp-server.c
index 85c277b..8c9b04f 100644
--- a/libbalsa/smtp-server.c
+++ b/libbalsa/smtp-server.c
@@ -417,7 +417,8 @@ smtp_server_response(GtkDialog * dialog, gint response,
     switch (response) {
     case GTK_RESPONSE_HELP:
         screen = gtk_widget_get_screen(GTK_WIDGET(dialog));
-        gtk_show_uri(screen, "ghelp:balsa?smtp-server-config",
+        gtk_show_uri(screen,
+                     "help:preferences-mail-options#smtp-server-config",
                      gtk_get_current_event_time(), &error);
         if (error) {
             libbalsa_information(LIBBALSA_INFORMATION_WARNING,
diff --git a/src/address-book-config.c b/src/address-book-config.c
index 92417d3..1e2c8e0 100644
--- a/src/address-book-config.c
+++ b/src/address-book-config.c
@@ -527,7 +527,7 @@ help_button_cb(AddressBookConfig * abc)
     GError *err = NULL;
 
     screen = gtk_widget_get_screen(abc->window);
-    gtk_show_uri(screen, "ghelp:balsa?preferences-address-books",
+    gtk_show_uri(screen, "help:balsa/preferences-address-books",
                  gtk_get_current_event_time(), &err);
 
     if (err) {
diff --git a/src/filter-edit-callbacks.c b/src/filter-edit-callbacks.c
index 01b2877..f192ba3 100644
--- a/src/filter-edit-callbacks.c
+++ b/src/filter-edit-callbacks.c
@@ -895,7 +895,7 @@ condition_dialog_response(GtkWidget * dialog, gint response,
         break;
     case GTK_RESPONSE_HELP:     /* Help button */
         screen = gtk_widget_get_screen(dialog);
-        gtk_show_uri(screen, "ghelp:balsa?win-condition",
+        gtk_show_uri(screen, "help:balsa/win-filters#win-condition",
                      gtk_get_current_event_time(), &err);
        if (err) {
            balsa_information_parented(GTK_WINDOW(dialog),
@@ -1494,7 +1494,7 @@ fe_dialog_response(GtkWidget * dialog, gint response, gpointer data)
 
     case GTK_RESPONSE_HELP:     /* Help button */
         screen = gtk_widget_get_screen(dialog);
-        gtk_show_uri(screen, "ghelp:balsa?win-filters",
+        gtk_show_uri(screen, "help:balsa/win-filters",
                      gtk_get_current_event_time(), &err);
        if (err) {
            balsa_information_parented(GTK_WINDOW(dialog),
diff --git a/src/filter-run-callbacks.c b/src/filter-run-callbacks.c
index 2860cae..827a895 100644
--- a/src/filter-run-callbacks.c
+++ b/src/filter-run-callbacks.c
@@ -178,7 +178,7 @@ void fr_dialog_response(GtkWidget * widget, gint response,
        break;
     case GTK_RESPONSE_HELP:     /* Help button */
         screen = gtk_widget_get_screen(widget);
-        gtk_show_uri(screen, "ghelp:balsa?win-run-filters",
+        gtk_show_uri(screen, "help:balsa/win-run-filters",
                      gtk_get_current_event_time(), &err);
        if (err) {
            balsa_information_parented(GTK_WINDOW(widget),
diff --git a/src/folder-conf.c b/src/folder-conf.c
index b37f853..35dae75 100644
--- a/src/folder-conf.c
+++ b/src/folder-conf.c
@@ -105,7 +105,7 @@ folder_conf_response(GtkDialog * dialog, int response,
     switch (response) {
     case GTK_RESPONSE_HELP:
         screen = gtk_widget_get_screen(GTK_WIDGET(dialog));
-        gtk_show_uri(screen, "ghelp:balsa?folder-config",
+        gtk_show_uri(screen, "help:balsa/folder-config",
                      gtk_get_current_event_time(), &err);
         if (err) {
             balsa_information(LIBBALSA_INFORMATION_WARNING,
diff --git a/src/main-window.c b/src/main-window.c
index 1e64653..649c870 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -449,7 +449,7 @@ static const GtkActionEntry entries[] = {
      N_("Create and set current identities"),
      G_CALLBACK(bw_ident_manage_dialog_cb)},
     /* Help menu items */
-    {"TableOfContents", GTK_STOCK_HELP, N_("_Contents"), "F1",
+    {"TableOfContents", GTK_STOCK_HELP, N_("_User's Guide"), "F1",
      N_("Table of Contents"), G_CALLBACK(bw_contents_cb)},
     {"MailboxTab1", NULL, NULL, "<alt>1", NULL,
      G_CALLBACK(bw_mailbox_tab_n_cb)},
@@ -2797,7 +2797,7 @@ bw_contents_cb(GtkAction * action, gpointer user_data)
     GError *err = NULL;
 
     screen = gtk_window_get_screen(user_data);
-    gtk_show_uri(screen, "ghelp:balsa", gtk_get_current_event_time(),
+    gtk_show_uri(screen, "help:balsa", gtk_get_current_event_time(),
                  &err);
     if (err) {
         balsa_information(LIBBALSA_INFORMATION_WARNING,
@@ -4727,7 +4727,7 @@ bw_find_real(BalsaWindow * window, BalsaIndex * bindex, gboolean again)
                 break;
            case GTK_RESPONSE_HELP:
                 screen = gtk_widget_get_screen(GTK_WIDGET(window));
-                gtk_show_uri(screen, "ghelp:balsa?win-search",
+                gtk_show_uri(screen, "help:balsa/win-search",
                              gtk_get_current_event_time(), &err);
                if (err) {
                    balsa_information(LIBBALSA_INFORMATION_WARNING,
diff --git a/src/pref-manager.c b/src/pref-manager.c
index c0b7dca..30b881f 100644
--- a/src/pref-manager.c
+++ b/src/pref-manager.c
@@ -3435,34 +3435,44 @@ balsa_help_pbox_display(void)
     GtkTreeSelection *selection;
     GtkTreeModel *model;
     GtkTreeIter iter;
+    GtkTreeIter parent;
     gchar *text, *p;
-    gchar *link_id;
     GError *err = NULL;
     gchar *uri;
     GdkScreen *screen;
+    GString *string;
 
     selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pui->view));
     if (!gtk_tree_selection_get_selected(selection, &model, &iter))
         return;
 
+    string = g_string_new("help:balsa/preferences-");
+
+    if (gtk_tree_model_iter_parent(model, &parent, &iter)) {
+        gtk_tree_model_get(model, &parent, PM_HELP_COL, &text, -1);
+        for (p = text; *p; p++)
+            *p = (*p == ' ') ? '-' : g_ascii_tolower(*p);
+        g_string_append(string, text);
+        g_free(text);
+        g_string_append_c(string, '#');
+    }
     gtk_tree_model_get(model, &iter, PM_HELP_COL, &text, -1);
     for (p = text; *p; p++)
         *p = (*p == ' ') ? '-' : g_ascii_tolower(*p);
-    link_id = g_strconcat("preferences-", text, NULL);
+    g_string_append(string, text);
     g_free(text);
 
-    uri = g_strconcat("ghelp:balsa?", link_id, NULL);
+    uri = g_string_free(string, FALSE);
     screen = gtk_widget_get_screen(pui->view);
     gtk_show_uri(screen, uri, gtk_get_current_event_time(), &err);
-    g_free(uri);
     if (err) {
         balsa_information(LIBBALSA_INFORMATION_WARNING,
-               _("Error displaying link_id %s: %s\n"),
-               link_id, err->message);
+               _("Error displaying %s: %s\n"),
+               uri, err->message);
         g_error_free(err);
     }
 
-    g_free(link_id);
+    g_free(uri);
 }
 
 /* pm_page: methods for making the contents of a notebook page
diff --git a/src/toolbar-prefs.c b/src/toolbar-prefs.c
index 42e7d22..da4080c 100644
--- a/src/toolbar-prefs.c
+++ b/src/toolbar-prefs.c
@@ -350,7 +350,7 @@ tp_dialog_response_cb(GtkDialog * dialog, gint response, gpointer data)
         break;
     case GTK_RESPONSE_HELP:
         screen = gtk_widget_get_screen(GTK_WIDGET(dialog));
-        gtk_show_uri(screen, "ghelp:balsa?toolbar-prefs",
+        gtk_show_uri(screen, "help:balsa/toolbar-prefs",
                      gtk_get_current_event_time(), &err);
         if (err) {
             balsa_information(LIBBALSA_INFORMATION_WARNING,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]