dabo Commit
Revision 6828
Date: 2011-09-08 11:53:45 -0700 (Thu, 08 Sep 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6828
Changed:
U trunk/dabo/ui/uiwx/dPageFrameMixin.py
Log:
Only remove the & in the page caption on Mac, since the other platforms will
underline the hotkey character.
Diff:
Modified: trunk/dabo/ui/uiwx/dPageFrameMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPageFrameMixin.py 2011-09-08 18:50:22 UTC (rev
6827)
+++ trunk/dabo/ui/uiwx/dPageFrameMixin.py 2011-09-08 18:53:45 UTC (rev
6828)
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+import sys
import time
import wx
import dabo
@@ -212,11 +213,14 @@
if not caption:
# Page could have its own default caption
caption = pg._caption
- if caption.count("&") == 1:
+ if caption.count("&") == 1 and caption[-1] != "&":
hotkey = "alt+%s" % (caption[caption.index("&")+1],)
self.Form.bindKey(hotkey, self._onHK)
pg._rawCaption = caption
- caption = caption.replace("&", "")
+ if sys.platform.startswith("darwin"):
+ # Other platforms underline the character after
the &; Mac just
+ # shows the &.
+ caption = caption.replace("&", "")
if imgKey:
idx = self._imageList[imgKey]
self.InsertPage(pos, pg, text=caption, imageId=idx)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]