Skip to content

Commit 1ff057b

Browse files
committed
Merge branch 'develop' of github.com:codinguser/gnucash-android into develop
2 parents 719e53e + 7dbab98 commit 1ff057b

18 files changed

Lines changed: 423 additions & 169 deletions

File tree

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ apply plugin: 'crashlytics'
66
def versionMajor = 1
77
def versionMinor = 6
88
def versionPatch = 0
9-
def versionBuild = 4
9+
def versionBuild = 5
1010

1111
def buildTime() {
1212
def df = new SimpleDateFormat("yyyyMMdd")

app/src/main/java/org/gnucash/android/db/DatabaseAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public abstract class DatabaseAdapter {
4242
/**
4343
* Tag for logging
4444
*/
45-
protected static String LOG_TAG = "DatabaseAdapter";
45+
protected String LOG_TAG = "DatabaseAdapter";
4646

4747
/**
4848
* SQLite database

app/src/main/java/org/gnucash/android/db/DatabaseHelper.java

Lines changed: 155 additions & 33 deletions
Large diffs are not rendered by default.

app/src/main/java/org/gnucash/android/db/MigrationHelper.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import java.io.IOError;
3434
import java.io.IOException;
3535
import java.nio.channels.FileChannel;
36+
import java.util.UUID;
3637

3738
import static org.gnucash.android.db.DatabaseSchema.AccountEntry;
3839

@@ -187,4 +188,9 @@ public void run() {
187188
oldExportFolder.delete();
188189
}
189190
};
191+
192+
public static String generateUUID()
193+
{
194+
return UUID.randomUUID().toString().replaceAll("-", "");
195+
}
190196
}

app/src/main/java/org/gnucash/android/ui/chart/BarChartActivity.java

Lines changed: 181 additions & 117 deletions
Large diffs are not rendered by default.

app/src/main/java/org/gnucash/android/ui/settings/SettingsActivity.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -573,12 +573,14 @@ public void onClick(DialogInterface dialog, int which) {
573573
public void onActivityResult(int requestCode, int resultCode, Intent data) {
574574
switch (requestCode) {
575575
case AccountsActivity.REQUEST_PICK_ACCOUNTS_FILE:
576-
try {
577-
InputStream accountInputStream = getContentResolver().openInputStream(data.getData());
578-
new ImportAsyncTask(this).execute(accountInputStream);
579-
} catch (FileNotFoundException e) {
580-
Crashlytics.logException(e);
581-
Toast.makeText(this, R.string.toast_error_importing_accounts, Toast.LENGTH_SHORT).show();
576+
if (resultCode == Activity.RESULT_OK && data != null) {
577+
try {
578+
InputStream accountInputStream = getContentResolver().openInputStream(data.getData());
579+
new ImportAsyncTask(this).execute(accountInputStream);
580+
} catch (FileNotFoundException e) {
581+
Crashlytics.logException(e);
582+
Toast.makeText(this, R.string.toast_error_importing_accounts, Toast.LENGTH_SHORT).show();
583+
}
582584
}
583585
break;
584586
case PasscodePreferenceFragment.PASSCODE_REQUEST_CODE:
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<!--
4+
Copyright (c) 2015 Oleksandr Tyshkovets <olexandr.tyshkovets@gmail.com>
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
19+
<android.support.v4.widget.DrawerLayout
20+
xmlns:android="http://schemas.android.com/apk/res/android"
21+
android:id="@+id/drawer_layout"
22+
android:layout_width="match_parent"
23+
android:layout_height="match_parent">
24+
<LinearLayout
25+
android:orientation="vertical"
26+
android:layout_width="match_parent"
27+
android:layout_height="match_parent">
28+
29+
<LinearLayout android:id="@+id/bar_chart"
30+
android:orientation="horizontal"
31+
android:layout_width="fill_parent"
32+
android:layout_height="0dip"
33+
android:layout_weight="1" />
34+
35+
<Spinner android:id="@+id/chart_data_spinner"
36+
android:layout_width="match_parent"
37+
android:layout_height="wrap_content" />
38+
39+
<LinearLayout android:layout_width="fill_parent"
40+
android:layout_height="wrap_content"
41+
android:gravity="center">
42+
43+
<TextView android:id="@+id/selected_chart_slice"
44+
android:layout_width="wrap_content"
45+
android:layout_height="wrap_content"
46+
android:gravity="center" />
47+
48+
</LinearLayout>
49+
50+
</LinearLayout>
51+
<ListView android:id="@+id/left_drawer"
52+
android:layout_width="240dp"
53+
android:layout_height="match_parent"
54+
android:layout_gravity="start"
55+
android:choiceMode="singleChoice"
56+
android:divider="@android:color/transparent"
57+
android:dividerHeight="0dp"
58+
android:background="#111"/>
59+
</android.support.v4.widget.DrawerLayout>

app/src/main/res/values-de/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ No user-identifiable information will be collected as part of this process!</str
490490
<string name="header_report_settings">Reports</string>
491491
<string name="label_report_currency">Select currency</string>
492492
<string name="title_use_account_color">Account color in reports</string>
493-
<string name="summary_use_account_color">Use account color in the pie chart</string>
493+
<string name="summary_use_account_color">Use account color in the bar/pie chart</string>
494494
<string name="label_confirm_passcode">Please confirm your passcode</string>
495495
<string name="label_new_passcode">Enter your new passcode</string>
496496
<string name="label_old_passcode">Enter your old passcode</string>

app/src/main/res/values-el/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ No user-identifiable information will be collected as part of this process!
509509
<string name="header_report_settings">Reports</string>
510510
<string name="label_report_currency">Select currency</string>
511511
<string name="title_use_account_color">Account color in reports</string>
512-
<string name="summary_use_account_color">Use account color in the pie chart</string>
512+
<string name="summary_use_account_color">Use account color in the bar/pie chart</string>
513513
<string name="label_confirm_passcode">Please confirm your passcode</string>
514514
<string name="label_new_passcode">Enter your new passcode</string>
515515
<string name="label_old_passcode">Enter your old passcode</string>

app/src/main/res/values-es-rMX/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ No user-identifiable information will be collected as part of this process!
494494
<string name="header_report_settings">Reports</string>
495495
<string name="label_report_currency">Select currency</string>
496496
<string name="title_use_account_color">Account color in reports</string>
497-
<string name="summary_use_account_color">Use account color in the pie chart</string>
497+
<string name="summary_use_account_color">Use account color in the bar/pie chart</string>
498498
<string name="label_confirm_passcode">Please confirm your passcode</string>
499499
<string name="label_new_passcode">Enter your new passcode</string>
500500
<string name="label_old_passcode">Enter your old passcode</string>

0 commit comments

Comments
 (0)