Example #1
0
    def on_search_buddies_clicked(self, widget):
        """
        Callback of the search buddies button
        """
        self.lock()

        fm = FileManager()

        #create a filter object
        filter = Filter(FilterType.BUDDY_FILTER, self.parenttab)
        filter.playerlist = fm.get_buddies()
        self.parenttab.set_all_buddies_to_offline()
        gc = GuiController()
        gc.executeMasterServerQuery(filter, self.parenttab)
Example #2
0
 def on_search_buddies_clicked(self, widget):
     """
     Callback of the search buddies button
     """
     self.lock()
     
     fm = FileManager()
     
     #create a filter object
     filter = Filter(FilterType.BUDDY_FILTER, self.parenttab)
     filter.playerlist = fm.get_buddies()
     self.parenttab.set_all_buddies_to_offline()
     gc = GuiController()
     gc.executeMasterServerQuery(filter, self.parenttab) 
Example #3
0
    def on_search_player_clicked(self, widget):
        """
        Callback of the player search button
        """
        self.search_button.set_sensitive(False)
        self.playersearchbutton.set_sensitive(False)

        name2search = self.playersearch_entry.get_text()
        searchname_list = []
        searchname_list.append(name2search)

        #create the filter object
        filter = Filter(FilterType.BUDDY_FILTER)
        filter.playerlist = searchname_list
        self.parenttab.set_all_buddies_to_offline()
        gc = GuiController()
        gc.executeMasterServerQuery(filter, self.parenttab)
Example #4
0
 def on_search_player_clicked(self, widget):
     """
     Callback of the player search button
     """
     self.search_button.set_sensitive(False)
     self.playersearchbutton.set_sensitive(False)
     
     name2search = self.playersearch_entry.get_text()
     searchname_list = []
     searchname_list.append(name2search)
     
     #create the filter object
     filter = Filter(FilterType.BUDDY_FILTER)
     filter.playerlist = searchname_list
     self.parenttab.set_all_buddies_to_offline()
     gc = GuiController()
     gc.executeMasterServerQuery(filter, self.parenttab) 
Example #5
0
    def load_buddies(self, tab, execute):
        """
        Loads the buddylist and append the values to the treeview on the 
        passed tab 
        
        @param tab - the tab requesting the buddylist
        @execute - boolean value. If True immediately start a buddy search after
                   loading the buddylist
        """
        Log.log.debug('[GuiController] load_buddies called...')
        fm = FileManager()
        buddylist = fm.get_buddies()
        for name in buddylist:
            gobject.idle_add(tab.append_buddy_to_list, name)

        
        if execute:
            tab.filter.lock()
        
            #create a filter object
            filter = Filter(FilterType.BUDDY_FILTER, tab)
            filter.playerlist = fm.get_buddies()
            tab.set_all_buddies_to_offline()
            self.executeMasterServerQuery(filter, tab)