diff options
Diffstat (limited to 'desktop/gmrun/patches')
-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 |
14 files changed, 309 insertions, 160 deletions
diff --git a/desktop/gmrun/patches/10-escaping.patch b/desktop/gmrun/patches/10-escaping.patch new file mode 100644 index 000000000000..b4bc2084b662 --- /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 000000000000..3614f42e8d38 --- /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 000000000000..c387bcd1dd34 --- /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 000000000000..bcdbc8acfef9 --- /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 000000000000..ecfe1d303b5f --- /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 000000000000..7f9477f7b600 --- /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 000000000000..7ce7dd33b212 --- /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 000000000000..05bac80ae3ac --- /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 000000000000..86da288d14e1 --- /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 000000000000..e83addebea5c --- /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 5f889d4e1e5a..000000000000 --- 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 ac1f843223f7..000000000000 --- 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 6a53462590b2..000000000000 --- 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 989183b2be46..000000000000 --- 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; - |