[Xfce4-commits] <xfce-utils:master> Hookup the help button.
Nick Schermer
noreply at xfce.org
Sun Nov 7 11:06:01 CET 2010
Updating branch refs/heads/master
to 33e62d6a3c24334f790111e3ac91fcfb250544ab (commit)
from 04487b53f9f7cf58bc99e7649b43781280bdfa4e (commit)
commit 33e62d6a3c24334f790111e3ac91fcfb250544ab
Author: Nick Schermer <nick at xfce.org>
Date: Sun Nov 7 11:02:34 2010 +0100
Hookup the help button.
xfce4-about/main.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/xfce4-about/main.c b/xfce4-about/main.c
index 4a89ae6..441236e 100644
--- a/xfce4-about/main.c
+++ b/xfce4-about/main.c
@@ -369,6 +369,24 @@ xfce_about_license_bsd (GtkBuilder *builder)
+static void
+xfce_about_help (GtkWidget *button)
+{
+ GError *error = NULL;
+ GdkScreen *screen;
+
+ g_return_if_fail (GTK_IS_BUTTON (button));
+
+ screen = gtk_widget_get_screen (button);
+ if (!gdk_spawn_command_line_on_screen (screen, "xfhelp4", &error))
+ {
+ g_critical ("Failed to spawn xfhelp4: %s", error->message);
+ g_error_free (error);
+ }
+}
+
+
+
gint
main (gint argc,
gchar **argv)
@@ -451,6 +469,10 @@ main (gint argc,
g_signal_connect_swapped (G_OBJECT (object), "clicked",
G_CALLBACK (xfce_about_license_bsd), builder);
+ object = gtk_builder_get_object (builder, "help-button");
+ g_signal_connect (G_OBJECT (object), "clicked",
+ G_CALLBACK (xfce_about_help), NULL);
+
object = gtk_builder_get_object (builder, "close-button");
g_signal_connect_swapped (G_OBJECT (object), "clicked",
G_CALLBACK (gtk_main_quit), NULL);
More information about the Xfce4-commits
mailing list