'Restore a previously backed up hosts file.
.. note:: This method is the slot responses to the signal from
ButtonRestore widget while the button is clicked.
This method would call
.. note:: No operations would be called if current session does not
have the privileges to change the hosts file.'

def on_Restore_clicked(self):

    if (not self._writable):
        self.warning_permission()
        return
    filename = ''
    if (self.platform == 'OS    X'):
        filename = ('/Users/' + filename)
    filepath = QtGui.QFileDialog.getOpenFileName(self, _translate('Util', 'Restore    hosts', None), QtCore.QString(filename), _translate('Util', 'Backup    File(*.bak)', None))
    if (unicode(filepath) != u''):
        shutil.copy2(unicode(filepath), self.hosts_path)
        self.info_complete()
