diff options
author | Edinaldo P.Silva <edps.mundognu@gmail.com> | 2017-03-10 09:49:47 +0000 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2017-03-10 09:50:48 +0000 |
commit | e3a478c576dff0958d1176710851195e44fe81c2 (patch) | |
tree | 8c1f6fe879d9d21307457f6cc59becb600c0edf4 | |
parent | fac6fa454693c332345f5970801f5b1f704247cb (diff) | |
download | slackbuilds-e3a478c576dff0958d1176710851195e44fe81c2.tar.gz |
desktop/gmrun: New maintainer + add manpage & patches.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r-- | desktop/gmrun/README | 6 | ||||
-rw-r--r-- | desktop/gmrun/gmrun.1 | 91 | ||||
-rw-r--r-- | desktop/gmrun/gmrun.SlackBuild | 42 | ||||
-rw-r--r-- | desktop/gmrun/gmrun.info | 4 | ||||
-rw-r--r-- | desktop/gmrun/patches/10-escaping.patch | 23 | ||||
-rw-r--r-- | desktop/gmrun/patches/100-gmrunrc.patch | 25 | ||||
-rw-r--r-- | desktop/gmrun/patches/20-includes.patch | 15 | ||||
-rw-r--r-- | desktop/gmrun/patches/30-fix-gcc-4.3-build.patch | 27 | ||||
-rw-r--r-- | desktop/gmrun/patches/40-history_string.patch | 28 | ||||
-rw-r--r-- | desktop/gmrun/patches/50-empty-history.patch | 36 | ||||
-rw-r--r-- | desktop/gmrun/patches/60-fix_gtkcompletionline.patch | 56 | ||||
-rw-r--r-- | desktop/gmrun/patches/70-cmdline.patch | 18 | ||||
-rw-r--r-- | desktop/gmrun/patches/80-selectoption.patch | 31 | ||||
-rw-r--r-- | desktop/gmrun/patches/90-window_placement.patch | 50 | ||||
-rw-r--r-- | desktop/gmrun/patches/gmrun-0.9.2-gcc43.patch | 44 | ||||
-rw-r--r-- | desktop/gmrun/patches/gmrun-0.9.2-mousewheel.patch | 68 | ||||
-rw-r--r-- | desktop/gmrun/patches/gmrun-gmrunrc.patch | 37 | ||||
-rw-r--r-- | desktop/gmrun/patches/gtkcompletionline.cc.patch | 11 | ||||
-rw-r--r-- | desktop/gmrun/slack-desc | 6 |
19 files changed, 439 insertions, 179 deletions
diff --git a/desktop/gmrun/README b/desktop/gmrun/README index b8245b2eba..6f30f341bd 100644 --- a/desktop/gmrun/README +++ b/desktop/gmrun/README @@ -1,3 +1,5 @@ -gmrun is a simple GTK program which provides a "run program" window. -It features a bash-like TAB completion, Ctrl-R/Ctrl-S for searching +gmrun (A simple program which provides a run program window) + +gmrun is a simple GTK program which provides a "run program" window. +It features a bash-like TAB completion, Ctrl-R/Ctrl-S for searching through the history and URL handlers for any user defined prefix. diff --git a/desktop/gmrun/gmrun.1 b/desktop/gmrun/gmrun.1 new file mode 100644 index 0000000000..d0564d5f1b --- /dev/null +++ b/desktop/gmrun/gmrun.1 @@ -0,0 +1,91 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH gmrun 1 "August 8, 2001" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp <n> insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +gmrun \- Featureful CLI-like GTK+ application launcher +.SH SYNOPSIS +.B gmrun \fR\fI[TEXT]\fR +.br +.SH DESCRIPTION +This manual page documents briefly the +.B gmrun +command. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +.PP +.\" TeX users may be more comfortable with the \fB<whatever>\fP and +.\" \fI<whatever>\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBgmrun\fP is a program that allows a user to use a CLI-like interface to launch applications from within the X11 windowing environment. It is based on the GTK+ toolkit. +.SH OPTIONS +If gmrun is invoked with a command-line parameter, that will be the initial content of the dialog box. +.PP +gmrun can be customized using a configuration file, ~/.gmrunrc . The system-wide configuration file is /etc/gmrunrc . +.PP +The format of the configuration file is simple; "variable = value". To refer to a variable as opposed to setting it, enclose the variable in ${}. +.TP +.B Example: +variable1 = foobar +.br +newvariable = ${variable1} foobaz +.TP +Were this placed within the configuration file, the gmrun variable "newvariable" would contain the text "foobar foobaz". Some variables that are understood by gmrun, by default. These are: +.TP +.B Terminal +The command to run when Ctrl+Enter is pressed with no command entered; used to start a new terminal. +.TP +.B TermExec +The command to run when Ctrl+Enter is pressed with a command entered. The entered command is supplied as an argument to TermExec. +.TP +.B Width +Initial width of gmrun window. +.TP +.B Top, Left +Initial placement of gmrun window - specify both Top and Left variables such that the gmrun window is placed at pixel (Top,Left) of your desktop. +.TP +.B History +Number of entered commands which should be kept in gmrun's history(~/.gmrun_history). Using the Up and Down arrow keys within the gmrun window will cycle through the history. You can search backwards through the history with Ctrl+R or by writing \fB!\fP (exclamation mark), and forward with Ctrl+S. To cancel a search, hit Ctrl+G or the \fIESC\fP key. Otherwise, after you have found the history item you wish to run, hit Enter. +.TP +.B ShowLast +Whether to show the last command as initial text, or an empty textarea (1 or 0). +.TP +.B Selected +Whether the initial text should be selected or not (1 or 0). +.SH URL HANDLING +As opposed to entering a command, gmrun supports the entering of URLs. The included configuration file(/etc/gmrunrc) gives some examples. To set up your own url, create a variable in /etc/gmrunrc or ~/.gmrunrc with the format of "URL_protocol". For instance, URL_http. Here is an example: +.TP +.B URL_http = /usr/bin/mozilla %u +Using this, entering "http://www.slashdot.org" will run '/usr/bin/mozilla http://slashdot.org'. +.TP +gmrun may also strip the protocol and colon away from the entered URL before passing it to the defined program. For example: +.TP +.B URL_mailto = mutt %s +Using this, entering "mailto:david@eelf.ddts.net" will run the command 'mutt david@eelf.ddts.net' +.TP +The included configuration files has a few examples which you can work with. You should also note that the protocol part of URL_protocol can be *anything*. You can set up "URL_foobarbazcustom", and so long as you enter in "foobarbazcustom:<whatever>", it will use the given program. Have fun :) +.SH SEE ALSO +.BR /usr/share/doc/gmrun/README.gz, +.BR /etc/gmrunrc. +.br +.SH AUTHOR +gmrun was written and is maintained by +.B Mihai Bazon <mishoo@infoiasi.ro> +, the latest version is available from +\fIhttp://www.sourceforge.net/projects/gmrun/\fP +.PP +This manual page was written by David B Harris <david@eelf.ddts.net>, +for the Debian GNU/Linux system (but may be used by others). diff --git a/desktop/gmrun/gmrun.SlackBuild b/desktop/gmrun/gmrun.SlackBuild index 26758e62e2..c5836fb754 100644 --- a/desktop/gmrun/gmrun.SlackBuild +++ b/desktop/gmrun/gmrun.SlackBuild @@ -1,7 +1,11 @@ #!/bin/sh - +# +# Slackware build script for gmrun. +# # Copyright 2010 Binh Nguyen <binhvng@gmail.com> -# Copyright 2014 Ryan P.C. McQuen, WA, ryanpcmcquen@member.fsf.org +# Copyright 2014 Ryan P.C. McQuen, WA, ryanpcmcquen@member.fsf.org +# Copyright 2017 Edinaldo P. Silva, Rio de Janeiro, Brazil. +# # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,12 +27,12 @@ PRGNAM=gmrun VERSION=${VERSION:-0.9.2} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; arm*) export ARCH=arm ;; *) export ARCH=$( uname -m ) ;; esac @@ -39,8 +43,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -69,18 +73,26 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Apply some patches from Fedora's SRPM: -patch -p1 < $CWD/patches/gmrun-0.9.2-gcc43.patch -patch -p1 < $CWD/patches/gmrun-0.9.2-mousewheel.patch -patch -p1 < $CWD/patches/gmrun-gmrunrc.patch -# And one from Gentoo -patch -p1 < $CWD/patches/gtkcompletionline.cc.patch +# Apply some patches from Debian: + +patch -p1 < $CWD/patches/10-escaping.patch +patch -p1 < $CWD/patches/20-includes.patch +patch -p1 < $CWD/patches/30-fix-gcc-4.3-build.patch +patch -p1 < $CWD/patches/40-history_string.patch +patch -p1 < $CWD/patches/50-empty-history.patch +patch -p1 < $CWD/patches/60-fix_gtkcompletionline.patch +patch -p1 < $CWD/patches/70-cmdline.patch +patch -p1 < $CWD/patches/80-selectoption.patch +patch -p1 < $CWD/patches/90-window_placement.patch +patch -p1 < $CWD/patches/100-gmrunrc.patch CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --localstatedir=/var \ + --mandir=/usr/man \ --sysconfdir=/etc \ --build=$ARCH-slackware-linux @@ -90,6 +102,12 @@ make install DESTDIR=$PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +mkdir -p $PKG/usr/man/man1 +cp -a $CWD/gmrun.1 $PKG/usr/man/man1 + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/desktop/gmrun/gmrun.info b/desktop/gmrun/gmrun.info index 1531652506..25e0294fc6 100644 --- a/desktop/gmrun/gmrun.info +++ b/desktop/gmrun/gmrun.info @@ -6,5 +6,5 @@ MD5SUM="6cef37a968006d9496fc56a7099c603c" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Ryan P.C. McQuen" -EMAIL="ryanpcmcquen@member.fsf.org" +MAINTAINER="Edinaldo P.Silva" +EMAIL="edps.mundognu@gmail.com" diff --git a/desktop/gmrun/patches/10-escaping.patch b/desktop/gmrun/patches/10-escaping.patch new file mode 100644 index 0000000000..b4bc2084b6 --- /dev/null +++ b/desktop/gmrun/patches/10-escaping.patch @@ -0,0 +1,23 @@ +# Description: Correct escaping of characters +# Author: Luca Bedogni <me@lucabedogni.it> + +Index: gmrun-0.9.2/src/gtkcompletionline.cc +=================================================================== +--- gmrun-0.9.2.orig/src/gtkcompletionline.cc 2010-02-03 12:30:02.239774762 +0800 ++++ gmrun-0.9.2/src/gtkcompletionline.cc 2010-02-03 12:30:24.983767847 +0800 +@@ -226,12 +226,9 @@ + const char* i = str.c_str(); + while (*i) { + char c = *i++; +- switch (c) { +- case ' ': +- res += '\\'; +- default: +- res += c; +- } ++ if (c == ' ' || c == '(' || c == ')' || c =='\'') ++ res += '\\'; ++ res += c; + } + return res; + } diff --git a/desktop/gmrun/patches/100-gmrunrc.patch b/desktop/gmrun/patches/100-gmrunrc.patch new file mode 100644 index 0000000000..3614f42e8d --- /dev/null +++ b/desktop/gmrun/patches/100-gmrunrc.patch @@ -0,0 +1,25 @@ +# Description: Use x-terminal-emulator and x-www-browser +# Author: Vincent Legout <vincent@legout.info> + +Index: gmrun-0.9.2/config/gmrunrc +=================================================================== +--- gmrun-0.9.2.orig/config/gmrunrc 2010-02-04 22:00:30.944468499 +0800 ++++ gmrun-0.9.2/config/gmrunrc 2010-02-04 22:01:31.508469387 +0800 +@@ -3,7 +3,7 @@ + # GPL v2.0 applies + + # Set terminal +-Terminal = gnome-terminal --start-factory-server --use-factory ++Terminal = x-terminal-emulator + TermExec = ${Terminal} -e + AlwaysInTerm = ssh telnet ftp lynx mc vi vim pine centericq perldoc man + +@@ -30,7 +30,7 @@ + # - %u gets replaced with the whole URL ("http://www.google.com") + # - %s gets replaced with "//www.google.com". This is useful for URL-s + # like "man:printf" --> %s will get replaced with "printf" +-URL_http = mozilla -remote "openURL(%u, new-window)" ++URL_http = x-www-browser '%u' + URL_mailto = mozilla -remote "mailto(%s)" + URL_man = ${TermExec} 'man %s' + URL_info = ${TermExec} 'info %s' diff --git a/desktop/gmrun/patches/20-includes.patch b/desktop/gmrun/patches/20-includes.patch new file mode 100644 index 0000000000..c387bcd1dd --- /dev/null +++ b/desktop/gmrun/patches/20-includes.patch @@ -0,0 +1,15 @@ +# Description: include missing headers +# Author: Martin Michlmayr <tbm@cyrius.com> + +Index: gmrun-0.9.2/src/prefs.cc +=================================================================== +--- gmrun-0.9.2.orig/src/prefs.cc 2010-02-03 12:30:57.407768496 +0800 ++++ gmrun-0.9.2/src/prefs.cc 2010-02-03 12:31:04.636318281 +0800 +@@ -10,6 +10,7 @@ + *****************************************************************************/ + + ++#include <cstdlib> + #include <fstream> + #include <iostream> + #include <stdio.h> diff --git a/desktop/gmrun/patches/30-fix-gcc-4.3-build.patch b/desktop/gmrun/patches/30-fix-gcc-4.3-build.patch new file mode 100644 index 0000000000..bcdbc8acfe --- /dev/null +++ b/desktop/gmrun/patches/30-fix-gcc-4.3-build.patch @@ -0,0 +1,27 @@ +# Description: include missing headers +# Author: Cyril Brulebois <cyril.brulebois@enst-bretagne.fr> + +Index: gmrun-0.9.2/src/ci_string.h +=================================================================== +--- gmrun-0.9.2.orig/src/ci_string.h 2010-02-03 12:31:31.323767018 +0800 ++++ gmrun-0.9.2/src/ci_string.h 2010-02-03 12:31:38.822001700 +0800 +@@ -8,6 +8,7 @@ + + #include <string> + #include <ctype.h> ++#include <cstring> + + struct ci_char_traits : public std::char_traits<char> + { +Index: gmrun-0.9.2/src/gtkcompletionline.cc +=================================================================== +--- gmrun-0.9.2.orig/src/gtkcompletionline.cc 2010-02-03 12:31:43.951768512 +0800 ++++ gmrun-0.9.2/src/gtkcompletionline.cc 2010-02-03 12:31:51.199767425 +0800 +@@ -30,6 +30,7 @@ + #include <sstream> + #include <string> + #include <vector> ++#include <cstring> + using namespace std; + + #include "gtkcompletionline.h" diff --git a/desktop/gmrun/patches/40-history_string.patch b/desktop/gmrun/patches/40-history_string.patch new file mode 100644 index 0000000000..ecfe1d303b --- /dev/null +++ b/desktop/gmrun/patches/40-history_string.patch @@ -0,0 +1,28 @@ +# Description: Handle more than 256 characters in the history +# Author: <bdefreese@bddebian3.bddebian.com> + +Index: gmrun-0.9.2/src/history.cc +=================================================================== +--- gmrun-0.9.2.orig/src/history.cc 2010-02-03 12:32:18.519767950 +0800 ++++ gmrun-0.9.2/src/history.cc 2010-02-03 12:32:43.586035039 +0800 +@@ -41,15 +41,14 @@ + ifstream f(filename); + if (!f) return; + ++ string line_text; ++ + while (!f.eof()) { +- char line_text[256]; + string line_str; + +- f.getline(line_text, sizeof(line_text)); +- if (*line_text) { +- line_str = line_text; +- history.push_back(line_str); +- } ++ getline(f,line_text); ++ line_str = line_text; ++ history.push_back(line_str); + } + + m_file_entries = history.size(); diff --git a/desktop/gmrun/patches/50-empty-history.patch b/desktop/gmrun/patches/50-empty-history.patch new file mode 100644 index 0000000000..7f9477f7b6 --- /dev/null +++ b/desktop/gmrun/patches/50-empty-history.patch @@ -0,0 +1,36 @@ +# Description: Don't create an empty history file when History=0 +# Author: <bdefreese@bddebian3.bddebian.com> + +Index: gmrun-0.9.2/src/history.cc +=================================================================== +--- gmrun-0.9.2.orig/src/history.cc 2010-02-03 12:33:29.575767540 +0800 ++++ gmrun-0.9.2/src/history.cc 2010-02-03 12:34:47.349422238 +0800 +@@ -65,17 +65,19 @@ + if (!configuration.get_int("History", HIST_MAX_SIZE)) + HIST_MAX_SIZE = 20; + +- ofstream f(filename, ios::out); ++ if (HIST_MAX_SIZE) { ++ ofstream f(filename, ios::out); + +- int start = 0; +- if (history.size() > (size_t)HIST_MAX_SIZE) +- start = history.size() - HIST_MAX_SIZE; ++ int start = 0; ++ if (history.size() > (size_t)HIST_MAX_SIZE) ++ start = history.size() - HIST_MAX_SIZE; ++ ++ for (size_t i = start; i < history.size(); i++) ++ if (history[i].length() != 0) ++ f << history[i] << endl; + +- for (size_t i = start; i < history.size(); i++) +- if (history[i].length() != 0) +- f << history[i] << endl; +- +- f.flush(); ++ f.flush(); ++ } + } + + void diff --git a/desktop/gmrun/patches/60-fix_gtkcompletionline.patch b/desktop/gmrun/patches/60-fix_gtkcompletionline.patch new file mode 100644 index 0000000000..7ce7dd33b2 --- /dev/null +++ b/desktop/gmrun/patches/60-fix_gtkcompletionline.patch @@ -0,0 +1,56 @@ +# Description: Fixes FTBFS +# Author: Rafael Cunha de Almeida <rafael@kontesti.me> + +Index: gmrun-0.9.2/src/gtkcompletionline.cc +=================================================================== +--- gmrun-0.9.2.orig/src/gtkcompletionline.cc 2010-03-07 14:53:19.000000000 +0000 ++++ gmrun-0.9.2/src/gtkcompletionline.cc 2010-03-07 14:53:53.000000000 +0000 +@@ -374,30 +374,6 @@ + return 0; + } + +-int my_alphasort(const void* va, const void* vb) { +- const struct dirent** a = (const struct dirent**)va; +- const struct dirent** b = (const struct dirent**)vb; +- +- const char* s1 = (*a)->d_name; +- const char* s2 = (*b)->d_name; +- +- int l1 = strlen(s1); +- int l2 = strlen(s2); +- int result = strcmp(s1, s2); +- +- if (result == 0) return 0; +- +- if (l1 < l2) { +- int res2 = strncmp(s1, s2, l1); +- if (res2 == 0) return -1; +- } else { +- int res2 = strncmp(s1, s2, l2); +- if (res2 == 0) return 1; +- } +- +- return result; +-} +- + static void + generate_execs() + { +@@ -405,7 +381,7 @@ + + for (StrSet::iterator i = path.begin(); i != path.end(); i++) { + struct dirent **eps; +- int n = scandir(i->c_str(), &eps, select_executables_only, my_alphasort); ++ int n = scandir(i->c_str(), &eps, select_executables_only, alphasort); + if (n >= 0) { + for (int j = 0; j < n; j++) { + execs.insert(eps[j]->d_name); +@@ -505,7 +481,7 @@ + dirlist.clear(); + struct dirent **eps; + prefix = filename; +- n = scandir(dest.c_str(), &eps, select_executables_only, my_alphasort); ++ n = scandir(dest.c_str(), &eps, select_executables_only, alphasort); + if (n >= 0) { + for (int j = 0; j < n; j++) { + { diff --git a/desktop/gmrun/patches/70-cmdline.patch b/desktop/gmrun/patches/70-cmdline.patch new file mode 100644 index 0000000000..05bac80ae3 --- /dev/null +++ b/desktop/gmrun/patches/70-cmdline.patch @@ -0,0 +1,18 @@ +# Description: add support for command line argument as initial content +# Author: Fernando Vezzosi <fv@linuxvar.it> + +Index: gmrun-0.9.2/src/main.cc +=================================================================== +--- gmrun-0.9.2.orig/src/main.cc 2010-02-03 12:36:13.483769799 +0800 ++++ gmrun-0.9.2/src/main.cc 2010-02-03 12:37:21.895975382 +0800 +@@ -619,6 +619,10 @@ + gtk_completion_line_last_history_item(GTK_COMPLETION_LINE(compline)); + } + ++ if(argc == 2 && argv[1]){ ++ gtk_entry_set_text(GTK_ENTRY(compline), argv[1]); ++ } ++ + gtk_box_pack_start(GTK_BOX(hbox), compline, TRUE, TRUE, 0); + + int prefs_top = 80; diff --git a/desktop/gmrun/patches/80-selectoption.patch b/desktop/gmrun/patches/80-selectoption.patch new file mode 100644 index 0000000000..86da288d14 --- /dev/null +++ b/desktop/gmrun/patches/80-selectoption.patch @@ -0,0 +1,31 @@ +# Description: add "Selected" config option +# Author: Fernando Vezzosi <fv@linuxvar.it> + +Index: gmrun-0.9.2/src/main.cc +=================================================================== +--- gmrun-0.9.2.orig/src/main.cc 2010-02-03 12:37:52.455767905 +0800 ++++ gmrun-0.9.2/src/main.cc 2010-02-03 12:38:46.801743816 +0800 +@@ -615,6 +615,10 @@ + if (!configuration.get_int("ShowLast", shows_last_history_item)) { + shows_last_history_item = 0; + } ++ int last_history_selected = 0; ++ if (!configuration.get_int("Selected", last_history_selected)) { ++ last_history_selected = 1; ++ } + if (shows_last_history_item) { + gtk_completion_line_last_history_item(GTK_COMPLETION_LINE(compline)); + } +@@ -662,7 +666,11 @@ + + gtk_widget_show(win); + +- gtk_window_set_focus(GTK_WINDOW(win), compline); ++ if(last_history_selected){ ++ gtk_entry_select_region(GTK_ENTRY(compline), 0, strlen(gtk_entry_get_text(GTK_ENTRY(compline)))); ++ }else{ ++ gtk_entry_set_position(GTK_ENTRY(compline), -1); ++ } + + gtk_main(); + } diff --git a/desktop/gmrun/patches/90-window_placement.patch b/desktop/gmrun/patches/90-window_placement.patch new file mode 100644 index 0000000000..e83addebea --- /dev/null +++ b/desktop/gmrun/patches/90-window_placement.patch @@ -0,0 +1,50 @@ +# Description: Update window placement +# If the user hasn't set any position prefs (Top or Left directives), then +# center the window +# Bug-Debian: http://bugs.debian.org/471319 +# Author: Vincent Legout <vincent@legout.info> + +Index: gmrun-0.9.2/config/gmrunrc +=================================================================== +--- gmrun-0.9.2.orig/config/gmrunrc 2010-02-04 21:55:11.968469321 +0800 ++++ gmrun-0.9.2/config/gmrunrc 2010-02-04 21:55:14.860466459 +0800 +@@ -9,8 +9,6 @@ + + # Set window geometry (except height) + Width = 400 +-Top = 100 +-Left = 200 + + # History size + History = 256 +Index: gmrun-0.9.2/src/main.cc +=================================================================== +--- gmrun-0.9.2.orig/src/main.cc 2010-02-04 21:55:22.104464288 +0800 ++++ gmrun-0.9.2/src/main.cc 2010-02-04 21:56:42.232468582 +0800 +@@ -629,8 +629,8 @@ + + gtk_box_pack_start(GTK_BOX(hbox), compline, TRUE, TRUE, 0); + +- int prefs_top = 80; +- int prefs_left = 100; ++ int prefs_top = -1; ++ int prefs_left = -1; + configuration.get_int("Top", prefs_top); + configuration.get_int("Left", prefs_left); + +@@ -659,10 +659,14 @@ + geo_parsed = gtk_window_parse_geometry (GTK_WINDOW (win), + geoptr); + } +- else ++ else if (prefs_top != -1 && prefs_left != -1) + { + gtk_widget_set_uposition(win, prefs_left, prefs_top); + } ++ else ++ { ++ gtk_window_set_position (GTK_WINDOW (win), GTK_WIN_POS_CENTER); ++ } + + gtk_widget_show(win); + diff --git a/desktop/gmrun/patches/gmrun-0.9.2-gcc43.patch b/desktop/gmrun/patches/gmrun-0.9.2-gcc43.patch deleted file mode 100644 index 5f889d4e1e..0000000000 --- a/desktop/gmrun/patches/gmrun-0.9.2-gcc43.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -ur gmrun-0.9.2/src/ci_string.h gmrun-0.9.2.new/src/ci_string.h ---- gmrun-0.9.2/src/ci_string.h 2001-05-16 17:39:31.000000000 +0300 -+++ gmrun-0.9.2.new/src/ci_string.h 2008-01-15 09:10:39.000000000 +0200 -@@ -7,6 +7,7 @@ - #define __CI_STRING_H__ - - #include <string> -+#include <string.h> - #include <ctype.h> - - struct ci_char_traits : public std::char_traits<char> -diff -ur gmrun-0.9.2/src/gtkcompletionline.cc gmrun-0.9.2.new/src/gtkcompletionline.cc ---- gmrun-0.9.2/src/gtkcompletionline.cc 2003-11-16 12:55:07.000000000 +0200 -+++ gmrun-0.9.2.new/src/gtkcompletionline.cc 2008-01-15 09:10:39.000000000 +0200 -@@ -24,6 +24,7 @@ - #include <sys/types.h> - #include <sys/stat.h> - #include <unistd.h> -+#include <string.h> - - #include <iostream> - #include <set> -diff -ur gmrun-0.9.2/src/main.cc gmrun-0.9.2.new/src/main.cc ---- gmrun-0.9.2/src/main.cc 2003-11-16 12:55:07.000000000 +0200 -+++ gmrun-0.9.2.new/src/main.cc 2008-01-15 09:10:39.000000000 +0200 -@@ -20,6 +20,7 @@ - #include <algorithm> - #include <iterator> - #include <popt.h> -+#include <string.h> - - using namespace std; - -diff -ur gmrun-0.9.2/src/prefs.cc gmrun-0.9.2.new/src/prefs.cc ---- gmrun-0.9.2/src/prefs.cc 2002-08-16 13:48:22.000000000 +0300 -+++ gmrun-0.9.2.new/src/prefs.cc 2008-01-16 19:48:39.000000000 +0200 -@@ -13,6 +13,7 @@ - #include <fstream> - #include <iostream> - #include <stdio.h> -+#include <stdlib.h> - - #include <list> - diff --git a/desktop/gmrun/patches/gmrun-0.9.2-mousewheel.patch b/desktop/gmrun/patches/gmrun-0.9.2-mousewheel.patch deleted file mode 100644 index ac1f843223..0000000000 --- a/desktop/gmrun/patches/gmrun-0.9.2-mousewheel.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -ur gmrun-0.9.2/src/gtkcompletionline.cc gmrun-0.9.2.new/src/gtkcompletionline.cc ---- gmrun-0.9.2/src/gtkcompletionline.cc 2010-01-11 12:20:16.076644635 +0200 -+++ gmrun-0.9.2.new/src/gtkcompletionline.cc 2010-01-11 12:21:11.815581518 +0200 -@@ -75,6 +75,8 @@ - - static gboolean - on_key_press(GtkCompletionLine *cl, GdkEventKey *event, gpointer data); -+static gboolean -+on_scroll(GtkCompletionLine *cl, GdkEventScroll *event, gpointer data); - - /* get_type */ - guint gtk_completion_line_get_type(void) -@@ -204,6 +206,8 @@ - GTK_SIGNAL_FUNC(on_key_press), NULL); - gtk_signal_connect(GTK_OBJECT(object), "key_release_event", - GTK_SIGNAL_FUNC(on_key_press), NULL); -+ gtk_signal_connect(GTK_OBJECT(object), "scroll-event", -+ GTK_SIGNAL_FUNC(on_scroll), NULL); - - object->hist = new HistoryFile(); - -@@ -954,6 +958,45 @@ - } - - static gboolean -+on_scroll(GtkCompletionLine *cl, GdkEventScroll *event, gpointer data) -+{ -+ if (event->direction == GDK_SCROLL_UP) { -+ if (cl->win_compl != NULL) { -+ int &item = cl->list_compl_items_where; -+ item--; -+ if (item < 0) { -+ item = 0; -+ } else { -+ complete_from_list(cl); -+ } -+ } else { -+ up_history(cl); -+ } -+ if (MODE_SRC) { -+ search_off(cl); -+ } -+ return TRUE; -+ } else if (event->direction == GDK_SCROLL_DOWN) { -+ if (cl->win_compl != NULL) { -+ int &item = cl->list_compl_items_where; -+ item++; -+ if (item >= cl->list_compl_nr_rows) { -+ item = cl->list_compl_nr_rows - 1; -+ } else { -+ complete_from_list(cl); -+ } -+ } else { -+ down_history(cl); -+ } -+ if (MODE_SRC) { -+ search_off(cl); -+ } -+ return TRUE; -+ } -+ return FALSE; -+} -+ -+static gboolean - on_key_press(GtkCompletionLine *cl, GdkEventKey *event, gpointer data) - { - static gint tt_id = -1; -Only in gmrun-0.9.2.new/src: gtkcompletionline.cc.orig diff --git a/desktop/gmrun/patches/gmrun-gmrunrc.patch b/desktop/gmrun/patches/gmrun-gmrunrc.patch deleted file mode 100644 index 6a53462590..0000000000 --- a/desktop/gmrun/patches/gmrun-gmrunrc.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- gmrun-0.9.2/config/gmrunrc.old 2003-11-16 12:43:41.000000000 +0200 -+++ gmrun-0.9.2/config/gmrunrc 2007-01-18 16:05:47.000000000 +0200 -@@ -3,7 +3,7 @@ - # GPL v2.0 applies - - # Set terminal --Terminal = gnome-terminal --start-factory-server --use-factory -+Terminal = xterm - TermExec = ${Terminal} -e - AlwaysInTerm = ssh telnet ftp lynx mc vi vim pine centericq perldoc man - -@@ -32,18 +32,14 @@ - # - %u gets replaced with the whole URL ("http://www.google.com") - # - %s gets replaced with "//www.google.com". This is useful for URL-s - # like "man:printf" --> %s will get replaced with "printf" --URL_http = mozilla -remote "openURL(%u, new-window)" --URL_mailto = mozilla -remote "mailto(%s)" -+URL_http = xdg-open %u -+URL_mailto = xdg-email %u -+URL_file = xdg-open %s - URL_man = ${TermExec} 'man %s' - URL_info = ${TermExec} 'info %s' --URL_pd = ${TermExec} 'perldoc %s' --URL_file = nautilus %s --URL_readme = ${TermExec} 'less /usr/doc/%s/README' --URL_info = ${TermExec} 'info %s' --URL_sh = sh -c '%s' -+URL_search = xdg-open 'http://www.google.com/search?q=%s' - - # extension handlers --EXT:doc,rtf = AbiWord %s --EXT:txt,cc,cpp,h,java,html,htm,epl,tex,latex,js,css,xml,xsl,am = emacs %s --EXT:ps = gv %s --EXT:pdf = xpdf %s -+# Customize your own extension handler. -+EXT:doc,rtf,txt,cc,cpp,h,java,html,htm,epl,tex,latex,js,css,xml,xsl,am,ps,pdf = xdg-open %s -+ diff --git a/desktop/gmrun/patches/gtkcompletionline.cc.patch b/desktop/gmrun/patches/gtkcompletionline.cc.patch deleted file mode 100644 index 989183b2be..0000000000 --- a/desktop/gmrun/patches/gtkcompletionline.cc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gmrun-0.9.2/src/gtkcompletionline.cc.orig 2009-06-19 22:38:14.000000000 +0400 -+++ gmrun-0.9.2/src/gtkcompletionline.cc 2009-06-19 22:37:14.000000000 +0400 -@@ -376,7 +377,7 @@ - return 0; - } - --int my_alphasort(const void* va, const void* vb) { -+int my_alphasort(const dirent** va, const dirent** vb) { - const struct dirent** a = (const struct dirent**)va; - const struct dirent** b = (const struct dirent**)vb; - diff --git a/desktop/gmrun/slack-desc b/desktop/gmrun/slack-desc index 13d41492b6..644bb90e2a 100644 --- a/desktop/gmrun/slack-desc +++ b/desktop/gmrun/slack-desc @@ -8,11 +8,11 @@ |-----handy-ruler------------------------------------------------------| gmrun: gmrun (A simple program which provides a run program window) gmrun: -gmrun: gmrun is a simple GTK program which provides a "run program" window. -gmrun: It features a bash-like TAB completion, Ctrl-R/Ctrl-S for searching +gmrun: gmrun is a simple GTK program which provides a "run program" window. +gmrun: It features a bash-like TAB completion, Ctrl-R/Ctrl-S for searching gmrun: through the history and URL handlers for any user defined prefix. gmrun: -gmrun: Homepage: http://sourceforge.net/projects/gmrun/ +gmrun: Home page: http://sourceforge.net/projects/gmrun/ gmrun: gmrun: gmrun: |