Ejemplo n.º 1
0
 def add_favorite(self, arg=None, menuw=None):
     """ Add a program to favorites """
     logger.log( 9, 'add_favorite(arg=%r, menuw=%r)', arg, menuw)
     if menuw:
         menuw.delete_submenu(refresh=False)
     # create a favorite
     fav = Favorite(self.title, self.prog, True, True, True, -1, True, False)
     logger.log( 9, 'self.title=%r, self.prog=%r, fav.__dict__=%r)', self.title, self.prog, fav.__dict__)
     # and a favorite item which represents the submen
     fav_item = FavoriteItem(self, fav, fav_action='add')
     # and open that submenu
     fav_item.display_submenu(menuw=menuw)
Ejemplo n.º 2
0
 def add_favorite(self, arg=None, menuw=None):
     """ Add a program to favorites """
     logger.log(9, 'add_favorite(arg=%r, menuw=%r)', arg, menuw)
     if menuw:
         menuw.delete_submenu(refresh=False)
     # create a favorite
     fav = Favorite(self.title, self.prog, True, True, True, -1, True,
                    False)
     logger.log(9, 'self.title=%r, self.prog=%r, fav.__dict__=%r)',
                self.title, self.prog, fav.__dict__)
     # and a favorite item which represents the submen
     fav_item = FavoriteItem(self, fav, fav_action='add')
     # and open that submenu
     fav_item.display_submenu(menuw=menuw)
Ejemplo n.º 3
0
    def edit_favorite(self, arg=None, menuw=None):
        """
        Edit the settings of a favorite
        """
        logger.log(9, 'edit_favorite(arg=%r, menuw=%r)', arg, menuw)
        if menuw:
            menuw.delete_submenu(refresh=False)

        # get the favorite from the record client
        (got_fav, fav) = self.recordclient.getFavoriteObjectNow(self.prog)
        if got_fav:
            # create a favorite item for the submenu
            fav_item = FavoriteItem(self, fav, fav_action='edit')
            # and open the submenu
            fav_item.display_submenu(menuw=menuw)
        else:
            dialog.show_alert(_('Cannot edit favorite %s') % self.name)
Ejemplo n.º 4
0
    def edit_favorite(self, arg=None, menuw=None):
        """
        Edit the settings of a favorite
        """
        logger.log( 9, 'edit_favorite(arg=%r, menuw=%r)', arg, menuw)
        if menuw:
            menuw.delete_submenu(refresh=False)

        # get the favorite from the record client
        (got_fav, fav) = self.recordclient.getFavoriteObjectNow(self.prog)
        if got_fav:
            # create a favorite item for the submenu
            fav_item = FavoriteItem(self, fav, fav_action='edit')
            # and open the submenu
            fav_item.display_submenu(menuw=menuw)
        else:
            dialog.show_alert(_('Cannot edit favorite %s') % self.name)