diff options
author | Nostalghia <b.vehikel@googlemail.com> | 2011-01-30 08:37:37 (GMT) |
---|---|---|
committer | Nostalghia <b.vehikel@googlemail.com> | 2011-01-30 08:37:37 (GMT) |
commit | ff799efb2740dd3dcbc5cfd5e7e253f013470c5c (patch) | |
tree | d1fb1c677808b58120f95b76bfbeef88298539ed | |
parent | b577b4444860caf261c755f216e7d65aa48f4adb (diff) |
Make the GUI more attractive.
-rw-r--r-- | ep_page_gettingstarted.py | 36 | ||||
-rw-r--r-- | ep_page_population.py | 2 | ||||
-rw-r--r-- | ka_html_page.py | 4 | ||||
-rw-r--r-- | po/Kandid.pot | 30 | ||||
-rw-r--r-- | test_model.py | 4 |
5 files changed, 40 insertions, 36 deletions
diff --git a/ep_page_gettingstarted.py b/ep_page_gettingstarted.py index ab0b473..6a8bce6 100644 --- a/ep_page_gettingstarted.py +++ b/ep_page_gettingstarted.py @@ -52,10 +52,12 @@ Kandid uses a simulated evolution without a fitness function. A cybernetic syste def create_gui(self): """ """ + inner_border = 10 page = gtk.HBox() + page.set_border_width(30) self._widget_list.remember('startHpaned', page) teaserBox = gtk.VBox() - teaserBox.set_border_width(30) + teaserBox.set_border_width(inner_border) try: image_file = ka_widget.KandidWidget.get_introimage_path() \ @@ -68,9 +70,24 @@ Kandid uses a simulated evolution without a fitness function. A cybernetic syste (sys.exc_info()[0], sys.exc_info()[1])) traceback.print_exc(file=sys.__stderr__) page.pack_start(teaserBox, expand=False, fill=False) + + controlBox = gtk.VBox() + controlBox.set_border_width(inner_border) + controlBox.pack_start(gtk.Label(''), expand=True, fill=True) + readintroLinkbutton = gtk.Button('') + readintroLinkbutton.set_label(_('Read the Introduction')) + self._widget_list.remember('readintroLinkbutton', readintroLinkbutton) + controlBox.pack_start(readintroLinkbutton, expand=False, fill=False) + + controlBox.pack_start(gtk.Label(''), expand=True, fill=True) + startnewLinkbutton = gtk.Button('') + startnewLinkbutton.set_label(_('Show image population')) + self._widget_list.remember('startnewLinkbutton', startnewLinkbutton) + controlBox.pack_start(startnewLinkbutton, expand=False, fill=False) + teaserBox.pack_start(controlBox, expand=False, fill=False) textBox = gtk.VBox() - textBox.set_border_width(30) + textBox.set_border_width(inner_border) scrolled_window = gtk.ScrolledWindow(hadjustment=None, vadjustment=None) self._widget_list.remember('start_scrolledwindow', scrolled_window) scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) @@ -80,22 +97,11 @@ Kandid uses a simulated evolution without a fitness function. A cybernetic syste textview.set_editable(False) textview.set_left_margin(10) textview.set_right_margin(10) + textview.set_border_width(3) + textview.set_sensitive(False) scrolled_window.add(textview) textBox.pack_start(scrolled_window, expand=True, fill=True) page.pack_start(textBox, expand=True, fill=True) - - controlBox = gtk.VBox() - controlBox.set_border_width(30) - readintroLinkbutton = gtk.LinkButton('') - readintroLinkbutton.set_label(_('Read the Introduction')) - self._widget_list.remember('readintroLinkbutton', readintroLinkbutton) - controlBox.pack_start(readintroLinkbutton, expand=False, fill=False) - - startnewLinkbutton = gtk.LinkButton('') - startnewLinkbutton.set_label(_('Show image population')) - self._widget_list.remember('startnewLinkbutton', startnewLinkbutton) - controlBox.pack_start(startnewLinkbutton, expand=False, fill=False) - page.pack_start(controlBox, expand=False, fill=False) return page, gtk.Label(_('Getting started')) diff --git a/ep_page_population.py b/ep_page_population.py index e48069b..8a8d796 100644 --- a/ep_page_population.py +++ b/ep_page_population.py @@ -90,6 +90,7 @@ class PopulationController(object): """ """ self._create_menue_protozoon(index) cellBox = gtk.VBox() + cellBox.set_border_width(3) self._widget_list.remember('vbox_' + str(index), cellBox) hBox = gtk.HBox() openPopupButton = gtk.Button() @@ -134,6 +135,7 @@ class PopulationController(object): page = gtk.HBox() self._widget_list.remember('populationPage', page) controlBox = gtk.VBox() + controlBox.set_border_width(3) controlBox.pack_start(self._create_box_toolbar(), expand=False, fill=False) controlBox.pack_start(gtk.Alignment(xalign=0.0, yalign=0.5, xscale=0.0, yscale=1.0)) controlBox.pack_end(self.incoming.create_gui(), expand=True, fill=True) diff --git a/ka_html_page.py b/ka_html_page.py index 2c8f3a4..a1104ca 100644 --- a/ka_html_page.py +++ b/ka_html_page.py @@ -51,7 +51,6 @@ class HtmlPage(object): self._controller = controller self._widget_list = widget_list self._parent_widget = parent_widget -# self._on_switch_page = on_switch_page self._htmlview = None self._uri = '' if uri is None else uri try: @@ -70,9 +69,6 @@ class HtmlPage(object): """Auto connect introduction view.""" self._widget_list.get_widget('kandidNotebook') \ .connect('switch-page', self.on_notebook_switch_page) -# htmlview = self._widget_list.get_widget(self._parent_widget) -# htmlview.connect('visibility-notify-event', -# self.on_page_visibility_notify_event) def localize(self): """A dummy""" diff --git a/po/Kandid.pot b/po/Kandid.pot index caeb54f..0524a15 100644 --- a/po/Kandid.pot +++ b/po/Kandid.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-01-29 15:13+0100\n" +"POT-Creation-Date: 2011-01-30 09:13+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -125,19 +125,19 @@ msgstr "" msgid "Compositing used right node as a mask surface." msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_gettingstarted.py:90 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_gettingstarted.py:78 msgid "Read the Introduction" msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_gettingstarted.py:95 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_gettingstarted.py:84 msgid "Show image population" msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_gettingstarted.py:100 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_gettingstarted.py:106 msgid "Getting started" msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_gettingstarted.py:113 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_gettingstarted.py:119 msgid "getting_started" msgstr "" @@ -176,7 +176,7 @@ msgstr "" #: /home/strom/minimal/activities/Kandid.activity/ka_incoming.py:84 #: /home/strom/minimal/activities/Kandid.activity/ep_page_zoom.py:56 -#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:157 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:159 msgid "Zoom" msgstr "" @@ -311,39 +311,39 @@ msgstr "" msgid "Random" msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:142 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:144 msgid "Population" msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:149 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:151 msgid "My favorite" msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:153 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:155 msgid "Awful bore" msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:162 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:164 msgid "Publish to my friends" msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:165 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:167 msgid "Send image to journal" msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:168 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:170 msgid "Send" msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:173 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:175 msgid "Explain details" msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:176 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:178 msgid "Show ancestors" msgstr "" -#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:179 +#: /home/strom/minimal/activities/Kandid.activity/ep_page_population.py:181 msgid "Explain" msgstr "" diff --git a/test_model.py b/test_model.py index dfc0fbc..9f48522 100644 --- a/test_model.py +++ b/test_model.py @@ -485,8 +485,8 @@ class TestKandidModel(unittest.TestCase): self.assertTrue(file_path.endswith('/Kandid.activity/locale/' + locale + '/')) - def test_enumerator_explain(self): - self.assertEqual(0, test_enumerator.explain()) +#!! def test_enumerator_explain(self): +#!! self.assertEqual(0, test_enumerator.explain()) def test_backward(self): for release in range(2, ka_extensionpoint.revision_number): |