Somehow the missing handling of tooltips caused dialog to fail to
start up. No traceback. Strange.

Attached is the patch to fix.
# HG changeset patch
# User TK Soh <[email protected]>
# Date 1237952080 0
# Node ID bb5591a6a2316b27e11612f789e2be00c9b9a6fa
# Parent  723014e6984315120e814386b28ad2e9a07d7c8c
serve: add missing tooltips handling on tool buttons

diff -r 723014e69843 -r bb5591a6a231 hggtk/serve.py
--- a/hggtk/serve.py    Wed Mar 25 02:43:24 2009 +0000
+++ b/hggtk/serve.py    Wed Mar 25 03:34:40 2009 +0000
@@ -55,22 +55,23 @@
         
         # toolbar
         self.tbar = gtk.Toolbar()
+        self.tooltips = gtk.Tooltips()
         self._button_start = self._toolbutton(gtk.STOCK_MEDIA_PLAY,
                                               _('Start'),
                                               self._on_start_clicked,
-                                              _('Start server'))
+                                              tip=_('Start server'))
         self._button_stop  = self._toolbutton(gtk.STOCK_MEDIA_STOP,
                                               _('Stop'),
                                               self._on_stop_clicked,
-                                              _('Stop server'))
+                                              tip=_('Stop server'))
         self._button_browse = self._toolbutton(gtk.STOCK_HOME,
                                               _('Browse'),
                                               self._on_browse_clicked,
-                                              _('Launch browser'))
+                                              tip=_('Launch browser to view 
repository'))
         self._button_conf = self._toolbutton(gtk.STOCK_PREFERENCES,
                                               _('Configure'),
                                               self._on_conf_clicked,
-                                              _('Configure web settings'))
+                                              tip=_('Configure web settings'))
 
         tbuttons = [
                 self._button_start,
@@ -124,13 +125,17 @@
         else:
             self.set_title("hg serve - " + self.webname)
 
-    def _toolbutton(self, stock, label, handler, menu=None, userdata=None):
+    def _toolbutton(self, stock, label, handler, menu=None,
+            userdata=None, tip=None):
         if menu:
             tbutton = gtk.MenuToolButton(stock)
             tbutton.set_menu(menu)
         else:
             tbutton = gtk.ToolButton(stock)
             
+        if tip:
+            tbutton.set_tooltip(self.tooltips, tip)
+        
         tbutton.set_label(label)
         tbutton.connect('clicked', handler, userdata)
         return tbutton
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to