Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Michael R. Head
On Tue, 2007-12-18 at 20:37 -0500, Michael McCann wrote: > Brian J. Tarricone wrote: > > Yes, I've already tried that, to no avail. My code basically only > consists of: > > gdk_screen_get_default(): Get the default screen > gdk_screen_get_root_window(): Get the root window > gdk_pixbuf_get_fr

Re: Reparsing with GtkBuilder

2007-12-18 Thread Johan Dahlin
amol wrote: > Hi > If i used gtk_builder_add_from_string to parse some string for builder > which already has some content then application terminates with > following message > >Gtk-ERROR **: file gtkbuilder.c: line 567 > (apply_delayed_properties): assertion failed: (object != NULL) > if

Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Michael McCann
I've got a multithreaded GTK application. One thread runs gtk_main(): gtk_threads_enter(); gtk_main(); gtk_threads_leave(); The other thread is an infinite loop that sleeps for one second on each loop. Every x seconds, the infinite loop calls a function, which makes some GDK calls. At the begin

Re: Custom container widget - childs drawn in top-left corner of window

2007-12-18 Thread Tristan Van Berkom
On Dec 15, 2007 8:46 AM, Stephan Arts <[EMAIL PROTECTED]> wrote: > Hi, > > I am having an issue with a new container widget I am writing. I have > overridden the size_request and size_allocate methods.[0] > > For some reason, the children are all rendered in the top-left corner > of the main windo

Button Callbacks

2007-12-18 Thread Vroni
Hi guys, I have this really dumb problem, but I can´t get my head around it. My program should do the following: - When a button is pressed, a specific playlist[m3u]-file should be opened in the media player. Sure, the first part is to add a callback for the buttons, but how do I open the fi

Re: C vs C++ for GTK

2007-12-18 Thread Jon Harrop
On Thursday 13 December 2007 08:28, Dan H wrote: > On Wed, 12 Dec 2007 09:26:25 -0700 > Michael L Torrie <[EMAIL PROTECTED]> wrote: > > GTKmm is based on some very nice C++ abstractions around pointers, > > providing many of the same benefits as any managed language with > > pure C++. They are cal

Re: C vs C++ for GTK

2007-12-18 Thread Jon Harrop
On Wednesday 12 December 2007 15:19, Dan H wrote: > Jon Harrop <[EMAIL PROTECTED]> wrote: > > My recommendation is to choose a garbage collected language for GUI > > work as it makes everything so much easier. Lots of GCd languages > > have GTK bindings these days. > > Just for the record, garbage

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Michael McCann
Brian J. Tarricone wrote: > Michael McCann wrote: > >> Brian J. Tarricone wrote: >> >>> Don't use gdk in the CPU-intensive function: >>> >> Unfortunately, the GDK calls _are_ what is CPU-intensive. I believe the >> gdk_pixbuf_get_from_drawable() call is the most intensive. None of m

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Brian J. Tarricone
Michael McCann wrote: > Brian J. Tarricone wrote: >> Don't use gdk in the CPU-intensive function: > Unfortunately, the GDK calls _are_ what is CPU-intensive. I believe the > gdk_pixbuf_get_from_drawable() call is the most intensive. None of my > "regular" code is CPU-intensive. How large is the

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Michael McCann
Michael R. Head wrote: > I'll break protocol and reply to my own message _again_... > > On Tue, 2007-12-18 at 19:05 -0500, Michael R. Head wrote: > >> On Tue, 2007-12-18 at 18:46 -0500, Michael McCann wrote: >> >>> Ahh, ok. How else can I accomplish my goal, then? I need to give GTK the >>

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Michael McCann
Brian J. Tarricone wrote: > Michael McCann wrote: > >> Michael R. Head wrote: >> >>> Does your special function take time to do its job? If so, then that >>> would be why. For example: >>> >>> ... >>> while(1) { >>> gdk_threads_enter(); >>> sleep(1) >>> gdk_threads_leave(); >>> sleep(10) >>

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread G Hasse
On Tue, Dec 18, 2007 at 07:05:18PM -0500, Michael McCann wrote: > Tomas Carnecky wrote: > > Michael McCann wrote: > >> Michael R. Head wrote: > >>> On Tue, 2007-12-18 at 17:14 -0500, Michael R. Head wrote: > >>> > I assume you meant > > g_threads_init(); > gdk_threads_

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Brian J. Tarricone
Michael McCann wrote: > Michael R. Head wrote: >> Does your special function take time to do its job? If so, then that >> would be why. For example: >> >> ... >> while(1) { >> gdk_threads_enter(); >> sleep(1) >> gdk_threads_leave(); >> sleep(10) >> }; >> ... >> >> you'd freeze your app for a second

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Michael R. Head
I'll break protocol and reply to my own message _again_... On Tue, 2007-12-18 at 19:05 -0500, Michael R. Head wrote: > On Tue, 2007-12-18 at 18:46 -0500, Michael McCann wrote: > > > > Ahh, ok. How else can I accomplish my goal, then? I need to give GTK the > > lock, as I'm calling GDK from anoth

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Michael R. Head
On Tue, 2007-12-18 at 18:46 -0500, Michael McCann wrote: > > Ahh, ok. How else can I accomplish my goal, then? I need to give GTK the > lock, as I'm calling GDK from another function not in the main GTK loop. > I tried leaving out gdk_threads_enter()/leave() in the CPU-intensive > function, bu

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Michael McCann
Tomas Carnecky wrote: > Michael McCann wrote: >> Michael R. Head wrote: >>> On Tue, 2007-12-18 at 17:14 -0500, Michael R. Head wrote: >>> I assume you meant g_threads_init(); gdk_threads_init(); gtk_init(); gdk_threads_enter(); gtk_main()

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Tomas Carnecky
Michael McCann wrote: > Michael R. Head wrote: >> On Tue, 2007-12-18 at 17:14 -0500, Michael R. Head wrote: >> >>> I assume you meant >>> >>> g_threads_init(); >>> gdk_threads_init(); >>> gtk_init(); >>> >>> gdk_threads_enter(); >>> gtk_main(); >>> gdk_threads_leave(

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Michael McCann
Michael R. Head wrote: > On Tue, 2007-12-18 at 17:14 -0500, Michael R. Head wrote: > >> I assume you meant >> >> g_threads_init(); >> gdk_threads_init(); >> gtk_init(); >> >> gdk_threads_enter(); >> gtk_main(); >> gdk_threads_leave(); >> >> right? >> Yes, that i

App blueprint, advice please!

2007-12-18 Thread Patrick
Thanks yet again to all for your help with this thread! and special thanks to John, Nicola, Dan, Gian, Lance and Reed for yesterdays posts. This is awesome! I was inspired by Göran's advice to promote selling code not software. I had an idea for the project name yesterday so I registered a cou

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Michael R. Head
On Tue, 2007-12-18 at 17:14 -0500, Michael R. Head wrote: > On Tue, 2007-12-18 at 16:45 -0500, Michael McCann wrote: > > I've got a multithreaded GTK application. One thread runs gtk_main(): > > > > gtk_threads_enter(); > > gtk_main(); > > gtk_threads_leave(); > > I assume you meant > > >

Re: make a window without the title bar

2007-12-18 Thread Andrew Cowie
On Fri, 2007-12-14 at 20:52 +0800, Binary Chen wrote: > I know it is a feature of window manager, but is there any portable way > in GTK+ to do this? In C... gtk_window_set_decorated(GTK_WINDOW(window), FALSE); or Python... window.set_decorated(False); or Java... windo

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Michael R. Head
On Tue, 2007-12-18 at 16:45 -0500, Michael McCann wrote: > I've got a multithreaded GTK application. One thread runs gtk_main(): > > gtk_threads_enter(); > gtk_main(); > gtk_threads_leave(); I assume you meant g_threads_init(); gdk_threads_init(); gtk_init(); gdk_threads_e

Re: Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread G Hasse
On Tue, Dec 18, 2007 at 04:45:50PM -0500, Michael McCann wrote: > I've got a multithreaded GTK application. One thread runs gtk_main(): > > gtk_threads_enter(); > gtk_main(); > gtk_threads_leave(); > > > The other thread is an infinite loop that sleeps for one second on each > loop. Every x seco

Multi-threaded UI Freezes on GDK Call

2007-12-18 Thread Michael McCann
I've got a multithreaded GTK application. One thread runs gtk_main(): gtk_threads_enter(); gtk_main(); gtk_threads_leave(); The other thread is an infinite loop that sleeps for one second on each loop. Every x seconds, the infinite loop calls a function, which makes some GDK calls. At the begin

posting rules regarding text format

2007-12-18 Thread Patrick
I have not been able to post a message today. I tried three times. The message concerned a website. The email was sent as text but contained a hyperlink I guess that's not good. I also tried after removing the _W_W_W but my message did not post. I visited the gtk site to review the rules but di

Re: [n00b] what's a smooth_draw_box?

2007-12-18 Thread Tomas Carnecky
Daniel Fetchinson wrote: > Hi list, > > I've just started with GTK and been going through the tutorial and > examples. My first small application is working all right but the > following (I guess) warning keeps being written to the console: > > CRITICAL **: smooth_draw_box: assertion `width >= -1