Пример #1
0
 def __init__(self, WinMain):
     # Set main window
     self.WinMain = WinMain
     # Build the window
     self.winID = gtk.Fixed()
     self.winID.set_has_window(True)
     self.imgBackground = gtk.Image()
     self.lblPrompt = gtk.Label()
     self.lblPromptText = gtk.Label()
     self.lblRFID = gtk.Label()
     self.sclIDs = ScrollList(self.WinMain)
     self.winID.add(self.imgBackground)
     self.winID.add(self.lblPrompt)
     self.winID.add(self.lblPromptText)
     self.winID.add(self.lblRFID)
     self.winID.add(self.sclIDs.fixd)
     WinMain.fixd.add(self.winID)
     self.imgBackground.show()
     self.lblPrompt.show()
     self.lblPromptText.show()
     self.winID.show()
     # Build list
     self.ldap = LoadLDAP()
     self.lsIDs = self.ldap.getNames()
     self.sclIDs.auto_update = True
     # Get keyboard & mouse events
     self.sclIDs.connect('update', self.on_sclIDs_changed)
     self.sclIDs.connect('mouse-left-click', self.on_sclIDs_changed)
     self.sclIDs.connect('mouse-double-click', self.ID_selected)
     # Init window
     self.set_lbls()
     self.record = False
     self.on_keypress = False
Пример #2
0
 def __init__(self, WinMain):
     # Set main window
     self.WinMain = WinMain
     # Build the window
     self.winPlayers = gtk.Fixed()
     self.winPlayers.set_has_window(True)
     self.imgBackground = gtk.Image()
     self.lblScore = gtk.Label()
     self.lbl1 = gtk.Label()
     self.sclPlayers = ScrollList(self.WinMain)
     self.winPlayers.add(self.imgBackground)
     self.winPlayers.add(self.lblScore)
     self.winPlayers.add(self.lbl1)
     #        self.winPlayers.add(self.lblRFID)
     self.winPlayers.add(self.sclPlayers.fixd)
     WinMain.fixd.add(self.winPlayers)
     self.imgBackground.show()
     self.lbl1.show()
     self.winPlayers.show()
     # Build list
     self.lsPlayers = self.WinMain.current_players
     self.sclPlayers.auto_update = True
     # Get keyboard & mouse events
     self.sclPlayers.connect('update', self.on_sclPlayers_changed)
     self.sclPlayers.connect('mouse-left-click', self.on_sclPlayers_changed)
     self.sclPlayers.connect('mouse-double-click', self.player_selected)
     # Set up IDs
     self.sclPlayers.ls = [l for l in self.lsPlayers]
     self.sclPlayers.ls.sort()
     # Init window
     self.lblScore.set_text("Who's score was this?")
     self.lbl1.set_text("-------------")
     self.record = False
     self.on_keypress = False
Пример #3
0
 def __init__(self, WinMain):
     # Main parent window
     self.WinMain = WinMain
     # Internals
     self.winPop = gtk.Fixed()
     self.winPop.set_has_window(True)
     self.imgBackground = gtk.Image()
     self.lblHeading = gtk.Label()
     self.sclPop = ScrollList(self.WinMain)
     self.winPop.add(self.imgBackground)
     self.winPop.add(self.lblHeading)
     self.winPop.add(self.sclPop.fixd)
     WinMain.fixd.add(self.winPop)
     self.imgBackground.show()
     self.lblHeading.show()
     self.sclPop.show()
     # Get keyboard & mouse events
     self.sclPop.connect('update', self.on_sclPop_changed)
     self.sclPop.connect('mouse-left-click', self.on_sclPop_changed)
     self.sclPop.connect('mouse-double-click', self.Pop_selected)
     # Set up games list
     self.sclPop.auto_update = True
     self.lsPop = [
         "Game", "Other Game", "Best Game", "#4", "#5", "#6", "#7", "#8",
         "#9", "#10"
     ]
     self.sclPop.ls = [g for g in self.lsPop]
     self.sclPop.ls.sort()
     self.sclPop._update_display()
     # Set text
     self.lblHeading.set_text("10 Most Popular Games")
Пример #4
0
 def __init__(self, WinMain):
     #set main window
     self.WinMain = WinMain
     self.layout_filename = ''
     self.histview_ok = True
     #open history viewer ini
     self.histview_ini = MameWahIni(os.path.join(CONFIG_DIR, 'histview.ini'), 'default', '0.16')
     if os.path.exists(os.path.join(CONFIG_DIR, 'ini', self.WinMain.current_emu + '.his')):
         self.cpviewer_ini = MameWahIni(os.path.join(CONFIG_DIR, 'ini', self.WinMain.current_emu + '.his'), 'default')
     if not os.path.isfile(self.histview_ini.get('history_dat_file')):
         self.WinMain.log_msg("Warning: history file: [%s] does not exist" % (
             self.histview_ini.get('history_dat_file')))
         self.histview_ok = False
     self.layout_filename = self.histview_ini.get('history_layout')
     if not os.path.isfile(self.layout_filename):
         self.WinMain.log_msg("Warning: history layout: [%s] does not exist" % (self.layout_filename))
         self.histview_ok = False
     #build the window
     self.winHistory = gtk.Fixed()
     self.winHistory.set_has_window(True)
     self.imgBackground = gtk.Image()
     self.lblHeading = gtk.Label()
     self.sclHistory = ScrollList()
     self.winHistory.add(self.imgBackground)
     self.winHistory.add(self.make_evb_widget(self.lblHeading))
     self.winHistory.add(self.sclHistory.fixd)
     WinMain.fixd.add(self.winHistory)
     self.imgBackground.show()
     self.lblHeading.show()
     self.winHistory.show()
     #build list
     self.lsHistory = []
     self.sclHistory.auto_update = True
     self.sclHistory.display_limiters = self.WinMain.wahcade_ini.getint('show_list_arrows', 0)
     #widgets
     self._histview_items = [
         (8, self.lblHeading),
         (21, self.sclHistory)]
     #get history
     self.history = self.read_history(self.histview_ini.get('history_dat_file'))
     #app number
     self.app_number = 0
Пример #5
0
 def __init__(self, WinMain):
     #set main window
     self.WinMain = WinMain
     #build the window
     self.winOptions = gtk.Fixed()
     self.winOptions.set_has_window(True)
     self.imgBackground = gtk.Image()
     self.lblHeading = gtk.Label()
     self.lblSettingHeading = gtk.Label()
     self.lblSettingValue = gtk.Label()
     self.sclOptions = ScrollList()
     self.winOptions.add(self.imgBackground)
     self.winOptions.add(self.lblHeading)
     self.winOptions.add(self.lblSettingHeading)
     self.winOptions.add(self.lblSettingValue)
     self.winOptions.add(self.sclOptions.fixd)
     WinMain.fixd.add(self.winOptions)
     self.imgBackground.show()
     self.lblHeading.show()
     self.lblSettingHeading.show()
     self.lblSettingValue.show()
     self.winOptions.show()
     #build list
     self.lsOptions = []
     self.sclOptions.auto_update = True
     self.sclOptions.display_limiters = self.WinMain.wahcade_ini.getint(
         'show_list_arrows', 0)
     #get keyboard & mouse events
     self.sclOptions.connect('update', self.on_sclOptions_changed)
     self.sclOptions.connect('mouse-left-click', self.on_sclOptions_changed)
     self.sclOptions.connect('mouse-double-click', self.menu_selected)
     #setup menu
     self.current_menu = 'main'
     self._menus = {
         'main': [
             [_('Select Platform'), 'emu_list'],
             [_('Select Game List'), 'game_list'],
             [_('Find Game'), 'find'],
             [_('Select Random Game'), 'random'],
             [_('Games List Options'), 'list_options'],
             #['Launch External Application', 'external'],
             [_('Music Options'), 'music'],
             [_('About...'), 'about'],
             [_('Exit Wah!Cade'), 'exit']
         ],
         #[_('Close Arcade'), 'shutdown']],
         'list_options': [[_('Add Game to List'), 'add_to_list'],
                          [_('Remove Game from List'), 'remove_from_list'],
                          [_('Generate Filtered List...'), 'generate_ftr'],
                          [_('Generate List...'), 'generate_list']],
         'generate_ftr':
         [[_('Display Clones'), 'ftr:filter_type'],
          [_('Year Filters'), 'ftr:year'],
          [_('Manufacturer Filters'), 'ftr:manufacturer'],
          [_('BIOS Filters'), 'ftr:driver'],
          [_('Screen Type Filters'), 'ftr:display_type'],
          [_('Screen Orientation Filters'), 'ftr:screen_type'],
          [_('Input Type Filters'), 'ftr:controller_type'],
          [_('General Status Filters'), 'ftr:driver_status'],
          [_('Colour Status Filters'), 'ftr:colour_status'],
          [_('Sound Status Filters'), 'ftr:sound_status'],
          [_('Category Filters'), 'ftr:category']],
         'music': [[_('Play / Pause'), 'music_play'],
                   [_('Next Track'), 'next_track'],
                   [_('Previous Track'), 'previous_track'],
                   [_('Select Track / Directory'), 'show_music_dir']],
         'exit': [[_('Exit to Desktop'), 'exit_desktop'],
                  [_('Exit & Reboot'), 'exit_reboot'],
                  [_('Exit & Shutdown'), 'exit_shutdown']],
     }
     self._display_clones = [[_('No'), 'no'], [_('Yes'), 'yes'],
                             [_('Only if better than Parent'), 'better']]
     self._display_clone_idx = 0
     #init window
     self.sclOptions.use_mouse = self.WinMain.ctrlr_ini.getint('mouse')
     self.sclOptions.wrap_list = self.WinMain.wahcade_ini.getint(
         'wrap_list')
Пример #6
0
 def __init__(self, WinMain):
     # Set main window
     self.WinMain = WinMain
     # Build the window
     self.winOptions = gtk.Fixed()
     self.winOptions.set_has_window(True)
     self.imgBackground = gtk.Image()
     self.lblHeading = gtk.Label()
     self.lblSettingHeading = gtk.Label()
     self.lblSettingValue = gtk.Label()
     self.sclOptions = ScrollList(self.WinMain)
     self.winOptions.add(self.imgBackground)
     self.winOptions.add(self.lblHeading)
     self.winOptions.add(self.lblSettingHeading)
     self.winOptions.add(self.lblSettingValue)
     self.winOptions.add(self.sclOptions.fixd)
     WinMain.fixd.add(self.winOptions)
     self.imgBackground.show()
     self.lblHeading.show()
     self.lblSettingHeading.show()
     self.lblSettingValue.show()
     self.winOptions.show()
     # Build list
     self.lsOptions = []
     self.sclOptions.auto_update = True
     # Get keyboard & mouse events
     self.sclOptions.connect('update', self.on_sclOptions_changed)
     self.sclOptions.connect('mouse-left-click', self.on_sclOptions_changed)
     self.sclOptions.connect('mouse-double-click', self.menu_selected)
     # Setup menu
     self.current_menu = 'main'
     self._menus = {
         'main': [
             [_('Select Platform'), 'emu_list'],
             [_('Select Game List'), 'game_list'],
             [_('Find Game'), 'find'],
             [_('Select Random Game'), 'random'],
             [_('Games List Options'), 'list_options'],
             #['Launch External Application', 'external'],
             [_('Music Options'), 'music'],
             [_('Video Recording Options'), 'record_video'],
             [_('About'), 'about'],
             [_('Change Cabinet Name'), 'change'],
             [_('Exit Wah!Cade'), 'exit']
         ],
         #[_('Close Arcade'), 'shutdown']],
         'list_options': [[_('Add Game to List'), 'add_to_list'],
                          [_('Remove Game from List'), 'remove_from_list'],
                          [_('Generate List...'), 'generate_list']],
         'music': [[_('Play / Pause'), 'music_play'],
                   [_('Next Track'), 'next_track'],
                   [_('Previous Track'), 'previous_track'],
                   [_('Select Track / Directory'), 'show_music_dir']],
         'record_video': [[_('On'), 'recording_launch'],
                          [_('Off'), 'recording_off']],
         'exit': [[_('Exit to Desktop'), 'exit_desktop'],
                  [_('Exit & Reboot'), 'exit_reboot'],
                  [_('Exit & Shutdown'), 'exit_shutdown']],
     }
     self._display_clones = [[_('No'), 'no'], [_('Yes'), 'yes'],
                             [_('Only if better than Parent'), 'better']]
     self._display_clone_idx = 0
     # Init window
     #self.lblHeading.set_ellipsize(pango.ELLIPSIZE_START)
     self.record = False