Re: Adding and removing widgets at runtime

2016-09-12 Thread Ben Iofel
Why not just make async network requests on the UI thread? On Mon, Sep 12, 2016 at 12:37 PM Daniel. wrote: > Well, if I wasn't clear before my layout is totally questionable. I > more generic question would be: > > How you guys aproaches when the problem is showing applications > behavior on scr

Re: Adding and removing widgets at runtime

2016-09-12 Thread Nicola Fontana
Il Mon, 12 Sep 2016 13:37:04 -0300 "Daniel." scrisse: > Well, if I wasn't clear before my layout is totally questionable. I > more generic question would be: > > How you guys aproaches when the problem is showing applications > behavior on screen? Hi, I don't see any problem in your approach.

Re: Adding and removing widgets at runtime

2016-09-12 Thread Daniel.
Well, if I wasn't clear before my layout is totally questionable. I more generic question would be: How you guys aproaches when the problem is showing applications behavior on screen? My backend logic is something like this: - Start a new thread for each address passed in command line. Address a

Re: Adding and removing widgets at runtime

2016-09-12 Thread Daniel.
Hi thank you guys for the replies, Gergely, I can't really use FlowBox since I'm depending on gtk2, not 3. So the solution is really implementing my own widget as Joël said .. Joël in swing I usually use an event queue so that there is only one thread doing GUI modifications. Is that pattern used

Re: Adding and removing widgets at runtime

2016-09-12 Thread Joël Krähemann
Hi again Don't mess synchronized with a mutex. The closest thing to synchronized would be ags_task_thread_append_task() and run things exclusively http://git.savannah.gnu.org/cgit/gsequencer.git/tree/ags/thread/ags_task_thread.h?h=0.7.x bests, Joël On Mon, Sep 12, 2016 at 5:50 PM, Joël Krähem

Re: Adding and removing widgets at runtime

2016-09-12 Thread Joël Krähemann
Hi Since I know Javax/Swing I can tell you there is no synchronize keyword doing your magic. Please take a look at pthread_mutex_lock(), pthread_cond_wait(), pthread_cond_signal(), pthread_cond_broadcast() or pthread_barrier_wait(). Bests, Joël On Mon, Sep 12, 2016 at 5:17 PM, Joël Krähemann

Re: Adding and removing widgets at runtime

2016-09-12 Thread Joël Krähemann
Hi You can't do that without implementing your own widget because of thread-safety issues. To do your own GtkFlowBox implement GtkWidget:size-allocate and GtkWidget:size-request the rest is up to you. Don't forget doing mutices or use g_timeout_add() but this is single threaded and is invoked by

Re: Adding and removing widgets at runtime

2016-09-12 Thread Gergely Polonkai
Hello, I have no knowledge of Java/Swing, but based on your requirements I guess you need FlowBox[1]. Best, Gergely [1] https://developer.gnome.org/gtk3/stable/GtkFlowBox.html On Mon, Sep 12, 2016, 16:35 Daniel. wrote: > Hi everybody, > > I have a library implementing some protocol. That libr

Adding and removing widgets at runtime

2016-09-12 Thread Daniel.
Hi everybody, I have a library implementing some protocol. That library is multithread and is responsible to delivery messages to remote nodes and retrieve it's responses. I need to visualise the whole mess running. To do this I wrote a simple application in Java/Swing where for each remote node

Re: How to get objecttype

2016-09-12 Thread Thomas Rønshof
Thanks :-) I've found them all in the gtk include-files. /Thomas Den 09/11/2016 kl. 12:04 AM skrev Ben Iofel: > in C, you can use the GTK_IS_COMO_BOX and GTK_IS_ENTRY macros on > GtkWidget* > > > On Fri, Sep 9, 2016 at 9:14 AM Thomas Rønshof > wrote: > > Hi, > >