<br><br><div class="gmail_quote">On Wed, Aug 17, 2011 at 8:38 PM, Manuel Quiñones <span dir="ltr"><<a href="mailto:manuq@laptop.org">manuq@laptop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Signed-off-by: Manuel Quiñones <<a href="mailto:manuq@laptop.org">manuq@laptop.org</a>><br>
---<br>
 pippy_app.py |   50 ++++++++++++++++++++++++++++++--------------------<br>
 1 files changed, 30 insertions(+), 20 deletions(-)<br>
<br>
diff --git a/pippy_app.py b/pippy_app.py<br>
index 180766b..25651f4 100644<br>
--- a/pippy_app.py<br>
+++ b/pippy_app.py<br>
@@ -63,8 +63,9 @@ class WordsActivity(ViewSourceActivity):<br>
         self.max_participants = 1<br>
<br>
         # Main layout.<br>
-        hbox = gtk.HBox(homogeneous=True)<br>
-        vbox = gtk.VBox()<br>
+        hbox = gtk.HBox(homogeneous=True, spacing=8)<br>
+        vbox = gtk.VBox(spacing=16)<br>
+        vbox.set_border_width(16)<br>
<br>
         # Toolbar (compatibility with old-toolbars).<br>
         try:<br>
@@ -103,12 +104,16 @@ class WordsActivity(ViewSourceActivity):<br>
             toolbox.show()<br>
<br>
         # transbox: <label> - <text entry> - <speak button><br>
-        transbox1 = gtk.HBox()<br>
-        transbox2 = gtk.HBox()<br>
+        transbox = gtk.Table()<br>
+        transbox.resize(2, 3)<br>
+        transbox.set_row_spacings(8)<br>
+        transbox.set_col_spacings(12)<br>
<br>
         # Labels.<br>
-        label1 = gtk.Label(_("Word"))<br>
-        label2 = gtk.Label(_("Translation"))<br>
+        label1 = gtk.Label(_("Word") + ':')<br>
+        label1.set_alignment(xalign=0.0, yalign=0.5)<br>
+        label2 = gtk.Label(_("Translation") + ':')<br>
+        label2.set_alignment(xalign=0.0, yalign=0.5)<br>
<br>
         # Text entry box to enter word to be translated.<br>
         self.totranslate = gtk.Entry(max=50)<br>
@@ -126,19 +131,17 @@ class WordsActivity(ViewSourceActivity):<br>
         speak2 = gtk.Button("Speak")<br>
         speak2.connect("clicked", self.speak2_cb)<br>
<br>
-        transbox1.pack_start(label1, expand=False)<br>
-        transbox1.pack_start(self.totranslate)<br>
-        transbox1.pack_start(speak1, expand=False)<br>
+        transbox.attach(label1, 0, 1, 0, 1, xoptions=gtk.FILL)<br>
+        transbox.attach(self.totranslate, 1, 2, 0, 1, xoptions=gtk.FILL|gtk.EXPAND)<br>
+        transbox.attach(speak1, 2, 3, 0, 1, xoptions=gtk.FILL)<br>
<br>
-        transbox2.pack_start(label2, expand=False)<br>
-        transbox2.pack_start(self.translated)<br>
-        transbox2.pack_start(speak2, expand=False)<br>
+        transbox.attach(label2, 0, 1, 1, 2, xoptions=gtk.FILL)<br>
+        transbox.attach(self.translated, 1, 2, 1, 2, xoptions=gtk.FILL|gtk.EXPAND)<br>
+        transbox.attach(speak2, 2, 3, 1, 2, xoptions=gtk.FILL)<br>
<br>
-        vbox.pack_start(transbox1, expand=False)<br>
-        vbox.pack_start(transbox2, expand=False)<br>
+        vbox.pack_start(transbox, expand=False)<br>
<br>
         # The language choice combo boxes.<br>
-        combohbox = gtk.HBox(homogeneous=True)<br>
         self.lang1combo = gtk.combo_box_new_text()<br>
         self.lang1combo.append_text("English")<br>
         self.lang1combo.connect("changed", self.lang1combo_cb)<br>
@@ -152,13 +155,11 @@ class WordsActivity(ViewSourceActivity):<br>
<br>
         self.lang1combo.set_size_request(600,50)<br>
         self.lang2combo.set_size_request(600,50)<br>
-        combohbox.pack_start(self.lang1combo, expand=False)<br>
-        combohbox.pack_start(self.lang2combo, expand=False)<br>
-        vbox.pack_start(combohbox, expand=False)<br>
<br>
         # The "lang1" treeview box<br>
         self.lang1model = gtk.ListStore(str)<br>
         lang1view = gtk.TreeView(self.lang1model)<br>
+        lang1view.set_headers_visible(False)<br>
         lang1cell = gtk.CellRendererText()<br>
         lang1treecol = gtk.TreeViewColumn("", lang1cell, text=0)<br>
         lang1view.get_selection().connect("changed", self.lang1sel_cb)<br>
@@ -167,13 +168,22 @@ class WordsActivity(ViewSourceActivity):<br>
         # The "lang2" box<br>
         self.lang2model = gtk.ListStore(str)<br>
         lang2view = gtk.TreeView(self.lang2model)<br>
+        lang2view.set_headers_visible(False)<br>
         lang2cell = gtk.CellRendererText()<br>
         lang2treecol = gtk.TreeViewColumn("", lang2cell, text=0)<br>
         lang2view.get_selection().connect("changed", self.lang2sel_cb)<br>
         lang2view.append_column(lang2treecol)<br>
<br>
-        hbox.pack_start(lang1view)<br>
-        hbox.pack_start(lang2view)<br>
+        lang1_vbox = gtk.VBox(spacing=8)<br>
+        lang1_vbox.pack_start(self.lang1combo, expand=False)<br>
+        lang1_vbox.pack_start(lang1view)<br>
+<br>
+        lang2_vbox = gtk.VBox(spacing=8)<br>
+        lang2_vbox.pack_start(self.lang2combo, expand=False)<br>
+        lang2_vbox.pack_start(lang2view)<br>
+<br>
+        hbox.pack_start(lang1_vbox)<br>
+        hbox.pack_start(lang2_vbox)<br>
<br>
         vbox.pack_start(hbox)<br>
         self.set_canvas(vbox)<br>
<font color="#888888">--<br>
1.7.4.4<br>
<br></font></blockquote><div><br></div><div>Applied as </div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://git.sugarlabs.org/words-activity/words-activity/commit/a0967841570bf9450105f237a9160c61411c428c">http://git.sugarlabs.org/words-activity/words-activity/commit/a0967841570bf9450105f237a9160c61411c428c</a></div>

<div><br></div><div>Thanks.</div><div><br></div><div><br></div><div> </div></div><br>