Código Python:
Ver original
#!/usr/bin/python # -*- coding: utf-8 -*- from gi.repository import Gtk import gettext import atk import Image gettext.textdomain("hola-mundo") gettext.bindtextdomain("hola-mundo", "../mo") _ = gettext.gettext class MyWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title=_("Hello World")) self.set_size_request(220, 120) table = Gtk.Table(3, 3, True) self.button = Gtk.Button(label=gettext.gettext("Aceptar")) self.button.connect("clicked", self.on_button_clicked) self.label= Gtk.Label(_("hola carlos como estas")) self.entry = Gtk.Entry() self.scroll_fondo = Gtk.ScrolledWindow(hadjustment=None, vadjustment=None) self.scroll_fondo.set_border_width(10) self.image = Gtk.Image() self.image.set_from_file("notas-captcha.jpg") table.attach(self.button, 0, 1, 0, 1) table.attach(self.label, 1, 3, 0, 1) table.attach(self.entry, 0, 1, 1, 3) table.attach(self.image, 0, 3, 1, 3) #table.attach(self.scroll_fondo, 1, 3, 1, 3) self.add(table) self.label.set_selectable(True) #atk_acc(self.image, self.label) def on_button_clicked(self, widget): print gettext.gettext("Hello World") win = MyWindow() win.connect("delete-event", Gtk.main_quit) win.show_all() Gtk.main()