diff options
author | Brent Smith <bmsmith@src.gnome.org> | 2006-07-31 05:10:38 +0000 |
---|---|---|
committer | Brent Smith <bmsmith@src.gnome.org> | 2006-07-31 05:10:38 +0000 |
commit | 73eaf3b438e9b02f54fe51484083e29803f3d47b (patch) | |
tree | 748acaf1033ec8ba83bef4f0c05329a305ab62df | |
parent | 88a5b24a2904fb6dedc5e666e94a725eb51f5952 (diff) | |
download | yelp-73eaf3b438e9b02f54fe51484083e29803f3d47b.tar.gz |
Fix to properly escape ampersand characters by using xmlNewTextChild,
* src/yelp-toc-pager.c: (process_info_pending): Fix to properly escape
ampersand characters by using xmlNewTextChild, patch from Daniel
Drake. Fixes #343372 (backport from HEAD)
* src/yelp-window.c: (window_help_contents_cb):
Remove a couple of headers that shouldn't be here
Remove call to gnome_help_display_desktop and
replace with a much simpler call to create a new window
and show the relevant section of the user guide, making it
much quicker to display help->Contents (backport from HEAD)
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | src/yelp-toc-pager.c | 6 | ||||
-rw-r--r-- | src/yelp-window.c | 32 |
3 files changed, 24 insertions, 29 deletions
@@ -1,3 +1,16 @@ +2006-07-30 Brent Smith <gnome@nextreality.net> + + * src/yelp-toc-pager.c: (process_info_pending): Fix to properly escape + ampersand characters by using xmlNewTextChild, patch from Daniel + Drake. Fixes #343372 (backport from HEAD) + + * src/yelp-window.c: (window_help_contents_cb): + Remove a couple of headers that shouldn't be here + Remove call to gnome_help_display_desktop and + replace with a much simpler call to create a new window + and show the relevant section of the user guide, making it + much quicker to display help->Contents (backport from HEAD) + 2006-06-25 Brent Smith <gnome@nextreality.net> * src/yelp-toc-pager.c: (create_toc_from_index): fix the biggest @@ -8,6 +21,8 @@ * src/yelp-toc-pager.c: - Use xmlNewTextChild so ampersands don't screw us up +==================== 2.14.2 ==================== + 2006-05-29 Brent Smith <gnome@nextreality.net> * NEWS: diff --git a/src/yelp-toc-pager.c b/src/yelp-toc-pager.c index 9e601525..d5101b0b 100644 --- a/src/yelp-toc-pager.c +++ b/src/yelp-toc-pager.c @@ -1139,12 +1139,12 @@ process_info_pending (YelpTocPager *pager) NULL); xmlNewNsProp (tmp, NULL, BAD_CAST "href", BAD_CAST fname); - xmlNewChild (tmp, NULL, BAD_CAST "title", + xmlNewTextChild (tmp, NULL, BAD_CAST "title", BAD_CAST part2); - xmlNewChild (tmp, NULL, BAD_CAST "tooltip", + xmlNewTextChild (tmp, NULL, BAD_CAST "tooltip", BAD_CAST tooltip); - xmlNewChild (tmp, NULL, BAD_CAST "description", + xmlNewTextChild (tmp, NULL, BAD_CAST "description", BAD_CAST desc); } done: diff --git a/src/yelp-window.c b/src/yelp-window.c index 5917ecc5..1c9e5b87 100644 --- a/src/yelp-window.c +++ b/src/yelp-window.c @@ -2647,32 +2647,12 @@ window_copy_mail_cb (GtkAction *action, YelpWindow *window) static void window_help_contents_cb (GtkAction *action, YelpWindow *window) { - GnomeProgram *program = gnome_program_get (); - GError *error = NULL; - - g_return_if_fail (YELP_IS_WINDOW (window)); - - gnome_help_display_desktop (program, "user-guide", - "user-guide", "yelp", &error); - - if (error) { - GtkWidget *dialog; - - dialog = gtk_message_dialog_new (GTK_WINDOW (window), - 0, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - _("Could not display help for Yelp.\n" - "%s"), - error->message); - - g_signal_connect_swapped (dialog, "response", - G_CALLBACK (gtk_widget_destroy), - dialog); - gtk_widget_show (dialog); - - g_error_free (error); - } + /* Since we are already running, and are calling ourselves, + * we can make this function easy by just creating a new window + * and avoiding calling gnome_help_display_desktop + */ + g_signal_emit (window, signals[NEW_WINDOW_REQUESTED], 0, + "ghelp:user-guide#yelp"); } static void |