From b8295ff79d975ba7f080ca51bc8679a1fad25b29 Mon Sep 17 00:00:00 2001 From: Lukas Schwaighofer Date: Sun, 12 Mar 2017 15:49:46 -0700 Subject: Import gmrun_0.9.2-2.2.debian.tar.xz [dgit import tarball gmrun 0.9.2-2.2 gmrun_0.9.2-2.2.debian.tar.xz] --- README.Debian | 17 ++ changelog | 240 +++++++++++++++++++++ compat | 1 + control | 16 ++ copyright | 24 +++ dirs | 4 + docs | 1 + gmrun.1 | 91 ++++++++ gmrun.install | 1 + gmrun.manpages | 1 + links | 1 + menu | 2 + patches/10-escaping.patch | 23 ++ patches/100-gmrunrc.patch | 25 +++ patches/20-includes.patch | 15 ++ patches/30-fix-gcc-4.3-build.patch | 27 +++ patches/40-history_string.patch | 28 +++ patches/50-empty-history.patch | 36 ++++ patches/60-fix_gtkcompletionline.patch | 56 +++++ patches/70-cmdline.patch | 18 ++ patches/80-selectoption.patch | 31 +++ patches/90-window_placement.patch | 50 +++++ patches/debian-changes-0.9.2-2.1 | 76 +++++++ .../return-type-gtk_completion_line_get_type.patch | 45 ++++ patches/series | 12 ++ rules | 4 + source/format | 1 + watch | 3 + 28 files changed, 849 insertions(+) create mode 100644 README.Debian create mode 100644 changelog create mode 100644 compat create mode 100644 control create mode 100644 copyright create mode 100644 dirs create mode 100644 docs create mode 100644 gmrun.1 create mode 100644 gmrun.install create mode 100644 gmrun.manpages create mode 100644 links create mode 100644 menu create mode 100644 patches/10-escaping.patch create mode 100644 patches/100-gmrunrc.patch create mode 100644 patches/20-includes.patch create mode 100644 patches/30-fix-gcc-4.3-build.patch create mode 100644 patches/40-history_string.patch create mode 100644 patches/50-empty-history.patch create mode 100644 patches/60-fix_gtkcompletionline.patch create mode 100644 patches/70-cmdline.patch create mode 100644 patches/80-selectoption.patch create mode 100644 patches/90-window_placement.patch create mode 100644 patches/debian-changes-0.9.2-2.1 create mode 100644 patches/return-type-gtk_completion_line_get_type.patch create mode 100644 patches/series create mode 100755 rules create mode 100644 source/format create mode 100644 watch diff --git a/README.Debian b/README.Debian new file mode 100644 index 0000000..1eec321 --- /dev/null +++ b/README.Debian @@ -0,0 +1,17 @@ +gmrun for Debian +---------------- + +Please see /etc/gmrunrc for an example configuration file. +Place it in ~/.gmrunrc if you wish to customize gmrun. + +Also of note is that in order to use complex commands like: + +"cat ~/.xsession | grep ssh | sh > /dev/null 2>&1" + +you must use the "shell" URL; ie, type in: + +shell:cat ~/.xsession | grep ssh | sh > /dev/null 2>&1 + +This will pass the command to 'sh -c'. + + -- David B Harris , Wed, 8 Aug 2001 08:05:49 -0400 diff --git a/changelog b/changelog new file mode 100644 index 0000000..54fba46 --- /dev/null +++ b/changelog @@ -0,0 +1,240 @@ +gmrun (0.9.2-2.2) unstable; urgency=medium + + * Non-maintainer upload. + + [ Andreas Henriksson ] + * fix return type of gtk_completion_line_get_type (Closes: #857065) + + -- Lukas Schwaighofer Sun, 12 Mar 2017 23:49:46 +0100 + +gmrun (0.9.2-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Use patch from Rafael Cunha de Almeida to build using glibc's alphasort + (Closes: #570348) + + -- Christoph Egger Sat, 17 Jul 2010 19:03:47 +0200 + +gmrun (0.9.2-2) unstable; urgency=low + + * New maintainer upload (Closes: #568989) + * Fixes compiler error when libc6-dev < 2.10.2-2 (Closes: #569586) + + -- Alexandre De Dommelin Tue, 09 Feb 2010 10:50:21 +0100 + +gmrun (0.9.2-1) unstable; urgency=low + + * QA upload + * New upstream version (Closes: #397028) + * debian/compat: Bumped to 7 + * debian/control: + - Add Build-Depends on libpopt-dev + - Update Standards-Version to 3.8.4 + - Bump debhelper build-dep to 7 + * Switch to 3.0 (quilt) source format: + - Add debian/source/format + - Remove README.source + - Switch from dpatch to quilt. Add DEP3 headers + * debian/rules: Use rules.tiny + * debian/gmrun.install: Added + * debian/gmrun.manpages: Added + * debian/patches: + - Add 90-window_placement.patch (Closes: #471319) + - Add 100-gmrunrc.patch: Use x-terminal-emulator and x-www-browser + + -- Vincent Legout Thu, 04 Feb 2010 22:19:46 +0800 + +gmrun (0.9.1-4) unstable; urgency=low + + * QA upload. + * debian/patches/: + - 60-fix_gtkcompletionline.dpatch added, thanks to Brian M. Carlson + (Closes: #554587) + - 70-cmdline.dpatch added, thanks to Fernando Vezzosi + (Closes: #460315) + - 80-selectoption.dpatch added, thanks to Fernando Vezzosi + (Closes: #499743) + * debian/gmrun.1 updated, thanks to Mauro Lizaur and Fernando + Vezzosi (Closes: #109962) + + -- David Paleino Mon, 09 Nov 2009 11:10:40 +0100 + +gmrun (0.9.1-3) unstable; urgency=low + + * QA upload. + + Set maintainer to Debian QA Group . + * 40-history_string.dpatch - (Closes: #518529). + + Handle more that 256 character string in history. + + Thanks to Mauro Lizaur for the patch. + * 50-empty-history.dpatch - (Closes: #386862). + + Don't create empty history file on History=0. + + Thanks to Markus Jarvinen for the patch. + * Install config/gmrunrc in etc. (Closes: #501696). + * Bump debhelper build-dep to 5. + * Move DH_COMPAT from rules to compat and set to 5. + * Add Homepage field. (Sourceforge project page). + * Add watch file. + * Make clean not ignore errors. + * Add ${misc:Depends} for debhelper package. + * Add appropriate copyright holder to debian/copyright. + * Version the path to the license to GPL-2. + * Add README.source for dpatch patch system. + * Bump Standards Version to 3.8.3. + + -- Barry deFreese Mon, 19 Oct 2009 16:40:23 -0400 + +gmrun (0.9.1-2.4) unstable; urgency=high + + * Non-maintainer upload. + * Make sure dpatchs are applied before building (Closes: #474797) + * Update standards version to 3.7.3 + * Changed menu section to Applications/File Management + + -- Joachim Breitner Wed, 09 Apr 2008 20:31:52 +0200 + +gmrun (0.9.1-2.3) unstable; urgency=low + + * Non-maintainer upload. + * Fix gcc-4.3 FTBFS, patch by Cyril Brulebois (Closes: #455301) + + -- Marc 'HE' Brockschmidt Sun, 16 Mar 2008 17:46:37 +0100 + +gmrun (0.9.1-2.2) unstable; urgency=low + + * Non-maintainer upload. + * Added patch (20-includes.dpatch) to fix missing includes for building with + gcc 4.3 (Closes: #417203). + + -- Luca Bedogni Tue, 25 Sep 2007 00:53:39 +0200 + +gmrun (0.9.1-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Added patch for correct escaping of special characters (Closes: #432702). + * Added Build-depends on dpatch + + -- Luca Bedogni Wed, 05 Sep 2007 14:45:35 +0200 + +gmrun (0.9.1-2) unstable; urgency=low + + * Enhance default /etc/gmrunrc an new URL handler; URL_term which launches + the given command with 'sh -c', in an x-terminal-emulator, and waits for + input when the command finishes. (Thanks to martin f krafft + for the initial patch.) + * Enhance default /etc/gmrunrc by adjusting the default file handlers to + take into account various desktop environments, and attempt to use the + most appropriate application (Thanks again to Madduck) + * Also add a bunch of apps to AlwaysInTerm (thanks Madduck). This and the + two above should (Closes: #353537) + * Quote 'needs' and 'section' values in debian/menu, thanks linda and + lintian. + * Updated FSF address in debian/copyright, thanks linda and lintian. + * Update standards-version to 3.6.2.0, no changes required. + * Change Maintainer: email address from my private address to + dbharris@debian.org + + -- David B. Harris Sun, 19 Feb 2006 13:35:47 -0500 + +gmrun (0.9.1-1) unstable; urgency=low + + * New upstream release + + %s and %u are expanded as many times as necessary in URL handlers + (Closes: #203939) + + Upstream fix for "hitting 'e' when gmrun starts deselects the text and + doesn't insert 'e'" (Closes: #186134) + + Upstream fix to make sure that ~/.gmrun_history is only created when + History is > 0 (Closes: #204714) + * src/main.cc: Fix running comlex commands (ie: commands with spaces or + other such things in them) with a terminal emulator + * config/gmrunrc: Use x-www-browser as the default http handler, now that + it's available. Used to be gnome-moz-remote (Closes: #198539) + * debian/control: + + Upstream now develops with GTK2, replace libgtk1.2-dev with + libgtk2.0-dev in Build-Depends + + Bump Standards-Version to 3.6.1.0, no changes required + + -- David B Harris Sun, 31 Aug 2003 04:13:48 -0400 + +gmrun (0.8.1-2) unstable; urgency=low + + * src/main.cc: If the user hasn't set any position prefs (Top or Left + directives), then center the window. + + -- David B Harris Thu, 23 Jan 2003 01:51:56 -0500 + +gmrun (0.8.1-1) unstable; urgency=low + + * New upstream release + * Update config.{sub,guess} to latest versions + * Update to standards-version 3.5.8.0 + + -- David B Harris Fri, 10 Jan 2003 02:20:28 -0500 + +gmrun (0.8-1) unstable; urgency=low + + * New upstream release + + Fixes ! history searching so that it works immediately after launch. + (Closes: #156221) + + -- David B Harris Fri, 16 Aug 2002 22:52:59 -0400 + +gmrun (0.7.0-3) unstable; urgency=low + + * Changed a few lines in src/main.cc so that ${TermExec} was launched + properly, and modified config file to be more correct. (Closes: #155413) + Thanks, Michal Politowski, for the above :) + + -- David B Harris Mon, 5 Aug 2002 02:03:53 -0400 + +gmrun (0.7.0-2) unstable; urgency=low + + * Added small patch to src/main.cc so that you can omit specifying + position in the config file(and the result will be the window + manager deciding where to place it). Submitted upstream. + (Closes: #131526) + + -- David B Harris Wed, 30 Jan 2002 10:56:39 -0500 + +gmrun (0.7.0-1) unstable; urgency=low + + * New upstream release + * Added Build-depend on g++-3.0; I simply don't know enough C++ to cope + with any upstream changes to source without some help. + * Modifications to upstream source: + + Undid all previous modifications if said modifications dealt with + gcc/gcc-3.0 incompatibilities. + + Removed the added ampersand in main.cc(line 92), and instead call + fork() in main.cc(lines 176 and 177). This actually works! :) + + -- David B Harris Sat, 20 Oct 2001 19:13:12 -0400 + +gmrun (0.6.1-2) unstable; urgency=low + + * Modifications to upstream source: + + main.cc(line 92): changed so that an ampersand is appended to each + command, so that the commands are backgrounded. + + -- David B Harris Mon, 24 Sep 2001 00:34:19 -0400 + +gmrun (0.6.1-1) unstable; urgency=low + + * Initial Release (closes: Bug#108057) + * Modifications to upstream source: + + Replaced all calls to string::clear() with string::erase(), so that + gmrun will build with g++ 2.95.3, as opposed to g++ 3.0 + + Replaced call to std::char_traits with std::string_char_traits(same + reason as above modifications) + + src/prefs.cc: look in /etc/ for the global gmrunrc, as opposed + to /usr/share/gmrun/ + + config/Makefile.in: change "myrcdir" such that the global gmrunrc + will be installed to /etc/gmrunrc + + -- David B Harris Wed, 8 Aug 2001 08:05:49 -0400 +gmrun (0.9.1-2.5) unstable; urgency=high + + * Non-maintainer upload. + * Make sure dpatchs are applied before building (Closes: #474797) + * Update standards version to 3.7.3 + * Changed menu section to Applications/File Management + + -- Joachim Breitner Wed, 09 Apr 2008 20:28:26 +0200 diff --git a/compat b/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/compat @@ -0,0 +1 @@ +7 diff --git a/control b/control new file mode 100644 index 0000000..b7521ff --- /dev/null +++ b/control @@ -0,0 +1,16 @@ +Source: gmrun +Section: x11 +Priority: optional +Maintainer: Alexandre De Dommelin +Build-Depends: debhelper (>= 7), libgtk2.0-dev, libpopt-dev +Standards-Version: 3.8.4 +Homepage: http://sourceforge.net/projects/gmrun/ + +Package: gmrun +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Featureful CLI-like GTK+ application launcher + This is gmrun; a small fast, yet featureful application launcher for use + under X11, which uses GTK+ widget toolkit. Some features include tab- + completion of file names and programs, history, easy x-terminal-emulator + launching, and URL handling. diff --git a/copyright b/copyright new file mode 100644 index 0000000..362aa3e --- /dev/null +++ b/copyright @@ -0,0 +1,24 @@ +This package was debianized by David B Harris on +Wed, 8 Aug 2001 08:05:49 -0400. + +It was downloaded from http://www.sourceforge.net/projects/gmrun/ + +Upstream Author: Mihai Bazon + +Copyright: + Copyright (C) 2000-2003 Mihai Bazon + +License: + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2, as + published by the Free Software Foundation. See the file + /usr/share/common-licenses/GPL-2 for details. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/dirs b/dirs new file mode 100644 index 0000000..12f22ef --- /dev/null +++ b/dirs @@ -0,0 +1,4 @@ +usr/bin +usr/share/man/man1 +etc/ +usr/share/gmrun diff --git a/docs b/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/docs @@ -0,0 +1 @@ +README diff --git a/gmrun.1 b/gmrun.1 new file mode 100644 index 0000000..d0564d5 --- /dev/null +++ b/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 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\fP and +.\" \fI\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:", 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 +, the latest version is available from +\fIhttp://www.sourceforge.net/projects/gmrun/\fP +.PP +This manual page was written by David B Harris , +for the Debian GNU/Linux system (but may be used by others). diff --git a/gmrun.install b/gmrun.install new file mode 100644 index 0000000..138a37d --- /dev/null +++ b/gmrun.install @@ -0,0 +1 @@ +config/gmrunrc /etc/ diff --git a/gmrun.manpages b/gmrun.manpages new file mode 100644 index 0000000..453b11f --- /dev/null +++ b/gmrun.manpages @@ -0,0 +1 @@ +debian/gmrun.1 diff --git a/links b/links new file mode 100644 index 0000000..c1ce44f --- /dev/null +++ b/links @@ -0,0 +1 @@ +/etc/gmrunrc /usr/share/gmrun/gmrunrc diff --git a/menu b/menu new file mode 100644 index 0000000..058471c --- /dev/null +++ b/menu @@ -0,0 +1,2 @@ +?package(gmrun):needs="X11" section="Applications/File Management"\ + title="gmrun" command="/usr/bin/gmrun" diff --git a/patches/10-escaping.patch b/patches/10-escaping.patch new file mode 100644 index 0000000..b4bc208 --- /dev/null +++ b/patches/10-escaping.patch @@ -0,0 +1,23 @@ +# Description: Correct escaping of characters +# Author: Luca Bedogni + +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/patches/100-gmrunrc.patch b/patches/100-gmrunrc.patch new file mode 100644 index 0000000..3614f42 --- /dev/null +++ b/patches/100-gmrunrc.patch @@ -0,0 +1,25 @@ +# Description: Use x-terminal-emulator and x-www-browser +# Author: Vincent Legout + +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/patches/20-includes.patch b/patches/20-includes.patch new file mode 100644 index 0000000..c387bcd --- /dev/null +++ b/patches/20-includes.patch @@ -0,0 +1,15 @@ +# Description: include missing headers +# Author: Martin Michlmayr + +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 + #include + #include + #include diff --git a/patches/30-fix-gcc-4.3-build.patch b/patches/30-fix-gcc-4.3-build.patch new file mode 100644 index 0000000..bcdbc8a --- /dev/null +++ b/patches/30-fix-gcc-4.3-build.patch @@ -0,0 +1,27 @@ +# Description: include missing headers +# Author: Cyril Brulebois + +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 + #include ++#include + + struct ci_char_traits : public std::char_traits + { +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 + #include + #include ++#include + using namespace std; + + #include "gtkcompletionline.h" diff --git a/patches/40-history_string.patch b/patches/40-history_string.patch new file mode 100644 index 0000000..ecfe1d3 --- /dev/null +++ b/patches/40-history_string.patch @@ -0,0 +1,28 @@ +# Description: Handle more than 256 characters in the history +# Author: + +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/patches/50-empty-history.patch b/patches/50-empty-history.patch new file mode 100644 index 0000000..7f9477f --- /dev/null +++ b/patches/50-empty-history.patch @@ -0,0 +1,36 @@ +# Description: Don't create an empty history file when History=0 +# Author: + +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/patches/60-fix_gtkcompletionline.patch b/patches/60-fix_gtkcompletionline.patch new file mode 100644 index 0000000..7ce7dd3 --- /dev/null +++ b/patches/60-fix_gtkcompletionline.patch @@ -0,0 +1,56 @@ +# Description: Fixes FTBFS +# Author: Rafael Cunha de Almeida + +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/patches/70-cmdline.patch b/patches/70-cmdline.patch new file mode 100644 index 0000000..05bac80 --- /dev/null +++ b/patches/70-cmdline.patch @@ -0,0 +1,18 @@ +# Description: add support for command line argument as initial content +# Author: Fernando Vezzosi + +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/patches/80-selectoption.patch b/patches/80-selectoption.patch new file mode 100644 index 0000000..86da288 --- /dev/null +++ b/patches/80-selectoption.patch @@ -0,0 +1,31 @@ +# Description: add "Selected" config option +# Author: Fernando Vezzosi + +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/patches/90-window_placement.patch b/patches/90-window_placement.patch new file mode 100644 index 0000000..e83adde --- /dev/null +++ b/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 + +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/patches/debian-changes-0.9.2-2.1 b/patches/debian-changes-0.9.2-2.1 new file mode 100644 index 0000000..c66d16f --- /dev/null +++ b/patches/debian-changes-0.9.2-2.1 @@ -0,0 +1,76 @@ +Description: Upstream changes introduced in version 0.9.2-2.1 + This patch has been created by dpkg-source during the package build. + Here's the last changelog entry, hopefully it gives details on why + those changes were made: + . + gmrun (0.9.2-2.1) unstable; urgency=low + . + * Non-maintainer upload. + * Use patch from Rafael Cunha de Almeida to build using glibc's alphasort + (Closes: #570348) + . + The person named in the Author field signed this changelog entry. +Author: Christoph Egger +Bug-Debian: http://bugs.debian.org/570348 + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +--- gmrun-0.9.2.orig/src/gtkcompletionline.cc ++++ gmrun-0.9.2/src/gtkcompletionline.cc +@@ -374,6 +374,27 @@ select_executables_only(const struct dir + return 0; + } + ++int my_alphasort(const struct dirent** a, const struct dirent** b) { ++ 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() + { +@@ -381,7 +402,7 @@ generate_execs() + + for (StrSet::iterator i = path.begin(); i != path.end(); i++) { + struct dirent **eps; +- int n = scandir(i->c_str(), &eps, select_executables_only, alphasort); ++ int n = scandir(i->c_str(), &eps, select_executables_only, my_alphasort); + if (n >= 0) { + for (int j = 0; j < n; j++) { + execs.insert(eps[j]->d_name); +@@ -481,7 +502,7 @@ generate_dirlist(const char *what) + dirlist.clear(); + struct dirent **eps; + prefix = filename; +- n = scandir(dest.c_str(), &eps, select_executables_only, alphasort); ++ n = scandir(dest.c_str(), &eps, select_executables_only, my_alphasort); + if (n >= 0) { + for (int j = 0; j < n; j++) { + { diff --git a/patches/return-type-gtk_completion_line_get_type.patch b/patches/return-type-gtk_completion_line_get_type.patch new file mode 100644 index 0000000..9c6f1f2 --- /dev/null +++ b/patches/return-type-gtk_completion_line_get_type.patch @@ -0,0 +1,45 @@ +From: Andreas Henriksson +Date: Wed, 8 Mar 2017 23:21:15 +0100 +Subject: fix return type of gtk_completion_line_get_type + +Patch originally downloaded from +https://src.fedoraproject.org/cgit/rpms/gmrun.git/plain/gmrun-0.9.2-f12.patch + +slighly modified (parts dropped, fuzz fixed) to apply on top of debian +package + +Closes: #857065 +--- + src/gtkcompletionline.cc | 4 ++-- + src/gtkcompletionline.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/gtkcompletionline.cc b/src/gtkcompletionline.cc +index 90897f7..c247994 100644 +--- a/src/gtkcompletionline.cc ++++ b/src/gtkcompletionline.cc +@@ -77,9 +77,9 @@ static gboolean + on_key_press(GtkCompletionLine *cl, GdkEventKey *event, gpointer data); + + /* get_type */ +-guint gtk_completion_line_get_type(void) ++GtkType gtk_completion_line_get_type(void) + { +- static guint type = 0; ++ static GtkType type = 0; + if (type == 0) + { + GtkTypeInfo type_info = +diff --git a/src/gtkcompletionline.h b/src/gtkcompletionline.h +index 5e14cd7..caed4c7 100644 +--- a/src/gtkcompletionline.h ++++ b/src/gtkcompletionline.h +@@ -76,7 +76,7 @@ extern "C++" { + void (* cancel)(GtkCompletionLine *cl); + }; + +- guint gtk_completion_line_get_type(void); ++ GtkType gtk_completion_line_get_type(void); + GtkWidget *gtk_completion_line_new(); + + void gtk_completion_line_last_history_item(GtkCompletionLine*); diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..2a255f0 --- /dev/null +++ b/patches/series @@ -0,0 +1,12 @@ +10-escaping.patch +20-includes.patch +30-fix-gcc-4.3-build.patch +40-history_string.patch +50-empty-history.patch +60-fix_gtkcompletionline.patch +70-cmdline.patch +80-selectoption.patch +90-window_placement.patch +100-gmrunrc.patch +debian-changes-0.9.2-2.1 +return-type-gtk_completion_line_get_type.patch diff --git a/rules b/rules new file mode 100755 index 0000000..2d33f6a --- /dev/null +++ b/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ diff --git a/source/format b/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/watch b/watch new file mode 100644 index 0000000..bc63a2b --- /dev/null +++ b/watch @@ -0,0 +1,3 @@ +version=3 + +http://sf.net/gmrun/gmrun-([\d.]+)\.tar\.gz -- cgit v1.2.3