mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-03 23:32:28 -08:00
Add beta warning message.
This commit is contained in:
1 parent
d915697bf9
commit
34ea8fa2c3
5 files changed
+33
-9
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2009-2011 Brian Pellin.
|
||||
Copyright 2009-2013 Brian Pellin.
|
||||
|
||||
This file is part of KeePassDroid.
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<string name="maskpass_key">maskpass</string>
|
||||
<string name="omitbackup_key">omitbackup</string>
|
||||
<string name="list_size_key">list_size</string>
|
||||
<string name="show_beta_warning">show_beta_warning</string>
|
||||
<string name="sort_key">sort_key</string>
|
||||
<string name="timeout_key">timeout_key</string>
|
||||
<bool name="maskpass_default">true</bool>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2009-2012 Brian Pellin.
|
||||
Copyright 2009-2013 Brian Pellin.
|
||||
|
||||
This file is part of KeePassDroid.
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
<string name="app_timeout_summary">Time before locking database when the application is inactive.</string>
|
||||
<string name="application">Application</string>
|
||||
<string name="application_settings">Application settings</string>
|
||||
<string name="beta_dontask">Don\'t show again</string>
|
||||
<string name="beta_warning">Support for saving changes to kdbx files is EXPERIMENTAL. Make backups of your database before saving changes.</string>
|
||||
<string name="brackets">Brackets</string>
|
||||
<string name="browser_intall_text">File browsing requires the Open Intents File Manager, click below to install it. Due to some quirks in the file manager, browsing may not work correctly, the first time you browse.</string>
|
||||
<string name="building_search_idx">Building search index…</string>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2009 Brian Pellin.
|
||||
* Copyright 2009-2013 Brian Pellin.
|
||||
*
|
||||
* This file is part of KeePassDroid.
|
||||
*
|
||||
@@ -53,6 +53,7 @@ public abstract class GroupActivity extends GroupBaseActivity {
|
||||
|
||||
protected boolean addGroupEnabled = false;
|
||||
protected boolean addEntryEnabled = false;
|
||||
protected boolean isRoot = false;
|
||||
|
||||
private static final String TAG = "Group Activity:";
|
||||
|
||||
@@ -120,6 +121,8 @@ public abstract class GroupActivity extends GroupBaseActivity {
|
||||
return;
|
||||
}
|
||||
|
||||
isRoot = mGroup == db.root;
|
||||
|
||||
setupButtons();
|
||||
|
||||
if ( addGroupEnabled && addEntryEnabled ) {
|
||||
@@ -163,7 +166,10 @@ public abstract class GroupActivity extends GroupBaseActivity {
|
||||
setListAdapter(new PwGroupListAdapter(this, mGroup));
|
||||
registerForContextMenu(getListView());
|
||||
Log.w(TAG, "Finished creating group");
|
||||
|
||||
|
||||
if (isRoot) {
|
||||
showWarnings();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -205,4 +211,8 @@ public abstract class GroupActivity extends GroupBaseActivity {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected void showWarnings() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010 Brian Pellin.
|
||||
* Copyright 2010-2013 Brian Pellin.
|
||||
*
|
||||
* This file is part of KeePassDroid.
|
||||
*
|
||||
@@ -21,7 +21,6 @@ package com.keepassdroid;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import com.keepassdroid.app.App;
|
||||
import com.keepassdroid.database.PwGroupIdV3;
|
||||
|
||||
public class GroupActivityV3 extends GroupActivity {
|
||||
@@ -39,7 +38,7 @@ public class GroupActivityV3 extends GroupActivity {
|
||||
|
||||
@Override
|
||||
protected void setupButtons() {
|
||||
if ( mGroup == App.getDB().root ) {
|
||||
if ( isRoot ) {
|
||||
addGroupEnabled = true;
|
||||
} else {
|
||||
addGroupEnabled = true;
|
||||
|
||||
@@ -21,13 +21,16 @@ package com.keepassdroid;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.view.Menu;
|
||||
|
||||
import com.android.keepass.R;
|
||||
import com.keepassdroid.app.App;
|
||||
import com.keepassdroid.database.PwGroupId;
|
||||
import com.keepassdroid.database.PwGroupIdV4;
|
||||
import com.keepassdroid.dialog.BetaWarningDialog;
|
||||
|
||||
public class GroupActivityV4 extends GroupActivity {
|
||||
|
||||
@@ -56,8 +59,17 @@ public class GroupActivityV4 extends GroupActivity {
|
||||
@Override
|
||||
protected void setupButtons() {
|
||||
addGroupEnabled = false;
|
||||
addEntryEnabled = !isRoot;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void showWarnings() {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
||||
addEntryEnabled = mGroup != App.getDB().root;
|
||||
if (prefs.getBoolean(getString(R.string.show_beta_warning), true)) {
|
||||
Dialog dialog = new BetaWarningDialog(this);
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user