#4020 NORM Update.: Multiline text entries should have border
Zarro Boogs per Child
bugtracker at laptop.org
Mon Nov 19 06:06:42 EST 2007
#4020: Multiline text entries should have border
-------------------------------+--------------------------------------------
Reporter: Eben | Owner: tomeu
Type: defect | Status: new
Priority: normal | Milestone: Update.2
Component: journal-activity | Version:
Resolution: | Keywords: has_patch
Verified: 0 |
-------------------------------+--------------------------------------------
Changes (by tomeu):
* keywords: => has_patch
Comment:
{{{
diff --git a/expandedentry.py b/expandedentry.py
index 230b3c0..95f92e6 100644
--- a/expandedentry.py
+++ b/expandedentry.py
@@ -49,9 +49,16 @@ class Separator(hippo.CanvasBox, hippo.CanvasItem):
class CanvasTextView(hippo.CanvasWidget):
def __init__(self, text, **kwargs):
hippo.CanvasWidget.__init__(self, **kwargs)
- text_view = gtk.TextView()
- text_view.props.buffer.props.text = text
- self.props.widget = text_view
+ self.text_view_widget = gtk.TextView()
+ self.text_view_widget.props.buffer.props.text = text
+ self.text_view_widget.show()
+
+ scrolled_window = gtk.ScrolledWindow()
+ scrolled_window.set_shadow_type(gtk.SHADOW_OUT)
+ scrolled_window.set_policy(gtk.POLICY_AUTOMATIC,
gtk.POLICY_AUTOMATIC)
+ scrolled_window.add(self.text_view_widget)
+
+ self.props.widget = scrolled_window
class BuddyList(hippo.CanvasBox):
def __init__(self, model):
@@ -235,9 +242,9 @@ class ExpandedEntry(hippo.CanvasBox):
text_view = CanvasTextView(description,
box_height=style.GRID_CELL_SIZE * 2)
vbox.append(text_view, hippo.PACK_EXPAND)
- text_view.props.widget.props.accepts_tab = False
- text_view.props.widget.connect('focus-out-event',
- self._description_focus_out_event_cb)
+ text_view.text_view_widget.props.accepts_tab = False
+ text_view.text_view_widget.connect('focus-out-event',
+
self._description_focus_out_event_cb)
return vbox, text_view
@@ -252,10 +259,10 @@ class ExpandedEntry(hippo.CanvasBox):
text_view = CanvasTextView(tags, box_height=style.GRID_CELL_SIZE
* 2)
vbox.append(text_view, hippo.PACK_EXPAND)
- text_view.props.widget.props.accepts_tab = False
- text_view.props.widget.connect('focus-out-event',
- self._tags_focus_out_event_cb)
-
+ text_view.text_view_widget.props.accepts_tab = False
+ text_view.text_view_widget.connect('focus-out-event',
+ self._tags_focus_out_event_cb)
+
return vbox, text_view
def _create_version_list(self):
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/4020#comment:3>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list