diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-06-08 21:47:00 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-06-08 22:32:39 +0200 |
commit | 1d6e7fb4c6167904e260798ab39bee255f677dec (patch) | |
tree | cc6596eaf220b45be4a125e0ac47969fa3d3383e | |
parent | 5f47e032fe2b2e8f69fe623e0e25b8e45bb3950a (diff) |
Add an about dialog
-rw-r--r-- | src/ppm.ui | 1 | ||||
-rw-r--r-- | src/ppm/Makefile.am | 1 | ||||
-rw-r--r-- | src/ppm/__init__.py.in | 1 | ||||
-rwxr-xr-x | src/prepaid-manager-applet.py | 16 |
4 files changed, 19 insertions, 0 deletions
@@ -56,6 +56,7 @@ <property name="use_action_appearance">False</property> <property name="use_underline">True</property> <property name="use_stock">True</property> + <signal name="activate" handler="on_about_activated" swapped="no"/> </object> </child> </object> diff --git a/src/ppm/Makefile.am b/src/ppm/Makefile.am index 8346110..65952cd 100644 --- a/src/ppm/Makefile.am +++ b/src/ppm/Makefile.am @@ -15,6 +15,7 @@ EXTRA_DIST = $(python_DATA) $(python_DATA_IN) %.py: $(srcdir)/%.py.in $(srcdir)/Makefile sed -e "s,::PACKAGE::,$(PACKAGE)," \ + -e "s,::VERSION::,$(PACKAGE_VERSION)," \ -e "s,::PYLIBDIR::,$(pkgdatadir)," \ -e "s,::GETTEXTDIR::,$(datadir)/locale," \ -e "s,::DATADIR::,$(datadir)," \ diff --git a/src/ppm/__init__.py.in b/src/ppm/__init__.py.in index ab3c59d..d1b0f13 100644 --- a/src/ppm/__init__.py.in +++ b/src/ppm/__init__.py.in @@ -3,3 +3,4 @@ gettext_app = '::PACKAGE::' gettext_dir = '::GETTEXTDIR::' ui_dir = '::PKGDATADIR::' +version = '::VERSION::' diff --git a/src/prepaid-manager-applet.py b/src/prepaid-manager-applet.py index 77de3ed..bf5ab8e 100755 --- a/src/prepaid-manager-applet.py +++ b/src/prepaid-manager-applet.py @@ -284,10 +284,22 @@ class PPMObject(object): # View class PPMDialog(GObject.GObject, PPMObject): + def _init_about_dialog(self): + self.about_dialog = Gtk.AboutDialog( + authors = ["Guido Günther <agx@sigxcpu.org>"], + program_name = "GNOME Prepaid Manager", + website = "https://honk.sigxcpu.org/piki/projects/ppm/", + website_label = _("Website"), + comments = _("Manage balance of prepaid GSM SIM cards"), + wrap_license = True, + version = ppm.version, + license_type = Gtk.License.GPL_3_0) + def _init_subdialogs(self): self.provider_info_missing_dialog = PPMProviderInfoMissingDialog(self) self.provider_assistant = PPMProviderAssistant(self) self.modem_response = PPMModemResponse(self) + self._init_about_dialog() def _setup_ui(self): self.dialog = self.builder.get_object("ppm_dialog") @@ -325,6 +337,10 @@ class PPMDialog(GObject.GObject, PPMObject): self.clear_top_up_information() self.controller.top_up_balance() + def on_about_activated(self, dummy): + self.about_dialog.run() + self.about_dialog.hide() + def on_balance_info_renew_clicked(self, dummy): self.controller.fetch_balance() |