summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2012-01-06 22:13:12 +0100
committerNick Schermer <nick@xfce.org>2012-01-06 22:13:38 +0100
commit3047ee12ab2d3c232227ab7dc0c35d7153bb37a1 (patch)
tree9f095770a5c3b8e22bd0ba86c5e3be325927b9d9
parente6d2321f1a4a51f640592048651a0493002ae9b0 (diff)
Use new help function to redirect to docs.xfce.org.
-rw-r--r--common/panel-utils.c66
-rw-r--r--configure.ac.in2
2 files changed, 3 insertions, 65 deletions
diff --git a/common/panel-utils.c b/common/panel-utils.c
index e8c5d7ce..56b04997 100644
--- a/common/panel-utils.c
+++ b/common/panel-utils.c
@@ -44,7 +44,7 @@ panel_utils_help_button_clicked (GtkWidget *button,
toplevel = gtk_widget_get_toplevel (button);
panel_utils_show_help (GTK_WINDOW (toplevel),
xfce_panel_plugin_get_name (panel_plugin),
- "properties");
+ NULL);
}
@@ -114,69 +114,7 @@ panel_utils_show_help (GtkWindow *parent,
const gchar *page,
const gchar *offset)
{
- GdkScreen *screen;
- gchar *filename;
- gchar *uri = NULL;
- GError *error = NULL;
- gchar *locale;
- gboolean exists;
-
- panel_return_if_fail (parent == NULL || GTK_IS_WINDOW (parent));
-
- if (G_LIKELY (parent != NULL))
- screen = gtk_window_get_screen (parent);
- else
- screen = gdk_screen_get_default ();
-
- if (page == NULL)
- page = "index";
-
- /* get the locale of the user */
- locale = g_strdup (setlocale (LC_MESSAGES, NULL));
- if (G_LIKELY (locale != NULL))
- locale = g_strdelimit (locale, "._", '\0');
- else
- locale = g_strdup ("C");
-
- /* check if the help page exists on the system */
- filename = g_strconcat (HELPDIR, G_DIR_SEPARATOR_S, locale,
- G_DIR_SEPARATOR_S, page, ".html", NULL);
- exists = g_file_test (filename, G_FILE_TEST_EXISTS);
- if (!exists)
- {
- g_free (filename);
- filename = g_strconcat (HELPDIR, G_DIR_SEPARATOR_S "C"
- G_DIR_SEPARATOR_S, page, ".html", NULL);
- exists = g_file_test (filename, G_FILE_TEST_EXISTS);
- }
-
- if (G_LIKELY (exists))
- {
- uri = g_strconcat ("file://", filename, offset != NULL ? "#" : NULL, offset, NULL);
- }
- else if (xfce_dialog_confirm (parent, "web-browser", _("_Read Online"),
- _("You can read the user manual online. This manual may however "
- "not exactly match your panel version."),
- _("The user manual is not installed on your computer")))
- {
- uri = g_strconcat ("http://docs.xfce.org/help.php?package=xfce4-panel&lang=",
- locale, "&page=", page, "&anchor=", offset, NULL);
- }
-
- g_free (filename);
- g_free (locale);
-
- /* try to run the documentation browser */
- if (uri != NULL
- && !exo_execute_preferred_application_on_screen ("WebBrowser", uri, NULL,
- NULL, screen, &error))
- {
- /* display an error message to the user */
- xfce_dialog_show_error (parent, error, _("Failed to open the documentation browser"));
- g_error_free (error);
- }
-
- g_free (uri);
+ xfce_dialog_show_help (parent, "xfce4-panel", page, offset);
}
diff --git a/configure.ac.in b/configure.ac.in
index 367313c8..4320795b 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -127,7 +127,7 @@ dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0])
XDT_CHECK_PACKAGE([GARCON], [garcon-1], [0.1.5])
-XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.9.0])
XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0])
XDT_CHECK_PACKAGE([EXO], [exo-1], [0.6.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])