[Pkg-bazaar-commits] ./bzr-gtk/unstable r327: Merge tab view for viz.
Jelmer Vernooij
jelmer at samba.org
Fri Apr 10 07:49:57 UTC 2009
------------------------------------------------------------
revno: 327
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Wed 2007-10-31 00:42:27 +0100
message:
Merge tab view for viz.
modified:
NEWS
logview.py
viz/branchwin.py
------------------------------------------------------------
revno: 324.2.1
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: revisionview
timestamp: Tue 2007-10-30 14:19:33 +0100
message:
Turned the logview into a notebook.
modified:
logview.py
------------------------------------------------------------
revno: 324.2.2
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: revisionview
timestamp: Tue 2007-10-30 15:12:47 +0100
message:
Surrounded the commit message textview with a scrolled window and added a shadow.
modified:
logview.py
------------------------------------------------------------
revno: 324.2.3
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: revisionview
timestamp: Tue 2007-10-30 15:17:45 +0100
message:
Added NEWS entry.
modified:
NEWS
------------------------------------------------------------
revno: 324.2.4
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: revisionview
timestamp: Tue 2007-10-30 16:46:43 +0100
message:
Added 'Changes' page to logview.
modified:
logview.py
viz/branchwin.py
------------------------------------------------------------
revno: 324.2.5
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: revisionview
timestamp: Tue 2007-10-30 16:53:42 +0100
message:
Surrounded the source view with a box.
modified:
logview.py
------------------------------------------------------------
revno: 324.2.6
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: revisionview
timestamp: Tue 2007-10-30 17:32:40 +0100
message:
Made 'Changes' page work with first revision.
modified:
logview.py
------------------------------------------------------------
revno: 324.2.7
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: revisionview
timestamp: Tue 2007-10-30 18:01:57 +0100
message:
Made logview display correct diff of first revision.
modified:
logview.py
------------------------------------------------------------
revno: 324.2.8
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: revisionview
timestamp: Tue 2007-10-30 18:03:13 +0100
message:
Cleaned up code displaying diff of first revision.
modified:
logview.py
------------------------------------------------------------
revno: 324.2.9
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: revisionview
timestamp: Tue 2007-10-30 18:05:29 +0100
message:
Made 'General' the default page of the logview.
modified:
logview.py
------------------------------------------------------------
revno: 324.2.10
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: revisionview
timestamp: Tue 2007-10-30 18:57:59 +0100
message:
Reduced overhead by only calculating diff when 'Changes' page is selected.
modified:
logview.py
------------------------------------------------------------
revno: 324.2.11
committer: Daniel Schierbeck <daniel.schierbeck at gmail.com>
branch nick: no-diff
timestamp: Tue 2007-10-30 23:34:58 +0100
message:
Removed 'Changes' page.
modified:
logview.py
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2007-10-22 22:31:36 +0000
+++ b/NEWS 2007-10-30 14:17:45 +0000
@@ -5,6 +5,7 @@
* Removed email part of committer id from committer column in the revision
history window. (Daniel Schierbeck)
* Removed date column from revision history window. (Daniel Schierbeck)
+ * Rearranged the logview into a notebook. (Daniel Schierbeck)
FEATURES
=== modified file 'logview.py'
--- a/logview.py 2007-10-02 04:59:13 +0000
+++ b/logview.py 2007-10-30 22:34:58 +0000
@@ -22,8 +22,7 @@
from bzrlib.osutils import format_date
-
-class LogView(gtk.ScrolledWindow):
+class LogView(gtk.Notebook):
""" Custom widget for commit log details.
A variety of bzr tools may need to implement such a thing. This is a
@@ -31,19 +30,21 @@
"""
def __init__(self, revision=None, scroll=True, tags=[],
- show_children=False):
- super(LogView, self).__init__()
- if scroll:
- self.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
- else:
- self.set_policy(gtk.POLICY_NEVER, gtk.POLICY_NEVER)
- self.set_shadow_type(gtk.SHADOW_NONE)
+ show_children=False, branch=None):
+ gtk.Notebook.__init__(self)
self.show_children = show_children
- self._create()
+
+ self._create_general()
+ self._create_relations()
+
+ self.set_current_page(0)
+
self._show_callback = None
self._go_callback = None
self._clicked_callback = None
+ self._branch = branch
+
if revision is not None:
self.set_revision(revision, tags=tags)
@@ -156,15 +157,21 @@
hbox.pack_start(button, expand=False, fill=True)
button.show()
- def _create(self):
+ def _create_general(self):
vbox = gtk.VBox(False, 6)
vbox.set_border_width(6)
vbox.pack_start(self._create_headers(), expand=False, fill=True)
+ vbox.pack_start(self._create_message_view())
+ self.append_page(vbox, tab_label=gtk.Label("General"))
+ vbox.show()
+
+ def _create_relations(self):
+ vbox = gtk.VBox(False, 6)
+ vbox.set_border_width(6)
vbox.pack_start(self._create_parents(), expand=False, fill=True)
if self.show_children:
vbox.pack_start(self._create_children(), expand=False, fill=True)
- vbox.pack_start(self._create_message_view())
- self.add_with_viewport(vbox)
+ self.append_page(vbox, tab_label=gtk.Label("Relations"))
vbox.show()
def _create_headers(self):
@@ -313,10 +320,15 @@
def _create_message_view(self):
self.message_buffer = gtk.TextBuffer()
+ window = gtk.ScrolledWindow()
+ window.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
+ window.set_shadow_type(gtk.SHADOW_IN)
tv = gtk.TextView(self.message_buffer)
tv.set_editable(False)
tv.set_wrap_mode(gtk.WRAP_WORD)
tv.modify_font(pango.FontDescription("Monospace"))
tv.show()
- return tv
+ window.add(tv)
+ window.show()
+ return window
=== modified file 'viz/branchwin.py'
--- a/viz/branchwin.py 2007-10-30 13:42:25 +0000
+++ b/viz/branchwin.py 2007-10-30 23:42:27 +0000
@@ -140,7 +140,7 @@
def construct_bottom(self):
"""Construct the bottom half of the window."""
from bzrlib.plugins.gtk.logview import LogView
- self.logview = LogView(None, True, [], True)
+ self.logview = LogView(None, True, [], True, branch=self.branch)
(width, height) = self.get_size()
self.logview.set_size_request(width, int(height / 2.5))
self.logview.show()
More information about the Pkg-bazaar-commits
mailing list