[Inteproxy-commits] r69 - in trunk: . inteproxy
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Apr 30 14:56:27 CEST 2007
Author: bh
Date: 2007-04-30 14:56:27 +0200 (Mon, 30 Apr 2007)
New Revision: 69
Modified:
trunk/ChangeLog
trunk/inteproxy/gtkapp.py
Log:
* inteproxy/gtkapp.py (run_about_dialog): New. Convenience
function to run gtk.AboutDialog with properties given as keyword
arguments.
(InteProxyApplication.run_about_dialog): Use the new
run_about_dialog function to run the dialog. Now the dialog shows
the logo, version, copyright information and the web site URL.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-04-30 12:40:39 UTC (rev 68)
+++ trunk/ChangeLog 2007-04-30 12:56:27 UTC (rev 69)
@@ -1,5 +1,14 @@
2007-04-30 Bernhard Herzog <bh at intevation.de>
+ * inteproxy/gtkapp.py (run_about_dialog): New. Convenience
+ function to run gtk.AboutDialog with properties given as keyword
+ arguments.
+ (InteProxyApplication.run_about_dialog): Use the new
+ run_about_dialog function to run the dialog. Now the dialog shows
+ the logo, version, copyright information and the web site URL.
+
+2007-04-30 Bernhard Herzog <bh at intevation.de>
+
* inteproxy/gtkapp.py (load_image): New. Loads an image as a pixbuf
(InteProxyMainWindow.__init__): Use load_image to load the logo
Modified: trunk/inteproxy/gtkapp.py
===================================================================
--- trunk/inteproxy/gtkapp.py 2007-04-30 12:40:39 UTC (rev 68)
+++ trunk/inteproxy/gtkapp.py 2007-04-30 12:56:27 UTC (rev 69)
@@ -165,7 +165,15 @@
return True
+def run_about_dialog(parent, **kw):
+ """Runs gtk.AboutDialog with properties given as keyword arguments."""
+ dialog = gtk.AboutDialog()
+ for key, value in kw.iteritems():
+ dialog.set_property(key, value)
+ dialog.run()
+ dialog.destroy()
+
class InteProxyApplication(inteproxy.app.InteProxyApplication):
"""GUI version of InteProxyApplication
@@ -239,14 +247,13 @@
def run_about_dialog(self, *args):
"""Run the about dialog"""
- dialog = gtk.MessageDialog(self.main_window,
- (gtk.DIALOG_MODAL |
- gtk.DIALOG_DESTROY_WITH_PARENT),
- gtk.MESSAGE_INFO, gtk.BUTTONS_OK,
- ("InteProxy version %s"
- % inteproxy.main.inteproxy_version))
- dialog.run()
- dialog.destroy()
+ run_about_dialog(self, name="InteProxy",
+ logo=load_image("InteProxy-logo.png"),
+ version=inteproxy.main.inteproxy_version,
+ copyright="Copyright 2006, 2007 by Intevation GmbH",
+ comments="InteProxy is distributed under the"
+ " GNU General Public License (GPL) version 2 or later",
+ website="http://inteproxy.wald.intevation.org/")
def get_password(self, *args):
"""Asks the user for username and password
More information about the Inteproxy-commits
mailing list