Exemple #1
0
    def __init__(self, core, amsn_contact):
        MenuView.__init__(self)
        self._cm = core._contactlist_manager
        self._uid = amsn_contact.uid

        remove = MenuItemView(MenuItemView.COMMAND,
                              label="Remove %s" % amsn_contact.account,
                              command= lambda:
                              self._cm.remove_contact_Uid(amsn_contact.uid))
        self.add_item(remove)
Exemple #2
0
    def __init__(self, em, ev):
        """ if just completed level 2, only propose to go to main menu """

        lvlname = ev.lvlname # number of the level just completed
        self.pagename = 'level %s completed' % lvlname # window-bar title

        self.evtlabels = [('to main menu', ToMenuEvent)]
        if lvlname != 'lvl2': # there is a next level
            lvlnum = int(lvlname[-1])
            self.evtlabels.insert(0, ('next game', StartGameEvent,
                                      ['lvl%d' % (lvlnum + 1)]))

        MenuView.__init__(self, em, ev)
    def __init__(self, core, amsn_contact):
        """
        @type core: L{amsn2.core.amsn.aMSNCore}
        @type amsn_contact: L{amsn2.core.contactlist_manager.aMSNContact}
        """
        MenuView.__init__(self)
        self._cm = core._contactlist_manager
        self._uid = amsn_contact.uid

        remove = MenuItemView(
            MenuItemView.COMMAND,
            label="Remove %s" % amsn_contact.account,
            command=lambda: self._cm.remove_contact_Uid(amsn_contact.uid))
        self.add_item(remove)
Exemple #4
0
    def __init__(self, core, amsn_contact):
        """
        @type core: L{amsn2.core.amsn.aMSNCore}
        @type amsn_contact: L{amsn2.core.contactlist_manager.aMSNContact}
        """
        MenuView.__init__(self)
        self._cm = core._contactlist_manager
        self._uid = amsn_contact.uid

        remove = MenuItemView(MenuItemView.COMMAND,
                              label="Remove %s" % amsn_contact.account,
                              command= lambda:
                              self._cm.remove_contact_Uid(amsn_contact.uid))
        self.add_item(remove)
Exemple #5
0
    def __init__(self, core, amsn_group):
        MenuView.__init__(self)
        add_group = MenuItemView(MenuItemView.COMMAND,
                                 label="Add group",
                                 command= lambda:
                                 core._contactlist_manager.add_group())

        self.add_item(add_group)
        if amsn_group.id != 0:
            remove = MenuItemView(MenuItemView.COMMAND,
                                  label="Remove group",
                                  command= lambda:
                                  core._contactlist_manager.remove_group_gid(amsn_group.id))

            self.add_item(remove)
    def __init__(self, core, amsn_group):
        """
        @type core: L{amsn2.core.amsn.aMSNCore}
        @type amsn_group: L{amsn2.core.contactlist_manager.aMSNBaseGroup}
        """
        MenuView.__init__(self)
        add_group = MenuItemView(
            MenuItemView.COMMAND,
            label="Add group",
            command=lambda: core._contactlist_manager.add_group())

        self.add_item(add_group)
        if amsn_group.id != 0:
            remove = MenuItemView(MenuItemView.COMMAND,
                                  label="Remove group",
                                  command=lambda: core._contactlist_manager.
                                  remove_group_gid(amsn_group.id))

            self.add_item(remove)
Exemple #7
0
    def __init__(self, core, amsn_group):
        """
        @type core: L{amsn2.core.amsn.aMSNCore}
        @type amsn_group: L{amsn2.core.contactlist_manager.aMSNBaseGroup}
        """
        MenuView.__init__(self)
        add_group = MenuItemView(MenuItemView.COMMAND,
                                 label="Add group",
                                 command= lambda:
                                 core._contactlist_manager.add_group())

        self.add_item(add_group)
        if amsn_group.id != 0:
            remove = MenuItemView(MenuItemView.COMMAND,
                                  label="Remove group",
                                  command= lambda:
                                  core._contactlist_manager.remove_group_gid(amsn_group.id))

            self.add_item(remove)