GtkTextView padding

2009-10-31 Thread Carlos Pereira
Hi all, what is the standard, simple, way to add some padding inside a GtkTextView? These functions work nice: gtk_text_view_set_left_margin (GTK_TEXT_VIEW (text), 10); gtk_text_view_set_right_margin (GTK_TEXT_VIEW (text), 10); but no equivalent functions seem to exist for top, bottom

Re: Need help to set a cursor/focus on treeview row!

2009-10-31 Thread Daniel B. Thurman
On 10/30/2009 05:48 PM, Daniel B. Thurman wrote: I am learning, so please bear with me! I have the following code: def expandHome(self, model, iter=None, defaultHome=None): ''' expand user's home directory ''' if not defaultHome: return ran =

GtkTreeView: g_signal_handlers_unblock_by_func

2009-10-31 Thread Carlos Pereira
Hi all, To avoid some reentrant callbacks, in a few cases I have to use code such as: g_signal_handlers_block_by_func (widget, func, data); do_stuff; g_signal_handlers_unblock_by_func (widget, func, data); Usually this works fine, but I have a Treeview where unblock seems to be done too

Re: Need help to set a cursor/focus on treeview row!

2009-10-31 Thread David Nečas
On Sat, Oct 31, 2009 at 10:06:12AM -0700, Daniel B. Thurman wrote: I wanted to add a bit of clarification. The goal is that once the user's home directory is expanded, I wanted to bring the expanded tree of /home/some-user into view in the scrolled window, centered, so I may have the wrong

Re: GtkTreeView: g_signal_handlers_unblock_by_func

2009-10-31 Thread Carlos Pereira
Tadej Borovšak wrote: Hello. Only situation that comes to my mind that would cause g_signal_handlers_block_by_func to misbehave is if you do something inside blocked part of code that installs idle handler to do the real work. What are you doing inside do_stuff part? Essentially adding a

Re: GtkTreeView: g_signal_handlers_unblock_by_func

2009-10-31 Thread Tadej Borovšak
Hello. Essentially adding a simple store model: store = gtk_list_store_new (1, G_TYPE_STRING); while (foo_bar != NULL)  {  gtk_list_store_append (store, iter);  gtk_list_store_set (store, iter, 0, my_name, -1);  } gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL