Added possibility to add entry to root group

This commit is contained in:
Philipp Crocoll
2013-07-24 06:43:25 +02:00
parent fa6555f01c
commit 57506336c1
2 changed files with 2 additions and 3 deletions

View File

@@ -122,8 +122,7 @@ namespace keepass2android
if (entryId.EqualsValue(PwUuid.Zero)) if (entryId.EqualsValue(PwUuid.Zero))
{ {
String groupId = i.GetStringExtra(KeyParent); String groupId = i.GetStringExtra(KeyParent);
State.ParentGroup = db.KpDatabase.RootGroup.FindGroup(new PwUuid(MemUtil.HexStringToByteArray(groupId)), true);
State.ParentGroup = db.Groups [new PwUuid(MemUtil.HexStringToByteArray(groupId))];
State.EntryInDatabase = new PwEntry(true, true); State.EntryInDatabase = new PwEntry(true, true);
State.EntryInDatabase.Strings.Set(PwDefs.UserNameField, new ProtectedString( State.EntryInDatabase.Strings.Set(PwDefs.UserNameField, new ProtectedString(

View File

@@ -78,7 +78,7 @@ namespace keepass2android
protected void SetupButtons() protected void SetupButtons()
{ {
AddGroupEnabled = true; AddGroupEnabled = true;
AddEntryEnabled = !Group.Uuid.EqualsValue(App.Kp2a.GetDb().Root.Uuid); AddEntryEnabled = true;
} }
protected override void OnCreate (Bundle savedInstanceState) protected override void OnCreate (Bundle savedInstanceState)