[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7481 - trunk/gnue-designer/src/base
From: |
jcater |
Subject: |
[gnue] r7481 - trunk/gnue-designer/src/base |
Date: |
Sun, 24 Apr 2005 16:01:44 -0500 (CDT) |
Author: jcater
Date: 2005-04-24 16:01:43 -0500 (Sun, 24 Apr 2005)
New Revision: 7481
Modified:
trunk/gnue-designer/src/base/MRUManager.py
Log:
Fix for the MRU trying to access the ui instance the old way
Modified: trunk/gnue-designer/src/base/MRUManager.py
===================================================================
--- trunk/gnue-designer/src/base/MRUManager.py 2005-04-24 20:37:50 UTC (rev
7480)
+++ trunk/gnue-designer/src/base/MRUManager.py 2005-04-24 21:01:43 UTC (rev
7481)
@@ -33,12 +33,12 @@
class MRUManager:
"""
- Most Recently Used (MRU) Manager
+ Most Recently Used (MRU) Manager
Responsible for maintaining the menu that displays the most
recently used items.
"""
- def __init__(self, app):
+ def __init__(self, app):
self._menus = []
self._locations = []
self.menulist = []
@@ -62,7 +62,7 @@
self._refreshMenuList()
- def addLocation(self, location):
+ def addLocation(self, location):
"""
Adds a URL to the MRU list.
@type location: string
@@ -80,7 +80,7 @@
self._locations.insert(0, absloc)
# Truncate list if necessary
- if len(self._locations) >= self._maxMRUs:
+ if len(self._locations) >= self._maxMRUs:
self._locations = self._locations[:self._maxMRUs]
self._refreshMenuList()
@@ -92,7 +92,7 @@
i.e., if you have /usr/home/me/form1.gfd, /usr/home/you/form2.gfd then
this will reduce to me/form1.gfd and you/form2.gfd.. This is to keep the
MRU menu list from being too wide!
- """
+ """
commonpos=len(os.path.commonprefix(
map(lambda x: os.path.join(os.path.split(x)[0],''),self._locations)))
@@ -119,7 +119,7 @@
def removeMenu(self, menu, instance):
"""
- Removes a wxMenu from the list of wxMenus that
+ Removes a wxMenu from the list of wxMenus that
contain recently opened files.
@type menu: wxMenu instance
@@ -127,13 +127,13 @@
@type instance: BaseInstance
@param instance: A designer instance to which this menu belongs. Designer
creates
an instance for every file it currently has
open. NOT USED?
-
+
"""
self._menus.remove(menu)
def refreshMenus(self):
"""
- Iterates through all the wxMenus under management and refreshes
+ Iterates through all the wxMenus under management and refreshes
their list.
"""
map(self.refreshMenu, self._menus)
@@ -142,7 +142,7 @@
"""
Resets and updates the wxMenu that displays the MRU list.
"""
- # Purge all entries from the existing wxMenu and
+ # Purge all entries from the existing wxMenu and
# reset the menu mapping
self.mruMenuMap = {}
for i in menu.GetMenuItems():
@@ -155,7 +155,7 @@
menu.Append ( tid, '&%s %s' % (i+1, location),
_('Open "%s" in a new window') % self._locations[i] )
- wx.EVT_MENU(menu.__instance, tid, self._app.OnOpenRecent)
+ wx.EVT_MENU(menu.__instance.uiinstance, tid, self._app.OnOpenRecent)
self.mruMenuMap[tid] = self._locations[i]
i += 1
@@ -163,7 +163,7 @@
"""
Returns a dictionary used by Designer's instance of RuntimeSettings
to save the recently used urls
-
+
@rtype: dict of {position:URL}
@return: The recently used files.
"""
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7481 - trunk/gnue-designer/src/base,
jcater <=