diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2023-01-19 18:01:26 +0100 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-01-20 13:05:37 +0900 |
commit | 94f5a3f12e1c61aa2f3cde2d7b260c08489336ac (patch) | |
tree | 9062a30a1d81a1a97e9397548e4ec48ae63c18a4 /wineconfig | |
parent | b9c0b6996a6da72f93baf50121a1be4a6fa48d2e (diff) | |
download | tde-guidance-94f5a3f12e1c61aa2f3cde2d7b260c08489336ac.tar.gz tde-guidance-94f5a3f12e1c61aa2f3cde2d7b260c08489336ac.zip |
Drop python2 support.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'wineconfig')
-rwxr-xr-x | wineconfig/firstrunwizard.py | 2 | ||||
-rw-r--r-- | wineconfig/kcm_wineconfig.cpp | 2 | ||||
-rwxr-xr-x | wineconfig/wineconfig.py | 290 | ||||
-rw-r--r-- | wineconfig/wineread.py | 2 | ||||
-rw-r--r-- | wineconfig/winewrite.py | 6 |
5 files changed, 151 insertions, 151 deletions
diff --git a/wineconfig/firstrunwizard.py b/wineconfig/firstrunwizard.py index 3b3af81..8d22264 100755 --- a/wineconfig/firstrunwizard.py +++ b/wineconfig/firstrunwizard.py @@ -37,7 +37,7 @@ class FirstRunWizard(KWizard): if not name: self.setName("firstrunwizard") - self.imagedir = unicode(TDEGlobal.dirs().findDirs("data","guidance/pics")[0]) + self.imagedir = str(TDEGlobal.dirs().findDirs("data","guidance/pics")[0]) self.setupPage1() self.setupPageVersion() diff --git a/wineconfig/kcm_wineconfig.cpp b/wineconfig/kcm_wineconfig.cpp index 34e1230..a1f9a69 100644 --- a/wineconfig/kcm_wineconfig.cpp +++ b/wineconfig/kcm_wineconfig.cpp @@ -94,7 +94,7 @@ static TDECModule* return_instance( TQWidget *parent, const char *name ) { // Call the factory function. Set up the args. PyObject *pyParent = PyLong_FromVoidPtr(parent); - PyObject *pyName = PyString_FromString(MODULE_NAME); + PyObject *pyName = PyBytes_FromString(MODULE_NAME); // Using NN here is effect gives our references to the arguement away. PyObject *args = Py_BuildValue ("NN", pyParent, pyName); if(pyName && pyParent && args) { diff --git a/wineconfig/wineconfig.py b/wineconfig/wineconfig.py index f2a61ee..b8027ea 100755 --- a/wineconfig/wineconfig.py +++ b/wineconfig/wineconfig.py @@ -644,7 +644,7 @@ class DrivesPage(TQWidget): def slotFolderChanged(self,folder): """ Change the directory mapping when a new one is entered in the URL box """ - self.drives[self.selecteddriveid][2] = unicode(folder) + self.drives[self.selecteddriveid][2] = str(folder) self.updateChanges() def slotFolderEdited(self,folder): @@ -657,7 +657,7 @@ class DrivesPage(TQWidget): """ Bring up a browse window to choose a ndew mapping directory """ mapping = KFileDialog.getExistingDirectory(wineread.winepath,self,i18n("Drive Mapping")) if mapping: - mapping = unicode(mapping) + mapping = str(mapping) self.drives[self.selecteddriveid][2] = mapping self.updateChanges() @@ -672,7 +672,7 @@ class DrivesPage(TQWidget): else: mapping = KFileDialog.getExistingDirectory(wineread.winepath,self,i18n("Drive Mapping")) if mapping: - mapping = unicode(mapping) + mapping = str(mapping) drive[2] = mapping else: return @@ -780,7 +780,7 @@ class DrivesPage(TQWidget): self.removebutton.setEnabled(False) - self.infotext1.setText(unicode(i18n("Windows path: ")) + self.drives[driveid][4]) + self.infotext1.setText(str(i18n("Windows path: ")) + self.drives[driveid][4]) # It seems some old versions of wine didn't store the shell folders in the same place if self.drives[driveid][5] != self.drives[driveid][4]: @@ -811,11 +811,11 @@ class DrivesPage(TQWidget): self.removebutton.setEnabled(True) if self.drives[driveid][4]: - self.infotext1.setText(unicode(i18n("Label: ")) + self.drives[driveid][4]) + self.infotext1.setText(str(i18n("Label: ")) + self.drives[driveid][4]) else: self.infotext1.setText("") if self.drives[driveid][5]: - self.infotext2.setText(unicode(i18n("Serial: ")) + self.drives[driveid][5]) + self.infotext2.setText(str(i18n("Serial: ")) + self.drives[driveid][5]) else: self.infotext2.setText("") @@ -1427,7 +1427,7 @@ class GraphicsPage(TQWidget): def slotEmuDesktopToggled(self,emudesktop): if emudesktop: - self.currentemudesktop = unicode(self.xsizeedit.text()) + 'x' + str(self.ysizeedit.text()) + self.currentemudesktop = str(self.xsizeedit.text()) + 'x' + str(self.ysizeedit.text()) else: self.currentemudesktop = "" self.__setEmuDesktop(self.currentemudesktop) @@ -1520,64 +1520,64 @@ class GraphicsPage(TQWidget): ############################################################################ class AppearancePage(TQWidget): - themes = [unicode(i18n("No Theme"))] - colorschemes = [unicode(i18n("Custom"))] - sizes = [("NormalSize",unicode(i18n("Normal"))), - ("LargeSize",unicode(i18n("Large Fonts"))), - ("ExtraLargeSize",unicode(i18n("Extra Large Fonts")))] + themes = [str(i18n("No Theme"))] + colorschemes = [str(i18n("Custom"))] + sizes = [("NormalSize",str(i18n("Normal"))), + ("LargeSize",str(i18n("Large Fonts"))), + ("ExtraLargeSize",str(i18n("Extra Large Fonts")))] # Items for the combo box reference a tuple of dictionaries for color # and size values and translations for that item # For example, the value of BorderWidth is # customizableitems[str(i18n("Window Border"))][1]["BorderWidth"][1] customizableitems = {"Window Border": - ({"ActiveBorder":[unicode(i18n("Active Color:")),TQColor()], - "InactiveBorder":[unicode(i18n("Inactive Color:")),TQColor()]}, - {"BorderWidth":[unicode(i18n("Width:")),1]}), #ActiveBorder, InactiveBorder, metrics: BorderWidth + ({"ActiveBorder":[str(i18n("Active Color:")),TQColor()], + "InactiveBorder":[str(i18n("Inactive Color:")),TQColor()]}, + {"BorderWidth":[str(i18n("Width:")),1]}), #ActiveBorder, InactiveBorder, metrics: BorderWidth "Title Bar": - ({"ActiveTitle":[unicode(i18n("Active Color:")),TQColor()], - "GradientActiveTitle":[unicode(i18n("Gradient:")),TQColor()], - "InactiveTitle":[unicode(i18n("Inactive Color:")),TQColor()], - "GradientInactiveTitle":[unicode(i18n("Gradient:")),TQColor()], - "TitleText":[unicode(i18n("Active Text:")),TQColor()], - "InactiveTitleText":[unicode(i18n("Inactive Text:")),TQColor()]}, + ({"ActiveTitle":[str(i18n("Active Color:")),TQColor()], + "GradientActiveTitle":[str(i18n("Gradient:")),TQColor()], + "InactiveTitle":[str(i18n("Inactive Color:")),TQColor()], + "GradientInactiveTitle":[str(i18n("Gradient:")),TQColor()], + "TitleText":[str(i18n("Active Text:")),TQColor()], + "InactiveTitleText":[str(i18n("Inactive Text:")),TQColor()]}, {}), #ActiveTitle, GradientActiveTitle, InactiveTitle, GradientInactiveTitle, TitleText, InactiveTitleText "Application Workspace": - ({"AppWorkSpace":[unicode(i18n("Background Color:")),TQColor()]}, + ({"AppWorkSpace":[str(i18n("Background Color:")),TQColor()]}, {}), #AppWorkSpace "Background" "Buttons": - ({"ButtonFace":[unicode(i18n("Face:")),TQColor()], - "ButtonHilight":[unicode(i18n("Hilight:")),TQColor()], - "ButtonLight":[unicode(i18n("Light:")),TQColor()], - "ButtonShadow":[unicode(i18n("Shadow:")),TQColor()], - "ButtonText":[unicode(i18n("Text Color:")),TQColor()], - "ButtonAlternateFace":[unicode(i18n("Alternate Face:")),TQColor()], - "ButtonDkShadow":[unicode(i18n("Dark Shadow:")),TQColor()], - "WindowFrame":[unicode(i18n("Frame:")),TQColor()]}, + ({"ButtonFace":[str(i18n("Face:")),TQColor()], + "ButtonHilight":[str(i18n("Hilight:")),TQColor()], + "ButtonLight":[str(i18n("Light:")),TQColor()], + "ButtonShadow":[str(i18n("Shadow:")),TQColor()], + "ButtonText":[str(i18n("Text Color:")),TQColor()], + "ButtonAlternateFace":[str(i18n("Alternate Face:")),TQColor()], + "ButtonDkShadow":[str(i18n("Dark Shadow:")),TQColor()], + "WindowFrame":[str(i18n("Frame:")),TQColor()]}, {}), #ButtonFace, ButtonHilight, ButtonLight, ButtonShadow, ButtonText, ButtonAlternateFace, ButtonDkShadow, WindowFrame "Caption Buttons": ({}, - {"CaptionHeight":[unicode(i18n("Height:")),1], - "CaptionWidth":[unicode(i18n("Width:")),1]}), #Metrics: CaptionHeight, CaptionWidth + {"CaptionHeight":[str(i18n("Height:")),1], + "CaptionWidth":[str(i18n("Width:")),1]}), #Metrics: CaptionHeight, CaptionWidth "Desktop": - ({"Background":[unicode(i18n("Background:")),TQColor()]}, + ({"Background":[str(i18n("Background:")),TQColor()]}, {}), #Background "Menu": - ({"Menu":[unicode(i18n("Menu Background:")),TQColor()], - "MenuBar":[unicode(i18n("Menu Bar Color:")),TQColor()], - "MenuHilight":[unicode(i18n("Menu Hilight:")),TQColor()], - "MenuText":[unicode(i18n("Text Color:")),TQColor()]}, - {"MenuHeight":[unicode(i18n("Menu Bar Height:")),1]}), #Menu (Background), MenuBar, MenuHilight, MenuText, metrics: MenuHeight, MenuWidth (does nothing) + ({"Menu":[str(i18n("Menu Background:")),TQColor()], + "MenuBar":[str(i18n("Menu Bar Color:")),TQColor()], + "MenuHilight":[str(i18n("Menu Hilight:")),TQColor()], + "MenuText":[str(i18n("Text Color:")),TQColor()]}, + {"MenuHeight":[str(i18n("Menu Bar Height:")),1]}), #Menu (Background), MenuBar, MenuHilight, MenuText, metrics: MenuHeight, MenuWidth (does nothing) "Scrollbar": - ({"Scrollbar":[unicode(i18n("Color:")),TQColor()]}, - {"ScrollWidth":[unicode(i18n("Width:")),1]}), #Scrollbar, metrics: ScrollHeight (does nothing), ScrollWidth + ({"Scrollbar":[str(i18n("Color:")),TQColor()]}, + {"ScrollWidth":[str(i18n("Width:")),1]}), #Scrollbar, metrics: ScrollHeight (does nothing), ScrollWidth "Window": - ({"Window":[unicode(i18n("Background:")),TQColor()], - "WindowText":[unicode(i18n("Text Color:")),TQColor()]}, + ({"Window":[str(i18n("Background:")),TQColor()], + "WindowText":[str(i18n("Text Color:")),TQColor()]}, {}), #Window "Background", WindowText "Selected Items": - ({"Hilight":[unicode(i18n("Hilight Color:")),TQColor()], - "HilightText":[unicode(i18n("Text Color:")),TQColor()]}, + ({"Hilight":[str(i18n("Hilight Color:")),TQColor()], + "HilightText":[str(i18n("Text Color:")),TQColor()]}, {})} #Hilight, HilightText def __init__(self,parent = None,name = None,modal = 0,fl = 0): @@ -1833,8 +1833,8 @@ class AppearancePage(TQWidget): changed = False custom = False # For a little efficiency - for item in self.customizableitems.keys(): - for key in self.customizableitems[item][0].keys(): + for item in list(self.customizableitems.keys()): + for key in list(self.customizableitems[item][0].keys()): color = colors.get(key,"0 0 0") color = color.split() color = TQColor(int(color[0]),int(color[1]),int(color[2])) @@ -1847,7 +1847,7 @@ class AppearancePage(TQWidget): return True else: changed = True - for key in self.customizableitems[item][1].keys(): + for key in list(self.customizableitems[item][1].keys()): size = int(metrics.get(key,1)) if not custom and self.customizableitems[item][1][key][1] !=\ self.config.readNumEntry(key,1): @@ -1863,11 +1863,11 @@ class AppearancePage(TQWidget): def reset(self): self.fillItemCombo(self.itemcombo) self.config.setGroup("") - self.currentcustomcolorscheme = unicode(self.config.readEntry("ColorScheme",i18n("Custom"))) + self.currentcustomcolorscheme = str(self.config.readEntry("ColorScheme",i18n("Custom"))) self.originalcustomcolorscheme = self.currentcustomcolorscheme schemeslist = self.config.readListEntry("ColorSchemes") - self.colorschemes = [unicode(i18n("Custom")), - unicode(i18n("Get KDE Colors"))] + list(schemeslist) + self.colorschemes = [str(i18n("Custom")), + str(i18n("Get KDE Colors"))] + list(schemeslist) self.config.setGroup(self.currentcustomcolorscheme) for preset in self.presets: @@ -1912,15 +1912,15 @@ class AppearancePage(TQWidget): colors = wineread.GetColorSettings() metrics = wineread.GetWindowMetrics() - for item in self.customizableitems.keys(): - for key in self.customizableitems[item][0].keys(): + for item in list(self.customizableitems.keys()): + for key in list(self.customizableitems[item][0].keys()): color = colors.get(key,"0 0 0") color = color.split() color = TQColor(int(color[0]),int(color[1]),int(color[2])) if color != self.config.readColorEntry(key,TQColor(0,0,0)): self.currentcustomcolorscheme = self.colorschemes[0] self.customizableitems[item][0][key][1] = color - for key in self.customizableitems[item][1].keys(): + for key in list(self.customizableitems[item][1].keys()): size = int(metrics.get(key,1)) if size != self.config.readNumEntry(key,1): self.currentcustomcolorscheme = self.colorschemes[0] @@ -1944,13 +1944,13 @@ class AppearancePage(TQWidget): colorsettings = {} metricssettings = {} - for item in self.customizableitems.keys(): - for key in self.customizableitems[item][0].keys(): + for item in list(self.customizableitems.keys()): + for key in list(self.customizableitems[item][0].keys()): color = self.customizableitems[item][0][key][1] color = str(color.red()) + " " + str(color.green()) +\ " " + str(color.blue()) colorsettings[key] = color - for key in self.customizableitems[item][1].keys(): + for key in list(self.customizableitems[item][1].keys()): size = self.customizableitems[item][1][key][1] metricssettings[key] = str(size) @@ -2006,13 +2006,13 @@ class AppearancePage(TQWidget): """ combo = self.itemcombo combo.clear() - items = self.customizableitems.keys() + items = list(self.customizableitems.keys()) items.sort() for item in items: if not (allowwm and (item == "Window Border" \ or item == "Title Bar" or \ item == "Caption Buttons")): - combo.insertItem(unicode(i18n(item))) + combo.insertItem(str(i18n(item))) def slotFillItemComboDesktop(self,desktop): """ @@ -2026,14 +2026,14 @@ class AppearancePage(TQWidget): if not combo: combo = self.itemcombo combo.clear() - items = self.customizableitems.keys() + items = list(self.customizableitems.keys()) items.sort() self.currentitems = [] for item in items: if not (currentallowwm == 'Y' and (item == "Window Border" \ or item == "Title Bar" or \ item == "Caption Buttons")): - combo.insertItem(unicode(i18n(item))) + combo.insertItem(str(i18n(item))) self.currentitems.append(item) def slotThemeActivated(self,themeid): @@ -2043,7 +2043,7 @@ class AppearancePage(TQWidget): def slotInstallThemeClicked(self): """ Opens up a dialog to install a new theme """ - themepath = unicode(KFileDialog.getOpenFileName(os.environ['HOME'],\ + themepath = str(KFileDialog.getOpenFileName(os.environ['HOME'],\ "*.msstyles|" + str(i18n("Windows Styles (*.msstyles)")),self,i18n("Install Style"))) if themepath: themename = themepath.split('/') @@ -2102,10 +2102,10 @@ class AppearancePage(TQWidget): schemeslist.append(name) self.config.writeEntry("ColorSchemes",schemeslist) self.config.setGroup(name) - for item in self.customizableitems.keys(): - for key in schemesettings[item][0].keys(): + for item in list(self.customizableitems.keys()): + for key in list(schemesettings[item][0].keys()): self.config.writeEntry(key,schemesettings[item][0][key][1]) - for key in schemesettings[item][1].keys(): + for key in list(schemesettings[item][1].keys()): self.config.writeEntry(key,schemesettings[item][1][key][1]) self.config.sync() @@ -2188,7 +2188,7 @@ class AppearancePage(TQWidget): def slotItemActivated(self,itemid): """ Picks an item to customize """ - items = self.customizableitems.keys() + items = list(self.customizableitems.keys()) items.sort() for i,item in enumerate(self.currentitems): if i == itemid: @@ -2228,11 +2228,11 @@ class AppearancePage(TQWidget): self.config.setGroup("") self.config.writeEntry("ColorScheme",self.colorschemes[colorid]) self.config.setGroup(self.colorschemes[colorid]) - for item in self.customizableitems.keys(): - for key in self.customizableitems[item][0].keys(): + for item in list(self.customizableitems.keys()): + for key in list(self.customizableitems[item][0].keys()): color = self.config.readColorEntry(key,TQColor(0,0,0)) self.customizableitems[item][0][key][1] = color - for key in self.customizableitems[item][1].keys(): + for key in list(self.customizableitems[item][1].keys()): size = self.config.readNumEntry(key,1) self.customizableitems[item][1][key][1] = size elif colorid == 1: @@ -2733,106 +2733,106 @@ class AppearancePage(TQWidget): self.top_layout.setSpacing(spacing) # --- Some default color schemes, with names --- - preset1 = (unicode(i18n("Purple")), + preset1 = (str(i18n("Purple")), {"Window Border": - ({"ActiveBorder":[unicode(i18n("Active Color:")),TQColor(239,239,239)], - "InactiveBorder":[unicode(i18n("Inactive Color:")),TQColor(239,239,239)]}, - {"BorderWidth":[unicode(i18n("Width:")),1]}), #ActiveBorder, InactiveBorder, metrics: BorderWidth + ({"ActiveBorder":[str(i18n("Active Color:")),TQColor(239,239,239)], + "InactiveBorder":[str(i18n("Inactive Color:")),TQColor(239,239,239)]}, + {"BorderWidth":[str(i18n("Width:")),1]}), #ActiveBorder, InactiveBorder, metrics: BorderWidth "Title Bar": - ({"ActiveTitle":[unicode(i18n("Active Color:")),TQColor(91,86,168)], - "GradientActiveTitle":[unicode(i18n("Gradient:")),TQColor(136,118,202)], - "InactiveTitle":[unicode(i18n("Inactive Color:")),TQColor(223,225,230)], - "GradientInactiveTitle":[unicode(i18n("Gradient:")),TQColor(157,170,186)], - "TitleText":[unicode(i18n("Active Text:")),TQColor(255,255,255)], - "InactiveTitleText":[unicode(i18n("Inactive Text:")),TQColor(168,168,168)]}, + ({"ActiveTitle":[str(i18n("Active Color:")),TQColor(91,86,168)], + "GradientActiveTitle":[str(i18n("Gradient:")),TQColor(136,118,202)], + "InactiveTitle":[str(i18n("Inactive Color:")),TQColor(223,225,230)], + "GradientInactiveTitle":[str(i18n("Gradient:")),TQColor(157,170,186)], + "TitleText":[str(i18n("Active Text:")),TQColor(255,255,255)], + "InactiveTitleText":[str(i18n("Inactive Text:")),TQColor(168,168,168)]}, {}), #ActiveTitle, GradientActiveTitle, InactiveTitle, GradientInactiveTitle, TitleText, InactiveTitleText "Application Workspace": - ({"AppWorkSpace":[unicode(i18n("Background Color:")),TQColor(90,90,90)]}, + ({"AppWorkSpace":[str(i18n("Background Color:")),TQColor(90,90,90)]}, {}), #AppWorkSpace "Background" "Buttons": - ({"ButtonFace":[unicode(i18n("Face:")),TQColor(238,239,242)], - "ButtonHilight":[unicode(i18n("Hilight:")),TQColor(255,255,255)], - "ButtonLight":[unicode(i18n("Light:")),TQColor(201,199,255)], - "ButtonShadow":[unicode(i18n("Shadow:")),TQColor(132,132,134)], - "ButtonText":[unicode(i18n("Text Color:")),TQColor(0,0,0)], - "ButtonAlternateFace":[unicode(i18n("Alternate Face:")),TQColor(238,239,242)], - "ButtonDkShadow":[unicode(i18n("Dark Shadow:")),TQColor(98,96,143)], - "WindowFrame":[unicode(i18n("Frame:")),TQColor(144,140,209)]}, + ({"ButtonFace":[str(i18n("Face:")),TQColor(238,239,242)], + "ButtonHilight":[str(i18n("Hilight:")),TQColor(255,255,255)], + "ButtonLight":[str(i18n("Light:")),TQColor(201,199,255)], + "ButtonShadow":[str(i18n("Shadow:")),TQColor(132,132,134)], + "ButtonText":[str(i18n("Text Color:")),TQColor(0,0,0)], + "ButtonAlternateFace":[str(i18n("Alternate Face:")),TQColor(238,239,242)], + "ButtonDkShadow":[str(i18n("Dark Shadow:")),TQColor(98,96,143)], + "WindowFrame":[str(i18n("Frame:")),TQColor(144,140,209)]}, {}), #ButtonFace, ButtonHilight, ButtonLight, ButtonShadow, ButtonText, ButtonAlternateFace, ButtonDkShadow, WindowFrame "Caption Buttons": ({}, - {"CaptionHeight":[unicode(i18n("Height:")),22], - "CaptionWidth":[unicode(i18n("Width:")),22]}), #Metrics: CaptionHeight, CaptionWidth + {"CaptionHeight":[str(i18n("Height:")),22], + "CaptionWidth":[str(i18n("Width:")),22]}), #Metrics: CaptionHeight, CaptionWidth "Desktop": - ({"Background":[unicode(i18n("Background:")),TQColor(146,127,188)]}, + ({"Background":[str(i18n("Background:")),TQColor(146,127,188)]}, {}), #Background "Menu": - ({"Menu":[unicode(i18n("Menu Background:")),TQColor(250,251,254)], - "MenuBar":[unicode(i18n("Menu Bar Color:")),TQColor(238,239,242)], - "MenuHilight":[unicode(i18n("Menu Hilight:")),TQColor(144,140,209)], - "MenuText":[unicode(i18n("Text Color:")),TQColor(0,0,0)]}, - {"MenuHeight":[unicode(i18n("Menu Bar Height:")),22]}), #Menu (Background), MenuBar, MenuHilight, MenuText, metrics: MenuHeight, MenuWidth (does nothing) + ({"Menu":[str(i18n("Menu Background:")),TQColor(250,251,254)], + "MenuBar":[str(i18n("Menu Bar Color:")),TQColor(238,239,242)], + "MenuHilight":[str(i18n("Menu Hilight:")),TQColor(144,140,209)], + "MenuText":[str(i18n("Text Color:")),TQColor(0,0,0)]}, + {"MenuHeight":[str(i18n("Menu Bar Height:")),22]}), #Menu (Background), MenuBar, MenuHilight, MenuText, metrics: MenuHeight, MenuWidth (does nothing) "Scrollbar": - ({"Scrollbar":[unicode(i18n("Color:")),TQColor(238,239,242)]}, - {"ScrollWidth":[unicode(i18n("Width:")),16]}), #Scrollbar, metrics: ScrollHeight (does nothing), ScrollWidth + ({"Scrollbar":[str(i18n("Color:")),TQColor(238,239,242)]}, + {"ScrollWidth":[str(i18n("Width:")),16]}), #Scrollbar, metrics: ScrollHeight (does nothing), ScrollWidth "Window": - ({"Window":[unicode(i18n("Background:")),TQColor(255,255,255)], - "WindowText":[unicode(i18n("Text Color:")),TQColor(0,0,0)]}, + ({"Window":[str(i18n("Background:")),TQColor(255,255,255)], + "WindowText":[str(i18n("Text Color:")),TQColor(0,0,0)]}, {}), #Window "Background", WindowText "Selected Items": - ({"Hilight":[unicode(i18n("Hilight Color:")),TQColor(144,140,209)], - "HilightText":[unicode(i18n("Text Color:")),TQColor(255,255,255)]}, + ({"Hilight":[str(i18n("Hilight Color:")),TQColor(144,140,209)], + "HilightText":[str(i18n("Text Color:")),TQColor(255,255,255)]}, {})}) #Hilight, HilightText - preset2 = (unicode(i18n("Blue")), + preset2 = (str(i18n("Blue")), {"Window Border": - ({"ActiveBorder":[unicode(i18n("Active Color:")),TQColor(239,239,239)], - "InactiveBorder":[unicode(i18n("Inactive Color:")),TQColor(239,239,239)]}, - {"BorderWidth":[unicode(i18n("Width:")),1]}), #ActiveBorder, InactiveBorder, metrics: BorderWidth + ({"ActiveBorder":[str(i18n("Active Color:")),TQColor(239,239,239)], + "InactiveBorder":[str(i18n("Inactive Color:")),TQColor(239,239,239)]}, + {"BorderWidth":[str(i18n("Width:")),1]}), #ActiveBorder, InactiveBorder, metrics: BorderWidth "Title Bar": - ({"ActiveTitle":[unicode(i18n("Active Color:")),TQColor(0,113,201)], - "GradientActiveTitle":[unicode(i18n("Gradient:")),TQColor(87,161,219)], - "InactiveTitle":[unicode(i18n("Inactive Color:")),TQColor(191,191,191)], - "GradientInactiveTitle":[unicode(i18n("Gradient:")),TQColor(171,171,171)], - "TitleText":[unicode(i18n("Active Text:")),TQColor(255,255,255)], - "InactiveTitleText":[unicode(i18n("Inactive Text:")),TQColor(95,95,95)]}, + ({"ActiveTitle":[str(i18n("Active Color:")),TQColor(0,113,201)], + "GradientActiveTitle":[str(i18n("Gradient:")),TQColor(87,161,219)], + "InactiveTitle":[str(i18n("Inactive Color:")),TQColor(191,191,191)], + "GradientInactiveTitle":[str(i18n("Gradient:")),TQColor(171,171,171)], + "TitleText":[str(i18n("Active Text:")),TQColor(255,255,255)], + "InactiveTitleText":[str(i18n("Inactive Text:")),TQColor(95,95,95)]}, {}), #ActiveTitle, GradientActiveTitle, InactiveTitle, GradientInactiveTitle, TitleText, InactiveTitleText "Application Workspace": - ({"AppWorkSpace":[unicode(i18n("Background Color:")),TQColor(90,90,90)]}, + ({"AppWorkSpace":[str(i18n("Background Color:")),TQColor(90,90,90)]}, {}), #AppWorkSpace "Background" "Buttons": - ({"ButtonFace":[unicode(i18n("Face:")),TQColor(239,239,239)], - "ButtonHilight":[unicode(i18n("Hilight:")),TQColor(246,246,246)], - "ButtonLight":[unicode(i18n("Light:")),TQColor(191,207,251)], - "ButtonShadow":[unicode(i18n("Shadow:")),TQColor(148,148,153)], - "ButtonText":[unicode(i18n("Text Color:")),TQColor(0,0,0)], - "ButtonAlternateFace":[unicode(i18n("Alternate Face:")),TQColor(238,239,242)], - "ButtonDkShadow":[unicode(i18n("Dark Shadow:")),TQColor(50,101,146)], - "WindowFrame":[unicode(i18n("Frame:")),TQColor(74,149,214)]}, + ({"ButtonFace":[str(i18n("Face:")),TQColor(239,239,239)], + "ButtonHilight":[str(i18n("Hilight:")),TQColor(246,246,246)], + "ButtonLight":[str(i18n("Light:")),TQColor(191,207,251)], + "ButtonShadow":[str(i18n("Shadow:")),TQColor(148,148,153)], + "ButtonText":[str(i18n("Text Color:")),TQColor(0,0,0)], + "ButtonAlternateFace":[str(i18n("Alternate Face:")),TQColor(238,239,242)], + "ButtonDkShadow":[str(i18n("Dark Shadow:")),TQColor(50,101,146)], + "WindowFrame":[str(i18n("Frame:")),TQColor(74,149,214)]}, {}), #ButtonFace, ButtonHilight, ButtonLight, ButtonShadow, ButtonText, ButtonAlternateFace, ButtonDkShadow, WindowFrame "Caption Buttons": ({}, - {"CaptionHeight":[unicode(i18n("Height:")),22], - "CaptionWidth":[unicode(i18n("Width:")),22]}), #Metrics: CaptionHeight, CaptionWidth + {"CaptionHeight":[str(i18n("Height:")),22], + "CaptionWidth":[str(i18n("Width:")),22]}), #Metrics: CaptionHeight, CaptionWidth "Desktop": - ({"Background":[unicode(i18n("Background:")),TQColor(44,109,189)]}, + ({"Background":[str(i18n("Background:")),TQColor(44,109,189)]}, {}), #Background "Menu": - ({"Menu":[unicode(i18n("Menu Background:")),TQColor(249,249,249)], - "MenuBar":[unicode(i18n("Menu Bar Color:")),TQColor(239,239,239)], - "MenuHilight":[unicode(i18n("Menu Hilight:")),TQColor(74,149,214)], - "MenuText":[unicode(i18n("Text Color:")),TQColor(0,0,0)]}, - {"MenuHeight":[unicode(i18n("Menu Bar Height:")),22]}), #Menu (Background), MenuBar, MenuHilight, MenuText, metrics: MenuHeight, MenuWidth (does nothing) + ({"Menu":[str(i18n("Menu Background:")),TQColor(249,249,249)], + "MenuBar":[str(i18n("Menu Bar Color:")),TQColor(239,239,239)], + "MenuHilight":[str(i18n("Menu Hilight:")),TQColor(74,149,214)], + "MenuText":[str(i18n("Text Color:")),TQColor(0,0,0)]}, + {"MenuHeight":[str(i18n("Menu Bar Height:")),22]}), #Menu (Background), MenuBar, MenuHilight, MenuText, metrics: MenuHeight, MenuWidth (does nothing) "Scrollbar": - ({"Scrollbar":[unicode(i18n("Color:")),TQColor(230,230,230)]}, - {"ScrollWidth":[unicode(i18n("Width:")),16]}), #Scrollbar, metrics: ScrollHeight (does nothing), ScrollWidth + ({"Scrollbar":[str(i18n("Color:")),TQColor(230,230,230)]}, + {"ScrollWidth":[str(i18n("Width:")),16]}), #Scrollbar, metrics: ScrollHeight (does nothing), ScrollWidth "Window": - ({"Window":[unicode(i18n("Background:")),TQColor(255,255,255)], - "WindowText":[unicode(i18n("Text Color:")),TQColor(0,0,0)]}, + ({"Window":[str(i18n("Background:")),TQColor(255,255,255)], + "WindowText":[str(i18n("Text Color:")),TQColor(0,0,0)]}, {}), #Window "Background", WindowText "Selected Items": - ({"Hilight":[unicode(i18n("Hilight Color:")),TQColor(74,149,214)], - "HilightText":[unicode(i18n("Text Color:")),TQColor(255,255,255)]}, + ({"Hilight":[str(i18n("Hilight Color:")),TQColor(74,149,214)], + "HilightText":[str(i18n("Text Color:")),TQColor(255,255,255)]}, {})}) #Hilight, HilightText presets = [preset1,preset2] @@ -2877,7 +2877,7 @@ class GeneralPage(TQWidget): "applications.</p>")) appwarning.setFrameStyle( TQFrame.Box | TQFrame.Raised ) self.winversions = self.winversions + (( "global",\ - unicode(i18n("Use Global Setting")), 0, 0, 0, "", "", 0, 0, ""),) + str(i18n("Use Global Setting")), 0, 0, 0, "", "", 0, 0, ""),) self.verdic["global"]=11 hbox = TQHBox(vbox) @@ -3150,13 +3150,13 @@ class ApplicationsPage(TQWidget): else: mailertr = str(i18n("KDE (Native)")) else: - mailertr = mailer.capitalize() + unicode(i18n(" (Native)")) + mailertr = mailer.capitalize() + str(i18n(" (Native)")) mailers.append((mailer,mailertr)) for mailer in wine: if mailer and mailer[1] == ':': mailer = mailer.lower() mailertr = mailer[mailer.rfind('\\\\')+2:mailer.rfind('.exe')] - mailertr = mailertr.capitalize() + unicode(i18n(" (Windows, set by application)")) + mailertr = mailertr.capitalize() + str(i18n(" (Windows, set by application)")) else: # winebrowser continue mailers.append((mailer,mailertr)) @@ -3176,7 +3176,7 @@ class ApplicationsPage(TQWidget): """ app = KFileDialog.getOpenFileName(wineread.winepath + \ "/dosdevices/c:",\ - "*.exe|" + unicode(i18n("Windows Executables (*.exe)")),self,i18n("Application")) + "*.exe|" + str(i18n("Windows Executables (*.exe)")),self,i18n("Application")) if app: app = str(app).split('/') app = app[-1] @@ -3325,11 +3325,11 @@ class LibrariesPage(TQWidget): orderoptions = ("builtin","native","builtin,native","native,builtin","") orderoptionstr = [ - unicode(i18n("Built-in (Wine)")), - unicode(i18n("Native (Windows)")), - unicode(i18n("Built-in then Native")), - unicode(i18n("Native then Built-in")), - unicode(i18n("Disable"))] + str(i18n("Built-in (Wine)")), + str(i18n("Native (Windows)")), + str(i18n("Built-in then Native")), + str(i18n("Native then Built-in")), + str(i18n("Disable"))] def __init__(self,parent = None,name = None,modal = 0,fl = 0): TQWidget.__init__(self,parent) @@ -3463,7 +3463,7 @@ class LibrariesPage(TQWidget): """ if self.selecteddll: order = KInputDialog.getItem(i18n("Edit Library Override"),\ - unicode(i18n("Load order for %s:")) % (unicode(self.selecteddll),), + str(i18n("Load order for %s:")) % (str(self.selecteddll),), TQStringList.fromStrList(self.orderoptionstr),\ False,0,self,"editdll") @@ -3488,7 +3488,7 @@ class LibrariesPage(TQWidget): firstselecteddll = None lastdll = None - for dll,order in self.overriddendlls.iteritems(): + for dll,order in self.overriddendlls.items(): lvi = TQListViewItem(self.dllslist,dll,order) self.dllsToListItems[dll] = lvi if self.selecteddll and self.selecteddll==dll: diff --git a/wineconfig/wineread.py b/wineconfig/wineread.py index c1fa3c5..d334d7c 100644 --- a/wineconfig/wineread.py +++ b/wineconfig/wineread.py @@ -102,7 +102,7 @@ def LoadDrives(): letter = drive[1].lower() if letter in driveletters: drive[2] = os.readlink(winepath + "/dosdevices/" + letter) - if drivetypes.has_key(drive[1]): + if drive[1] in drivetypes: drive[3] = drivetypes[drive[1]] return drives diff --git a/wineconfig/winewrite.py b/wineconfig/winewrite.py index 0d0d365..db01614 100644 --- a/wineconfig/winewrite.py +++ b/wineconfig/winewrite.py @@ -99,7 +99,7 @@ def SetShellLinks(shelllinks): if createLink: os.symlink(link[2], wineread.winepath + "/dosdevices/c:/windows/profiles/" + os.environ['USER'] + "/" + link[1]) - if shellregistry.has_key(link[1]): + if link[1] in shellregistry: SetShellRegistry(link) @@ -322,10 +322,10 @@ def SetDllOverrides(overrides, app = None): origoverrides = wineread.GetDllOverrides(app) - for dll in overrides.keys(): + for dll in list(overrides.keys()): dllfile.write('"'+str(dll)+'"="'+str(overrides[dll])+'"\n') - for dll in origoverrides.keys(): + for dll in list(origoverrides.keys()): if dll not in overrides: dllfile.write('"'+str(dll)+'"=-\n') |