[Xfce4-commits] <ristretto:master> Add help->contents menuitem

Stephan Arts noreply at xfce.org
Thu Oct 27 22:58:03 CEST 2011


Updating branch refs/heads/master
         to 2fb12e9c9825cd39ed33c3b73609ff5ca91700e4 (commit)
       from d9db4868c9636dfa1cb3083c742e65645c752ba0 (commit)

commit 2fb12e9c9825cd39ed33c3b73609ff5ca91700e4
Author: Stephan Arts <stephan at xfce.org>
Date:   Thu Oct 27 22:55:14 2011 +0200

    Add help->contents menuitem

 autogen.sh             |    2 +-
 configure.in.in        |    2 ++
 docs                   |    2 +-
 src/Makefile.am        |    5 ++++-
 src/main_window.c      |   16 +++++++++++++++-
 src/main_window_ui.xml |    2 --
 6 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index a5c8683..2bd515a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -10,7 +10,7 @@
 #
 
 export XDT_AUTOGEN_REQUIRED_VERSION="4.8.0"
-export XDT_AUTOGET_CHECK_DOCS="docs"
+export XDT_AUTOGEN_CHECK_DOCS="docs"
 
 (type xdt-autogen) >/dev/null 2>&1 || {
   cat >&2 <<EOF
diff --git a/configure.in.in b/configure.in.in
index 3b7bfb4..3ec289c 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -61,6 +61,8 @@ XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.34])
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0])
 XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
 
+XDT_CHECK_PACKAGE([EXO], [exo-1], [0.4.0])
+
 XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0])
 
 XDT_CHECK_PACKAGE([CAIRO], [cairo], [1.8.0])
diff --git a/docs b/docs
index ebbf730..538fcec 160000
--- a/docs
+++ b/docs
@@ -1 +1 @@
-Subproject commit ebbf730e27fc3db0bbf1196b96f2a92a721d2559
+Subproject commit 538fcece452491a22c41a0c185d3040aa8c5f453
diff --git a/src/Makefile.am b/src/Makefile.am
index 6ef8af2..6270f06 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,10 +28,12 @@ ristretto_CFLAGS = \
 	$(GIO_CFLAGS) \
 	$(LIBEXIF_CFLAGS) \
 	$(XFCONF_CFLAGS) \
+	$(EXO_CFLAGS) \
 	$(CAIRO_CFLAGS) \
 	$(LIBXFCE4UTIL_CFLAGS) \
 	$(LIBXFCE4UI_CFLAGS) \
 	$(LIBX11_CFLAGS) \
+	-DDOCDIR=\"$(DESTDIR)$(docdir)\" \
 	-DDATADIR=\"$(datadir)\" \
 	-DSRCDIR=\"$(top_srcdir)\" \
 	-DLOCALEDIR=\"$(localedir)\"
@@ -42,8 +44,9 @@ ristretto_LDADD = \
 	$(GTHREAD_LIBS) \
 	$(GIO_LIBS) \
 	$(LIBEXIF_LIBS) \
-	$(CAIRO_LIBS) \
 	$(XFCONF_LIBS) \
+	$(EXO_LIBS) \
+	$(CAIRO_LIBS) \
 	$(LIBXFCE4UTIL_LIBS) \
 	$(LIBXFCE4UI_LIBS) \
 	$(LIBX11_LIBS) \
diff --git a/src/main_window.c b/src/main_window.c
index 16f679a..a4725da 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -24,6 +24,8 @@
 
 #include <gio/gio.h>
 
+#include <exo/exo.h>
+
 #include <libxfce4ui/libxfce4ui.h>
 #include <libexif/exif-data.h>
 
@@ -51,6 +53,10 @@
 #define RISTRETTO_APP_TITLE _("Image Viewer")
 #endif
 
+#ifndef RISTRETTO_HELP_LOCATION
+#define RISTRETTO_HELP_LOCATION "file://"DOCDIR"/html/C/index.html"
+#endif
+
 
 #define RSTTO_RECENT_FILES_APP_NAME "ristretto"
 #define RSTTO_RECENT_FILES_GROUP "Graphics"
@@ -2230,7 +2236,15 @@ cb_rstto_main_window_about (GtkWidget *widget, RsttoMainWindow *window)
 static void
 cb_rstto_main_window_contents (GtkWidget *widget, RsttoMainWindow *window)
 {
-    g_debug ("%s", __FUNCTION__);
+    if (FALSE == exo_execute_preferred_application (
+            "WebBrowser",
+            RISTRETTO_HELP_LOCATION,
+            "/tmp",
+            NULL,
+            NULL))
+    {
+
+    }
 }
 
 
diff --git a/src/main_window_ui.xml b/src/main_window_ui.xml
index efa8821..c7888f7 100644
--- a/src/main_window_ui.xml
+++ b/src/main_window_ui.xml
@@ -66,9 +66,7 @@
             <placeholder name="placeholder-slideshow" />
         </menu>
         <menu action="help-menu">
-            <!--
             <menuitem action="contents"/>
-            -->
             <menuitem action="about"/>
         </menu>
     </menubar>


More information about the Xfce4-commits mailing list