On master: Current working dir changes

This commit is contained in:
AlexVallat
2013-07-25 13:47:05 +01:00
30 changed files with 628 additions and 712 deletions

View File

@@ -72,25 +72,6 @@ namespace keepass2android
set { _loaded = value; }
}
public bool Open
{
get { return Loaded && (!Locked); }
}
bool _locked;
public bool Locked
{
get
{
return _locked;
}
set
{
Kp2aLog.Log("Locked=" + _locked);
_locked = value;
}
}
public bool DidOpenFileChange()
{
if (Loaded == false)
@@ -102,6 +83,9 @@ namespace keepass2android
}
/// <summary>
/// Do not call this method directly. Call App.Kp2a.LoadDatabase instead.
/// </summary>
public void LoadData(IKp2aApp app, IOConnectionInfo iocInfo, MemoryStream databaseData, String password, String keyfile, ProgressDialogStatusLogger status)
{
PwDatabase pwDatabase = new PwDatabase();
@@ -153,15 +137,6 @@ namespace keepass2android
SearchHelper = new SearchDbHelper(app);
}
public bool QuickUnlockEnabled { get; set; }
//KeyLength of QuickUnlock at time of loading the database.
//This is important to not allow an attacker to set the length to 1 when QuickUnlock is started already.
public int QuickUnlockKeyLength
{
get;
set;
}
public PwGroup SearchForText(String str) {
PwGroup group = SearchHelper.SearchForText(this, str);
@@ -227,7 +202,6 @@ namespace keepass2android
Root = null;
KpDatabase = null;
_loaded = false;
_locked = false;
_reloadRequested = false;
}

View File

@@ -79,7 +79,7 @@ namespace keepass2android
else
{
// Let's not bother recovering from a failure to save a deleted entry. It is too much work.
App.SetShutdown();
App.LockDatabase();
}
}, OnFinishToRun);
}
@@ -99,7 +99,7 @@ namespace keepass2android
Db.Dirty.Add(pgRecycleBin);
} else {
// Let's not bother recovering from a failure to save a deleted entry. It is too much work.
App.SetShutdown();
App.LockDatabase();
}
}, OnFinishToRun);

View File

@@ -108,7 +108,7 @@ namespace keepass2android
Db.Dirty.Add(pgParent);
} else {
// Let's not bother recovering from a failure to save a deleted group. It is too much work.
App.SetShutdown();
App.LockDatabase();
}
}, OnFinishToRun);
}
@@ -146,7 +146,7 @@ namespace keepass2android
}
} else {
// Let's not bother recovering from a failure to save a deleted group. It is too much work.
_app.SetShutdown();
_app.LockDatabase();
}
base.Run();

View File

@@ -47,7 +47,7 @@ namespace keepass2android
try
{
StatusLogger.UpdateMessage(UiStringKey.loading_database);
_app.GetDb().LoadData (_app, _ioc, _databaseData, _pass, _key, StatusLogger);
_app.LoadDatabase(_ioc, _databaseData, _pass, _key, StatusLogger);
SaveFileData (_ioc, _key);
} catch (KeyFileException) {