Show
Ignore:
Timestamp:
01/06/07 12:00:50 (23 months ago)
Author:
asterix
Message:

merge changeset from trunk except pyopenssl stuff

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.11/src/profile_window.py

    r7510 r7787  
    240240                                self.remove_statusbar, self.message_id) 
    241241                        gobject.source_remove(self.update_progressbar_timeout_id) 
    242                         # redraw progressbar after avatar is set so that windows is already 
    243                         # resized. Else progressbar is not correctly redrawn 
    244                         gobject.idle_add(self.progressbar.set_fraction, 0) 
     242                        self.progressbar.hide() 
     243                        self.progressbar.set_fraction(0) 
    245244                        self.update_progressbar_timeout_id = None 
    246245 
     
    300299                return vcard 
    301300 
    302         def on_publish_button_clicked(self, widget): 
     301        def on_ok_button_clicked(self, widget): 
    303302                if self.update_progressbar_timeout_id: 
    304303                        # Operation in progress 
     
    319318                self.message_id = self.statusbar.push(self.context_id, 
    320319                        _('Sending profile...')) 
     320                self.progressbar.show() 
    321321                self.update_progressbar_timeout_id = gobject.timeout_add(100, 
    322322                        self.update_progressbar) 
    323323 
    324324        def vcard_published(self): 
    325                 if self.message_id: 
    326                         self.statusbar.remove(self.context_id, self.message_id) 
    327                 self.message_id = self.statusbar.push(self.context_id, 
    328                         _('Information published')) 
    329                 self.remove_statusbar_timeout_id = gobject.timeout_add(3000, 
    330                         self.remove_statusbar, self.message_id) 
    331325                if self.update_progressbar_timeout_id is not None: 
    332326                        gobject.source_remove(self.update_progressbar_timeout_id) 
    333                         self.progressbar.set_fraction(0) 
    334327                        self.update_progressbar_timeout_id = None 
     328                self.window.destroy() 
    335329 
    336330        def vcard_not_published(self): 
     
    349343                        'try again later.')) 
    350344 
    351         def on_retrieve_button_clicked(self, widget): 
    352                 if self.update_progressbar_timeout_id: 
    353                         # Operation in progress 
    354                         return 
    355                 entries = ['FN', 'NICKNAME', 'BDAY', 'EMAIL_HOME_USERID', 'URL', 
    356                         'TEL_HOME_NUMBER', 'N_FAMILY', 'N_GIVEN', 'N_MIDDLE', 'N_PREFIX', 
    357                         'N_SUFFIX', 'ADR_HOME_STREET', 'ADR_HOME_EXTADR', 'ADR_HOME_LOCALITY', 
    358                         'ADR_HOME_REGION', 'ADR_HOME_PCODE', 'ADR_HOME_CTRY', 'ORG_ORGNAME', 
    359                         'ORG_ORGUNIT', 'TITLE', 'ROLE', 'ADR_WORK_STREET', 'ADR_WORK_EXTADR', 
    360                         'ADR_WORK_LOCALITY', 'ADR_WORK_REGION', 'ADR_WORK_PCODE', 
    361                         'ADR_WORK_CTRY'] 
    362                 if gajim.connections[self.account].connected > 1: 
    363                         # clear all entries 
    364                         for e in entries: 
    365                                 self.xml.get_widget(e + '_entry').set_text('') 
    366                         self.xml.get_widget('DESC_textview').get_buffer().set_text('') 
    367                         button = self.xml.get_widget('PHOTO_button') 
    368                         image = button.get_image() 
    369                         image.set_from_pixbuf(None) 
    370                         button.set_label(_('Click to set your avatar')) 
    371                         gajim.connections[self.account].request_vcard(self.jid) 
    372                 else: 
    373                         dialogs.ErrorDialog(_('You are not connected to the server'), 
    374                         _('Without a connection, you can not get your contact information.')) 
    375                 self.message_id = self.statusbar.push(self.context_id, 
    376                         _('Retrieving profile...')) 
    377                 self.update_progressbar_timeout_id = gobject.timeout_add(100, 
    378                         self.update_progressbar) 
    379  
    380         def on_close_button_clicked(self, widget): 
     345        def on_cancel_button_clicked(self, widget): 
    381346                self.window.destroy()