Show
Ignore:
Timestamp:
09/03/07 11:04:21 (15 months ago)
Author:
asterix
Message:

automaticaly fill password entry in groupchat invitation dialog if we get it. fixes #3271

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.11.1/src/dialogs.py

    r8660 r8698  
    11281128 
    11291129class JoinGroupchatWindow: 
    1130         def __init__(self, account, room_jid = '', nick = '', automatic = False): 
     1130        def __init__(self, account, room_jid = '', nick = '', password = '', 
     1131        automatic = False): 
    11311132                '''automatic is a dict like {'invities': []} 
    11321133                If automatic is not empty, this means room must be automaticaly configured 
     
    11521153                self._room_jid_entry = self.xml.get_widget('room_jid_entry') 
    11531154                self._nickname_entry = self.xml.get_widget('nickname_entry') 
     1155                self._password_entry = self.xml.get_widget('password_entry') 
    11541156 
    11551157                self._room_jid_entry.set_text(room_jid) 
    11561158                self._nickname_entry.set_text(nick) 
     1159                if password: 
     1160                        self._password_entry.set_text(password) 
    11571161                self.xml.signal_autoconnect(self) 
    11581162                gajim.interface.instances[account]['join_gc'] = self #now add us to open windows 
     
    12221226                nickname = self._nickname_entry.get_text().decode('utf-8') 
    12231227                room_jid = self._room_jid_entry.get_text().decode('utf-8') 
    1224                 password = self.xml.get_widget('password_entry').get_text().decode( 
    1225                         'utf-8') 
     1228                password = self._password_entry.get_text().decode('utf-8') 
    12261229                user, server, resource = helpers.decompose_jid(room_jid) 
    12271230                if not user or not server or resource: 
     
    22512254                self.room_jid = room_jid 
    22522255                self.account = account 
     2256                self.password = password 
    22532257                xml = gtkgui_helpers.get_glade('invitation_received_dialog.glade') 
    22542258                self.dialog = xml.get_widget('invitation_received_dialog') 
     
    22842288                self.dialog.destroy() 
    22852289                try: 
    2286                         JoinGroupchatWindow(self.account, self.room_jid) 
     2290                        JoinGroupchatWindow(self.account, self.room_jid, 
     2291                                password=self.password) 
    22872292                except GajimGeneralException: 
    22882293                        pass