[Xfce4-commits] <orage:master> 4.9.7.3 Fixed bug 10401 orage launches help in firefox and not via exo-open

Juha Kautto noreply at xfce.org
Tue Nov 12 10:20:01 CET 2013


Updating branch refs/heads/master
         to 406784dbf3f7ebf81c2c388b2ea17b420b9cffc8 (commit)
       from 2af0cd48e5d4781be7c6dd0166eb2525c234144f (commit)

commit 406784dbf3f7ebf81c2c388b2ea17b420b9cffc8
Author: Juha Kautto <juha at xfce.org>
Date:   Tue Nov 12 11:18:02 2013 +0200

    4.9.7.3 Fixed bug 10401 orage launches help in firefox and not via exo-open
    
    Orage now uses exo-open for help and only if that failsr, it calls firefox
    directly.

 configure.in.in  |    2 +-
 src/mainbox.c    |   21 ++++++++++++++++++---
 src/parameters.c |   21 ++++++++++++++++++---
 3 files changed, 37 insertions(+), 7 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index c8c0971..df604f8 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -9,7 +9,7 @@ dnl Written for Xfce by Juha Kautto <juha at xfce.org>
 dnl
 
 dnl Version information
-m4_define([orage_version], [4.9.7.2-git])
+m4_define([orage_version], [4.9.7.3-git])
 
 m4_define([gtk_minimum_version], [2.14.0])
 m4_define([xfce_minimum_version], [4.8.0])
diff --git a/src/mainbox.c b/src/mainbox.c
index e232dd2..8d7b8af 100644
--- a/src/mainbox.c
+++ b/src/mainbox.c
@@ -196,14 +196,29 @@ static void mHelp_help_activate_cb(GtkMenuItem *menuitem, gpointer user_data)
 #ifdef ORAGE_DEBUG
     orage_message(-100, P_N);
 #endif
-    helpdoc = g_strconcat("firefox ", PACKAGE_DATA_DIR
+    helpdoc = g_strconcat("exo-open ", PACKAGE_DATA_DIR
            , G_DIR_SEPARATOR_S, "orage"
            , G_DIR_SEPARATOR_S, "doc"
            , G_DIR_SEPARATOR_S, "C"
            , G_DIR_SEPARATOR_S, "orage.html"
            , NULL);
-    if (!orage_exec(helpdoc, FALSE, &error))
-        orage_message(100, "start of %s failed: %s", helpdoc, error->message);
+    if (!orage_exec(helpdoc, FALSE, &error)) {
+        orage_message(10, "%s failed: %s. Trying firefox", helpdoc
+                                    , error->message);
+        g_clear_error(&error);
+        g_free(helpdoc);
+        helpdoc = g_strconcat("firefox ", PACKAGE_DATA_DIR
+               , G_DIR_SEPARATOR_S, "orage"
+               , G_DIR_SEPARATOR_S, "doc"
+               , G_DIR_SEPARATOR_S, "C"
+               , G_DIR_SEPARATOR_S, "orage.html"
+               , NULL);
+        if (!orage_exec(helpdoc, FALSE, &error)) {
+            orage_message(100, "start of %s failed: %s", helpdoc
+                    , error->message);
+            g_clear_error(&error);
+        }
+    }
     g_free(helpdoc);
 }
 
diff --git a/src/parameters.c b/src/parameters.c
index 39732f2..c9fdaf5 100644
--- a/src/parameters.c
+++ b/src/parameters.c
@@ -97,15 +97,30 @@ static void dialog_response(GtkWidget *dialog, gint response_id
 
     if (response_id == GTK_RESPONSE_HELP) {
         /* Needs to be in " to keep # */
-        helpdoc = g_strconcat("firefox \"file://", PACKAGE_DATA_DIR
+        helpdoc = g_strconcat("exo-open \"file://", PACKAGE_DATA_DIR
                 , G_DIR_SEPARATOR_S, "orage"
                 , G_DIR_SEPARATOR_S, "doc"
                 , G_DIR_SEPARATOR_S, "C"
                 , G_DIR_SEPARATOR_S, "orage.html#orage-preferences-window\""
                 , NULL);
-        if (!orage_exec(helpdoc, FALSE, &error))
-            orage_message(100, "start of %s failed: %s", helpdoc
+        if (!orage_exec(helpdoc, FALSE, &error)) {
+            orage_message(10, "%s failed: %s. Trying firefox", helpdoc
                     , error->message);
+            g_clear_error(&error);
+            g_free(helpdoc);
+            helpdoc = g_strconcat("firefox \"file://", PACKAGE_DATA_DIR
+                    , G_DIR_SEPARATOR_S, "orage"
+                    , G_DIR_SEPARATOR_S, "doc"
+                    , G_DIR_SEPARATOR_S, "C"
+                    , G_DIR_SEPARATOR_S, "orage.html#orage-preferences-window\""
+                    , NULL);
+            if (!orage_exec(helpdoc, FALSE, &error)) {
+                orage_message(100, "start of %s failed: %s", helpdoc
+                        , error->message);
+                g_clear_error(&error);
+            }
+        }
+        g_free(helpdoc);
     }
     else { /* delete signal or close response */
         write_parameters();


More information about the Xfce4-commits mailing list