[Pkg-bazaar-commits] ./bzr-gtk/unstable r532: Merged improvement of visual appeal of status dialog.
Jelmer Vernooij
jelmer at samba.org
Fri Apr 10 07:44:50 UTC 2009
------------------------------------------------------------
revno: 532
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Thu 2008-07-17 13:48:58 +0200
message:
Merged improvement of visual appeal of status dialog.
modified:
status.py
------------------------------------------------------------
revno: 531.1.1
committer: Vincent Geddes <vincent.geddes at gmail.com>
branch nick: bzr-gtk
timestamp: Tue 2008-07-08 23:40:38 +0200
message:
Improved visual appeal of gstatus dialog.
* status.py:
- Adjust border and spacing sizes on dialog.
- "OK" button is a now a "Close" button.
modified:
status.py
-------------- next part --------------
=== modified file 'status.py'
--- a/status.py 2008-05-05 18:16:46 +0000
+++ b/status.py 2008-07-08 21:40:38 +0000
@@ -28,12 +28,13 @@
""" Display Status window and perform the needed actions. """
def __init__(self, wt, wtpath, revision=None):
""" Initialize the Status window. """
- super(StatusDialog, self).__init__(flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
+ super(StatusDialog, self).__init__(flags=gtk.DIALOG_MODAL, buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE))
self.set_title("Working tree changes")
+ self.set_default_response(gtk.RESPONSE_CLOSE)
self._create()
self.wt = wt
self.wtpath = wtpath
-
+
if revision is None:
revision = self.wt.branch.last_revision()
@@ -44,13 +45,22 @@
def _create(self):
self.set_default_size(400, 300)
- scrolledwindow = gtk.ScrolledWindow()
- scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+ self.set_has_separator(False)
+ sw = gtk.ScrolledWindow()
+ sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
+ sw.set_shadow_type(gtk.SHADOW_IN)
self.treeview = gtk.TreeView()
- scrolledwindow.add(self.treeview)
- self.vbox.pack_start(scrolledwindow, True, True)
+ sw.add(self.treeview)
+ self.vbox.pack_start(sw, True, True)
self.vbox.show_all()
+ # sane border and spacing widths (as recommended by GNOME HIG)
+ self.set_border_width(5)
+ sw.set_border_width(5)
+ self.vbox.set_spacing(2)
+ self.action_area.set_border_width(5)
+
+
def row_diff(self, tv, path, tvc):
file = self.model[path][1]
if file is None:
@@ -61,6 +71,7 @@
window.set_file(file)
window.show()
+
def _generate_status(self):
""" Generate 'bzr status' output. """
self.model = gtk.TreeStore(str, str)
More information about the Pkg-bazaar-commits
mailing list