rpms/gmrun/F-12 gmrun-0.9.2-f12.patch, NONE, 1.1 gmrun-0.9.2-mousewheel.patch, NONE, 1.1 gmrun.spec, 1.12, 1.13

Gilboa Davara gilboa at fedoraproject.org
Mon Jan 11 11:05:10 UTC 2010


Author: gilboa

Update of /cvs/pkgs/rpms/gmrun/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29126

Modified Files:
	gmrun.spec 
Added Files:
	gmrun-0.9.2-f12.patch gmrun-0.9.2-mousewheel.patch 
Log Message:


gmrun-0.9.2-f12.patch:
 gtkcompletionline.cc |    9 +++------
 gtkcompletionline.h  |    3 ++-
 2 files changed, 5 insertions(+), 7 deletions(-)

--- NEW FILE gmrun-0.9.2-f12.patch ---
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 <gtk/gtkentry.h>
+#include <gtk/gtktypeutils.h>
 
 #include <string>
 
@@ -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*);

gmrun-0.9.2-mousewheel.patch:
 gtkcompletionline.cc      |   43 +++++++++++++++++++++++++++++++++++++++++++
 gtkcompletionline.cc.orig |only
 2 files changed, 43 insertions(+)

--- NEW FILE gmrun-0.9.2-mousewheel.patch ---
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


Index: gmrun.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gmrun/F-12/gmrun.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -p -r1.12 -r1.13
--- gmrun.spec	25 Jul 2009 00:29:40 -0000	1.12
+++ gmrun.spec	11 Jan 2010 11:05:10 -0000	1.13
@@ -9,6 +9,8 @@ URL:			http://sourceforge.net/projects/g
 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,8 +61,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
-* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.2-17
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+* Mon Jan 11 2010 Gilboa Davara <gilboad at gmail.com> - 0.9.2-17
+- Fix #511639. Should build on F12.
+- Add mouse wheel support.
+- Fix possible crash due total input size.
 
 * Tue Feb 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.2-16
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild



More information about the scm-commits mailing list