Re: need help with callback

2012-04-03 Thread Andrew Potter
On Tue, Apr 3, 2012 at 8:04 PM, Gary Kline kl...@thought.org wrote:        nobody?! I don't understand what you mean when you say       i hope you can help me get the largest function to print If you are attempting to store application settings to disk, you might consider the GSettings API

Re: Handle Enter pressing at GtkEntry

2012-10-03 Thread Andrew Potter
On Wed, Oct 3, 2012 at 7:42 AM, Yury Alyaev muta...@rambler.ru wrote: What is the right way to catch Enter pressing at the end of the text input to GtkEntry gtk_entry_set_activates_default() is probably what you want. ___ gtk-app-devel-list mailing

Re: Calculating the size of TextView

2012-11-23 Thread Andrew Potter
I've run into this before myself [1]. Seems to happen only when you add the Textview to an already show()n parent, as you are doing by adding it with a button click. I gave up and used a label. They work fine. [1] https://mail.gnome.org/archives/gtk-devel-list/2012-September/msg00034.html On

Re: Calculating the size of TextView

2012-11-23 Thread Andrew Potter
I did a little investigating today. This bug is fixed in the latest. I git bisected and found out that the commit that makes it work is 15be68054074bc, which was in 3.5.1. So I gtk 3.6 should work for you. On Fri, Nov 23, 2012 at 10:53 AM, Andrew Potter agpot...@gmail.com wrote: I've run

Re: Would this leak be inside gtk?

2013-01-23 Thread Andrew Potter
On Wed, Jan 23, 2013 at 1:38 PM, Edscott Wilson edscott.wilson.gar...@gmail.com wrote: Maybe it's just a bug in Valgrind... I'm finding that a threaded environment may confuse Valgrind. I'll do some more checking. In Valgrind threads become serialized, there is no true concurrency. I found

Re: change treeview's cell height

2013-01-24 Thread Andrew Potter
On Thu, Jan 24, 2013 at 1:53 PM, Rudra Banerjee rudra.baner...@aol.co.ukwrote: In my treeview, I have cells of fixed width, and I want texts longer than that should be wrapped with height increased. Get a pointer to the GtkCellRendererText for the column in question; depending on how you

Re: change treeview's cell height

2013-01-24 Thread Andrew Potter
On Thu, Jan 24, 2013 at 4:00 PM, Rudra Banerjee rudra.baner...@aol.co.ukwrote: gtk_tree_view_set_rules_hint (GTK_TREE_VIEW(tree), TRUE); the rules_hint are not working, i.e. I am not getteing alternative color for each row. I'm not an expert, but it probably means your default theme does

Re: open an existing file in buffer and write on it

2013-01-25 Thread Andrew Potter
On Fri, Jan 25, 2013 at 9:00 AM, Rudra Banerjee rudra.baner...@aol.co.ukwrote: But this writes the data in unformatted form. Can you kindly explain a bit more? A good tool glib has for serializing data is GVariant: http://developer.gnome.org/glib/stable/glib-GVariant.html All the example

Re: open an existing file in buffer and write on it

2013-01-25 Thread Andrew Potter
On Fri, Jan 25, 2013 at 11:00 AM, Liam R E Quin l...@holoweb.net wrote: Please let's not encourage the use of binary file formats where there's no measured performance requirement. An XML file would be better if structure is needed, as then it can be interchanged with other tools and

Re: open an existing file in buffer and write on it

2013-01-25 Thread Andrew Potter
On Fri, Jan 25, 2013 at 11:14 AM, Andrew Potter agpot...@gmail.com wrote: [...] blah blah blah. On second reading this comes off as a little flippant, my apologies. You made a good point, and I should have prefaced my example with links to proper serialization tools

Re: GTK app development for windows.

2013-01-30 Thread Andrew Potter
On Wed, Jan 30, 2013 at 10:52 AM, John Stebbins stebb...@jetheaddev.comwrote: Not sure where you are getting your information. I just built HandBrake using the mingw tools on Fedora 18 with gtk+ 3 support. Works spiffy. Presumably he is getting his information from

Re: GTK app development for windows.

2013-01-30 Thread Andrew Potter
On 01/30/2013 01:08 PM, John Stebbins wrote: I realized I didn't answer your question completely. My installer is just a zip file containing the directory tree of everything needed. I have a simple script that copies everything needed into the directory, then I zip it up. Example

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Andrew Potter
On Wed, Jan 30, 2013 at 2:17 PM, Ferdinand Ramirez ramirez.ferdin...@yahoo.com wrote: However, as I pointed out, it works if I replace the GtkTextView with a GtkEntry within each cell of the table. 2013/1/30 Ferdinand Ramirez ramirez.ferdin...@yahoo.com This works fine if it is all done

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-30 Thread Andrew Potter
On Wed, Jan 30, 2013 at 8:11 PM, Ferdinand Ramirez ramirez.ferdin...@yahoo.com wrote: I have nothing in there that modifies the buffer. I just create the view and add it. In fact, the error comes from the line gtk_widget_show_all. If I replace this line with code to traverse the hierarchy and

Re: Threads and gtk_widget_show (code should not be reached?)

2013-01-31 Thread Andrew Potter
You missed the list in your last reply. It is quoted below, and I've attached the file you sent me as well (table.txt). On Thu, Jan 31, 2013 at 4:54 PM, Ferdinand Ramirez ramirez.ferdin...@yahoo.com wrote: Attached is a working program with GtkEntry in the table. If you comment out line 21

Re: Gdk PixbufAnimation supported formats

2013-04-18 Thread Andrew Potter
On Thu, Apr 18, 2013 at 12:40 AM, Kip Warner k...@thevertigo.com wrote: Thanks Tadej. It looks like the only format that supports animation that I can see on my system, and perhaps everywhere at best, is GIF. Do you have any suggestions for another approach to a simple animation that

Re: GtkCellRenderer for GtkButton or GtkSwitch

2013-05-03 Thread Andrew Potter
On Fri, May 3, 2013 at 12:53 PM, Michael Cronenworth m...@cchtml.comwrote: On 05/03/2013 02:29 PM, D.H. Bahr wrote: Ok, does anyone have some working code with similar effects? I've never coded my own widgets before, so I'm not sure how to do so. Your question was asked[2] a few years ago,

Re: Image resizing

2013-06-09 Thread Andrew Potter
On Sat, Jun 8, 2013 at 10:27 PM, Kip Warner k...@thevertigo.com wrote: The banner image should automatically resize as the window is resized. It should use the full width available in the parent page (GtkBox), but the image's height should be calculated as a function of the aspect ratio to

Re: Invisible GtkImage

2013-06-13 Thread Andrew Potter
On Thu, Jun 13, 2013 at 6:09 PM, Kip Warner k...@thevertigo.com wrote: The code mostly works in that I can see that the area the widget is taking appears to be the correct size as I resize its parent. However, the actual image pixels do not appear to be painted. Hi Kip, After setting the

Re: Invisible GtkImage

2013-06-13 Thread Andrew Potter
On Thu, Jun 13, 2013 at 8:42 PM, Kip Warner k...@thevertigo.com wrote: That makes sense, but should the allocation passed to the base class's do_size_allocate() be the original allocation parameter that was passed into the override, or the one that I modified to contain the new image

Re: Invisible GtkImage

2013-06-14 Thread Andrew Potter
On Thu, Jun 13, 2013 at 9:54 PM, Kip Warner k...@thevertigo.com wrote: What you can do to (try to) prevent that situation is to set the widget to do height for width allocation, and override get_preferred_height_for_width() to honor your aspect ratio. In some situations of course the

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread Andrew Potter
On Fri, Jun 14, 2013 at 12:27 AM, dE de.tec...@gmail.com wrote: I was monitoring the memory usage before and after execution of g_object_unref and gtk_list_store_clear, and it didnt change the memory usage by a bit. Is this normal (am I doing it right?)? e.g. -- gtk_list_store_clear

Re: Invisible GtkImage

2013-06-14 Thread Andrew Potter
On Fri, Jun 14, 2013 at 5:20 PM, Kip Warner k...@thevertigo.com wrote: I have three concerns. The first is that sometimes the incoming allocation has some very strange width and height values in it, but are usually valid the rest of the time. Sometimes I see values like width of -408563232 and

Re: Invisible GtkImage

2013-06-23 Thread Andrew Potter
On Sun, Jun 23, 2013 at 11:17 AM, Kip Warner k...@thevertigo.com wrote: On Sun, 2013-06-23 at 20:11 +0200, David Nečas wrote: Well, as it has already been suggested, this is a matter of packing. If you request that the widget does not expand page.pack_start(page._bannerAspectFrame, False,

Re: Invisible GtkImage

2013-06-25 Thread Andrew Potter
On Sun, Jun 23, 2013 at 10:04 PM, Kip Warner k...@thevertigo.com wrote: Hey Andrew. Thanks for the help. I've almost got it working after I took your advise, but the image is still taking up too much room in the vertical GtkBox above and below it. See all the extra space above and below it I'd

Re: Invisible GtkImage

2013-06-25 Thread Andrew Potter
2013/6/24 Andrew Potter agpot...@gmail.com: # Note here that the minimum request is set to the natural height of the input pixbuf # This may not be the desired behavior in all circumstances def do_get_preferred_height_for_width(self, width): return (self.pb.get_height(), width

Re: Invisible GtkImage

2013-06-27 Thread Andrew Potter
On Wed, Jun 26, 2013 at 2:51 PM, Kip Warner k...@thevertigo.com wrote: On Mon, 2013-06-24 at 13:56 -0700, Andrew Potter wrote: So two questions now I have for you, if you don't mind. The first is a problem with clipping, the same one I experienced a few days ago. Note the assistant button

Re: Insert Various GTKWidgets into a dlg_window

2013-06-28 Thread Andrew Potter
On Fri, Jun 28, 2013 at 10:45 AM, Rui Pedro Caldeira rpcalde...@outlook.com wrote: I have all sorts os GTKWidgets (buttons, labels, comboboxes,...) and a dlg_window. And I would like to know how I can put all those widgets in the dlg_window and set their size and position in the window.

Re: Insert Various GTKWidgets into a dlg_window

2013-06-28 Thread Andrew Potter
On Fri, Jun 28, 2013 at 2:10 PM, Rui Pedro Caldeira rpcalde...@outlook.com wrote: I'm sorry Andrew but I'm using GTK+ 2.24.19 and there is not GTKGrid on this version, aren't you aware of an equivalent for version 2.24.19 of GTK+? The documentation for Gtk2 can be found here [1]. As you've

Re: calling gtk_widget_queue_draw from another thread

2013-11-06 Thread Andrew Potter
On Wed, Nov 6, 2013 at 9:58 AM, Horst Löffel bionicsp...@web.de wrote: Because the program acts as a plugin i have to run gtk_main in it's own thread. But drawing operations will come from another thread which i call main thread. Many main loop implementations allow you to embed a different

Re: deactivate enter signal on GtkButton

2013-11-07 Thread Andrew Potter
On Thu, Nov 7, 2013 at 4:10 AM, Mahesh Chaudhari mahesh.chaudh...@ymail.com wrote: Also (unsuccessfully) tried : void enter_button1(GtkWidget *widget, gpointer data) { GtkStyle *style; style = gtk_widget_get_style(button1); style-bg[GTK_STATE_PRELIGHT] =

Re: deactivate enter signal on GtkButton

2013-11-07 Thread Andrew Potter
On Thu, Nov 7, 2013 at 7:06 PM, Mahesh Chaudhari mahesh.chaudh...@ymail.com wrote: On Thursday, 7 November 2013 10:46 AM, Andrew Potter agpot...@gmail.com wrote: On Thu, Nov 7, 2013 at 4:10 AM, Mahesh Chaudhari mahesh.chaudh...@ymail.com wrote: Also (unsuccessfully) tried : void

Re: Delay time to spawn new threads?

2013-11-27 Thread Andrew Potter
On Wed, Nov 27, 2013 at 7:29 AM, David Buchan pdbuc...@yahoo.com wrote: I have written a program which spawns a new thread when the user clicks a button. The new thread does something noticeable immediately after starting, so I know when the thread has begun. What I mean is, if I run that

Re: Delay time to spawn new threads?

2013-11-27 Thread Andrew Potter
On Wed, Nov 27, 2013 at 11:20 AM, David Buchan pdbuc...@yahoo.com wrote: Yes, I've tried the printf thing. It takes about 1.5 sec. Very strange. It will be hard to help you much further without an example program. If thread creation does in fact take so long on your platform, you can perhaps

Re: Still confused on new thread starting idle functions to update UI.

2013-12-03 Thread Andrew Potter
On Tue, Dec 3, 2013 at 11:02 AM, David Buchan pdbuc...@yahoo.com wrote: These darn threads and idle functions still baffle me. I'm sorry to be such a pest. I want to periodically update a textview as new information comes available. Sometimes this information can come in quickly (roughly

Re: freely re sizable GtkTreeView columns

2013-12-08 Thread Andrew Potter
On Sun, Dec 8, 2013 at 2:45 PM, Max Linke max_li...@gmx.de wrote: I'm writing my first GTK app with pygobject. I'm struggling with the resizing of treeview columns. The data in one column are quite long strings (filepaths) and I want to be able to dynamically resize the column to something

Re: Could not find signal handler...

2013-12-11 Thread Andrew Potter
On Wed, Dec 11, 2013 at 11:06 AM, Ken Bass daytoo...@gmail.com wrote: I know that this subject has been asked and answered many times, and I have been googling for several days to try to find an answer that works, but to no avail. So, sorry in advance... [...] and the compile and like

Re: GUI signals from a thread (GTK+-3.10)

2014-02-14 Thread Andrew Potter
On Fri, Feb 14, 2014 at 6:51 PM, Valentin But valentin@eesti.ee wrote: Greetings gtk-app-devel-list. I'm a newbie GTK+ developer and I have encountered with a problem. Hello and welcome! Documentation say that the threading support has been deprecated in GTK+ 3.6. Instead of calling GTK+

Fwd: GUI signals from a thread (GTK+-3.10)

2014-02-15 Thread Andrew Potter
Oops, missed the list on my reply... -- Forwarded message -- From: Andrew Potter agpot...@gmail.com Date: Sat, Feb 15, 2014 at 9:41 AM Subject: Re: GUI signals from a thread (GTK+-3.10) To: Valentin But valentin@eesti.ee On Fri, Feb 14, 2014 at 9:25 PM, Valentin But valentin

Re: Reshowing Icons in a Grid

2014-03-14 Thread Andrew Potter
On Fri, Mar 14, 2014 at 4:53 PM, Marshall Lake ml...@mlake.net wrote: I have 10 different icons stored in 10 files. I want to display these 10 icons in different locations in a gtk_grid_new(). It works fine once. If I gtk_widget_destroy(grid), create a new grid, and try to display these