diff --git a/gmrun-0.9.2-f12.patch b/gmrun-0.9.2-f12.patch new file mode 100644 index 0000000..ab771c5 --- /dev/null +++ b/gmrun-0.9.2-f12.patch @@ -0,0 +1,47 @@ +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:22:35.097644540 +0200 ++++ gmrun-0.9.2.new/src/gtkcompletionline.cc 2010-01-11 12:22:45.686644030 +0200 +@@ -79,9 +79,9 @@ + on_scroll(GtkCompletionLine *cl, GdkEventScroll *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 = +@@ -381,10 +381,7 @@ + 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; +- ++int my_alphasort(const struct dirent** a, const struct dirent** b) { + const char* s1 = (*a)->d_name; + const char* s2 = (*b)->d_name; + +diff -ur gmrun-0.9.2/src/gtkcompletionline.h gmrun-0.9.2.new/src/gtkcompletionline.h +--- gmrun-0.9.2/src/gtkcompletionline.h 2003-11-16 12:43:32.000000000 +0200 ++++ gmrun-0.9.2.new/src/gtkcompletionline.h 2010-01-11 12:22:45.686644030 +0200 +@@ -14,6 +14,7 @@ + #define __GTKCOMPLETIONLINE_H__ + + #include ++#include + + #include + +@@ -76,7 +77,7 @@ + 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/gmrun-0.9.2-mousewheel.patch b/gmrun-0.9.2-mousewheel.patch new file mode 100644 index 0000000..ac1f843 --- /dev/null +++ b/gmrun-0.9.2-mousewheel.patch @@ -0,0 +1,68 @@ +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/gmrun.spec b/gmrun.spec index f8236af..e748886 100644 --- a/gmrun.spec +++ b/gmrun.spec @@ -1,6 +1,6 @@ Name: gmrun Version: 0.9.2 -Release: 16%{?dist} +Release: 19%{?dist} Summary: Lightweight "Run program" dialog box with search history and tab completion Group: User Interface/Desktops @@ -9,6 +9,8 @@ URL: http://sourceforge.net/projects/gmrun Source0: http://heanet.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz Patch0: gmrun-gmrunrc.patch Patch1: gmrun-0.9.2-gcc43.patch +Patch2: gmrun-0.9.2-mousewheel.patch +Patch3: gmrun-0.9.2-f12.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if 0%{?fedora} >= 8 BuildRequires: popt-devel @@ -33,6 +35,8 @@ prefix. %setup -q %patch0 -p1 -b .gmrunrc %patch1 -p1 -b .gcc43 +%patch2 -p1 -b .mousewheel +%patch3 -p1 -b .f12_support %build @@ -57,6 +61,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jan 11 2010 Gilboa Davara - 0.9.2-19 +- Fix #511639. Should build on F12. +- Add mouse wheel support. +- Fix possible crash due total input size. + * Tue Feb 24 2009 Fedora Release Engineering - 0.9.2-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild