Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@laptop.org>2012-10-08 05:00:13 (GMT)
committer Simon Schampijer <simon@laptop.org>2012-10-09 17:42:11 (GMT)
commite731544ff72377bdfb64212e9ab048fe101113b8 (patch)
treedd1f064b2460147be703110dff9cc4283c4e2467
parent4baef0b242305999172e898b67987b646cdbf085 (diff)
AP password dialog: theme the ok button correctly, SL #3971
Use gtk-dialog-add-action-widget to add buttons to the GtkDialog that use the Sugar Icons. Signed-off-by: Simon Schampijer <simon@laptop.org> Acked-by: Manuel QuiƱones <manuq@laptop.org>
-rw-r--r--src/jarabe/desktop/keydialog.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/jarabe/desktop/keydialog.py b/src/jarabe/desktop/keydialog.py
index a0509d9..a4c8e36 100644
--- a/src/jarabe/desktop/keydialog.py
+++ b/src/jarabe/desktop/keydialog.py
@@ -21,6 +21,8 @@ from gettext import gettext as _
from gi.repository import Gtk
import dbus
+from sugar3.graphics.icon import Icon
+
from jarabe.model import network
@@ -90,8 +92,15 @@ class KeyDialog(Gtk.Dialog):
" the wireless network '%s'.") % (display_name, ))
self.vbox.pack_start(label, True, True, 0)
- self.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
- Gtk.STOCK_OK, Gtk.ResponseType.OK)
+ button = Gtk.Button()
+ button.set_image(Icon(icon_name='dialog-cancel'))
+ button.set_label(_('Cancel'))
+ self.add_action_widget(button, Gtk.ResponseType.CANCEL)
+ button = Gtk.Button()
+ button.set_image(Icon(icon_name='dialog-ok'))
+ button.set_label(_('Ok'))
+ self.add_action_widget(button, Gtk.ResponseType.OK)
+
self.set_default_response(Gtk.ResponseType.OK)
def add_key_entry(self):