On Sat, Mar 22, 2008 at 2:38 PM, Matti Räty <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> My question is about Python and Hildon UI. It might be pretty basic one but
> I haven't been able to find a solution.
>
> So, my problem is this. I am creating application with Python for Maemo but
> for some reason window title and toolbar remain hidden. I can add widgets to
> window and they work fine. So most likely I am missing just some minor
> thing. I am hoping someone could push me to the right direction :)
>
> Here is code snipset that I have :
>
> class MyApp(hildon.Program):
>
> def __init__(self):
> hildon.Program.__init__(self)
>
> self.window = hildon.Window()
>
> self.window.set_title("Title, not seen.")
> self.window.connect("destroy", gtk.main_quit)
>
> label = gtk.Label("Hello")
> self.window.add(label)
>
> self._create_toolbar()
>
> self.add_window(self.window)
>
> def _create_toolbar(self):
> toolbar = gtk.Toolbar()
> toolbar.set_border_width (3)
> toolbar.set_orientation ('horizontal')
> toolbar.set_style ('both-horiz')
> button = gtk.ToolButton (None, "TB Button")
> toolbar.insert (button, -1)
>
> button.show()
> toolbar.show()
>
> self.window.add_toolbar(toolbar)
>
> def run(self):
> self.window.show_all()
> gtk.main()
>
> run() is called when program is launched.
>
> So there it is. All pointers are very much welcome.
>
About the toolbar, that probably is a bug when using the set_style
with both_horizontal. At [1] there's a C code example.
[1] http://pastebin.com/m3a52df8b
--
Lauro Moura
INdT - Instituto Nokia de Tecnologia
_______________________________________________
maemo-developers mailing list
[email protected]
https://lists.maemo.org/mailman/listinfo/maemo-developers