UI/UserInterface.py

changeset 6192
0fbc876d7468
parent 6191
bf6bd1ecfac7
parent 6188
5a6ae3be31e6
child 6193
0313134e20b1
equal deleted inserted replaced
6191:bf6bd1ecfac7 6192:0fbc876d7468
3720 @param act reference to the action that was triggered (QAction) 3720 @param act reference to the action that was triggered (QAction)
3721 """ 3721 """
3722 name = act.data() 3722 name = act.data()
3723 if name: 3723 if name:
3724 if name == "__SHOW__": 3724 if name == "__SHOW__":
3725 for text, tb in list(self.__toolbars.values()): 3725 for _text, tb in self.__toolbars.values():
3726 tb.show() 3726 tb.show()
3727 if self.__menus["toolbars"].isTearOffMenuVisible(): 3727 if self.__menus["toolbars"].isTearOffMenuVisible():
3728 self.__menus["toolbars"].hideTearOffMenu() 3728 self.__menus["toolbars"].hideTearOffMenu()
3729 elif name == "__HIDE__": 3729 elif name == "__HIDE__":
3730 for text, tb in list(self.__toolbars.values()): 3730 for _text, tb in self.__toolbars.values():
3731 tb.hide() 3731 tb.hide()
3732 if self.__menus["toolbars"].isTearOffMenuVisible(): 3732 if self.__menus["toolbars"].isTearOffMenuVisible():
3733 self.__menus["toolbars"].hideTearOffMenu() 3733 self.__menus["toolbars"].hideTearOffMenu()
3734 else: 3734 else:
3735 tb = self.__toolbars[name][1] 3735 tb = self.__toolbars[name][1]
3746 @param act reference to the action that was triggered (QAction) 3746 @param act reference to the action that was triggered (QAction)
3747 """ 3747 """
3748 name = act.data() 3748 name = act.data()
3749 if name: 3749 if name:
3750 if name == "__SHOW__": 3750 if name == "__SHOW__":
3751 for text, tb in list(self.__toolbars.values()): 3751 for _text, tb in self.__toolbars.values():
3752 tb.show() 3752 tb.show()
3753 elif name == "__HIDE__": 3753 elif name == "__HIDE__":
3754 for text, tb in list(self.__toolbars.values()): 3754 for _text, tb in self.__toolbars.values():
3755 tb.hide() 3755 tb.hide()
3756 else: 3756 else:
3757 tb = self.__toolbars[name][1] 3757 tb = self.__toolbars[name][1]
3758 if act.isChecked(): 3758 if act.isChecked():
3759 tb.show() 3759 tb.show()
4948 Private slot to handle the readyReadStderr signal of a tool process. 4948 Private slot to handle the readyReadStderr signal of a tool process.
4949 """ 4949 """
4950 ioEncoding = Preferences.getSystem("IOEncoding") 4950 ioEncoding = Preferences.getSystem("IOEncoding")
4951 4951
4952 # loop through all running tool processes 4952 # loop through all running tool processes
4953 for program, toolProc, toolProcData in self.toolProcs: 4953 for program, toolProc, _toolProcData in self.toolProcs:
4954 toolProc.setReadChannel(QProcess.StandardError) 4954 toolProc.setReadChannel(QProcess.StandardError)
4955 4955
4956 while toolProc.canReadLine(): 4956 while toolProc.canReadLine():
4957 error = str(toolProc.readLine(), ioEncoding, 'replace') 4957 error = str(toolProc.readLine(), ioEncoding, 'replace')
4958 s = "{0} - {1}".format(program, error) 4958 s = "{0} - {1}".format(program, error)

eric ide

mercurial