Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - # find and load the gui
 - gui_file = self.inifile.find('DISPLAY', 'GUI') or False
 - if gui_file: # gui is in the ini file
 - gui_path = os.path.join(os.path.dirname(self.status.ini_filename), gui_file)
 - if not os.path.isfile(gui_path): # gui not found
 - gui_path = os.path.join(self.gui_path, 'flex_default.ui')
 - gui_file = 'flex_default.ui'
 - else: # no gui specified
 - gui_path = os.path.join(self.gui_path, 'flex_default.ui')
 - gui_file = 'flex_default.ui'
 - # Tried commenting this out for gentoo
 - #results = subprocess.run(['dpkg-query', '-W', 'flexgui'], text=True, capture_output=True)
 - #if results.stdout:
 - # self.flex_version = results.stdout.split()[1]
 - #else:
 - self.flex_version = 'Unknown'
 - loadUi(gui_path, self)
 - machine = self.inifile.find('EMC', 'MACHINE') or False
 - if machine:
 - self.setWindowTitle(f'{machine} Flex GUI V{self.flex_version}')
 - else:
 - self.setWindowTitle(f'Flex GUI - Version: {self.flex_version} - Using {gui_file}')
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment