Re: Can I install both GTK+2 and GTK+3?

2013-05-16 Thread Frank Cox
On Fri, 17 May 2013 03:50:57 +0100 Emmanuele Bassi wrote: > targeting gtk 2.x is not a good idea, though, unless you're migrating > from 2.x to 3.x and you want to have a "grace period" for your users > to switch. Or if you're using RHEL/Centos/what-have-you, where GTK2 is "current". -- MELVILL

Re: destroy a widget while keeping the window with Glade

2012-10-07 Thread Frank Cox
On Sun, 7 Oct 2012 16:59:48 +0900 Tristan Van Berkom wrote: > Just right click on any widget in Glade's palette and chose "Add as toplevel" > > Glade/GtkBuilder do not restrict you to using toplevel GtkWindows in your xml. Well, whaddayaknow bout 'dat! Thanks loads! -- MELVILLE THEATRE ~ Real

destroy a widget while keeping the window with Glade

2012-10-06 Thread Frank Cox
I've just started playing with Glade and once again I'm wondering if I'm using the wrong approach to get stuff done, since I can't find anything that tells me how to do this. So far, I've been creating a main window for the program and simply creating and destroying boxes and widgets within that w

Re: path for icon

2012-09-04 Thread Frank Cox
On Wed, 05 Sep 2012 04:12:03 +0100 Rudra Banerjee wrote: > Is there any better way of doing it? As a matter of fact, I just asked this very same question this past Sunday. Here is the answer: https://mail.gnome.org/archives/gtk-app-devel-list/2012-September/msg2.html Depending on your need

Re: Where to put graphic elements so I can find them again

2012-09-03 Thread Frank Cox
On Mon, 3 Sep 2012 08:55:52 +0200 Vivien Malerba wrote: > You can also use Gio's Gresource for this purpose: > http://developer.gnome.org/gio/stable/gio-GResource.html Well, now that's pretty darn snappy isn't it! The more I learn about GTK the more impressed I am with its capabilities. After p

Re: Where to put graphic elements so I can find them again

2012-09-02 Thread Frank Cox
On Sun, 2 Sep 2012 22:33:29 -0400 (EDT) Allin Cottrell wrote: > You'd be better including the custom graphic in your program. This > can be done very easily with xpm format, or see gdk-pixbuf-csource. Now that's an idea that hadn't occurred to me. Thanks! -- MELVILLE THEATRE ~ Real D 3D Digit

Where to put graphic elements so I can find them again

2012-09-02 Thread Frank Cox
1. I have a "custom" graphic that I'm showing as a sort of a placeholder or background in my mailing list program. 2. I see that most program-specific graphics on my computer seem to be located in /usr/share/pixmaps. Is it proper to put the custom graphic into /usr/share/pixmaps and just "assume"

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: Trouble maximizing windows on MS Windows

2012-08-27 Thread Frank Cox
On Mon, 27 Aug 2012 14:27:22 +1000 Jared Henley wrote: > Does anyone have a clue about how to solve this? I've trawled the 'net > and this list and come up with nothing. I'm probably the last person to try to provide a usable answer to anyone's question on this topic since I've just started lea

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-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 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-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

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

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

Why doesn't my label show up in the window

2012-08-25 Thread Frank Cox
When I click the button the subwindow shows up but the label is missing in action. I thought that this line --> while (g_main_context_iteration(NULL, FALSE)); would make both the subwindow and the label show up without having to re-visit gtk_main(), but obviously that's not the case. Unsurprisin

Re: getting the icon pixbuf for a file

2012-08-16 Thread Frank Cox
On Thu, 16 Aug 2012 17:24:02 +0200 Andreas Rönnquist wrote: > Sorry, I mean loading the Pixbuf of the file-type / mime-type of a > file - Not simply loading a file into a pixbuf. That is a bit more > complicated getting... Do you mean something like this? GtkWidget *icon; GdkPixbuf *pixbuf; pixb

Re: Passing data to a callback (again)

2012-07-31 Thread Frank Cox
On Tue, 31 Jul 2012 11:06:14 -0500 Michael Cronenworth wrote: > Not all callbacks perform the same function. That is why you must > consult the documentation for the signal you want to catch. > > The g_signal_connect() function does indeed only pass one pointer for > the fourth argument "data". A

Passing data to a callback (again)

2012-07-31 Thread Frank Cox
I think I'm missing something fundamental here. My understanding is that I can pass one pointer to a callback and that's it. And that works. When I look at the example provided for "How do I validate/limit/filter the input to a GtkEntry?" in the Gtk+ FAQ (version 2.18.9 in my case) I see that th

Re: Passing structure with a callback

2012-07-23 Thread Frank Cox
It occurs to me that the problem here may be that all roads lead to gtk_main(). If my current theory is correct, then by creating the emailshare structure in the MainMenu function that structure is not available in main(), and hence is not being passed to the Clear function when the clear icon is

Passing structure with a callback

2012-07-22 Thread Frank Cox
I'm really new to this whole GUI and GTK thing, so I hope I can get away with a few beginner questions, as I'm sure that the answer to what's going wrong here is simple if you understand what's going on (which I don't, yet.) I'm working on my very first GTK program, mostly as a project/excuse to l

Re: Unusual GTK error message

2012-07-20 Thread Frank Cox
On Fri, 20 Jul 2012 18:37:01 -0700 (PDT) David Buchan wrote: > Any ideas? A google search comes up completely dry (!! when did that happen > last? weird) as does a Yahoo search. Dead end, it would seem. I'm certainly > not at all keen to muck around in /root/. You don't have a .local directory in

How can I check if a GtkWidget exists?

2012-07-20 Thread Frank Cox
How can I check if a GtkWidget exists? I am planning to create and destroy widgets in a window depending on the user's selections, but I can't figure out how to determine if a particular widget already exists in the window so it won't be created twice or receive a second deletion attempt if it's a