Skip to content
This repository has been archived by the owner on Jun 14, 2018. It is now read-only.

Commit

Permalink
force tracker update, and change for double encryption setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit HERVIER committed Jun 19, 2013
1 parent 202457f commit 421e91a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
5 changes: 3 additions & 2 deletions bitpurse/__init__.py
Expand Up @@ -29,7 +29,7 @@

__author__ = 'Benoit HERVIER (Khertan)'
__email__ = 'khertan@khertan.net'
__version__ = '2.0.1'
__version__ = '2.0.2'
__build__ = '1'
__upgrade__ = '''0.9.0: First beta release
0.9.1: Second beta release, add missing python-crypto dependancy
Expand All @@ -54,7 +54,8 @@
Improve double password dialog
Update wallet balance after sending a transaction
Remove transaction without confirmation older than 7 days
Add a copy address item menu in address page menu'''
Add a copy address item menu in address page menu
2.0.2: Workarround to try to fix tracker index for shareui'''


class BitPurse(QApplication):
Expand Down
4 changes: 2 additions & 2 deletions bitpurse/qml/DoubleDecryptPage.qml
Expand Up @@ -11,7 +11,7 @@ Page {

ToolIcon {
platformIconId: "toolbar-back"
onClicked: {pageStack.pop();Settings.useDoubleEncryption = true;}
onClicked: {Settings.useDoubleEncryption = true;pageStack.pop();}
}
}

Expand Down Expand Up @@ -81,4 +81,4 @@ Page {
}
}

}
}
4 changes: 2 additions & 2 deletions bitpurse/qml/DoubleEncryptPage.qml
Expand Up @@ -12,7 +12,7 @@ Page {

ToolIcon {
platformIconId: "toolbar-back"
onClicked: {pageStack.pop();Settings.useDoubleEncryption = false;}
onClicked: {Settings.useDoubleEncryption = false;pageStack.pop();}
}
}

Expand Down Expand Up @@ -102,4 +102,4 @@ Page {
}
}

}
}
27 changes: 18 additions & 9 deletions bitpurse/walletcontroller.py
Expand Up @@ -4,14 +4,14 @@
# Copyright (c) 2012 Benoit HERVIER <khertan@khertan.net>
# Licenced under GPLv3

## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published
## by the Free Software Foundation; version 3 only.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; version 3 only.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

from PySide.QtCore import Slot, QObject, \
Signal, Property, QTimer
Expand All @@ -30,6 +30,8 @@

from wallet import Wallet, DataError, WrongPassword

import time


class WalletController(QObject):
onError = Signal(unicode)
Expand Down Expand Up @@ -208,6 +210,11 @@ def exportWithShareUI(self):
link = os.path.join(os.path.expanduser('~'),
'MyDocs',
'bitpurse.wallet')

# Force tracker index sometime
os.system('/usr/bin/tracker-info "%s"' % link)
time.sleep(1)

item = '%s' % link
share([item, ])

Expand Down Expand Up @@ -282,6 +289,7 @@ def _doubleEncrypt(self, doubleKey):
try:
self._wallet.doubleEncryptPrivKeys(doubleKey)
self.settings.useDoubleEncryption = True
self.settings.on_useDoubleEncryption.emit()
self.storeWallet()
self._update()
except Exception, err:
Expand All @@ -300,6 +308,7 @@ def _doubleDecrypt(self, doubleKey):
try:
self._wallet.doubleDecryptPrivKeys(doubleKey)
self.settings.useDoubleEncryption = False
self.settings.on_useDoubleEncryption.emit()
self.storeWallet()
self._update()
except Exception, err:
Expand Down Expand Up @@ -508,4 +517,4 @@ def putAddrInClipboard(self, addr):
currentPassKey = Property(unicode,
getCurrentPassKey,
setCurrentPassKey,
notify=onCurrentPassKey)
notify=onCurrentPassKey)

0 comments on commit 421e91a

Please sign in to comment.