glib: modular test fixtures?

2012-05-30 Thread Christopher Howard
Maybe I've just been up too late and am not thinking straight, but I suppose it doesn't hurt to ask... is there some way to use the Glib testing framework so as to have modular fixtures that could be combined or separated on a per-test basis? I'm staring at the API, but not seeing it. What I mean

Help with a multi-threaded application. Spot a crash.

2012-05-30 Thread Osmo Antero
Hello, I have a multi-threaded application that filters data practically while user types text in an entry-field. But this applications regularly crashes. This surprises me because I have done similar code in another occacion and language. This particular Gtk code is from an open source app. So

Re: Help with a multi-threaded application. Spot a crash.

2012-05-30 Thread Osmo Antero
Oh, I forgot to mension. Compile and start the test2 app and then press the Test... button at the top. It will fire 10 threads. Each of them creates own a GRegex object. Then the crash. // Osmo Antero ___ gtk-app-devel-list mailing list

Re: Help with a multi-threaded application. Spot a crash.

2012-05-30 Thread David Nečas
On Wed, May 30, 2012 at 08:30:40PM +0100, Osmo Antero wrote: I have a multi-threaded application that filters data practically while user types text in an entry-field. But this applications regularly crashes. GRegex is not a GObject, it's just POD. So if (G_IS_OBJECT(search-regex)) will

Re: RFC: glocal - automatically freeing memory when it goes out of scope

2012-05-30 Thread Mikkel Kamstrup Erlandsen
On 05/29/2012 10:21 PM, Ben Pfaff wrote: Mikkel Kamstrup Erlandsenmikkel.kamst...@canonical.com writes: On 05/29/2012 07:23 PM, Ben Pfaff wrote: Mikkel Kamstrup Erlandsenmikkel.kamst...@canonical.com writes: I have been looking at gcc's cleanup attribute[1] that allows one to specify a

Re: RFC: glocal - automatically freeing memory when it goes out of scope

2012-05-30 Thread Behdad Esfahbod
On 05/30/2012 05:17 AM, Paul Davis wrote: On Wed, May 30, 2012 at 3:22 AM, Mikkel Kamstrup Erlandsen mikkel.kamst...@canonical.com mailto:mikkel.kamst...@canonical.com wrote: alloca() does not provide a callback when cleaning up, and we need that for anything that needs a

Re: compiler optimization causing issues with glib

2012-05-30 Thread Mike
On Wed, May 30, 2012 at 6:43 AM, Simon McVittie simon.mcvit...@collabora.co.uk wrote: On 24/05/12 17:20, Mike wrote: I am using glib 2.26.0 [...] The application I'm having issues with uses gdbus [...] - Thread stuck in futex wait inside kernel When I've attached GDB (or done SysRq), it's

wide characters in label

2012-05-30 Thread jessCPP
int main(int argc, char *argv[] ){ gtk_init (argc, argv); setlocale(LC_CTYPE, UTF-8); GtkWidget *window=gtk_window_new (GTK_WINDOW_TOPLEVEL); GtkWidget *hbox=gtk_hbox_new (FALSE, 1); wchar_t wide[]=Lthis is wide; GtkWidget

Re: RFC: glocal - automatically freeing memory when it goes out of scope

2012-05-30 Thread Ben Pfaff
Mikkel Kamstrup Erlandsen mikkel.kamst...@canonical.com writes: I have been looking at gcc's cleanup attribute[1] that allows one to specify a callback that will be invoked when a variable goes out of scope. This allows one to play with automatically freeing resources. Is it possible to

Re: RFC: glocal - automatically freeing memory when it goes out of scope

2012-05-30 Thread Ben Pfaff
Mikkel Kamstrup Erlandsen mikkel.kamst...@canonical.com writes: On 05/29/2012 07:23 PM, Ben Pfaff wrote: Mikkel Kamstrup Erlandsenmikkel.kamst...@canonical.com writes: I have been looking at gcc's cleanup attribute[1] that allows one to specify a callback that will be invoked when a

Text does not align in GTK label

2012-05-30 Thread Naten Baptista
Hello all Iam new here .. Iam experiencing a strange problem in a GTK label. I have created a label with justification as CENTER using glade. if I manually add text using glade then all is well with the label. but if the text is loaded from the program it seems to shift to the left of the label

Re: wide characters in label

2012-05-30 Thread David Nečas
This is the wrong mailing list, dedicated to development of Gtk+. Your e-mail does not contain any question. So I suppose you want to know why your code is broken. On Tue, May 29, 2012 at 09:18:38AM -0700, jessCPP wrote: setlocale(LC_CTYPE, UTF-8); A bit strange and not actually

Re: compiler optimization causing issues with glib

2012-05-30 Thread Mike
On Wed, May 30, 2012 at 9:12 AM, Mike puffy.t...@gmail.com wrote: On Wed, May 30, 2012 at 6:43 AM, Simon McVittie simon.mcvit...@collabora.co.uk wrote: On 24/05/12 17:20, Mike wrote: I am using glib 2.26.0 [...] The application I'm having issues with uses gdbus [...] - Thread stuck in