From 09b6a9187bd4ba2030bece50fe391ad2fe6045b5 Mon Sep 17 00:00:00 2001
From: Simon Schampijer <simon@laptop.org>
Date: Mon, 8 Oct 2012 07:00:13 +0200
Subject: [PATCH shell] 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>
---
src/jarabe/desktop/keydialog.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/jarabe/desktop/keydialog.py b/src/jarabe/desktop/keydialog.py
index 5215d05..0230f95 100644
a
|
b
|
from gettext import gettext as _ |
21 | 21 | from gi.repository import Gtk |
22 | 22 | import dbus |
23 | 23 | |
| 24 | from sugar3.graphics.icon import Icon |
| 25 | |
24 | 26 | from jarabe.model import network |
25 | 27 | |
26 | 28 | |
… |
… |
class KeyDialog(Gtk.Dialog): |
90 | 92 | " the wireless network '%s'.") % (display_name, )) |
91 | 93 | self.vbox.pack_start(label, True, True, 0) |
92 | 94 | |
93 | | self.add_buttons(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, |
94 | | Gtk.STOCK_OK, Gtk.ResponseType.OK) |
| 95 | button = Gtk.Button() |
| 96 | button.set_image(Icon(icon_name='dialog-cancel')) |
| 97 | button.set_label(_('Cancel')) |
| 98 | self.add_action_widget(button, Gtk.ResponseType.CANCEL) |
| 99 | button = Gtk.Button() |
| 100 | button.set_image(Icon(icon_name='dialog-ok')) |
| 101 | button.set_label(_('Ok')) |
| 102 | self.add_action_widget(button, Gtk.ResponseType.OK) |
| 103 | |
95 | 104 | self.set_default_response(Gtk.ResponseType.OK) |
96 | 105 | |
97 | 106 | def add_key_entry(self): |