Browse Source

Delete confirmation

master
Julio Biason 15 years ago
parent
commit
bbdb6c3443
  1. 8
      issues/issue-1ba42d0de5892489e7366fd1e73dc9e818868026.yaml
  2. 12
      mitterlib/ui/ui_pygtk.py

8
issues/issue-1ba42d0de5892489e7366fd1e73dc9e818868026.yaml

@ -5,8 +5,8 @@ type: :feature
component: pygtk component: pygtk
release: 1.0.0 release: 1.0.0
reporter: Julio Biason <julio.biason@gmail.com> reporter: Julio Biason <julio.biason@gmail.com>
status: :unstarted status: :closed
disposition: disposition: :fixed
creation_time: 2009-12-23 21:56:05.062614 Z creation_time: 2009-12-23 21:56:05.062614 Z
references: [] references: []
@ -16,3 +16,7 @@ log_events:
- Julio Biason <julio.biason@gmail.com> - Julio Biason <julio.biason@gmail.com>
- created - created
- "" - ""
- - 2009-12-25 20:55:06.402541 Z
- Julio Biason <julio.biason@gmail.com>
- closed with disposition fixed
- ""

12
mitterlib/ui/ui_pygtk.py

@ -884,6 +884,18 @@ class Interface(object):
(model, iter) = self._grid.get_selection().get_selected() (model, iter) = self._grid.get_selection().get_selected()
message = model.get_value(iter, 0) message = model.get_value(iter, 0)
confirm = gtk.MessageDialog(parent=self._main_window,
type=gtk.MESSAGE_QUESTION,
message_format='Delete this message?',
buttons=gtk.BUTTONS_YES_NO);
option = confirm.run()
confirm.hide()
_log.debug("Option selected: %s" % (option))
if option == -9:
_log.debug("Delete cancelled");
return False
self._update_statusbar('Deleting message...') self._update_statusbar('Deleting message...')
self._delete_iter = iter self._delete_iter = iter
_log.debug('Deleting messing %d', message.id) _log.debug('Deleting messing %d', message.id)

Loading…
Cancel
Save