# HG changeset patch
# User Yuki KODAMA <endflow....@gmail.com>
# Date 1252255559 -32400
# Node ID 034127f6a69fb0bcfe0f731193418926ed118820
# Parent  84217fe1f1c1604e3d3f8ecc6cca90f0679ce281
history: add drop-down menu to gorev toolbutton

diff --git a/hggtk/history.py b/hggtk/history.py
--- a/hggtk/history.py
+++ b/hggtk/history.py
@@ -63,7 +63,7 @@
                 gtk.SeparatorToolItem(),
                 self.make_toolbutton(gtk.STOCK_JUMP_TO,
                     _('Select Revision'),
-                    self.goto_clicked,
+                    self.goto_clicked, menu=self.gorev_menu(),
                     tip=_('Select revision')),
                 gtk.SeparatorToolItem(),
                 self.make_toolbutton(gtk.STOCK_REFRESH,
@@ -531,6 +531,22 @@
         m.show_all()
         return m

+    def gorev_menu(self):
+        m = gtk.Menu()
+
+        def goto_tip(menuitem):
+            self.goto_rev(self.repo['tip'].node())
+        m.append(create_menu(_('tip'), goto_tip))
+
+        def goto_parent(menuitem):
+            self.goto_rev(self.repo['.'].node())
+        m.append(create_menu(_('parent'), goto_parent))
+
+        # TODO: last merged, qtip, qparent, qbase, tags
+
+        m.show_all()
+        return m
+
     def get_body(self):
         self.gorev_dialog = None
         self._menu = self.tree_context_menu()

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to