RE: [gtk-list] ANNOUNCE: GtkSheet-5.3




I've noticed that using GtkSheet (on Slackware Linux 2.0.35 - XFree86 3.3.2
- GTK 1.0.6)
That if you click quickly (and randomly) around that when you destroy the
window
your receive the following messages:


** WARNING **: invalid cast from `(unknown)' to `GtkSheet'

** WARNING **: invalid cast from `(unknown)' to `GtkWidget'

** WARNING **: invalid cast from `(unknown)' to `GtkObject'

This is caused by the "timeout" calls in the gtk_sheet_button_pressed.
It seems that multiple clicks will cause the routine to be called before
a timeout is removed. When the routine is called again, the original
timeout is lost, thus causing the warning messages after the widget is 
destroyed.

I added a test to see if the timeout exists before creating a new one.
If one does, then I remove it.  This may not be the best implementation
but it was the only one I had time for. I haven't taken a look to see
what ramifications that this will cause.

Please take a look, and maybe someone could fix this better :)

 <<gtksheet.diff>> 
This is a diff of gtksheet.c for 5.3


> -----Original Message-----
> From:	Adrian Feiguin [SMTP:adrian@ifir.ifir.edu.ar]
> Sent:	Monday, November 02, 1998 1:09 PM
> To:	gtk-list@redhat.com
> Subject:	[gtk-list] ANNOUNCE: GtkSheet-5.3
> 
> 
> GtkSheet-5.3
> ============
> 
> The graphic interface is nicer and more friendly. 
> The appeareance is more familiar and I added some new features:
> 
> You can make a selection and move it dragging the border.
> 
> You can resize the selection dragging the bottom-right corner.
> 
> You can store the selection on the clipboard. 
> 
> (All this functions emit a signal. You can cutomize your application
>  connecting a signal handler in order to do the desired action. See
>  the example 1 in the demo program) 
> 
> NOTE: the selection handler has not been implemented yet.
> The demo program is an application which includes an external entry 
> connected with the sheet's entry. The external entry does not belong to
> the 
> widget, the widget has its own entry and the text is edited interactivelly
> and "on the site". 
> You can download it from my ftp site:
>   ftp://ripley.ifir.edu.ar/pub/gtk/gtksheet/gtksheet-5.3.tar.gz
> I'm uploading the new version to gtk.org
> I hope it will be included in future releases of gtk.
> 
> --------------------------------------------------------------------------
> 
> GtkSheet is a Matrix/Table widget for Gtk+
> Originally, it was a variant of GtkClist widget (by Jay Painter) but
> it became more than I expected, and actually it has almost nothing to do 
> with it.
> 
> This distribution includes a demo program where you can see many of the
> widget's features.
> 
> You can download it from my ftp site:
>   ftp://ripley.ifir.edu.ar/pub/gtk/gtksheet/gtksheet-5.3.tar.gz
> 
> BRIEF DESCRIPTION
> =================
> 
> GtkSheet is a matrix where you can allocate cells of text.
> 
> Cell contents can be edited interactively with an specially designed
> entry, based on GtkEntry (so it has the same features).
> 
> You can parse text connecting a parser to the "set cell" signal.
> (See example 2 in the demo program)
> 
> You can change width, height, background color, foreground color, border
> color, border style, and many other attributes of the cells.
> (see examples in the demo program)
> 
> You can use the matrix as a browser with gtk_sheet_new_browser, and the
> cell contents could not be edited.
> 
> ** READ THE HEADERS FOR MORE INFORMATION **
> 
> TO DEVELOPERS
> ==============
> 
> GtkSheet is a composite widget: scrollbars, entry, and a button.
> 
> I realized that I can gain a lot of time and memory replacing button
> widgets with button emulating gadgets. This is one of the main differences
> with GtkClist GUI, and I don't use windows to resize rows/columns. 
> 
> To allocate memory, I used an array of pointers. I could used a linked
> list or a hash table, but I was originally inspired in SC (I wanted to do
> a Gtk port for it), so memory allocation routines are inspired on SC's.
> 
> I didn't take advantage of the use of glibs, maybe many features could be
>  optimized in this way.
> 
> GtkSheetEntry is based on the gtk+-0.99.3 realease of GtkEntry, so many
> bugs must be fixed, and features must be updated.
> 
> I have no experience on XFonts, so I left this part of the attributes
> setting to be done by anyone who wants to.
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
> /dev/null

gtksheet.diff



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