Reply
Thread Tools
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#1
Hi,
I'm trying to get expanders shown in a gtk.TreeView (with pygtk) in maemo4.
I've already tryed to set the expander size setting a style
Code:
gtk.rc_parse_string('''style "toolkit"
{
        GtkTreeView::expander-size = 12
}

class "GtkTreeView" style "toolkit"
''')
but the expanders aren't drawn.
Is there any way to get the expanders shown?
 
Posts: 52 | Thanked: 73 times | Joined on Feb 2009 @ Corunha
#2
Originally Posted by maacruz View Post
Hi,
but the expanders aren't drawn.
Is there any way to get the expanders shown?
They're hidden by default in Maemo-gtk. Try with this function:

http://maemo.org/api_refs/5.0/beta/g...show-expanders
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#3
Originally Posted by Alberto Garcia View Post
They're hidden by default in Maemo-gtk. Try with this function:

http://maemo.org/api_refs/5.0/beta/g...show-expanders
They are already enabled by default, and I can expand the tree, but the little triangles are not drawn.
 
Posts: 52 | Thanked: 73 times | Joined on Feb 2009 @ Corunha
#4
Originally Posted by maacruz View Post
They are already enabled by default, and I can expand the tree, but the little triangles are not drawn.
Strange, since in C they are disabled by default.

Anyway, this works for me here:

Code:
    gtk_rc_parse_string ("style \"toolkit\"\n"
                         "{\n"
                         "GtkTreeView::expander-size = 40\n"
                         "}\n"
                         "class \"GtkTreeView\" style \"toolkit\"\n");
(this is C, not Python, but it should work the same)
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#5
But you are using maemo5 (N900), aren't you?
 
Posts: 52 | Thanked: 73 times | Joined on Feb 2009 @ Corunha
#6
Originally Posted by maacruz View Post
But you are using maemo5 (N900), aren't you?
Yes, but it also works in Maemo 4 (I don't have a device here,
but I tested in the SDK).

But I really had to enable 'show-expanders'. Maemo 4 doesn't seem to have gtk_tree_view_set_show_expanders (), but you can use:

g_object_set (tree_view, "show-expanders", TRUE, NULL);

I can upload a complete test case (in C) if you want.
 

The Following User Says Thank You to Alberto Garcia For This Useful Post:
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#7
That did it!!!
Thank you very much!!!

Now, for being so helpful, I'm going to really abuse you
My program (zim) runs in maemo5 too, but since there is no fullscreen hardware buton, once it goes fullscreen there is no way to go back to windowed mode.
It seems that by clicking on the lower right corner of the screen a fullscreen switch button should appear, but it doesn't (people showed me browser screenshots to demonstrate the function). Can I make appear such button (by calling some hildon function/object)? Or must I implement my own fullscreen button?
 
Posts: 52 | Thanked: 73 times | Joined on Feb 2009 @ Corunha
#8
Originally Posted by maacruz View Post
My program (zim) runs in maemo5 too, but since there is no fullscreen hardware buton, once it goes fullscreen there is no way to go back to windowed mode.
I'm afraid you have to implement it yourself (or use any other mechanism, such as the +/- buttons, or whatever)
 

The Following User Says Thank You to Alberto Garcia For This Useful Post:
Reply

Tags
pygtk


 
Forum Jump


All times are GMT. The time now is 17:15.