gettext-ify GuiPrefs.py

This commit is contained in:
steffen123 2010-08-14 17:36:19 +02:00
parent 755b19af4f
commit 6914c90341

View File

@ -67,13 +67,13 @@ class GuiPrefs:
self.configView = gtk.TreeView(self.configStore) self.configView = gtk.TreeView(self.configStore)
self.configView.set_enable_tree_lines(True) self.configView.set_enable_tree_lines(True)
configColumn = gtk.TreeViewColumn("Setting") configColumn = gtk.TreeViewColumn(_("Setting"))
self.configView.append_column(configColumn) self.configView.append_column(configColumn)
cRender = gtk.CellRendererText() cRender = gtk.CellRendererText()
configColumn.pack_start(cRender, True) configColumn.pack_start(cRender, True)
configColumn.add_attribute(cRender, 'text', 1) configColumn.add_attribute(cRender, 'text', 1)
configColumn = gtk.TreeViewColumn("Value (double-click to change)") configColumn = gtk.TreeViewColumn(_("Value (double-click to change)"))
self.configView.append_column(configColumn) self.configView.append_column(configColumn)
cRender = gtk.CellRendererText() cRender = gtk.CellRendererText()
configColumn.pack_start(cRender, True) configColumn.pack_start(cRender, True)
@ -168,19 +168,17 @@ class GuiPrefs:
if dia is not None: if dia is not None:
dia.response(gtk.RESPONSE_ACCEPT) dia.response(gtk.RESPONSE_ACCEPT)
if __name__=="__main__": if __name__=="__main__":
config = Configuration.Config() config = Configuration.Config()
win = gtk.Window(gtk.WINDOW_TOPLEVEL) win = gtk.Window(gtk.WINDOW_TOPLEVEL)
win.set_title("Test Preferences Dialog") win.set_title(_("Test Preferences Dialog"))
win.set_border_width(1) win.set_border_width(1)
win.set_default_size(600, 500) win.set_default_size(600, 500)
win.set_resizable(True) win.set_resizable(True)
dia = gtk.Dialog("Preferences", dia = gtk.Dialog(_("Preferences"),
win, win,
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
@ -193,7 +191,3 @@ if __name__=="__main__":
# save updated config # save updated config
config.save() config.save()
dia.destroy() dia.destroy()