diff --git a/Makefile.am b/Makefile.am index 845e402d511cc6611353d9cdead3fe0db81715b9..17873ce4f832468396507219a3d06ea5e6f0a439 100644 --- a/Makefile.am +++ b/Makefile.am @@ -54,15 +54,6 @@ ThunarBulkRename: ThunarBulkRename.in Makefile && mv ThunarBulkRename.gen ThunarBulkRename \ ) -ThunarHelp: ThunarHelp.in Makefile - $(AM_V_GEN) ( \ - rm -f ThunarHelp.gen ThunarHelp \ - && sed -e "s,\@docdir\@,$(docdir),g" \ - < $(srcdir)/ThunarHelp.in \ - > ThunarHelp.gen \ - && mv ThunarHelp.gen ThunarHelp \ - ) - desktopdir = $(datadir)/applications desktop_in_in_files = \ Thunar.desktop.in.in \ @@ -86,7 +77,6 @@ EXTRA_DIST = \ FAQ \ HACKING \ ThunarBulkRename.in \ - ThunarHelp.in \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ @@ -95,7 +85,6 @@ EXTRA_DIST = \ DISTCLEANFILES = \ ThunarBulkRename \ - ThunarHelp \ intltool-extract \ intltool-merge \ intltool-update \ diff --git a/ThunarHelp.in b/ThunarHelp.in deleted file mode 100644 index 3294b35bd60b598ea54efec3e6939fcd8996e995..0000000000000000000000000000000000000000 --- a/ThunarHelp.in +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# $Id$ -# -# Copyright (c) 2004-2006 Benedikt Meurer <benny@xfce.org> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# - -HELPDIR="@docdir@/html/" - -if test -n "$LC_ALL"; then - LC=$LC_ALL -elif test -n "$LANG"; then - LC=$LANG -else - LC="C" -fi - -if test -n "$1"; then - HELPFILE="$1.html" -else - HELPFILE="index.html" -fi - -if test -r "$HELPDIR/$LC/$HELPFILE"; then - URL="$HELPDIR/$LC/$HELPFILE" -elif test -r "$HELPDIR/`echo $LC | sed 's/\(..\)_.*/\1/'`/$HELPFILE"; then - URL="$HELPDIR/`echo $LC | sed 's/\(..\)_.*/\1/'`/$HELPFILE" -else - URL="$HELPDIR/C/index.html" -fi - -[ -n "$2" ] && URL="$URL#$2" - -exec exo-open --launch WebBrowser "file://$URL" - -# vim:set ts=2 sw=2 et ai: diff --git a/thunar/thunar-column-editor.c b/thunar/thunar-column-editor.c index 738c49f53d7194a8aefd5e4704fd2883b3350926..75149e20c6266ec0c7552ac8526294d87db038ad 100644 --- a/thunar/thunar-column-editor.c +++ b/thunar/thunar-column-editor.c @@ -21,6 +21,8 @@ #include <config.h> #endif +#include <libxfce4ui/libxfce4ui.h> + #include <thunar/thunar-abstract-dialog.h> #include <thunar/thunar-column-editor.h> #include <thunar/thunar-dialogs.h> @@ -302,7 +304,10 @@ thunar_column_editor_help_clicked (GtkWidget *button, _thunar_return_if_fail (GTK_IS_BUTTON (button)); /* open the user manual */ - thunar_dialogs_show_help (column_editor, "the-file-manager-window", "visible-columns-in-the-detailed-list-view"); + xfce_dialog_show_help (GTK_WINDOW (gtk_widget_get_toplevel (button)), + "thunar", + "the-file-manager-window", + "visible-columns-in-the-detailed-list-view"); } diff --git a/thunar/thunar-dialogs.c b/thunar/thunar-dialogs.c index 576252b4828e7441a69913ca9040ca51e199b932..3d92ec403ae2ff34a32945191cc4f68406ad57bb 100644 --- a/thunar/thunar-dialogs.c +++ b/thunar/thunar-dialogs.c @@ -322,67 +322,6 @@ thunar_dialogs_show_error (gpointer parent, -/** - * thunar_dialogs_show_help: - * @parent : a #GtkWidget on which the user manual should be shown, or a #GdkScreen - * if no #GtkWidget is known. May also be %NULL, in which case the default - * #GdkScreen will be used. - * @page : the name of the page of the user manual to display or %NULL to display - * the overview page. - * @offset : the offset of the topic in the @page to display or %NULL to just display - * @page. - * - * Displays the Thunar user manual. If @page is not %NULL it specifies the basename - * of the HTML file to display. @offset may refer to a anchor in the @page. - **/ -void -thunar_dialogs_show_help (gpointer parent, - const gchar *page, - const gchar *offset) -{ - GdkScreen *screen; - GError *error = NULL; - gchar *command; - gchar *tmp; - - /* determine the screen on which to launch the help */ - screen = thunar_util_parse_parent (parent, NULL); - - /* generate the command for the documentation browser */ - command = g_strdup (HELPERDIR G_DIR_SEPARATOR_S "Thunar" G_DIR_SEPARATOR_S "ThunarHelp"); - - /* check if a page is given */ - if (G_UNLIKELY (page != NULL)) - { - /* append page as second parameter */ - tmp = g_strconcat (command, " ", page, NULL); - g_free (command); - command = tmp; - - /* check if an offset is given */ - if (G_UNLIKELY (offset != NULL)) - { - /* append offset as third parameter */ - tmp = g_strconcat (command, " ", offset, NULL); - g_free (command); - command = tmp; - } - } - - /* try to run the documentation browser */ - if (!gdk_spawn_command_line_on_screen (screen, command, &error)) - { - /* display an error message to the user */ - thunar_dialogs_show_error (parent, error, _("Failed to open the documentation browser")); - g_error_free (error); - } - - /* cleanup */ - g_free (command); -} - - - /** * thunar_dialogs_show_job_ask: * @parent : the parent #GtkWindow or %NULL. diff --git a/thunar/thunar-dialogs.h b/thunar/thunar-dialogs.h index b8b82c01f2e60d416edd81aad45f61e4b18ec39f..d476cb6abbbc95259704eb81e1ea15093c38bcb1 100644 --- a/thunar/thunar-dialogs.h +++ b/thunar/thunar-dialogs.h @@ -39,10 +39,6 @@ void thunar_dialogs_show_error (gpointer pa const gchar *format, ...) G_GNUC_PRINTF (3, 4); -void thunar_dialogs_show_help (gpointer parent, - const gchar *page, - const gchar *offset); - ThunarJobResponse thunar_dialogs_show_job_ask (GtkWindow *parent, const gchar *question, ThunarJobResponse choices); diff --git a/thunar/thunar-preferences-dialog.c b/thunar/thunar-preferences-dialog.c index 504db2cc0a23ca432c6ef352e5558422ff03d875..c5df29996e557fe06174c32f27e1cbe7c9567df6 100644 --- a/thunar/thunar-preferences-dialog.c +++ b/thunar/thunar-preferences-dialog.c @@ -610,7 +610,8 @@ thunar_preferences_dialog_response (GtkDialog *dialog, if (G_UNLIKELY (response == GTK_RESPONSE_HELP)) { /* open the preferences section of the user manual */ - thunar_dialogs_show_help (GTK_WIDGET (dialog), "preferences", NULL); + xfce_dialog_show_help (GTK_WINDOW (dialog), "thunar", + "preferences", NULL); } else { diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c index c189e2610f461b89986f819c13934a3b2db3a7f6..de90d5db1d8fcbd0ea1eefb160fcabcbd845ac35 100644 --- a/thunar/thunar-properties-dialog.c +++ b/thunar/thunar-properties-dialog.c @@ -33,6 +33,7 @@ #include <gdk/gdkkeysyms.h> #include <exo/exo.h> +#include <libxfce4ui/libxfce4ui.h> #include <thunar/thunar-abstract-dialog.h> #include <thunar/thunar-application.h> @@ -599,7 +600,9 @@ thunar_properties_dialog_response (GtkDialog *dialog, } else if (response == GTK_RESPONSE_HELP) { - thunar_dialogs_show_help (dialog, "working-with-files-and-folders", "file-properties"); + xfce_dialog_show_help (GTK_WINDOW (dialog), "thunar", + "working-with-files-and-folders", + "file-properties"); } else if (GTK_DIALOG_CLASS (thunar_properties_dialog_parent_class)->response != NULL) { diff --git a/thunar/thunar-renamer-dialog.c b/thunar/thunar-renamer-dialog.c index 619d93ea248bc2ff71bbf9ca954ed4ce1220f02b..66ea52f48a46b83a048d85af0ca3e0ad5128aa62 100644 --- a/thunar/thunar-renamer-dialog.c +++ b/thunar/thunar-renamer-dialog.c @@ -28,6 +28,8 @@ #include <string.h> #endif +#include <libxfce4ui/libxfce4ui.h> + #include <thunar/thunar-abstract-dialog.h> #include <thunar/thunar-application.h> #include <thunar/thunar-dialogs.h> @@ -928,7 +930,8 @@ thunar_renamer_dialog_help (ThunarRenamerDialog *renamer_dialog) if (G_LIKELY (help_url == NULL)) { /* open the general documentation if no specific URL */ - thunar_dialogs_show_help (GTK_WIDGET (renamer_dialog), "advanced-topics", "to-bulk-rename-files"); + xfce_dialog_show_help (GTK_WINDOW (renamer_dialog), "thunar", + "advanced-topics", "to-bulk-rename-files"); } else { diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c index a42d982429eb5796b736aa719927f253896c4fd7..8d930a9df0e6d6c7ae00693c88db8290a6648fbc 100644 --- a/thunar/thunar-window.c +++ b/thunar/thunar-window.c @@ -31,6 +31,7 @@ #endif #include <gdk/gdkkeysyms.h> +#include <libxfce4ui/libxfce4ui.h> #include <thunar/thunar-application.h> #include <thunar/thunar-browser.h> @@ -2362,7 +2363,7 @@ thunar_window_action_contents (GtkAction *action, ThunarWindow *window) { /* display the documentation index */ - thunar_dialogs_show_help (window, NULL, NULL); + xfce_dialog_show_help (GTK_WINDOW (window), "thunar", NULL, NULL); }