#2605 LOW Untriag: OK button in Journal Trial-2 backup function error dialogs doesn't function (patch included)

Zarro Boogs per Child bugtracker at laptop.org
Tue Jul 31 11:21:04 EDT 2007


#2605: OK button in Journal Trial-2 backup function error dialogs doesn't function
(patch included)
------------------------------+---------------------------------------------
 Reporter:  tim.millerdyck    |       Owner:  tomeu    
     Type:  defect            |      Status:  new      
 Priority:  low               |   Milestone:  Untriaged
Component:  journal-activity  |     Version:           
 Keywords:                    |    Verified:  0        
------------------------------+---------------------------------------------
 The confirmation OK button in journal backup error dialog boxes is non-
 working. The dialog doesn't close when when clicking the OK button or
 pressing Enter or spacebar. You can still close the window using the
 window top-right X button, however.

 I'm not sure how long this code will last as it appears to be just for
 Trial 2 but if it is helpful, a patch to add this functionality to the two
 dialogs is below.

 Found and fix tested with build 538/qemu.

 To reproduce:
 Click the backup tab and then the backup button in Journal

 Output from git-diff:

 {{{
 diff --git a/backup.py b/backup.py
 index 2dee6a4..09a94f1 100644
 --- a/backup.py
 +++ b/backup.py
 @@ -135,7 +135,9 @@ class BackupDialog(gtk.Dialog):
              dlg = gtk.MessageDialog(None, gtk.DIALOG_MODAL,
 gtk.MESSAGE_ERROR,
                                      gtk.BUTTONS_OK,
                                      "Backup failed:\n%s" %
 self._thread.errmsg(
 +             dlg.set_default_response(gtk.RESPONSE_ACCEPT)
              dlg.run()
 +             dlg.destroy()
          elif self._thread.isAlive():
              self._thread.kill()

 @@ -147,7 +149,9 @@ def backup_gui():
      except RuntimeError, e:
          dlg = gtk.MessageDialog(None, gtk.DIALOG_MODAL,
 gtk.MESSAGE_ERROR, \
                                  gtk.BUTTONS_OK, 'Backup failed: %s' %
 str(e))
 +         dlg.set_default_response(gtk.RESPONSE_ACCEPT)
          dlg.run()
 +         dlg.destroy()

  def backup_cron():
 }}}

-- 
Ticket URL: <https://dev.laptop.org/ticket/2605>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list