[Xfce4-commits] <xfce-utils:master> Use '#' as a shortcut to open man pages (Bug #5984).

Jérôme Guelfucci noreply at xfce.org
Mon Oct 25 14:46:05 CEST 2010


Updating branch refs/heads/master
         to 58b4d3f21d704815ed5a6cef3cb31548f44c3931 (commit)
       from 314df806bdf64ea9f322c4643b2ccfc45e519c04 (commit)

commit 58b4d3f21d704815ed5a6cef3cb31548f44c3931
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Mon Oct 25 13:48:01 2010 +0200

    Use '#' as a shortcut to open man pages (Bug #5984).
    
    We use the default terminal emulator to open the man page.

 xfrun/xfrun-dialog.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xfrun/xfrun-dialog.c b/xfrun/xfrun-dialog.c
index d34489a..391f8e8 100644
--- a/xfrun/xfrun-dialog.c
+++ b/xfrun/xfrun-dialog.c
@@ -525,6 +525,17 @@ xfrun_run_clicked(GtkWidget *widget,
         cmdline = new_cmdline;
     }
 
+    if (g_str_has_prefix (cmdline, "#"))
+      {
+        /* Shortcut to open manpages in terminal */
+        new_cmdline = g_strconcat ("exo-open --launch TerminalEmulator 'man ",
+                                   cmdline + 1, "'", NULL);
+        g_free (cmdline);
+        cmdline = new_cmdline;
+        /* We already do that */
+        in_terminal = FALSE;
+      }
+
     if(in_terminal) {
         gint i = 0;
 



More information about the Xfce4-commits mailing list