~muelnet/heybuddy/remote_users

« back to all changes in this revision

Viewing changes to heybuddy.py

  • Committer: jezra
  • Date: 2011-01-22 03:39:12 UTC
  • Revision ID: jezra@jezra.net-20110122033912-qkpn7ud3zl276kce
I bet the horseshit time fucking shit will make lots of shit break

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
                self.comm.connect('widget-image',self.process_widget_image)
147
147
                self.comm.connect('direct-messageXML',self.process_new_directXML)
148
148
                self.comm.connect('verify_credentialsXML',self.process_verifycredentialsXML)
 
149
                self.comm.connect('configXML',self.process_configXML)
149
150
                #create an image cacher thingy
150
151
                self.imagecache = ImageCache()
151
152
                self.imagecache.set_disabled( self.conf.get_bool_option('no_avatars') )
168
169
                        self.mainwindow.set_icon_from_file(self.default_icon_path)
169
170
                except:
170
171
                        pass
 
172
                self.mainwindow.set_textlimit( self.conf.textlimit() )  
171
173
                self.mainwindow.connect('quit', self.quit_triggered )
172
174
                self.mainwindow.connect('window-to-tray', self.window_to_tray )
173
175
                self.mainwindow.connect('update-status',self.update_status)
308
310
                if n!=self.conf.name() or p!=self.conf.password() or s!=self.conf.service():
309
311
                        #check if these are valid
310
312
                        self.mainwindow.set_message(_("Authenticating account..."))
 
313
                        self.increment_requests()
311
314
                        self.comm.verify_credentials(n, p, s)
312
315
                        
313
316
        def increment_requests(self):
348
351
                #update the comm
349
352
                self.comm.set_name_and_password( n,p )
350
353
                self.comm.set_service( s )
351
 
                #switch to the dents page
352
 
                self.mainwindow.set_notebook_page(DENT) 
353
 
                self.get_statuses()
354
 
 
 
354
                
355
355
        def get_statuses(self,count="20"):
356
356
                if self.credentials_verified:
357
357
                        #do some time handling for the good doctor
542
542
                self.mainwindow.message_label.hide()
543
543
                (n, p, s) = data
544
544
                self.valid_account_info(n, p, s)
 
545
                #get the config
 
546
                self.comm.get_config()
 
547
                #switch to the dents page
 
548
                self.mainwindow.set_notebook_page(DENT) 
 
549
                self.get_statuses()
545
550
 
546
551
        def process_conversationXML(self,object,text,conversation_id):
547
552
                self.decrement_requests()
561
566
                                #recursively get in_reply_to_ids
562
567
                                self.get_conversation(id=data['in_reply_to_id'],conversation_id=conversation_id)
563
568
 
 
569
        def process_configXML(self, object, text):
 
570
                self.decrement_requests()
 
571
                server = self.xmlprocessor.get_server_config(text)
 
572
                self.conf.textlimit( server['textlimit'] )
 
573
                self.conf.save()
 
574
                self.mainwindow.set_textlimit( self.conf.textlimit() )
 
575
 
564
576
        def connect_dent(self,data,target_page,is_conv=False,conv_backwards=False,is_direct_dent=False):
565
577
                #make the dent
566
578
                dent = Dent(data,is_direct=is_direct_dent)