Re: Failure to allocate gtk object

2005-10-05 Thread John Cupitt
On 10/5/05, Nikolaj Kiær Thygesen <[EMAIL PROTECTED]> wrote: > Just a quickie... What happens if the gtk_*_new() function fails to > allocate memory for a widget??? From looking at sources I'm under the > impression that the program will simply exit, but, if so, is there any way of > keeping

Failure to allocate gtk object

2005-10-05 Thread Nikolaj Kiær Thygesen
Hey list Just a quickie... What happens if the gtk_*_new() function fails to allocate memory for a widget??? From looking at sources I'm under the impression that the program will simply exit, but, if so, is there any way of keeping it afloat and reveive a NULL-pointer-return instead???

Re: g_strsplit

2005-10-05 Thread Alan M. Evans
On Wed, 2005-10-05 at 09:10, Alan M. Evans wrote: > /* throw away GLib array bookkeeping - keep only array data */ > sarray = (gchar**)parray->pdata; > g_ptr_array_free(parray,FALSE); Come to think of it, g_ptr_array_free returns the pdata pointer. sarray = g_ptr_array_free(parray,FALSE);

Re: g_strsplit

2005-10-05 Thread Alan M. Evans
On Wed, 2005-10-05 at 08:56, Alan M. Evans wrote: > /* append terminating nulls to string arrays */ > g_ptr_array_add(attributes,0); Sorry, neglected to change the variable name in that copy/pasted example. Should have been: g_ptr_array_add(parray,0); > /* throw away GLib array bookkeeping

Limiting a GtkTextBuffer

2005-10-05 Thread Bryan Christ
Is there anyway to limit the size of a GtkTextBuffer by line count? I would like to be able to set a maximum number of lines. In some cases, I would like to truncate the extra text appened to the end of the buffer. At other times, I would like to delete the first line in the buffer and appen

Re: g_strsplit

2005-10-05 Thread Alan M. Evans
On Wed, 2005-10-05 at 07:29, The Saltydog wrote: > This is more related to Glib than to gtk+, but I wonder if anyone can help. > > I have an array of strings, created with g_strsplit() function. Then I > need to add another array, also created with the same function, or > some single string.. Is t

Re: g_strsplit

2005-10-05 Thread The Saltydog
On 10/5/05, Matthias Clasen <[EMAIL PROTECTED]> wrote: > On Wed, 2005-10-05 at 16:29 +0200, The Saltydog wrote: > If you are already scared by that, then maybe C is not the right > language for you ? How about using e.g python ? I was jocking. ___ gtk-ap

Re: g_strsplit

2005-10-05 Thread Matthias Clasen
On Wed, 2005-10-05 at 16:29 +0200, The Saltydog wrote: > This is more related to Glib than to gtk+, but I wonder if anyone can help. > > I have an array of strings, created with g_strsplit() function. Then I > need to add another array, also created with the same function, or > some single string.

g_strsplit

2005-10-05 Thread The Saltydog
This is more related to Glib than to gtk+, but I wonder if anyone can help. I have an array of strings, created with g_strsplit() function. Then I need to add another array, also created with the same function, or some single string.. Is there a shortcut to accomplish this, or should I play with r

Re: Size of text entries

2005-10-05 Thread Olivier Sessink
flood wrote: >> use gtk_widget_set_size_request () >> >> but if the user doesn't change the data, why not use a GtkLabel ? > Thank you. As far as the label goes, I would use it if you could > change the background color to white. that is a little tricky: a label doesn't have a background, so you

Re: gtk rendering order

2005-10-05 Thread John Cupitt
On 10/5/05, Kevin Brooks <[EMAIL PROTECTED]> wrote: > With the double buffering turned on, any drawing is > pushed onto a stack before the updated window is made > visible. > > Is it possible to reverse the stack just before the > flush in order to boost the performance? Unfortunately, the remove/

Re: gtk rendering order

2005-10-05 Thread Kevin Brooks
With the double buffering turned on, any drawing is pushed onto a stack before the updated window is made visible. Is it possible to reverse the stack just before the flush in order to boost the performance? Kev --- John Cupitt <[EMAIL PROTECTED]> wrote: > On 10/5/05, Kevin Brooks <[EMAIL PROTE

Re: [OT] How to add cairo linking and compilation flags to makefile ?

2005-10-05 Thread John Cupitt
On 10/5/05, Colossus <[EMAIL PROTECTED]> wrote: > This is the content of Makefile.am: > INCLUDES = \ > -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ > -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ > @PACKAGE_CFLAGS@ > > xarchiver_LDADD = @PACKAGE_LIBS@ Those are t

Re: gtk rendering order

2005-10-05 Thread John Cupitt
On 10/5/05, Kevin Brooks <[EMAIL PROTECTED]> wrote: > I don't know how to reverse the rendering order > though. I implement a 'pop - to - front' effect with layered widgets with g_object_ref( thing ); gtk_container_remove( container, thing ); gtk_container_add( container, thing ); g_objec

RE: gtk rendering order

2005-10-05 Thread Kevin Brooks
It's because EventBox is a widget which has its own gdkwindow so it can be rendered above its parent gdkwindow. If you try to set the EventBox to has no visible window then you will find that the window background cover everything again. For those no window widgets, child widgets on the top will b

Re: [OT] How to add cairo linking and compilation flags to makefile ?

2005-10-05 Thread Colossus
John Cupitt wrote: You need lines like CFLAGS=`pkg-config gtk+-2.0 --cflags` LDADD=`pkg-config gtk+-2.0 --libs` in your Makefile.am. I forget the exact names. This is what I have in Makefile.in # Makefile.in generated by automake 1.9.6 from Makefile.am. # @[EMAIL PROTECTED] [CUT THE LONG

[OT] How to add cairo linking and compilation flags to makefile ?

2005-10-05 Thread Colossus
Hi, sorry for the OT. I upgraded to gtk 2.8 and cairo and obviously my glade makefile project doesn't contain -I/usr/include/cairo. I added manually to it in my_project/Makefile and my_project/src/Makefile but it doesn't work, I keep getting cairo.h file not found in the output of makefile: 1)

Re: [OT] How to add cairo linking and compilation flags to makefile ?

2005-10-05 Thread John Cupitt
On 10/5/05, Colossus <[EMAIL PROTECTED]> wrote: > sorry for the OT. I upgraded to gtk 2.8 and cairo and obviously my > glade makefile project doesn't contain -I/usr/include/cairo. I added > manually to it in my_project/Makefile and my_project/src/Makefile but > it doesn't work, I keep getting cairo

ToolTip Color Extraction

2005-10-05 Thread Neelesh Bodas
Hi, I see this query posted on this mailing list a multiple times, but non of them have been answered. (One of the post is mine itself.) The issue is as follows : 1) The Background and Foreground Color of "Gtk Tooltip" is configurable through the "GTKRC file". 2) What this means is that the Gtk-

Re: problem with gtk_tree_view_set_fixed_height_mode()

2005-10-05 Thread Stefan Kost
Hi Brian, Brian J. Tarricone wrote: On 10/4/2005 5:07 AM, Stefan Kost wrote: Brian J. Tarricone schrieb: Hi all, I'm trying to use GtkTreeView's fixed height mode for a playlist that can hold thousands of items, but I'm having a bit of trouble. All I seem to get is: Gtk-CRITICAL **: gtk