Ejemplo n.º 1
0
    def __init__(self, issingleton):
        self._logger = logging.getLogger('bigboard.Presence')
        
        if not issingleton == 42:
            raise Exception("use presence.get_presence()")

        self.__proxy = None
        self.__buddies = []
        mugshot.get_mugshot().connect("initialized", lambda mugshot: self.__on_reset())
Ejemplo n.º 2
0
 def __init__(self):
     self._fetcher = libbig.http.AsyncHTTPFetcher.getInstance()
     self._mugshot = mugshot.get_mugshot()
     self._baseurl = None
     self._mugshot.connect("initialized", lambda mugshot: self._sync_baseurl())
     self._profiles = {}
     self._callbacks = {}
Ejemplo n.º 3
0
 def __on_reset(self):
     if self.__proxy:
         self.__proxy.disconnect_from_signal("BuddyChanged")
         self.__proxy.disconnect_from_signal("BuddyListChanged")
     self.__proxy = mugshot.get_mugshot().get_im_proxy()
     if self.__proxy:
         self.__proxy.connect_to_signal("BuddyChanged", self.__on_buddy_changed)
         self.__proxy.connect_to_signal("BuddyListChanged", self.__reload_buddy_list)
         self.__reload_buddy_list()
Ejemplo n.º 4
0
 def __init__(self, *args, **kwargs):
     super(AbstractMugshotStock, self).__init__(*args, **kwargs)
     self._auth = False
     self.__have_contacts = False        
     self._mugshot_initialized = False
     self._dependent_handlers = []
     
     self._mugshot = mugshot.get_mugshot()
     self._mugshot.connect("initialized", lambda mugshot: self._on_mugshot_initialized())
     self._mugshot.connect("connection-status", lambda mugshot, auth, xmpp, contacts: self.__handle_mugshot_connection_status(auth, xmpp, contacts))  
     
     self.__cursize = None
     self.__box = hippo.CanvasBox()
Ejemplo n.º 5
0
    def __init__(self):
        super(PeopleStock, self).__init__("People", "People")
        
        self._mugshot = mugshot.get_mugshot()

        self._mugshot.connect("entity-added", self._handle_entity_added)
        self._mugshot.connect("self-changed", self._handle_self_changed)
        
        self._mugshot.get_self()
        self._mugshot.get_network()
        
        self._box = hippo.CanvasBox(orientation=hippo.ORIENTATION_VERTICAL, spacing=3)

        self._items = {}

        self._slideout = None
        self._slideout_item = None
Ejemplo n.º 6
0
 def __init__(self):
     super(SelfStock,self).__init__("Self", None)
     
     spider = identity_spider.IdentitySpider()
     self._mugshot = mugshot.get_mugshot()
     
     self._mugshot.connect("self-changed", self._handle_self_changed)
     
     self._mugshot.get_self()
     
     self._mugshot.connect('whereim-added', self._handle_whereim_added)
     
     self._box = hippo.CanvasBox()    
     
     self._namephoto_box = hippo.CanvasBox(orientation=hippo.ORIENTATION_HORIZONTAL)
     
     self._photo = CanvasURLImage()
     self._photo.connect("button-press-event", lambda button, event: self._on_edit_self())
     #self._photo.set_property("image-name", '/usr/share/pixmaps/nobody.png')
         
     self._namephoto_box.append(self._photo)
     
     self._name = hippo.CanvasText(text=spider.get_self_name())
     self._photo.connect("button-press-event", lambda button, event: self._on_edit_self())        
     self.append_bull(self._namephoto_box, self._name)        
     
     self._box.append(self._namephoto_box)
     
     self._whereim_box = hippo.CanvasBox(orientation=hippo.ORIENTATION_HORIZONTAL, spacing=2)
     self._whereim_box.set_property("padding-top", 4)
     
     self._box.append(self._whereim_box)
     
     self._whereim = {}
     
     self._mugshot.get_whereim()