Rev 221: Add simple about dialog. in file:///data/jelmer/bzr-gtk/trunk/
Jelmer Vernooij
jelmer at samba.org
Sun Jul 15 16:02:33 BST 2007
At file:///data/jelmer/bzr-gtk/trunk/
------------------------------------------------------------
revno: 221
revision-id: jelmer at samba.org-20070715150233-zcrxg8t2fdj74wqh
parent: jelmer at samba.org-20070715144741-jcxiq3d80yewodzz
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sun 2007-07-15 18:02:33 +0300
message:
Add simple about dialog.
added:
about.py about.py-20070715145104-2ihlkw9xgrwj7i3d-1
modified:
NEWS news-20070325173539-3va57o99cz3o57xe-1
notify.py notify.py-20070713203101-vymtmaj9t9b95z99-1
=== added file 'about.py'
--- a/about.py 1970-01-01 00:00:00 +0000
+++ b/about.py 2007-07-15 15:02:33 +0000
@@ -0,0 +1,35 @@
+# Copyright (C) 2007 by Jelmer Vernooij <jelmer at samba.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+try:
+ import pygtk
+ pygtk.require("2.0")
+except:
+ pass
+
+import gtk
+import bzrlib
+
+class AboutDialog(gtk.AboutDialog):
+ def __init__(self):
+ super(AboutDialog, self).__init__()
+ self.set_name("Bazaar")
+ self.set_version(bzrlib.version_string)
+ self.set_website("http://bazaar-vcs.org/")
+ self.set_license("GNU GPLv2")
+ self.set_icon(gtk.gdk.pixbuf_new_from_file("bzr-icon-64.png"))
+ self.connect ("response", lambda d, r: d.destroy())
+
=== modified file 'NEWS'
--- a/NEWS 2007-07-15 13:09:17 +0000
+++ b/NEWS 2007-07-15 15:02:33 +0000
@@ -8,6 +8,8 @@
* New tango icons. (Pascal Klein)
+ * Add simple About dialog. (Jelmer)
+
BUG FIXES
* Fix option help strings to comply with the style guide. (Vincent)
=== modified file 'notify.py'
--- a/notify.py 2007-07-13 21:48:23 +0000
+++ b/notify.py 2007-07-15 15:02:33 +0000
@@ -48,6 +48,9 @@
item = gtk.ImageMenuItem(gtk.STOCK_PREFERENCES, None)
item.connect('activate', self.show_preferences)
self.append(item)
+ item = gtk.ImageMenuItem(gtk.STOCK_ABOUT, None)
+ item.connect('activate', self.show_about)
+ self.append(item)
self.append(gtk.SeparatorMenuItem())
item = gtk.MenuItem('_Close')
item.connect('activate', gtk.main_quit)
@@ -70,6 +73,11 @@
else:
self.zeroconfserver.close()
+ def show_about(self, item):
+ from about import AboutDialog
+ dialog = AboutDialog()
+ dialog.run()
+
def show_preferences(self, item):
from preferences import PreferencesWindow
prefs = PreferencesWindow()
More information about the bazaar-commits
mailing list