From: Digital X. <dig...@us...> - 2007-04-03 00:15:08
|
Update of /cvsroot/openrpg/openrpg1/orpg/tools In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9374/orpg/tools Modified Files: metamenus.py orpg_settings.py Log Message: Fixed an issue that allowed Lurkers to load local minitures Removed all instances of <> in the code as that is depreciated in python 2.5 Index: metamenus.py =================================================================== RCS file: /cvsroot/openrpg/openrpg1/orpg/tools/metamenus.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** metamenus.py 18 Oct 2006 21:50:20 -0000 1.4 --- metamenus.py 3 Apr 2007 00:14:35 -0000 1.5 *************** *** 20,25 **** its label. ! - Supplies EVT_BEFOREMENU and EVT_AFTERMENU, events that are triggered right ! before and after, respectively, the triggering of a EVT_MENU-bound method on selection of some menu item. --- 20,25 ---- its label. ! - Supplies EVT_BEFOREMENU and EVT_AFTERMENU, events that are triggered right ! before and after, respectively, the triggering of a EVT_MENU-bound method on selection of some menu item. *************** *** 28,32 **** - If your app is already i18n'd, menu items may be translated on the fly. ! All you need to do is to write somewhere a .mo file containing the menu translations. --- 28,32 ---- - If your app is already i18n'd, menu items may be translated on the fly. ! All you need to do is to write somewhere a .mo file containing the menu translations. *************** *** 146,155 **** wx.MenuItem.SetFont for more information about this. ! - xaccel: (MenuBarEx only) allows one to bind events to 'items' that are not actually menu items, rather methods or functions that are triggered when some key or combination of keys is pressed. ! xaccel is a list of tuples (accel, function), where accel is a string following the accelerator syntax described in the wx.Menu.Append docs and function is the function/method to be --- 146,155 ---- wx.MenuItem.SetFont for more information about this. ! - xaccel: (MenuBarEx only) allows one to bind events to 'items' that are not actually menu items, rather methods or functions that are triggered when some key or combination of keys is pressed. ! xaccel is a list of tuples (accel, function), where accel is a string following the accelerator syntax described in the wx.Menu.Append docs and function is the function/method to be *************** *** 210,222 **** More about i18n: ! If you want to get your menu items automatically translated, you'll need to: ! 1. Create a directory named 'locale' under your app's directory, and under the 'locale', create subdirectories named after the canonical names of the languages you're going to use (e. g., 'pt_BR', 'es_ES', etc.) 2. Inside each of the subdirectories, write a gettext compiled catalog file ! (e. g., "my_messages.mo") containing all of the menu labels translated to the language represented by the subdirectory. --- 210,222 ---- More about i18n: ! If you want to get your menu items automatically translated, you'll need to: ! 1. Create a directory named 'locale' under your app's directory, and under the 'locale', create subdirectories named after the canonical names of the languages you're going to use (e. g., 'pt_BR', 'es_ES', etc.) 2. Inside each of the subdirectories, write a gettext compiled catalog file ! (e. g., "my_messages.mo") containing all of the menu labels translated to the language represented by the subdirectory. *************** *** 243,247 **** package. On the other hand, if by any reason you _don't_ want the menu items to be translated, you may pass a i18n=False kwarg to the constructor. ! You can use metamenus itself directly from a command line to help on creating a gettext-parseable file based on the menus you wrote. For more --- 243,247 ---- package. On the other hand, if by any reason you _don't_ want the menu items to be translated, you may pass a i18n=False kwarg to the constructor. ! You can use metamenus itself directly from a command line to help on creating a gettext-parseable file based on the menus you wrote. For more *************** *** 432,443 **** # # When you use this new style, Metamenus will check if the thing passed ! # can be translated as an item kind (either wx.RADIO, "radio", etc.) or # not, and so will try to guess what to do with the thing. Note that if ! # you want a status bar showing something like "radio", you'll not be # able to use this new style, but ("radio",) will still work for such # purposes, though. # # - xaccel, a new kwarg available in MenuBarEx, allows one to bind events ! # to 'items' that are not actually menu items, rather methods or # functions that are triggered when some key or combination of keys is # pressed. --- 432,443 ---- # # When you use this new style, Metamenus will check if the thing passed ! # can be translated as an item kind (either wx.RADIO, "radio", etc.) or # not, and so will try to guess what to do with the thing. Note that if ! # you want a status bar showing something like "radio", you'll not be # able to use this new style, but ("radio",) will still work for such # purposes, though. # # - xaccel, a new kwarg available in MenuBarEx, allows one to bind events ! # to 'items' that are not actually menu items, rather methods or # functions that are triggered when some key or combination of keys is # pressed. *************** *** 505,509 **** args = (); kwargs = {} params = params + [None] * (3 - len(params)) ! if type(params[1]) == tuple: args = params[1] --- 505,509 ---- args = (); kwargs = {} params = params + [None] * (3 - len(params)) ! if type(params[1]) == tuple: args = params[1] *************** *** 568,573 **** self.children.append(Item) return Item ! ! def GetRealLabel(self, i18n): if i18n: --- 568,573 ---- self.children.append(Item) return Item ! ! def GetRealLabel(self, i18n): if i18n: *************** *** 644,648 **** r = child; break return r ! def GetPath(self): --- 644,648 ---- r = child; break return r ! def GetPath(self): *************** *** 713,717 **** for acc, fctn in xaccel: flags, keyCode = self._parseEntry(acc) ! if flags <> None and keyCode <> None: n.append((flags, keyCode, fctn)) self.xaccel = n --- 713,717 ---- for acc, fctn in xaccel: flags, keyCode = self._parseEntry(acc) ! if flags != None and keyCode != None: n.append((flags, keyCode, fctn)) self.xaccel = n *************** *** 752,756 **** flags, keyCode = self._parseEntry(accel) ! if flags <> None and keyCode <> None: self.entries.append(wx.AcceleratorEntry(flags, keyCode, cmd)) --- 752,756 ---- flags, keyCode = self._parseEntry(accel) ! if flags != None and keyCode != None: self.entries.append(wx.AcceleratorEntry(flags, keyCode, cmd)) *************** *** 793,800 **** getattr(item, m)(kwargs[kw]) ! if margin <> wx.DEFAULT: item.SetMarginWidth(margin) ! if font <> wx.NullFont: item.SetFont(font) --- 793,800 ---- getattr(item, m)(kwargs[kw]) ! if margin != wx.DEFAULT: item.SetMarginWidth(margin) ! if font != wx.NullFont: item.SetFont(font) *************** *** 1100,1104 **** # Public methods -------------------------------------------------------- ! def UpdateMenus(self): """ --- 1100,1104 ---- # Public methods -------------------------------------------------------- ! def UpdateMenus(self): """ *************** *** 1106,1110 **** changes. """ ! if not self.i18n: return --- 1106,1110 ---- changes. """ ! if not self.i18n: return *************** *** 1219,1223 **** self.MenuStrings.update(child.GetAllMethods()) self.MenuList.append([Id, child.GetPath()]) ! # Initialize menu states. self.MenuState = {} --- 1219,1223 ---- self.MenuStrings.update(child.GetAllMethods()) self.MenuList.append([Id, child.GetPath()]) ! # Initialize menu states. self.MenuState = {} *************** *** 1245,1249 **** for x in range(g.index(i), 0, -1): ! if g[x] <> None: n.append(g[x]) else: --- 1245,1249 ---- for x in range(g.index(i), 0, -1): ! if g[x] != None: n.append(g[x]) else: *************** *** 1251,1255 **** for x in range(g.index(i) + 1, len(g)): ! if g[x] <> None: n.append(g[x]) else: --- 1251,1255 ---- for x in range(g.index(i) + 1, len(g)): ! if g[x] != None: n.append(g[x]) else: Index: orpg_settings.py =================================================================== RCS file: /cvsroot/openrpg/openrpg1/orpg/tools/orpg_settings.py,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** orpg_settings.py 18 Feb 2007 16:14:47 -0000 1.49 --- orpg_settings.py 3 Apr 2007 00:14:35 -0000 1.50 *************** *** 394,398 **** row = evt.GetRow() col = evt.GetCol() ! if col <> 1: return setting = self.GetCellValue(row,0) --- 394,398 ---- row = evt.GetRow() col = evt.GetCol() ! if col != 1: return setting = self.GetCellValue(row,0) |