From bff480176f8c16553e95aba08641d3b91d9eece9 Mon Sep 17 00:00:00 2001 From: "uspallek@bart.dsl" Date: Wed, 23 Jul 2008 16:27:09 +0200 Subject: [PATCH] Added tooltips, and Buttonnamings for translation. --- tryton/gui/window/dblogin.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/dblogin.py b/tryton/gui/window/dblogin.py index e541fa9685..2c613a9ed5 100644 --- a/tryton/gui/window/dblogin.py +++ b/tryton/gui/window/dblogin.py @@ -18,12 +18,20 @@ class DBLogin(object): self.dialog.set_position(gtk.WIN_POS_CENTER_ON_PARENT) self.dialog.set_has_separator(False) self.dialog.set_icon(TRYTON_ICON) - self.dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CANCEL) + + tooltips = gtk.Tooltips() + button_cancel = gtk.Button(_('_Cancel')) + img_cancel = gtk.Image() + img_cancel.set_from_stock('tryton-cancel', gtk.ICON_SIZE_BUTTON) + button_cancel.set_image(img_cancel) + tooltips.set_tip(button_cancel, _('Cancel connection or reconnection to the Tryton server')) + self.dialog.add_action_widget(button_cancel, gtk.RESPONSE_CANCEL) self.button_connect = gtk.Button(_('C_onnect')) img_connect = gtk.Image() img_connect.set_from_stock('tryton-connect', gtk.ICON_SIZE_BUTTON) self.button_connect.set_image(img_connect) self.button_connect.set_flags(gtk.CAN_DEFAULT) + tooltips.set_tip(self.button_connect, _('Connect or reconnect the Tryton server')) self.dialog.add_action_widget(self.button_connect, gtk.RESPONSE_OK) self.dialog.set_default_response(gtk.RESPONSE_OK) dialog_vbox = gtk.VBox() @@ -74,6 +82,7 @@ class DBLogin(object): self.entry_server.set_width_chars(16) self.button_server = gtk.Button(label=_("C_hange"), stock=None, use_underline=True) + tooltips.set_tip(self.button_server, _('Configure the Tryton server connection preferences')) table_main.attach(self.button_server, 2, 3, 0, 1, xoptions=gtk.FILL) label_password = gtk.Label(str = _("Password:")) label_password.set_justify(gtk.JUSTIFY_RIGHT)