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

def simple-restore-gnome::SRestoreGTK::restore_as (   self,
  args 
)

Restore selected path to a specific location

Definition at line 411 of file simple-restore-gnome.py.

00411                                   :
            """ Restore selected path to a specific location"""
            iter = self._restore_init()
            if self.treestore.iter_children( iter ):
                  # is a directory
                  dialog = gtk.FileChooserDialog(title=_("Select restore location") ,action=gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK))
                  dialog.set_filename( self.src )
                  result = dialog.run()
                  filename = dialog.get_filename()
                  dialog.destroy()

                  if result == gtk.RESPONSE_OK:
                        self._do_restore( self.src, filename )
            else:
                  dialog = gtk.FileChooserDialog(title=_("Select restore location") ,action=gtk.FILE_CHOOSER_ACTION_SAVE, buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK))
                  dialog.set_filename( self.src )
                  dialog.set_current_name( self.src )
                  result = dialog.run()
                  filename = dialog.get_filename()
                  dialog.destroy()
                  
                  if result == gtk.RESPONSE_OK:
                        self._do_restore( self.src, filename )


if __name__ == '__main__':


Generated by  Doxygen 1.6.0   Back to index