Re: not able to change color of widget

2013-11-05 Thread Ruslan Kabatsayev
I didn't look at the code yet, but the symptoms look like you still have that same problem: your widgets just aren't repainted. (This will only be visible if you don't use screen compositing). You'll have to either somehow periodically process all events, or move your inotify-related code to a sepa

changing font, color, size, etc. in a GtkEntry

2013-11-05 Thread Eric Wajnberg
Hi there, I have a simple problem for weeks that I remain unable to solve. I simply want to modify the font, color, size, etc. of the characters entered while they are typed in a GtkEntry. I am coding with GTK 2.24.0. Looking around on the web, I found several possible functions to do that,

Re: changing font, color, size, etc. in a GtkEntry

2013-11-05 Thread Michael Cronenworth
Eric Wajnberg wrote: I simply want to modify the font, color, size, etc. of the characters entered while they are typed in a GtkEntry. I am coding with GTK 2.24.0. Looking around on the web, I found several possible functions to do that, some of them seem to be specific to GTK3, however. I found

Valgrind is grinding my gears

2013-11-05 Thread David Buchan
I have a rather large program I've written in C language which uses GTK+2. My Makefile has: CCFLAGS = `pkg-config --cflags gtk+-2.0 gmodule-2.0` LIBS    = `pkg-config --libs   gtk+-2.0 gmodule-2.0` GCC compiles it without warnings using flags: -Wall -O -Wuninitialized My program has several us

Re: Valgrind is grinding my gears

2013-11-05 Thread David Buchan
Perhaps relevant, is that I have a large struct which I use to pass stuff amongst functions and callbacks and I allocate memory for it in main() thus:   // Allocate data structure   data = g_slice_new (MyData); and then free it at the end:   g_slice_free (MyData, data); Maybe Valgrind has trou

Re: Valgrind is grinding my gears

2013-11-05 Thread David Buchan
Sorry for peppering you with emails but I just noticed this statement: "For newly written code it is recommended to use the new g_slice API instead of g_malloc() and friends, as long as objects are not resized during their lifetime and the object size used at allocation time is still available whe

Re: Valgrind is grinding my gears

2013-11-05 Thread David Nečas
On Tue, Nov 05, 2013 at 09:47:13AM -0800, David Buchan wrote: > But when I invoke Valgrind at runtime, I get a lot of errors which I > can't make any sense of. > > I have grabbed a small sample of them here: > > http://pdbuchan.com/valgrind.txt > > I don't like ignoring errors and warnings, but

Re: Valgrind is grinding my gears

2013-11-05 Thread David Buchan
Hi Dave, "GObject type registration machinery is, under normal circumstances, only ever used tocreate structures that will exist during the entire program lifetime." Does that mean that if I just use straight old malloc() instead of g_slice(), most of the errors would go away? I gather that's e

Re: Valgrind is grinding my gears

2013-11-05 Thread David Buchan
Aaaah. I see. Thanks guys. From: Bernhard Schuster To: David Buchan Cc: David Nečas ; gtk-app-devel-list list Sent: Tuesday, November 5, 2013 3:59 PM Subject: Re: Valgrind is grinding my gears No, as soon as you use GObject derived types (or call g_t

Re: Valgrind is grinding my gears

2013-11-05 Thread jcupitt
I have a valgrind file here I use for my large gtk2 program: http://www.vips.ecs.soton.ac.uk/development/nip2a.supp I get clean runs with this file. Run with something like: export G_DEBUG=gc-friendly export G_SLICE=always-malloc valgrind --suppressions=/home/john/nip2.su

Re: Valgrind is grinding my gears

2013-11-05 Thread David Buchan
Great! Thanks! Dave From: "jcup...@gmail.com" To: David Buchan Cc: gtk-app-devel-list list Sent: Tuesday, November 5, 2013 4:56 PM Subject: Re: Valgrind is grinding my gears I have a valgrind file here I use for my large gtk2 program: http://www.vips.

Re: changing font, color, size, etc. in a GtkEntry

2013-11-05 Thread Eric Wajnberg
Thanks Michael, This is indeed the sort of solutions I've tried. However, as I've mentioned in my original post, functions like pango_font_description_from_string, etc. are not recognized in my coding environment (while I can define pointer to things like PangoFontDescription without problem