Show
Ignore:
Timestamp:
01/13/07 23:35:41 (23 months ago)
Author:
asterix
Message:

merge diff from trunc to 0.11 branch

Files:
1 modified

Legend:

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

    r7662 r7829  
    267267                if self.data_form_widget.get_data_form() is None: 
    268268                        self.data_form_widget.hide() 
     269                else: 
     270                        self.data_form_widget.data_form.type='submit' 
    269271 
    270272                self.close_button.set_sensitive(True) 
     
    297299                                # FIXME: translate 
    298300                                self.stage5(error='Service sent malformed data', senderror=True) 
     301                                return 
    299302                        self.data_form_widget.show() 
     303                        if self.data_form_widget.title: 
     304                                self.window.set_title("%s - Ad-hoc Commands - Gajim" % \ 
     305                                        self.data_form_widget.title) 
    300306                else: 
    301307                        self.data_form_widget.hide() 
     
    466472#                       cmdnode.addChild(node=dataforms.DataForm(tofill=self.data_form_widget.data_form)) 
    467473                        # FIXME: simplified form to send 
     474                         
    468475                        cmdnode.addChild(node=self.data_form_widget.data_form) 
    469476 
     
    481488                '''Send the command with action='cancel'. ''' 
    482489                assert self.commandnode is not None 
    483                 if self.sessionid is not None: 
     490                if self.sessionid is not None and self.account.connection: 
    484491                        # we already have sessionid, so the service sent at least one reply. 
    485492                        stanza = xmpp.Iq(typ='set', to=self.jid) 
     
    490497                                        'action':'cancel' 
    491498                                }) 
    492          
     499 
    493500                        self.account.connection.send(stanza) 
    494501                else: