Re: [Rhythmbox-devel] State Of The Rhythmbox]



Colin Walters a écrit :
 > Mmm, fun.  Well, since a lot of people will not really want to upgrade
> their GTK+ anyways, I guess we're stuck with forking GtkTreeView.  I'll
> do this sometime in the next few days (unless someone else beats me to
> it! :))

Here are the necessary files to include to have our own
gtktreemodelsort. Put them in lib/widgets.
I also attached a patch to be able to choose to use the workaround at
configure time (--enable-gtk-workaround).
Beaten you ? :)

  > Thanks again for tracking down this bug.

You're welcome, I like Rhythmbox and I'm glad to spend some time to
improve it !

Cheers,

Yann

? lib/widgets/gtkintl.h
? lib/widgets/gtktreedatalist.c
? lib/widgets/gtktreedatalist.h
? lib/widgets/gtktreemodelsort.c
? lib/widgets/gtktreemodelsort.h
Index: configure.ac
===================================================================
RCS file: /cvs/gnome/rhythmbox/configure.ac,v
retrieving revision 1.6
diff -b -u -2 -r1.6 configure.ac
--- configure.ac	2 Aug 2003 01:32:20 -0000	1.6
+++ configure.ac	3 Aug 2003 13:28:47 -0000
@@ -38,4 +38,19 @@
 RHYTHMBOX_CFLAGS="$CFLAGS $RHYTHMBOX_CFLAGS"
 
+
+dnl Workaround for the gtktreemodelsort bug
+
+AC_ARG_ENABLE(gtk_workaround,
+              [  --enable-gtk-workaround		Enable use of a workaround for a gtk bug which causes song jumping],
+	      USE_GTK_WORKAROUND=0)
+
+if test x$gtk_workaround != xno; then
+	AC_DEFINE(USE_GTK_WORKAROUND,1,[Define if you want to use the gtk workaround])
+fi
+
+AM_CONDITIONAL(GTK_WORKAROUND, test x$gtk_workaround != xtrue)
+
+
+
 dnl Sound system
 WANT_XINE=
Index: lib/widgets/Makefile.am
===================================================================
RCS file: /cvs/gnome/rhythmbox/lib/widgets/Makefile.am,v
retrieving revision 1.28
diff -b -u -2 -r1.28 Makefile.am
--- lib/widgets/Makefile.am	31 Jul 2003 19:37:35 -0000	1.28
+++ lib/widgets/Makefile.am	3 Aug 2003 13:28:51 -0000
@@ -43,4 +43,13 @@
 	rb-tree-view-column.h
 
+
+if GTK_WORKAROUND
+librbwidgets_la_SOURCES += gtktreemodelsort.c
+librbwidgets_la_SOURCES += gtktreemodelsort.h
+librbwidgets_la_SOURCES += gtktreedatalist.c
+librbwidgets_la_SOURCES += gtktreedatalist.h
+endif
+
+
 INCLUDES =						\
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"        \
Index: lib/widgets/rb-node-view.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/lib/widgets/rb-node-view.c,v
retrieving revision 1.101
diff -b -u -2 -r1.101 rb-node-view.c
--- lib/widgets/rb-node-view.c	30 Jul 2003 23:26:31 -0000	1.101
+++ lib/widgets/rb-node-view.c	3 Aug 2003 13:29:03 -0000
@@ -20,5 +20,11 @@
 
 #include <gtk/gtktreeview.h>
-#include <gtk/gtktreemodelsort.h>
+
+#ifdef USE_GTK_WORKAROUND
+	#include "gtktreemodelsort.h"
+#else
+	#include <gtk/gtktreemodelsort.h>
+#endif
+
 #include <gtk/gtktreeselection.h>
 #include <gtk/gtkcellrenderertext.h>
Index: lib/widgets/rb-tree-model-sort.h
===================================================================
RCS file: /cvs/gnome/rhythmbox/lib/widgets/rb-tree-model-sort.h,v
retrieving revision 1.3
diff -b -u -2 -r1.3 rb-tree-model-sort.h
--- lib/widgets/rb-tree-model-sort.h	24 Aug 2002 10:41:52 -0000	1.3
+++ lib/widgets/rb-tree-model-sort.h	3 Aug 2003 13:29:03 -0000
@@ -23,5 +23,9 @@
 #include <glib-object.h>
 
-#include <gtk/gtktreemodelsort.h>
+#ifdef USE_GTK_WORKAROUND
+	#include "gtktreemodelsort.h"
+#else
+	#include <gtk/gtktreemodelsort.h>
+#endif
 
 G_BEGIN_DECLS

treemodelsort_files.tar.gz



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]