From ba850d5787168f1d02fe9b38c971a9d18164b1c7 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Thu, 14 Aug 2008 21:31:42 +0200 Subject: [PATCH] Wrap message in alert needed for 7841 --- src/sugar/graphics/alert.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sugar/graphics/alert.py b/src/sugar/graphics/alert.py index fad90bb1..a4d2a5ac 100644 --- a/src/sugar/graphics/alert.py +++ b/src/sugar/graphics/alert.py @@ -85,7 +85,7 @@ class Alert(gtk.EventBox): self._buttons_box.set_spacing(style.DEFAULT_SPACING) self._hbox.pack_start(self._buttons_box) - gtk.EventBox.__init__(self, **kwargs) + gobject.GObject.__init__(self, **kwargs) self.set_visible_window(True) self.add(self._hbox) @@ -105,6 +105,10 @@ class Alert(gtk.EventBox): if self._msg != value: self._msg = value self._msg_label.set_markup(self._msg) + width, height_ = self._msg_label.size_request() + self._msg_label.set_size_request(width-style.DEFAULT_SPACING, + -1) + self._msg_label.set_line_wrap(True) elif pspec.name == 'icon': if self._icon != value: self._icon = value