Example #1
0
 def __init__(self):
     MenuItem.__init__(self)
     # if app.name == "fs-uae-arcade":
     self.title = gettext("FS-UAE   Arcade")
     # else:
     #     self.title = gettext("Game   Center")
     self.path_title = self.title
Example #2
0
 def activate(self, menu):
     print("YearMenuItem.activate")
     menu = create_item_menu(gettext("Select Year"))
     # for year in GameList().get().get_years(): # FIXME: GET YEARS FROM
     # FILTERED GAME LIST
     #     item = YearItem(year)
     #     menu.append(item)
     return menu
Example #3
0
 def activate(self, menu):
     print("YearMenuItem.activate")
     menu = create_item_menu(gettext("Select Year"))
     # for year in GameList().get().get_years(): # FIXME: GET YEARS FROM
     # FILTERED GAME LIST
     #     item = YearItem(year)
     #     menu.append(item)
     return menu
Example #4
0
 def __init__(self):
     super().__init__()
     # if app.name == "fs-uae-arcade":
     self.title = gettext("FS-UAE   Arcade")
     # else:
     #     self.title = gettext("Game   Center")
     self.path_title = self.title
     self.enabled = False
Example #5
0
 def __init__(self):
     super().__init__()
     # if app.name == "fs-uae-arcade":
     self.title = gettext("FS-UAE   Arcade")
     # else:
     #     self.title = gettext("Game   Center")
     self.path_title = self.title
     self.enabled = False
Example #6
0
 def activate(self, menu):
     print("LetterMenuItem.activate")
     new_menu = create_item_menu(gettext("Select First Letter"))
     menu_path = self.create_menu_path(menu)
     new_menu.update_path(menu_path)
     for letter in "#ABCDEFGHIJKLMNOPQRSTUVWXYZ":
         item = LetterItem(letter)
         new_menu.append(item)
     return new_menu
Example #7
0
 def activate(self, menu):
     print("LetterMenuItem.activate")
     new_menu = create_item_menu(gettext("Select First Letter"))
     menu_path = self.create_menu_path(menu)
     new_menu.update_path(menu_path)
     for letter in "#ABCDEFGHIJKLMNOPQRSTUVWXYZ":
         item = LetterItem(letter)
         new_menu.append(item)
     return new_menu
Example #8
0
    def activate(self, menu):
        print("KeywordMenuItem.activate")
        new_menu = create_item_menu(gettext("Select Keyword"))
        menu_path = self.create_menu_path(menu)
        new_menu.update_path(menu_path)
        category_filters = list(self.generate_category_filters(menu_path))

        def check(cat):
            for flt in category_filters:
                if not flt(cat):
                    return False
            return True

        # for keyword in GameList().get().get_keywords():
        #     item = KeywordItem(keyword)
        #     if check(item):
        #         new_menu.append(item)
        return new_menu
Example #9
0
    def activate(self, menu):
        print("KeywordMenuItem.activate")
        new_menu = create_item_menu(gettext("Select Keyword"))
        menu_path = self.create_menu_path(menu)
        new_menu.update_path(menu_path)
        category_filters = list(self.generate_category_filters(menu_path))

        def check(cat):
            for flt in category_filters:
                if not flt(cat):
                    return False
            return True

        # for keyword in GameList().get().get_keywords():
        #     item = KeywordItem(keyword)
        #     if check(item):
        #         new_menu.append(item)
        return new_menu
Example #10
0
    def activate(self, menu):
        print("ListMenuItem.activate")
        new_menu = create_item_menu(gettext("Select List"))
        menu_path = self.create_menu_path(menu)
        new_menu.update_path(menu_path)
        # Database.cursor.execute("SELECT DISTINCT platform FROM Game "
        #         "ORDER BY platform")
        # items = []
        # for row in Database.cursor:
        #     item = PlatformItem(row[0])
        #     items.append((item.sort_title, item))
        # for sort_title, item in sorted(items):
        #    new_menu.append(item)

        for title, path in get_game_lists():
            item = ListItem(title, path)
            new_menu.append(item)
        return new_menu
Example #11
0
    def activate(self, menu):
        print("ListMenuItem.activate")
        new_menu = create_item_menu(gettext("Select List"))
        menu_path = self.create_menu_path(menu)
        new_menu.update_path(menu_path)
        # Database.cursor.execute("SELECT DISTINCT platform FROM Game "
        #         "ORDER BY platform")
        # items = []
        # for row in Database.cursor:
        #     item = PlatformItem(row[0])
        #     items.append((item.sort_title, item))
        # for sort_title, item in sorted(items):
        #    new_menu.append(item)

        for title, path in ListItem.get_game_lists():
            item = ListItem(title, path)
            new_menu.append(item)
        return new_menu
Example #12
0
 def activate(self, menu):
     print("PlatformMenuItem.activate")
     new_menu = create_item_menu(gettext("Select Platform"))
     menu_path = self.create_menu_path(menu)
     new_menu.update_path(menu_path)
     with Database.instance() as database:
         cursor = database.cursor()
         cursor.execute(
             "SELECT DISTINCT platform FROM game WHERE have >= 3 "
             "ORDER BY platform")
         items = []
         for row in cursor:
             if not row[0]:
                 continue
             item = PlatformItem(row[0])
             items.append((item.sort_title, item))
         for sort_title, item in sorted(items):
             new_menu.append(item)
     return new_menu
Example #13
0
 def activate(self, menu):
     print("PlatformMenuItem.activate")
     new_menu = create_item_menu(gettext("Select Platform"))
     menu_path = self.create_menu_path(menu)
     new_menu.update_path(menu_path)
     with Database.instance() as database:
         cursor = database.cursor()
         cursor.execute(
             "SELECT DISTINCT platform FROM game WHERE have >= 3 "
             "ORDER BY platform")
         items = []
         for row in cursor:
             if not row[0]:
                 continue
             item = PlatformItem(row[0])
             items.append((item.sort_title, item))
         for sort_title, item in sorted(items):
             new_menu.append(item)
     return new_menu
Example #14
0
 def __init__(self):
     MenuItem.__init__(self)
     self.title = gettext("Shuffle")
     self.path_title = "Shuffle"
Example #15
0
 def __init__(self):
     AutoExpandItem.__init__(self)
     self.title = gettext("All")
     self.path_title = "All Games"
Example #16
0
 def __init__(self):
     super().__init__()
     self.title = gettext("FS-UAE Arcade")
     self.path_title = self.title
     self.enabled = False
Example #17
0
 def __init__(self):
     MenuItem.__init__(self)
     self.title = gettext("Keyword")
     self.path_title_active = "Choose Keyword"
Example #18
0
 def __init__(self):
     MenuItem.__init__(self)
     self.title = gettext("Letter")
     self.path_title_active = "Choose Letter"
Example #19
0
 def __init__(self):
     MenuItem.__init__(self)
     self.title = gettext("Shuffle")
     self.path_title = "Shuffle"
Example #20
0
 def __init__(self):
     MenuItem.__init__(self)
     self.title = gettext("Add")
     self.path_title = self.title
Example #21
0
 def __init__(self):
     AutoExpandItem.__init__(self)
     self.title = gettext("All")
     self.path_title = "All Games"
Example #22
0
 def __init__(self):
     MenuItem.__init__(self)
     self.title = gettext("Platform")
     self.path_title_active = "Choose Platform"
Example #23
0
 def __init__(self):
     MenuItem.__init__(self)
     self.title = gettext("Year")
     self.path_title_active = "Choose Year"
Example #24
0
 def __init__(self):
     super().__init__()
     self.title = gettext("FS-UAE Arcade")
     self.path_title = self.title
     self.enabled = False
Example #25
0
 def __init__(self):
     MenuItem.__init__(self)
     self.title = gettext("Keyword")
     self.path_title_active = "Choose Keyword"
Example #26
0
 def __init__(self):
     MenuItem.__init__(self)
     self.title = gettext("No Last Played")
Example #27
0
 def __init__(self):
     super().__init__()
     self.title = gettext("Add")
     self.path_title = self.title
Example #28
0
 def __init__(self):
     MenuItem.__init__(self)
     self.title = gettext("Platform")
     self.path_title_active = "Choose Platform"
Example #29
0
 def __init__(self):
     super().__init__()
     self.title = gettext("Add")
     self.path_title = self.title
Example #30
0
 def __init__(self):
     MenuItem.__init__(self)
     self.title = gettext("No Last Played")