ChooseGPGDialog is back with run() (We need to wait for the answer before continuing) and this cause NO PB with keepalive
This commit is contained in:
parent
ccaf468fd9
commit
7e225fcf7d
|
@ -1365,7 +1365,7 @@ _('There was a problem retrieving your GPG secret keys.')).get_response()
|
|||
secret_keys['None'] = 'None'
|
||||
instance = dialogs.ChooseGPGKeyDialog(_('Passphrase'),
|
||||
_('Choose your OpenPGP key'), secret_keys)
|
||||
keyID = instance.keyID
|
||||
keyID = instance.run()
|
||||
if keyID is None:
|
||||
return
|
||||
checkbutton = self.xml.get_widget('gpg_save_password_checkbutton')
|
||||
|
|
|
@ -165,7 +165,6 @@ class ChooseGPGKeyDialog:
|
|||
self.window = xml.get_widget('choose_gpg_key_dialog')
|
||||
self.window.set_title(title_text)
|
||||
self.keys_treeview = xml.get_widget('keys_treeview')
|
||||
self.keyID = None
|
||||
prompt_label = xml.get_widget('prompt_label')
|
||||
prompt_label.set_text(prompt_text)
|
||||
model = gtk.ListStore(str, str)
|
||||
|
@ -178,18 +177,18 @@ class ChooseGPGKeyDialog:
|
|||
self.keys_treeview.insert_column_with_attributes(-1, _('Contact name'),
|
||||
renderer, text = 1)
|
||||
self.fill_tree(secret_keys, selected)
|
||||
|
||||
xml.signal_autoconnect(self)
|
||||
self.window.show_all()
|
||||
|
||||
def on_choose_gpg_key_dialog_response(self, widget, response_id):
|
||||
'''If OK button was pressed return the selected key'''
|
||||
if response_id == gtk.RESPONSE_OK:
|
||||
def run(self):
|
||||
rep = self.window.run()
|
||||
if rep == gtk.RESPONSE_OK:
|
||||
selection = self.keys_treeview.get_selection()
|
||||
(model, iter) = selection.get_selected()
|
||||
self.keyID = [ model[iter][0], model[iter][1] ]
|
||||
|
||||
keyID = [ model[iter][0], model[iter][1] ]
|
||||
else:
|
||||
keyID = None
|
||||
self.window.destroy()
|
||||
return keyID
|
||||
|
||||
def fill_tree(self, list, selected):
|
||||
model = self.keys_treeview.get_model()
|
||||
|
|
|
@ -9650,7 +9650,7 @@ Custom</property>
|
|||
<property name="title" translatable="yes"></property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="default_width">550</property>
|
||||
<property name="default_height">300</property>
|
||||
<property name="resizable">True</property>
|
||||
|
@ -9661,8 +9661,6 @@ Custom</property>
|
|||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="has_separator">True</property>
|
||||
<signal name="key_press_event" handler="on_Passphrase_key_press_event" last_modification_time="Thu, 07 Oct 2004 14:25:48 GMT"/>
|
||||
<signal name="response" handler="on_choose_gpg_key_dialog_response" last_modification_time="Fri, 22 Jul 2005 22:35:39 GMT"/>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="vbox33">
|
||||
|
|
|
@ -740,7 +740,7 @@ class RosterWindow:
|
|||
public_keys['None'] = 'None'
|
||||
instance = dialogs.ChooseGPGKeyDialog(_('Assign OpenPGP Key'),
|
||||
_('Select a key to apply to the contact'), public_keys, keyID)
|
||||
keyID = instance.keyID
|
||||
keyID = instance.run()
|
||||
if keyID is None:
|
||||
return
|
||||
if keyID[0] == 'None':
|
||||
|
|
Loading…
Reference in New Issue