removed button became inactive if there are
no selected rows
This commit is contained in:
parent
9aae8dadbb
commit
4de1ac6e46
1 changed files with 3 additions and 2 deletions
|
@ -1140,7 +1140,7 @@ class PopupNotificationWindow:
|
||||||
keyID = ''
|
keyID = ''
|
||||||
attached_keys = gajim.config.get_per('accounts', self.account,
|
attached_keys = gajim.config.get_per('accounts', self.account,
|
||||||
'attached_gpg_keys').split()
|
'attached_gpg_keys').split()
|
||||||
if jid in attached_keys:
|
if self.jid in attached_keys:
|
||||||
keyID = attached_keys[attached_keys.index(jid) + 1]
|
keyID = attached_keys[attached_keys.index(jid) + 1]
|
||||||
contact = Contact(jid = self.jid, name = self.jid.split('@')[0],
|
contact = Contact(jid = self.jid, name = self.jid.split('@')[0],
|
||||||
groups = [_('not in the roster')], show = 'not in the roster',
|
groups = [_('not in the roster')], show = 'not in the roster',
|
||||||
|
@ -1405,6 +1405,7 @@ class FileTransfersWindow:
|
||||||
self.tree = self.xml.get_widget('transfers_list')
|
self.tree = self.xml.get_widget('transfers_list')
|
||||||
self.stop_button = self.xml.get_widget('stop_button')
|
self.stop_button = self.xml.get_widget('stop_button')
|
||||||
self.pause_button = self.xml.get_widget('pause_restore_button')
|
self.pause_button = self.xml.get_widget('pause_restore_button')
|
||||||
|
self.remove_button = self.xml.get_widget('remove_button')
|
||||||
self.notify_ft_checkbox = \
|
self.notify_ft_checkbox = \
|
||||||
self.xml.get_widget('notify_ft_complete_checkbox')
|
self.xml.get_widget('notify_ft_complete_checkbox')
|
||||||
notify = gajim.config.get('notify_on_file_complete')
|
notify = gajim.config.get('notify_on_file_complete')
|
||||||
|
@ -1660,6 +1661,7 @@ class FileTransfersWindow:
|
||||||
selected_path = self.model.get_path(selected[1])
|
selected_path = self.model.get_path(selected[1])
|
||||||
if selected_path == path:
|
if selected_path == path:
|
||||||
is_selected = True
|
is_selected = True
|
||||||
|
self.remove_button.set_property('sensitive', selected[1] == None)
|
||||||
sid = self.model[current_iter][4]
|
sid = self.model[current_iter][4]
|
||||||
file_props = self.files_props[sid[0]][sid[1:]]
|
file_props = self.files_props[sid[0]][sid[1:]]
|
||||||
if self.is_transfer_stoped(file_props):
|
if self.is_transfer_stoped(file_props):
|
||||||
|
@ -1676,7 +1678,6 @@ class FileTransfersWindow:
|
||||||
self.pause_button.set_label(_('_Continue'))
|
self.pause_button.set_label(_('_Continue'))
|
||||||
else:
|
else:
|
||||||
self.pause_button.set_property('sensitive', False)
|
self.pause_button.set_property('sensitive', False)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def on_remove_button_clicked(self, widget):
|
def on_remove_button_clicked(self, widget):
|
||||||
|
|
Loading…
Add table
Reference in a new issue