Mercurial > traipse_dev
changeset 26:65c5cb9be59c traipse_dev
This patch fixes the known issue with users not being able to set their name
in the settings menu. This version also cleans up the themes settings in
main.py and preps for Ornery Orc. Some cleaning was done with
orpg_settings.py also
author | sirebral |
---|---|
date | Fri, 31 Jul 2009 00:44:10 -0500 |
parents | 69149263026d |
children | a571772a45c7 |
files | orpg/main.py orpg/orpg_version.py orpg/player_list.py orpg/tools/orpg_settings.py |
diffstat | 4 files changed, 15 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/orpg/main.py Thu Jul 30 00:32:05 2009 -0500 +++ b/orpg/main.py Fri Jul 31 00:44:10 2009 -0500 @@ -216,9 +216,8 @@ self.mainmenu = MenuBarEx(self, menu) if self.settings.get_setting('Heartbeat') == '1': self.mainmenu.SetMenuState("GameServerServerHeartbeat", True) - tabtheme = self.settings.get_setting('TabTheme') - #This change is stable. TaS. + tabtheme = self.settings.get_setting('TabTheme') #This change is stable. TaS. self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedColorful", tabtheme == 'slanted&colorful') self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedBlackandWhite", tabtheme == 'slanted&bw') self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedAqua", tabtheme == 'slanted&aqua') @@ -239,7 +238,7 @@ self.pluginMenu.AppendItem(item) self.pluginMenu.AppendSeparator() self.mainmenu.Insert(2, self.pluginMenu, "&Plugins") - self.log.log("Exit orpgFrame->build_menu()", ORPG_DEBUG) + self.log.log("Exit orpgFrame->build_menu()", ORPG_DEBUG) ################################# ## All Menu Events @@ -247,6 +246,16 @@ #Tab Styles Menus def SetTabStyles(self, *args, **kwargs): self.log.log("Enter orpgFrame->SetTabStyles(self, *args, **kwargs)", ORPG_DEBUG) + + tabtheme = self.settings.get_setting('TabTheme') #This change is stable. TaS. + self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedColorful", tabtheme == 'slanted&colorful') + self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedBlackandWhite", tabtheme == 'slanted&bw') + self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedAqua", tabtheme == 'slanted&aqua') + self.mainmenu.SetMenuState("OpenRPGTabStylesFlatBlackandWhite", tabtheme == 'flat&bw') + self.mainmenu.SetMenuState("OpenRPGTabStylesFlatAqua", tabtheme == 'flat&aqua') + self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedCustom", tabtheme == 'customslant') + self.mainmenu.SetMenuState("OpenRPGTabStylesFlatCustom", tabtheme == 'customflat') + if kwargs.has_key('style'): newstyle = kwargs['style'] else: try: newstyle = args[1] @@ -263,18 +272,6 @@ if kwargs.has_key('textColor'): textColor = kwargs['textColor'] else: textColor = None - #Set all menu's to unchecked - self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedColorful", False) - self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedBlackandWhite", False) - self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedAqua", False) - self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedCustom", False) - self.mainmenu.SetMenuState("OpenRPGTabStylesFlatBlackandWhite", False) - self.mainmenu.SetMenuState("OpenRPGTabStylesFlatAqua", False) - self.mainmenu.SetMenuState("OpenRPGTabStylesFlatCustom", False) - - #check the proper menu - self.mainmenu.SetMenuState(menu, True) - #Run though the current tabbed window list and remove those that have been closed tabbedwindows = open_rpg.get_component("tabbedWindows") rgbc = orpg.tools.rgbhex.RGBHex() @@ -333,7 +330,6 @@ def OnMB_OpenRPGTabStylesSlantedCustom(self): self.log.log("Enter orpgFrame->OnMB_OpenRPGTabStylesSlantedCustom(self)", ORPG_DEBUG) - if self.mainmenu.GetMenuState("OpenRPGTabStylesSlantedCustom"): self.settings.set_setting('TabTheme', 'customslant') rgbc = orpg.tools.rgbhex.RGBHex()
--- a/orpg/orpg_version.py Thu Jul 30 00:32:05 2009 -0500 +++ b/orpg/orpg_version.py Fri Jul 31 00:44:10 2009 -0500 @@ -4,7 +4,7 @@ #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed) DISTRO = "Traipse Dev" DIS_VER = "Grumpy Goblin" -BUILD = "090730-00" +BUILD = "090731-00" # This version is for network capability. PROTOCOL_VERSION = "1.2"
--- a/orpg/player_list.py Thu Jul 30 00:32:05 2009 -0500 +++ b/orpg/player_list.py Fri Jul 31 00:44:10 2009 -0500 @@ -488,7 +488,7 @@ # def update_player(self,player): i = self.FindItemData(-1,int(player[2])) # finds the right list box index - self.SetStringItem(i,1,player[0]) + self.SetStringItem(i,1,self.strip_html(player)) self.SetStringItem(i,2,player[3]) item = self.GetItem(i) self.colorize_player_list()
--- a/orpg/tools/orpg_settings.py Thu Jul 30 00:32:05 2009 -0500 +++ b/orpg/tools/orpg_settings.py Fri Jul 31 00:44:10 2009 -0500 @@ -273,13 +273,6 @@ if (self.changes[i][0][:3] == 'Tab' and self.changes[i][1][:6] == 'custom') or\ (self.changes[i][0][:3] == 'Tab' and self.settings.get_setting('TabTheme')[:6] == 'custom'): - """ Old code. Can be removed, staying in for Dev purposes. - if (self.changes[i][0] == 'TabTheme' and (self.changes[i][1] == 'customflat' or self.changes[i][1] == 'customslant')) or\ - (self.changes[i][0] == 'TabTextColor' and (self.settings.get_setting('TabTheme') == 'customflat' or self.settings.get_setting('TabTheme') == 'customslant')) or\ - (self.changes[i][0] == 'TabGradientFrom' and (self.settings.get_setting('TabTheme') == 'customflat' or self.settings.get_setting('TabTheme') == 'customslant')) or\ - (self.changes[i][0] == 'TabGradientTo' and (self.settings.get_setting('TabTheme') == 'customflat' or self.settings.get_setting('TabTheme') == 'customslant')): - """ - gfrom = self.settings.get_setting('TabGradientFrom') (fred, fgreen, fblue) = rgbconvert.rgb_tuple(gfrom) @@ -288,6 +281,7 @@ tabtext = self.settings.get_setting('TabTextColor') (tred, tgreen, tblue) = rgbconvert.rgb_tuple(tabtext) + for wnd in tabbedwindows: style = wnd.GetWindowStyleFlag() # remove old tabs style