Re: Why doesn't my label show up in the window

2012-08-28 Thread Frank Cox
Thanks loads, Emmanuele and Olivier, for the information! I now have lots of reading, thinking and experimenting to do. It sure is a different way to do things. I just spent an hour trying to figure out what I'm supposed to do after setting up the queue and while the mail is being sent out? And

Re: Why doesn't my label show up in the window

2012-08-28 Thread Frank Cox
On Mon, 27 Aug 2012 11:08:16 +0200 Colomban Wendling wrote: > ...or not. Looks like I didn't forgot it even the first time but the ML > is eating it. OK, here you go: https://gist.github.com/3486813 Thank you ever so much! Your example clarifies some of the concepts that I'm trying to get a gr

Re: Why doesn't my label show up in the window

2012-08-27 Thread Olivier Sessink
On 08/27/2012 09:30 AM, Frank Cox wrote: > My mailserver is small and I need to pace the email that I send to it to avoid > DOS-ing it. Therefore, I inject a pause of a fixed number of seconds between > sending each outbound email. > > If I'm not allowed to pause the program, then how shall I cr

Re: Why doesn't my label show up in the window

2012-08-27 Thread Colomban Wendling
Le 27/08/2012 11:05, Colomban Wendling a écrit : > Le 27/08/2012 00:20, Frank Cox a écrit : >> On Sun, 26 Aug 2012 22:49:26 +0200 >> Colomban Wendling wrote: >> >>> For example, I attached a dummy program that replicates yours but using >>> threading. >> >> Thanks loads for all of the information

Re: Why doesn't my label show up in the window

2012-08-27 Thread Colomban Wendling
Le 27/08/2012 00:20, Frank Cox a écrit : > On Sun, 26 Aug 2012 22:49:26 +0200 > Colomban Wendling wrote: > >> For example, I attached a dummy program that replicates yours but using >> threading. > > Thanks loads for all of the information! Unfortunately, the dummy program > that > you attach

Re: Why doesn't my label show up in the window

2012-08-27 Thread Emmanuele Bassi
hi; On 27 August 2012 08:30, Frank Cox wrote: > On Mon, 27 Aug 2012 08:13:30 +0100 > Emmanuele Bassi wrote: > >> another thing is that if you feel you need to call sleep() anywhere in >> a GUI then you are doing it wrong on an epic scale. the first rule of >> mainloop-driven toolkits (such as GTK

Re: Why doesn't my label show up in the window

2012-08-27 Thread Frank Cox
On Mon, 27 Aug 2012 08:13:30 +0100 Emmanuele Bassi wrote: > another thing is that if you feel you need to call sleep() anywhere in > a GUI then you are doing it wrong on an epic scale. the first rule of > mainloop-driven toolkits (such as GTK+) is: you do not block the main > loop. the second rule

Re: Why doesn't my label show up in the window

2012-08-27 Thread Emmanuele Bassi
hi; On 27 August 2012 07:40, Frank Cox wrote: > Both of the attached modifications of the program appears to work properly > every > time. > > So is my problem that the label isn't actually ready to be drawn on the first > call to sleep() for some reason? you still fail at understanding the bas

Re: Why doesn't my label show up in the window

2012-08-26 Thread Frank Cox
Both of the attached modifications of the program appears to work properly every time. So is my problem that the label isn't actually ready to be drawn on the first call to sleep() for some reason? -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com www.creekfm.com - FIFTY T

Re: Why doesn't my label show up in the window

2012-08-26 Thread Frank Cox
At risk of being a huge pain in the ass to you fine and knowledgeable folks, I have now done a fair bit of reading and some experimenting with the g_idle_add () functions, and I'm still not seeing what I think I should see. I have attached another version of my test program with the button and a w

Re: Why doesn't my label show up in the window

2012-08-26 Thread Frank Cox
On Sun, 26 Aug 2012 22:17:59 +0200 Olivier Sessink wrote: > 1) show the dialog (like you do now > > 2) at the end of that function, register a idle callback with > g_idle_add_full() with a low priority > > 3) in the callback, send the email, and show the second dialog, return > FALSE (otherwise

Re: Why doesn't my label show up in the window

2012-08-26 Thread Frank Cox
On Sun, 26 Aug 2012 22:49:26 +0200 Colomban Wendling wrote: > For example, I attached a dummy program that replicates yours but using > threading. Thanks loads for all of the information! Unfortunately, the dummy program that you attached wasn't actually attached. I'd love to see it, though,

Re: Why doesn't my label show up in the window

2012-08-26 Thread Colomban Wendling
Hi, I haven't read the linked program, but based on the dummy program and the previous discussion: Le 26/08/2012 19:13, Frank Cox a écrit : > On Sun, 26 Aug 2012 17:36:01 +0700 > Ardhan Madras wrote: > > [...] > > The objective of the program is to maintain an email mailing list for my > theatr

Re: Why doesn't my label show up in the window

2012-08-26 Thread Olivier Sessink
On 08/26/2012 07:13 PM, Frank Cox wrote: > I have posted a complete copy of the program as it exists right now here so > you can see what I'm trying to do: > > http://www.melvilletheatre.com/listwrangler.c.bz2 your function test_email_button() shows a message 'sending', then starts the sending,

Re: Why doesn't my label show up in the window

2012-08-26 Thread Frank Cox
On Sun, 26 Aug 2012 17:36:01 +0700 Ardhan Madras wrote: > You may got inconsistency which the label sometimes shown up > or not because most of time the update (in your case: the label) are > still not drawn when you call sleep() and block the main thread. What you are saying, then, is that contr

Re: Why doesn't my label show up in the window

2012-08-26 Thread Ardhan Madras
Hi, sleep() block the mainloop or gtk_main() which GTK+'s most widgets are updated in queue, also remember that gtk_main() (usually) runs in main thread. You may got inconsistency which the label sometimes shown up or not because most of time the update (in your case: the label) are still not draw

Re: Why doesn't my label show up in the window

2012-08-25 Thread Frank Cox
On Sat, 25 Aug 2012 16:18:20 -0600 Frank Cox wrote: I have modified my little test program so it will provide a visual cue for each pending event. I have attached the modification. I get three pending events every time I press the OK button. The subwindow always appears. The label sometimes ap

Re: Why doesn't my label show up in the window

2012-08-25 Thread Frank Cox
On Sat, 25 Aug 2012 11:35:27 -0600 Frank Cox wrote: The more I look at this the less I understand it. > What I have discovered is that the subwindow appears as expected prior to > starting task x, but the label is missing (the subwindow is blank) until it > updates at the start of task y. Playin

Re: Why doesn't my label show up in the window

2012-08-25 Thread Frank Cox
On Sat, 25 Aug 2012 16:49:14 +0800 Ardhan Madras wrote: > You call sleep() in mainloop causes it block, you can use > g_timeout_*() functions to create event in mainloop in timely manner. > Below I modify your code to implement g_timeout_*() functions. So the sleep() causes the g_main_context_ite

Re: Why doesn't my label show up in the window

2012-08-25 Thread Ardhan Madras
You call sleep() in mainloop causes it block, you can use g_timeout_*() functions to create event in mainloop in timely manner. Below I modify your code to implement g_timeout_*() functions. Note, you must care with subwindow creation, user may still create the subwindow (by clicking the OK button