[gtkada] Wicked keyboard behaviour for gtk.extra.sheet

Ludovic Brenta ludovic.brenta at insalien.org
Wed Sep 29 20:49:07 CEST 2004


Arnaud Charlet writes:
>> Thanks Arnaud.  I looked at the project on SourceForge, and behold!
>> the bug was fixed there just 10 days ago in their CVS repository.
>
> That's great.

Here is the patch as I applied it in Debian.  The line numbers are
slightly different from the latest revision in the CVS; GtkAda appears
to use a revision of this file older than 1.18.

--- src/gtkextra/gtksheet.c.orig	2004-09-28 18:02:35.000000000 +0200
+++ src/gtkextra/gtksheet.c	2004-09-28 18:03:35.000000000 +0200
@@ -5734,8 +5734,10 @@
       extend_selection = FALSE;
       break;
     default:
-      if(in_selection) GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_SELECTION);
-      if(extend_selection) return TRUE;
+      if(in_selection) {
+	GTK_SHEET_SET_FLAGS(sheet, GTK_SHEET_IN_SELECTION);
+	if(extend_selection) return TRUE;
+      }
       if(state == GTK_SHEET_ROW_SELECTED) 
         sheet->active_cell.col=MIN_VISIBLE_COLUMN(sheet);
       if(state == GTK_SHEET_COLUMN_SELECTED)

(this is yet another of those silly bugs that Ada prevents!)

>> What is the policy at Ada Core relative to the development
>> currently taking place on gtkextra-2.0 on SourceForge?  GtkAda
>> 2.2.1 contains what appears to be a CVS snapshot of gtkextra-2.0.
>
> We try to update versions when we get a chance, and in particular
> when there are official releases made (I'm not sure whether there
> have been official releases of gtkextra recently, or when the next
> one is scheduled).

Yes, the SourceForge project has never actually released any files.
Debian contains packages for versions 0.99.16 and 0.99.17, which use
GTK+ 1.2.  These appear to be snapshots, or CVS tags, I don't know.
Few Debian packages make use of either version.  On SourceForge, there
is a directory named gtkextra-2.0 where some regular activity takes
place.  The code in there is very different from 0.99.x; this branch
uses GTK+ 2.4.  There is no Debian package for this branch, and I am
not aware of anything that uses it besides the obvious SciGraphica.

BTW, the GtkExtra developers renamed gtkcombobox after GTK+ 2.4
introduced a widget by the same name.  This is unfortunately an
incompatible reimplementation of Jeffrey Creem's patch.

> Although in this particular case, we would certainly consider
> including the patch that you've put in the Debian package.

Glad to be of help.  I think this is low-risk.  It would perhaps be
worthwhile to evaluate the risk and benefits of switching to the CVS
HEAD of GtkExtra.

> We should also hopefully be able to make a GtkAda 2.4.0 release,
> which is the next release planned, which will be compatible with
> Gtk+ 2.4.x

This is great news.  Please let me know your decision WRT GtkExtra.
If you take the latest CVS HEAD, I'll package it separately for
Debian, and GtkAda will use it as a shared library.  Currently it is
built statically into GtkAda. OTOH, "if it ain't broke, don't fix it".

-- 
Ludovic Brenta.




More information about the gtkada mailing list