Logo Search packages:      
Sourcecode: mago version File versions  Download package

def mago::application::gnome::Seahorse::new_key (   self,
  key_type 
)

It opens up the list of available new keys, and select the one to create.

@type key_type: string
@param key_type: The type of key to create. 

Definition at line 47 of file gnome.py.

00047                                :
        """
        It opens up the list of available new keys, and select the one to create.
        
        @type key_type: string
        @param key_type: The type of key to create. 
        """
        
        seahorse = ooldtp.context(self.name)
        
        try:
            mnu_new_key = seahorse.getchild(self.MNU_NEWKEY)
        except ldtp.LdtpExecutionError:
            raise ldtp.LdtpExecutionError, "The new key menu was not found."

        try:
            mnu_new_key.selectmenuitem() 
        except ldtp.LdtpExecutionError:
            raise ldtp.LdtpExecutionError, "There was a problem when selecting new key menu item."

        try:
            ldtp.waittillguiexist(self.NEWKEY_DLG)
            dlg_new_key = ooldtp.context(self.NEWKEY_DLG)
        except ldtp.LdtpExecutionError:
            raise ldtp.LdtpExecutionError, "The new key dialog was not found."

        try:
            table  = dlg_new_key.getchild(role = 'table')
            types_table = table[0]

            for i in range(0, types_table.getrowcount(), 1):
                text = types_table.getcellvalue(i, 1)
                candidate = text.split('\n')[0]
                if candidate == key_type:
                    types_table.selectrowindex(i)
                    break
                ldtp.wait(1)
        except ldtp.LdtpExecutionError:
            raise ldtp.LdtpExecutionError, "Error getting the key types table."

        try:
            btn_continue = dlg_new_key.getchild(self.BTN_CONTINUE)
        except ldtp.LdtpExecutionError:
            raise ldtp.LdtpExecutionError, "The continue button at the new key dialog was not found."

        try:
            btn_continue.click() 
        except ldtp.LdtpExecutionError:
            raise ldtp.LdtpExecutionError, "There was a problem when clicking the continue button."
        
    def new_pgp_key(self, full_name, email, comment, passphrase):


Generated by  Doxygen 1.6.0   Back to index