+#def showImportInboxFileDialog():
+ #name = QFileDialog.getOpenFileName(None, "Open Image", "/home/user/", "Image Files (*.png *.jpg *.bmp)");
+ #chooser = gtk.FileChooserDialog(title=None,action=gtk.FILE_CHOOSER_ACTION_OPEN, buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK))
+
+
+def importInbox(path):
+ if msgs.importInbox(path):
+ notifier.requestPatience()
+
+ msgs.fetchContactsInfo()
+ populateInbox()
+
+ notifier.showSuccess(len(msgs.recvLst))
+ else:
+ notifier.showFailure()
+
+def importSent(path):
+ if msgs.importSent(path):
+ notifier.requestPatience()
+
+ msgs.fetchContactsInfo()
+ populateSent()
+
+ notifier.showSuccess(len(msgs.sentLst))
+ else:
+ notifier.showFailure()
+
+
+def showInboxDialog():
+ if not msgs.hasImportedInbox() :
+ inboxDialog.open()
+ else:
+ res = QMessageBox.question(mainWindow, "Retro Conversations",
+ "This will overwrite previously imported Inbox SMS. Proceed?", QMessageBox.Yes | QMessageBox.No);
+
+ if res == QMessageBox.Yes:
+ inboxDialog.open()
+
+def showSentDialog():
+ if not msgs.hasImportedSent():
+ sentDialog.open()
+ else:
+ res = QMessageBox.question(mainWindow, "Retro Conversations",
+ "This will overwrite previously imported Sent SMS. Proceed?", QMessageBox.Yes | QMessageBox.No);
+
+ if res == QMessageBox.Yes:
+ sentDialog.open()
+