From: Ed Page Date: Fri, 30 Oct 2009 01:38:36 +0000 (-0500) Subject: Switching to the GTK About dialog X-Git-Url: http://git.maemo.org/git/?p=gonvert;a=commitdiff_plain;h=bcee83ff1a951669202293320c9d320ecb57da88 Switching to the GTK About dialog --- diff --git a/data/gonvert.glade b/data/gonvert.glade index 7c036f1..dfafd67 100644 --- a/data/gonvert.glade +++ b/data/gonvert.glade @@ -528,239 +528,6 @@ - - About - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - -7 - - - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - 0.5 - 0.5 - 0 - 0 - - - 0 - True - True - - - - - - True - 3 - 2 - False - 0 - 0 - - - - True - Version: - False - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - True - False - True - 0 - x.x.x - True - * - False - - - 1 - 2 - 0 - 1 - - - - - - - True - Website: - False - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - 363 - True - True - False - True - 0 - http://unihedron.com/projects/gonvert/gonvert.php - True - * - False - - - 1 - 2 - 1 - 2 - - - - - - - True - Author: - False - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - True - False - True - 0 - Anthony Tekatch anthony@unihedron.com - True - * - False - - - 1 - 2 - 2 - 3 - - - - - - 0 - True - True - - - - - - message box GTK_WINDOW_TOPLEVEL diff --git a/src/gonvert_glade.py b/src/gonvert_glade.py index b8118de..6d88863 100755 --- a/src/gonvert_glade.py +++ b/src/gonvert_glade.py @@ -85,15 +85,9 @@ class Gonvert(object): self._unitValue = widgets.get_widget('unitValue') self._previousUnitName = widgets.get_widget('previousUnitName') self._previousUnitValue = widgets.get_widget('previousUnitValue') - self._about_box = widgets.get_widget('about_box') messagebox = widgets.get_widget('msgbox') messageboxtext = widgets.get_widget('msgboxtext') - about_image = widgets.get_widget('about_image') - about_image.set_from_file(pixmapspath +'gonvert.png') - versionlabel = widgets.get_widget('versionlabel') - versionlabel.set_text(constants.__version__) - self._unitSymbol = widgets.get_widget('unitSymbol') self._previousUnitSymbol = widgets.get_widget('previousUnitSymbol') @@ -161,7 +155,6 @@ class Gonvert(object): "on_findEntry_key_press_event": self._on_find_key_press, "on_findEntry_changed": self._findEntry_changed, "on_aboutMenuItem_activate": self._on_about_clicked, - "on_about_close_clicked": self._on_about_hide, "on_messagebox_ok_clicked": self.messagebox_ok_clicked, "on_clearSelectionMenuItem_activate": self._on_user_clear_selections, "on_unitsView_cursor_changed": self._on_click_unit, @@ -292,14 +285,18 @@ class Gonvert(object): #Check if the key pressed was the 'Enter' key if ord(b.string[0]) == 13: #Execute the find units function - _on_user_find_units(1) + self._on_user_find_units(1) def _on_about_clicked(self, a): - self._about_box.show() - - def _on_about_hide(self, *args): - self._about_box.hide() - return gtk.TRUE + dlg = gtk.AboutDialog() + dlg.set_name(constants.__pretty_app_name__) + dlg.set_version("%s-%d" % (constants.__version__, constants.__build__)) + dlg.set_copyright("Copyright 2009 - GPL") + dlg.set_comments("") + dlg.set_website("http://unihedron.com/projects/gonvert/gonvert.php") + dlg.set_authors(["Anthony Tekatch ", "Ed Page "]) + dlg.run() + dlg.destroy() def messagebox_ok_clicked(self, a): messagebox.hide()