Menu File Backup/Restore your data
This commit is contained in:
parent
109ea9f0fb
commit
46e4c88f2a
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@ src/dist
|
||||||
src/.project
|
src/.project
|
||||||
src/.pydevproject
|
src/.pydevproject
|
||||||
src/.settings/
|
src/.settings/
|
||||||
|
src/bitmessageqt/treedirectory.ui
|
|
@ -26,7 +26,6 @@ from help import *
|
||||||
from iconglossary import *
|
from iconglossary import *
|
||||||
from connect import *
|
from connect import *
|
||||||
import sys
|
import sys
|
||||||
import shutil
|
|
||||||
from time import strftime, localtime, gmtime
|
from time import strftime, localtime, gmtime
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
|
@ -38,6 +37,8 @@ from debug import logger
|
||||||
import subprocess
|
import subprocess
|
||||||
import datetime
|
import datetime
|
||||||
from helper_sql import *
|
from helper_sql import *
|
||||||
|
from backuprestore import *
|
||||||
|
import shutil
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
@ -126,10 +127,8 @@ class MyForm(QtGui.QMainWindow):
|
||||||
# FILE MENU and other buttons
|
# FILE MENU and other buttons
|
||||||
QtCore.QObject.connect(self.ui.actionExit, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.ui.actionExit, QtCore.SIGNAL(
|
||||||
"triggered()"), self.quit)
|
"triggered()"), self.quit)
|
||||||
#mj
|
|
||||||
QtCore.QObject.connect(self.ui.actionBackup, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.ui.actionBackup, QtCore.SIGNAL(
|
||||||
"triggered()"), self.click_actionBackup)
|
"triggered()"), self.click_actionBackup)
|
||||||
#mj
|
|
||||||
QtCore.QObject.connect(self.ui.actionManageKeys, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.ui.actionManageKeys, QtCore.SIGNAL(
|
||||||
"triggered()"), self.click_actionManageKeys)
|
"triggered()"), self.click_actionManageKeys)
|
||||||
QtCore.QObject.connect(self.ui.actionDeleteAllTrashedMessages, QtCore.SIGNAL(
|
QtCore.QObject.connect(self.ui.actionDeleteAllTrashedMessages, QtCore.SIGNAL(
|
||||||
|
@ -1129,14 +1128,13 @@ class MyForm(QtGui.QMainWindow):
|
||||||
sqlStoredProcedure('deleteandvacuume')
|
sqlStoredProcedure('deleteandvacuume')
|
||||||
|
|
||||||
def click_actionBackup(self):
|
def click_actionBackup(self):
|
||||||
#mj
|
self.backuprestoreDilaugeInstance = NewBackupRestoreDialog(self)
|
||||||
#d = os.path.dirname(f)
|
if self.backuprestoreDilaugeInstance.exec_():
|
||||||
if not os.path.exists('./Backup'):
|
pass
|
||||||
os.makedirs('./Backup')
|
#queryreturn = sqlQuery('''DETACH BackupDB;''')
|
||||||
|
#load the inbox and sendbox after restoring data
|
||||||
shutil.copyfile('C:\\Users\\mjha\\Dropbox\\semester Three\\software_engineering\\paper\\1988Hare.pdf','./Backup/1988.pdf')
|
#self.loadInbox()
|
||||||
return
|
#self.loadSent()
|
||||||
|
|
||||||
|
|
||||||
def click_actionRegenerateDeterministicAddresses(self):
|
def click_actionRegenerateDeterministicAddresses(self):
|
||||||
self.regenerateAddressesDialogInstance = regenerateAddressesDialog(
|
self.regenerateAddressesDialogInstance = regenerateAddressesDialog(
|
||||||
|
@ -2316,6 +2314,9 @@ class MyForm(QtGui.QMainWindow):
|
||||||
currentInboxRow, 0).data(Qt.UserRole).toPyObject())
|
currentInboxRow, 0).data(Qt.UserRole).toPyObject())
|
||||||
fromAddressAtCurrentInboxRow = str(self.ui.tableWidgetInbox.item(
|
fromAddressAtCurrentInboxRow = str(self.ui.tableWidgetInbox.item(
|
||||||
currentInboxRow, 1).data(Qt.UserRole).toPyObject())
|
currentInboxRow, 1).data(Qt.UserRole).toPyObject())
|
||||||
|
Date = self.ui.tableWidgetInbox.item(
|
||||||
|
currentInboxRow, 3).data(Qt.UserRole).toPyObject()
|
||||||
|
|
||||||
if toAddressAtCurrentInboxRow == self.str_broadcast_subscribers:
|
if toAddressAtCurrentInboxRow == self.str_broadcast_subscribers:
|
||||||
self.ui.labelFrom.setText('')
|
self.ui.labelFrom.setText('')
|
||||||
elif not shared.config.has_section(toAddressAtCurrentInboxRow):
|
elif not shared.config.has_section(toAddressAtCurrentInboxRow):
|
||||||
|
@ -3166,7 +3167,6 @@ class newChanDialog(QtGui.QDialog):
|
||||||
self.ui.groupBoxCreateChan.setHidden(True)
|
self.ui.groupBoxCreateChan.setHidden(True)
|
||||||
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
|
QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
|
||||||
|
|
||||||
|
|
||||||
class iconGlossaryDialog(QtGui.QDialog):
|
class iconGlossaryDialog(QtGui.QDialog):
|
||||||
|
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
|
@ -3307,3 +3307,165 @@ def run():
|
||||||
if shared.safeConfigGetBoolean('bitmessagesettings', 'dontconnect'):
|
if shared.safeConfigGetBoolean('bitmessagesettings', 'dontconnect'):
|
||||||
myapp.showConnectDialog() # ask the user if we may connect
|
myapp.showConnectDialog() # ask the user if we may connect
|
||||||
sys.exit(app.exec_())
|
sys.exit(app.exec_())
|
||||||
|
|
||||||
|
class NewBackupRestoreDialog(QtGui.QDialog):
|
||||||
|
|
||||||
|
def __init__(self, parent):
|
||||||
|
QtGui.QWidget.__init__(self, parent)
|
||||||
|
self.ui = Ui_BackupRestore()
|
||||||
|
self.ui.setupUi(self)
|
||||||
|
self.parent = parent
|
||||||
|
self.RestorePath = 'None'
|
||||||
|
QtCore.QObject.connect(self.ui.BackupRestorebuttonBox, QtCore.SIGNAL("accepted()"), self.BackupRestoreaccepted)
|
||||||
|
QtCore.QObject.connect(self.ui.pushButton_browse, QtCore.SIGNAL("clicked()"), self.selectDirectory)
|
||||||
|
|
||||||
|
def verify_form(self):
|
||||||
|
if not self.ui.checkBox_Default_directory.isChecked() and str(self.ui.lineEdit_directory_name.text())== '' :
|
||||||
|
QtGui.QMessageBox.information(
|
||||||
|
self, 'Message', 'Please Select the default direcotry checkbox or provide the directory of your choice', QtGui.QMessageBox.Ok)
|
||||||
|
self.parent.click_actionBackup() #call the backup function again
|
||||||
|
return False
|
||||||
|
elif (self.ui.radioButton_Backup.isChecked() or self.ui.radioButton_Restore.isChecked()):
|
||||||
|
if not (self.ui.checkBox_inbox_only.isChecked() or self.ui.checkBox_messages.isChecked() or self.ui.checkBox_keys.isChecked()):
|
||||||
|
QtGui.QMessageBox.information(
|
||||||
|
self, 'Message', 'Please select at least one of the files to backup/restore', QtGui.QMessageBox.Ok)
|
||||||
|
self.parent.click_actionBackup() #call the backup function again
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
elif self.ui.radioButton_DeleteBackup.isChecked():
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def checkPermission(self): #check permission to execute in directory
|
||||||
|
if self.ui.radioButton_Backup or self.ui.radioButton_DeleteBackup:
|
||||||
|
#check for permission to execute in directory
|
||||||
|
try:
|
||||||
|
if not os.access(self.RestorePath, os.X_OK):
|
||||||
|
QtGui.QMessageBox.information(
|
||||||
|
self, 'Message', 'No Execute Permission for ' + self.RestorePath + 'directory. Please check your permissions of your direcotry', QtGui.QMessageBox.Ok)
|
||||||
|
except ValueError, e:
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'Error : ' + e, QtGui.QMessageBox.Ok)
|
||||||
|
return True
|
||||||
|
elif self.ui.radioButton_Restore:
|
||||||
|
#check for Read permission of the directory where user has specified
|
||||||
|
try:
|
||||||
|
if not os.access(self.RestorePath, os.R_OK):
|
||||||
|
QtGui.QMessageBox.information(
|
||||||
|
self, 'Message', 'No Execute Permission for ' + self.RestorePath + 'directory. Please check your permissions of your direcotry', QtGui.QMessageBox.Ok)
|
||||||
|
except ValueError, e:
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'Error : ' + e, QtGui.QMessageBox.Ok)
|
||||||
|
#if none of the previous condition satisfy just return false
|
||||||
|
return False
|
||||||
|
|
||||||
|
def BackupRestoreaccepted(self):
|
||||||
|
if self.verify_form(): #verify if the form was correctly filled by the user or not
|
||||||
|
#get the valid path:
|
||||||
|
if self.ui.checkBox_Default_directory.isChecked():
|
||||||
|
#self.RestorePath = shared.lookupAppdataFolder() + 'backup' + os.altsep
|
||||||
|
self.RestorePath = '.'+ os.altsep + 'backup' + os.altsep
|
||||||
|
else:
|
||||||
|
if not os.path.exists(str(self.ui.lineEdit_directory_name.text())):
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'The Given Directory Does not Exist', QtGui.QMessageBox.Ok)
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
self.RestorePath = str(self.ui.lineEdit_directory_name.text())+ os.altsep
|
||||||
|
if self.RestorePath == shared.appdata:
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'You provided the directory which is currently being used for live *.dat files. Please provide other directory', QtGui.QMessageBox.Ok)
|
||||||
|
#self.parent.click_actionBackup() #call the backup function again
|
||||||
|
return
|
||||||
|
# if self.checkPermission(): can be implemented in future to check the permissions as the number of data-files grow
|
||||||
|
# Creating Backup
|
||||||
|
if self.ui.radioButton_Backup.isChecked():
|
||||||
|
if not os.path.exists(self.RestorePath):
|
||||||
|
try:
|
||||||
|
reply = QtGui.QMessageBox.question(self, 'Message', 'Provided directory does not exist. Do you want Pybitmessage to create it? ', QtGui.QMessageBox.Yes , QtGui.QMessageBox.No)
|
||||||
|
if reply == QtGui.QMessageBox.Yes:
|
||||||
|
os.makedirs(self.RestorePath)
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
except ValueError, e:
|
||||||
|
QtGui.QMessageBox.information(self, 'Info Message', 'Unable to create backup directory. Error: ' + e ,QMessageBox.Ok)
|
||||||
|
if self.ui.checkBox_keys.isChecked():
|
||||||
|
try:
|
||||||
|
shutil.copyfile(shared.appdata + 'keys.dat' , self.RestorePath + 'keys.dat',)
|
||||||
|
except IOError, e:
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'Unable to Backup keys.dat Error' + e, QtGui.QMessageBox.Ok)
|
||||||
|
if self.ui.checkBox_messages.isChecked():
|
||||||
|
try:
|
||||||
|
shutil.copyfile(shared.appdata + 'messages.dat', self.RestorePath + 'messages.dat')
|
||||||
|
except IOError, e:
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'Unable to backup messages.dat' + e, QtGui.QMessageBox.Ok)
|
||||||
|
|
||||||
|
#Restoring files
|
||||||
|
elif self.ui.radioButton_Restore.isChecked():
|
||||||
|
if not os.path.exists(self.RestorePath):
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'No backup exists to be restored.', QtGui.QMessageBox.Ok)
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
if self.ui.checkBox_keys.isChecked():
|
||||||
|
if not os.path.exists(self.RestorePath + 'keys.dat'):
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'No Keys.dat exists to be restored.', QtGui.QMessageBox.Ok)
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
shutil.copyfile(self.RestorePath + 'keys.dat', shared.appdata + 'keys.dat')
|
||||||
|
except IOError, e:
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'Unable to restore keys.dat Error: ' + e, QtGui.QMessageBox.Ok)
|
||||||
|
|
||||||
|
if self.ui.checkBox_messages.isChecked() and self.ui.checkBox_messages.isEnabled(): # need to provide functionality to restore the inbox only or sent only
|
||||||
|
if not os.path.exists(self.RestorePath + 'keys.dat'):
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'No messages.dat exists to be restored.', QtGui.QMessageBox.Ok)
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
shutil.copyfile(self.RestorePath + 'messages.dat', shared.appdata + 'messages.dat')
|
||||||
|
except IOError, e:
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'Unable to restore message.dat Error' + e, QtGui.QMessageBox.Ok)
|
||||||
|
# load the inbox and sent after loading the data
|
||||||
|
self.parent.loadInbox();
|
||||||
|
self.parent.loadSent();
|
||||||
|
|
||||||
|
elif self.ui.checkBox_inbox_only.isChecked() and self.ui.checkBox_inbox_only.isEnabled(): # checkbox_messages and checkBox_inbox_only are mutually exclusive restoration
|
||||||
|
try:
|
||||||
|
if not os.path.exists(self.RestorePath + 'messages.dat'):
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'No messages.dat exists to be restored.', QtGui.QMessageBox.Ok)
|
||||||
|
else:
|
||||||
|
queryreturn1 = sqlQuery('''ATTACH DATABASE ? AS BackupDB;''', self.RestorePath + 'messages.dat')
|
||||||
|
queryreturn2 = sqlExecute('''delete from inbox;''')
|
||||||
|
queryreturn3 = sqlQuery('''INSERT INTO inbox SELECT * FROM BackupDB.inbox;''')
|
||||||
|
queryreturn4 = sqlQuery('''DETACH BackupDB;''')
|
||||||
|
except ValueError, e:
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'Unable to restore inbox. Error : ' + e, QtGui.QMessageBox.Ok)
|
||||||
|
# load only inbox and not the sent
|
||||||
|
self.parent.loadInbox();
|
||||||
|
|
||||||
|
except Exception, e:
|
||||||
|
sys.stderr.write('Write error: ' + e)
|
||||||
|
self.statusBar().showMessage(_translate("MainWindow", "Write error."))
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'Restore Error: ' + e, QtGui.QMessageBox.Ok)
|
||||||
|
|
||||||
|
#Deleting Backup
|
||||||
|
elif self.ui.radioButton_DeleteBackup.isChecked():
|
||||||
|
if not os.path.exists(self.RestorePath):
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'No backup exists to be Deleted.', QtGui.QMessageBox.Ok)
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
if os.path.isfile(self.RestorePath + 'messages.dat'):
|
||||||
|
os.remove(self.RestorePath + 'messages.dat')
|
||||||
|
else:
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'Keys.dat does not exists in the given folder', QtGui.QMessageBox.Ok)
|
||||||
|
if os.path.isfile(self.RestorePath + 'keys.dat'):
|
||||||
|
os.remove(self.RestorePath + 'keys.dat')
|
||||||
|
else:
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'messages.dat does not exists in the given folder.', QtGui.QMessageBox.Ok)
|
||||||
|
except OSError, e: # # if failed, report it back to the user ##
|
||||||
|
sys.stderr.write('Write error: ' + e)
|
||||||
|
self.statusBar().showMessage(_translate("MainWindow", "Write error."))
|
||||||
|
QtGui.QMessageBox.information(self, 'Message', 'Delete Backup Error: ' + e, QtGui.QMessageBox.Ok)
|
||||||
|
# shutil.rmtree('./backup')
|
||||||
|
|
||||||
|
def selectDirectory(self):
|
||||||
|
dialog = QFileDialog(self)
|
||||||
|
dialog.setFileMode(QFileDialog.DirectoryOnly)
|
||||||
|
if dialog.exec_():
|
||||||
|
fileNames = dialog.selectedFiles()
|
||||||
|
self.ui.lineEdit_directory_name.setText(fileNames[0])
|
||||||
|
|
114
src/bitmessageqt/backuprestore.py
Normal file
114
src/bitmessageqt/backuprestore.py
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file 'C:\Users\mjha\Documents\GitHub\PyBitmessage\src\bitmessageqt\backuprestore.ui'
|
||||||
|
#
|
||||||
|
# Created: Tue Oct 08 12:25:23 2013
|
||||||
|
# by: PyQt4 UI code generator 4.10.3
|
||||||
|
#
|
||||||
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
|
try:
|
||||||
|
_fromUtf8 = QtCore.QString.fromUtf8
|
||||||
|
except AttributeError:
|
||||||
|
def _fromUtf8(s):
|
||||||
|
return s
|
||||||
|
|
||||||
|
try:
|
||||||
|
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||||
|
def _translate(context, text, disambig):
|
||||||
|
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||||
|
except AttributeError:
|
||||||
|
def _translate(context, text, disambig):
|
||||||
|
return QtGui.QApplication.translate(context, text, disambig)
|
||||||
|
|
||||||
|
class Ui_BackupRestore(object):
|
||||||
|
def setupUi(self, BackupRestore):
|
||||||
|
BackupRestore.setObjectName(_fromUtf8("BackupRestore"))
|
||||||
|
BackupRestore.setEnabled(True)
|
||||||
|
BackupRestore.resize(359, 250)
|
||||||
|
self.BackupRestorebuttonBox = QtGui.QDialogButtonBox(BackupRestore)
|
||||||
|
self.BackupRestorebuttonBox.setGeometry(QtCore.QRect(-90, 210, 341, 32))
|
||||||
|
self.BackupRestorebuttonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||||
|
self.BackupRestorebuttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
|
||||||
|
self.BackupRestorebuttonBox.setObjectName(_fromUtf8("BackupRestorebuttonBox"))
|
||||||
|
self.radioButton_Restore = QtGui.QRadioButton(BackupRestore)
|
||||||
|
self.radioButton_Restore.setGeometry(QtCore.QRect(30, 20, 82, 17))
|
||||||
|
self.radioButton_Restore.setChecked(True)
|
||||||
|
self.radioButton_Restore.setObjectName(_fromUtf8("radioButton_Restore"))
|
||||||
|
self.radioButton_Backup = QtGui.QRadioButton(BackupRestore)
|
||||||
|
self.radioButton_Backup.setGeometry(QtCore.QRect(130, 20, 82, 17))
|
||||||
|
self.radioButton_Backup.setChecked(False)
|
||||||
|
self.radioButton_Backup.setObjectName(_fromUtf8("radioButton_Backup"))
|
||||||
|
self.checkBox_keys = QtGui.QCheckBox(BackupRestore)
|
||||||
|
self.checkBox_keys.setEnabled(True)
|
||||||
|
self.checkBox_keys.setGeometry(QtCore.QRect(40, 140, 70, 20))
|
||||||
|
self.checkBox_keys.setObjectName(_fromUtf8("checkBox_keys"))
|
||||||
|
self.checkBox_messages = QtGui.QCheckBox(BackupRestore)
|
||||||
|
self.checkBox_messages.setEnabled(True)
|
||||||
|
self.checkBox_messages.setGeometry(QtCore.QRect(40, 160, 171, 17))
|
||||||
|
self.checkBox_messages.setObjectName(_fromUtf8("checkBox_messages"))
|
||||||
|
self.label = QtGui.QLabel(BackupRestore)
|
||||||
|
self.label.setEnabled(True)
|
||||||
|
self.label.setGeometry(QtCore.QRect(30, 120, 111, 20))
|
||||||
|
self.label.setObjectName(_fromUtf8("label"))
|
||||||
|
self.checkBox_inbox_only = QtGui.QCheckBox(BackupRestore)
|
||||||
|
self.checkBox_inbox_only.setEnabled(True)
|
||||||
|
self.checkBox_inbox_only.setGeometry(QtCore.QRect(40, 180, 167, 17))
|
||||||
|
self.checkBox_inbox_only.setCheckable(True)
|
||||||
|
self.checkBox_inbox_only.setObjectName(_fromUtf8("checkBox_inbox_only"))
|
||||||
|
self.radioButton_DeleteBackup = QtGui.QRadioButton(BackupRestore)
|
||||||
|
self.radioButton_DeleteBackup.setGeometry(QtCore.QRect(240, 20, 101, 17))
|
||||||
|
self.radioButton_DeleteBackup.setObjectName(_fromUtf8("radioButton_DeleteBackup"))
|
||||||
|
self.label_2 = QtGui.QLabel(BackupRestore)
|
||||||
|
self.label_2.setEnabled(True)
|
||||||
|
self.label_2.setGeometry(QtCore.QRect(30, 50, 321, 20))
|
||||||
|
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||||
|
self.lineEdit_directory_name = QtGui.QLineEdit(BackupRestore)
|
||||||
|
self.lineEdit_directory_name.setEnabled(True)
|
||||||
|
self.lineEdit_directory_name.setGeometry(QtCore.QRect(40, 90, 211, 20))
|
||||||
|
self.lineEdit_directory_name.setObjectName(_fromUtf8("lineEdit_directory_name"))
|
||||||
|
self.pushButton_browse = QtGui.QPushButton(BackupRestore)
|
||||||
|
self.pushButton_browse.setEnabled(True)
|
||||||
|
self.pushButton_browse.setGeometry(QtCore.QRect(270, 90, 75, 23))
|
||||||
|
self.pushButton_browse.setObjectName(_fromUtf8("pushButton_browse"))
|
||||||
|
self.checkBox_Default_directory = QtGui.QCheckBox(BackupRestore)
|
||||||
|
self.checkBox_Default_directory.setEnabled(True)
|
||||||
|
self.checkBox_Default_directory.setGeometry(QtCore.QRect(40, 70, 221, 17))
|
||||||
|
self.checkBox_Default_directory.setObjectName(_fromUtf8("checkBox_Default_directory"))
|
||||||
|
|
||||||
|
self.retranslateUi(BackupRestore)
|
||||||
|
QtCore.QObject.connect(self.radioButton_Restore, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_keys.setEnabled)
|
||||||
|
QtCore.QObject.connect(self.radioButton_Restore, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_messages.setEnabled)
|
||||||
|
QtCore.QObject.connect(self.radioButton_Backup, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_keys.setEnabled)
|
||||||
|
QtCore.QObject.connect(self.radioButton_Backup, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_messages.setEnabled)
|
||||||
|
QtCore.QObject.connect(self.radioButton_Backup, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_inbox_only.setEnabled)
|
||||||
|
QtCore.QObject.connect(self.radioButton_Restore, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_inbox_only.setEnabled)
|
||||||
|
QtCore.QObject.connect(self.radioButton_Backup, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_inbox_only.setEnabled)
|
||||||
|
QtCore.QObject.connect(self.checkBox_messages, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_inbox_only.setDisabled)
|
||||||
|
QtCore.QObject.connect(self.checkBox_inbox_only, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_messages.setDisabled)
|
||||||
|
QtCore.QObject.connect(self.radioButton_DeleteBackup, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_keys.setDisabled)
|
||||||
|
QtCore.QObject.connect(self.radioButton_DeleteBackup, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_messages.setDisabled)
|
||||||
|
QtCore.QObject.connect(self.radioButton_DeleteBackup, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_inbox_only.setDisabled)
|
||||||
|
QtCore.QObject.connect(self.radioButton_Backup, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_inbox_only.setHidden)
|
||||||
|
QtCore.QObject.connect(self.radioButton_Restore, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.checkBox_inbox_only.setVisible)
|
||||||
|
QtCore.QObject.connect(self.checkBox_Default_directory, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.lineEdit_directory_name.setDisabled)
|
||||||
|
QtCore.QObject.connect(self.BackupRestorebuttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), BackupRestore.accept)
|
||||||
|
QtCore.QObject.connect(self.BackupRestorebuttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), BackupRestore.reject)
|
||||||
|
QtCore.QObject.connect(self.checkBox_Default_directory, QtCore.SIGNAL(_fromUtf8("clicked(bool)")), self.pushButton_browse.setDisabled)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(BackupRestore)
|
||||||
|
|
||||||
|
def retranslateUi(self, BackupRestore):
|
||||||
|
BackupRestore.setWindowTitle(_translate("BackupRestore", "Dialog", None))
|
||||||
|
self.radioButton_Restore.setText(_translate("BackupRestore", "Restore Files", None))
|
||||||
|
self.radioButton_Backup.setText(_translate("BackupRestore", "Backup Files", None))
|
||||||
|
self.checkBox_keys.setText(_translate("BackupRestore", "Keys.dat", None))
|
||||||
|
self.checkBox_messages.setText(_translate("BackupRestore", "Complete messages.dat", None))
|
||||||
|
self.label.setText(_translate("BackupRestore", "Please select the files", None))
|
||||||
|
self.checkBox_inbox_only.setText(_translate("BackupRestore", "Restore Only Inbox Messages", None))
|
||||||
|
self.radioButton_DeleteBackup.setText(_translate("BackupRestore", "Delete Backup", None))
|
||||||
|
self.label_2.setText(_translate("BackupRestore", "Provide Directory Location to Restore/Backup/Delete ", None))
|
||||||
|
self.pushButton_browse.setText(_translate("BackupRestore", "Browse", None))
|
||||||
|
self.checkBox_Default_directory.setText(_translate("BackupRestore", "use default directory location \".\\backup\"", None))
|
||||||
|
|
500
src/bitmessageqt/backuprestore.ui
Normal file
500
src/bitmessageqt/backuprestore.ui
Normal file
|
@ -0,0 +1,500 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>BackupRestore</class>
|
||||||
|
<widget class="QDialog" name="BackupRestore">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>359</width>
|
||||||
|
<height>250</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QDialogButtonBox" name="BackupRestorebuttonBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>-90</x>
|
||||||
|
<y>210</y>
|
||||||
|
<width>341</width>
|
||||||
|
<height>32</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QRadioButton" name="radioButton_Restore">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>82</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Restore Files</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QRadioButton" name="radioButton_Backup">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>130</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>82</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Backup Files</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="checkBox_keys">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>40</x>
|
||||||
|
<y>140</y>
|
||||||
|
<width>70</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Keys.dat</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="checkBox_messages">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>40</x>
|
||||||
|
<y>160</y>
|
||||||
|
<width>171</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Complete messages.dat</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>120</y>
|
||||||
|
<width>111</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Please select the files</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="checkBox_inbox_only">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>40</x>
|
||||||
|
<y>180</y>
|
||||||
|
<width>167</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Restore Only Inbox Messages</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QRadioButton" name="radioButton_DeleteBackup">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>240</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>101</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete Backup</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>30</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>321</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Provide Directory Location to Restore/Backup/Delete </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_directory_name">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>40</x>
|
||||||
|
<y>90</y>
|
||||||
|
<width>211</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_browse">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>270</x>
|
||||||
|
<y>90</y>
|
||||||
|
<width>75</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Browse</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="checkBox_Default_directory">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>40</x>
|
||||||
|
<y>70</y>
|
||||||
|
<width>221</width>
|
||||||
|
<height>17</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>use default directory location ".\backup"</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>radioButton_Restore</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_keys</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>154</x>
|
||||||
|
<y>28</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>82</x>
|
||||||
|
<y>172</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>radioButton_Restore</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_messages</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>132</x>
|
||||||
|
<y>27</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>46</x>
|
||||||
|
<y>191</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>radioButton_Backup</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_keys</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>60</x>
|
||||||
|
<y>25</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>102</x>
|
||||||
|
<y>168</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>radioButton_Backup</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_messages</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>106</x>
|
||||||
|
<y>28</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>121</x>
|
||||||
|
<y>193</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>radioButton_Backup</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_inbox_only</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>58</x>
|
||||||
|
<y>28</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>152</x>
|
||||||
|
<y>212</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>radioButton_Restore</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_inbox_only</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>150</x>
|
||||||
|
<y>27</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>62</x>
|
||||||
|
<y>208</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>radioButton_Backup</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_inbox_only</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>58</x>
|
||||||
|
<y>22</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>206</x>
|
||||||
|
<y>204</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>checkBox_messages</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_inbox_only</receiver>
|
||||||
|
<slot>setDisabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>168</x>
|
||||||
|
<y>189</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>168</x>
|
||||||
|
<y>201</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>checkBox_inbox_only</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_messages</receiver>
|
||||||
|
<slot>setDisabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>44</x>
|
||||||
|
<y>210</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>45</x>
|
||||||
|
<y>186</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>radioButton_DeleteBackup</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_keys</receiver>
|
||||||
|
<slot>setDisabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>240</x>
|
||||||
|
<y>36</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>106</x>
|
||||||
|
<y>176</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>radioButton_DeleteBackup</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_messages</receiver>
|
||||||
|
<slot>setDisabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>262</x>
|
||||||
|
<y>34</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>210</x>
|
||||||
|
<y>194</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>radioButton_DeleteBackup</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_inbox_only</receiver>
|
||||||
|
<slot>setDisabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>286</x>
|
||||||
|
<y>30</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>203</x>
|
||||||
|
<y>213</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>radioButton_Backup</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_inbox_only</receiver>
|
||||||
|
<slot>setHidden(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>91</x>
|
||||||
|
<y>33</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>109</x>
|
||||||
|
<y>208</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>radioButton_Restore</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>checkBox_inbox_only</receiver>
|
||||||
|
<slot>setVisible(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>136</x>
|
||||||
|
<y>32</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>81</x>
|
||||||
|
<y>213</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>checkBox_Default_directory</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>lineEdit_directory_name</receiver>
|
||||||
|
<slot>setDisabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>204</x>
|
||||||
|
<y>75</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>246</x>
|
||||||
|
<y>102</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>BackupRestorebuttonBox</sender>
|
||||||
|
<signal>accepted()</signal>
|
||||||
|
<receiver>BackupRestore</receiver>
|
||||||
|
<slot>accept()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>118</x>
|
||||||
|
<y>230</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>157</x>
|
||||||
|
<y>138</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>BackupRestorebuttonBox</sender>
|
||||||
|
<signal>rejected()</signal>
|
||||||
|
<receiver>BackupRestore</receiver>
|
||||||
|
<slot>reject()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>186</x>
|
||||||
|
<y>230</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>272</x>
|
||||||
|
<y>138</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>checkBox_Default_directory</sender>
|
||||||
|
<signal>clicked(bool)</signal>
|
||||||
|
<receiver>pushButton_browse</receiver>
|
||||||
|
<slot>setDisabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>214</x>
|
||||||
|
<y>82</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>325</x>
|
||||||
|
<y>92</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
# Form implementation generated from reading ui file 'bitmessageui.ui'
|
# Form implementation generated from reading ui file 'bitmessageui.ui'
|
||||||
#
|
#
|
||||||
# Created: Tue Sep 03 15:17:26 2013
|
# Created: Tue Oct 01 16:47:57 2013
|
||||||
# by: PyQt4 UI code generator 4.10.2
|
# by: PyQt4 UI code generator 4.10.3
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ except AttributeError:
|
||||||
class Ui_MainWindow(object):
|
class Ui_MainWindow(object):
|
||||||
def setupUi(self, MainWindow):
|
def setupUi(self, MainWindow):
|
||||||
MainWindow.setObjectName(_fromUtf8("MainWindow"))
|
MainWindow.setObjectName(_fromUtf8("MainWindow"))
|
||||||
MainWindow.resize(885, 580)
|
MainWindow.resize(795, 580)
|
||||||
icon = QtGui.QIcon()
|
icon = QtGui.QIcon()
|
||||||
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-24px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-24px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
MainWindow.setWindowIcon(icon)
|
MainWindow.setWindowIcon(icon)
|
||||||
|
@ -439,7 +439,7 @@ class Ui_MainWindow(object):
|
||||||
self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1)
|
self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1)
|
||||||
MainWindow.setCentralWidget(self.centralwidget)
|
MainWindow.setCentralWidget(self.centralwidget)
|
||||||
self.menubar = QtGui.QMenuBar(MainWindow)
|
self.menubar = QtGui.QMenuBar(MainWindow)
|
||||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 795, 18))
|
self.menubar.setGeometry(QtCore.QRect(0, 0, 795, 21))
|
||||||
self.menubar.setObjectName(_fromUtf8("menubar"))
|
self.menubar.setObjectName(_fromUtf8("menubar"))
|
||||||
self.menuFile = QtGui.QMenu(self.menubar)
|
self.menuFile = QtGui.QMenu(self.menubar)
|
||||||
self.menuFile.setObjectName(_fromUtf8("menuFile"))
|
self.menuFile.setObjectName(_fromUtf8("menuFile"))
|
||||||
|
@ -457,21 +457,16 @@ class Ui_MainWindow(object):
|
||||||
self.actionManageKeys = QtGui.QAction(MainWindow)
|
self.actionManageKeys = QtGui.QAction(MainWindow)
|
||||||
self.actionManageKeys.setCheckable(False)
|
self.actionManageKeys.setCheckable(False)
|
||||||
self.actionManageKeys.setEnabled(True)
|
self.actionManageKeys.setEnabled(True)
|
||||||
#mj
|
|
||||||
self.actionBackup = QtGui.QAction(MainWindow)
|
|
||||||
self.actionBackup.setCheckable(False)
|
|
||||||
self.actionBackup.setEnabled(True)
|
|
||||||
#mj end
|
|
||||||
icon = QtGui.QIcon.fromTheme(_fromUtf8("dialog-password"))
|
icon = QtGui.QIcon.fromTheme(_fromUtf8("dialog-password"))
|
||||||
self.actionManageKeys.setIcon(icon)
|
self.actionManageKeys.setIcon(icon)
|
||||||
self.actionManageKeys.setObjectName(_fromUtf8("actionManageKeys"))
|
self.actionManageKeys.setObjectName(_fromUtf8("actionManageKeys"))
|
||||||
#mj
|
self.actionBackup = QtGui.QAction(MainWindow)
|
||||||
|
self.actionBackup.setCheckable(False)
|
||||||
|
self.actionBackup.setEnabled(True)
|
||||||
icon = QtGui.QIcon.fromTheme(_fromUtf8("dialog-password"))
|
icon = QtGui.QIcon.fromTheme(_fromUtf8("dialog-password"))
|
||||||
self.actionBackup.setIcon(icon)
|
self.actionBackup.setIcon(icon)
|
||||||
self.actionBackup.setObjectName(_fromUtf8("actionBackup"))
|
self.actionBackup.setObjectName(_fromUtf8("actionBackup"))
|
||||||
self.actionExit = QtGui.QAction(MainWindow)
|
self.actionExit = QtGui.QAction(MainWindow)
|
||||||
#mj end
|
|
||||||
self.actionExit = QtGui.QAction(MainWindow)
|
|
||||||
icon = QtGui.QIcon.fromTheme(_fromUtf8("application-exit"))
|
icon = QtGui.QIcon.fromTheme(_fromUtf8("application-exit"))
|
||||||
self.actionExit.setIcon(icon)
|
self.actionExit.setIcon(icon)
|
||||||
self.actionExit.setObjectName(_fromUtf8("actionExit"))
|
self.actionExit.setObjectName(_fromUtf8("actionExit"))
|
||||||
|
@ -499,10 +494,8 @@ class Ui_MainWindow(object):
|
||||||
icon = QtGui.QIcon.fromTheme(_fromUtf8("contact-new"))
|
icon = QtGui.QIcon.fromTheme(_fromUtf8("contact-new"))
|
||||||
self.actionJoinChan.setIcon(icon)
|
self.actionJoinChan.setIcon(icon)
|
||||||
self.actionJoinChan.setObjectName(_fromUtf8("actionJoinChan"))
|
self.actionJoinChan.setObjectName(_fromUtf8("actionJoinChan"))
|
||||||
#mj
|
|
||||||
self.menuFile.addAction(self.actionBackup)
|
|
||||||
#mj
|
|
||||||
self.menuFile.addAction(self.actionManageKeys)
|
self.menuFile.addAction(self.actionManageKeys)
|
||||||
|
self.menuFile.addAction(self.actionBackup)
|
||||||
self.menuFile.addAction(self.actionDeleteAllTrashedMessages)
|
self.menuFile.addAction(self.actionDeleteAllTrashedMessages)
|
||||||
self.menuFile.addAction(self.actionRegenerateDeterministicAddresses)
|
self.menuFile.addAction(self.actionRegenerateDeterministicAddresses)
|
||||||
self.menuFile.addAction(self.actionJoinChan)
|
self.menuFile.addAction(self.actionJoinChan)
|
||||||
|
@ -644,10 +637,8 @@ class Ui_MainWindow(object):
|
||||||
self.menuSettings.setTitle(_translate("MainWindow", "Settings", None))
|
self.menuSettings.setTitle(_translate("MainWindow", "Settings", None))
|
||||||
self.menuHelp.setTitle(_translate("MainWindow", "Help", None))
|
self.menuHelp.setTitle(_translate("MainWindow", "Help", None))
|
||||||
self.actionImport_keys.setText(_translate("MainWindow", "Import keys", None))
|
self.actionImport_keys.setText(_translate("MainWindow", "Import keys", None))
|
||||||
self.actionManageKeys.setText(_translate("MainWindow", "Manage keys", None))
|
self.actionManageKeys.setText(_translate("MainWindow", "Manage Keys", None))
|
||||||
#mj
|
self.actionBackup.setText(_translate("MainWindow", "Backup / Restore", None))
|
||||||
self.actionBackup.setText(_translate("MainWindow", "Backup/Restore", None))
|
|
||||||
#mj
|
|
||||||
self.actionExit.setText(_translate("MainWindow", "Quit", None))
|
self.actionExit.setText(_translate("MainWindow", "Quit", None))
|
||||||
self.actionExit.setShortcut(_translate("MainWindow", "Ctrl+Q", None))
|
self.actionExit.setShortcut(_translate("MainWindow", "Ctrl+Q", None))
|
||||||
self.actionHelp.setText(_translate("MainWindow", "Help", None))
|
self.actionHelp.setText(_translate("MainWindow", "Help", None))
|
||||||
|
|
|
@ -1055,7 +1055,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>795</width>
|
<width>795</width>
|
||||||
<height>18</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
|
@ -1112,11 +1112,10 @@ p, li { white-space: pre-wrap; }
|
||||||
</iconset>
|
</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Manage keys</string>
|
<string>Manage Keys</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionBackup">
|
||||||
<action name="actionBackup">
|
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1129,10 +1128,9 @@ p, li { white-space: pre-wrap; }
|
||||||
</iconset>
|
</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Manage keys</string>
|
<string>Backup / Restore</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
<action name="actionExit">
|
<action name="actionExit">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="application-exit">
|
<iconset theme="application-exit">
|
||||||
|
|
74
src/bitmessageqt/treedirectory.ui
Normal file
74
src/bitmessageqt/treedirectory.ui
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>TreeDirectoryDialog</class>
|
||||||
|
<widget class="QFileDialog" name="TreeDirectoryDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>357</width>
|
||||||
|
<height>297</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel" name="label_select">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>240</y>
|
||||||
|
<width>81</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Selected Folder: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_selected_folder">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>110</x>
|
||||||
|
<y>240</y>
|
||||||
|
<width>231</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_ok">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>160</x>
|
||||||
|
<y>270</y>
|
||||||
|
<width>75</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Ok</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QTreeView" name="treeView_directory">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>21</x>
|
||||||
|
<y>11</y>
|
||||||
|
<width>321</width>
|
||||||
|
<height>221</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
Reference in New Issue
Block a user