Added new method to break text into several lines of a maximum length. This is neccessary because pygtk.set_width_chars doesn't work correctly on the Moko

git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@242 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
oepen
2010-08-05 13:55:26 +00:00
parent 93f9b4b232
commit 0061145f39
2 changed files with 27 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ except ImportError:
from eid_gui_globals import IMAGES, GLADE_FILE, EPA_ATR
from widgets import customCheckButton
from logic import cardChecker
from logic import cardChecker, break_text
class MokoWindow(gtk.Window):
"""
@@ -123,9 +123,9 @@ class MsgBox(gtk.Dialog):
self.set_size_request(480, 160)
hbox_top = gtk.HBox()
lbl = gtk.Label(msg)
lbl.set_width_chars(20)
lbl.set_line_wrap(True)
lbl = gtk.Label(break_text(msg, 35))
#lbl.set_width_chars(20)
#lbl.set_line_wrap(True)
btn = gtk.Button("Ok")
btn.connect("clicked", self.__destroy)
img = gtk.Image()