Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:codinguser/gnucash-android into …
Browse files Browse the repository at this point in the history
…develop
  • Loading branch information
codinguser committed Jun 16, 2015
2 parents 719e53e + 7dbab98 commit 1ff057b
Show file tree
Hide file tree
Showing 18 changed files with 423 additions and 169 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ apply plugin: 'crashlytics'
def versionMajor = 1
def versionMinor = 6
def versionPatch = 0
def versionBuild = 4
def versionBuild = 5

def buildTime() {
def df = new SimpleDateFormat("yyyyMMdd")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public abstract class DatabaseAdapter {
/**
* Tag for logging
*/
protected static String LOG_TAG = "DatabaseAdapter";
protected String LOG_TAG = "DatabaseAdapter";

/**
* SQLite database
Expand Down
188 changes: 155 additions & 33 deletions app/src/main/java/org/gnucash/android/db/DatabaseHelper.java

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions app/src/main/java/org/gnucash/android/db/MigrationHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.io.IOError;
import java.io.IOException;
import java.nio.channels.FileChannel;
import java.util.UUID;

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

Expand Down Expand Up @@ -187,4 +188,9 @@ public void run() {
oldExportFolder.delete();
}
};

public static String generateUUID()
{
return UUID.randomUUID().toString().replaceAll("-", "");
}
}
298 changes: 181 additions & 117 deletions app/src/main/java/org/gnucash/android/ui/chart/BarChartActivity.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -573,12 +573,14 @@ public void onClick(DialogInterface dialog, int which) {
public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case AccountsActivity.REQUEST_PICK_ACCOUNTS_FILE:
try {
InputStream accountInputStream = getContentResolver().openInputStream(data.getData());
new ImportAsyncTask(this).execute(accountInputStream);
} catch (FileNotFoundException e) {
Crashlytics.logException(e);
Toast.makeText(this, R.string.toast_error_importing_accounts, Toast.LENGTH_SHORT).show();
if (resultCode == Activity.RESULT_OK && data != null) {
try {
InputStream accountInputStream = getContentResolver().openInputStream(data.getData());
new ImportAsyncTask(this).execute(accountInputStream);
} catch (FileNotFoundException e) {
Crashlytics.logException(e);
Toast.makeText(this, R.string.toast_error_importing_accounts, Toast.LENGTH_SHORT).show();
}
}
break;
case PasscodePreferenceFragment.PASSCODE_REQUEST_CODE:
Expand Down
59 changes: 59 additions & 0 deletions app/src/main/res/layout/activity_bar_chart.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
Copyright (c) 2015 Oleksandr Tyshkovets <olexandr.tyshkovets@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout android:id="@+id/bar_chart"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1" />

<Spinner android:id="@+id/chart_data_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center">

<TextView android:id="@+id/selected_chart_slice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" />

</LinearLayout>

</LinearLayout>
<ListView android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111"/>
</android.support.v4.widget.DrawerLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ No user-identifiable information will be collected as part of this process!</str
<string name="header_report_settings">Reports</string>
<string name="label_report_currency">Select currency</string>
<string name="title_use_account_color">Account color in reports</string>
<string name="summary_use_account_color">Use account color in the pie chart</string>
<string name="summary_use_account_color">Use account color in the bar/pie chart</string>
<string name="label_confirm_passcode">Please confirm your passcode</string>
<string name="label_new_passcode">Enter your new passcode</string>
<string name="label_old_passcode">Enter your old passcode</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-el/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ No user-identifiable information will be collected as part of this process!
<string name="header_report_settings">Reports</string>
<string name="label_report_currency">Select currency</string>
<string name="title_use_account_color">Account color in reports</string>
<string name="summary_use_account_color">Use account color in the pie chart</string>
<string name="summary_use_account_color">Use account color in the bar/pie chart</string>
<string name="label_confirm_passcode">Please confirm your passcode</string>
<string name="label_new_passcode">Enter your new passcode</string>
<string name="label_old_passcode">Enter your old passcode</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-es-rMX/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ No user-identifiable information will be collected as part of this process!
<string name="header_report_settings">Reports</string>
<string name="label_report_currency">Select currency</string>
<string name="title_use_account_color">Account color in reports</string>
<string name="summary_use_account_color">Use account color in the pie chart</string>
<string name="summary_use_account_color">Use account color in the bar/pie chart</string>
<string name="label_confirm_passcode">Please confirm your passcode</string>
<string name="label_new_passcode">Enter your new passcode</string>
<string name="label_old_passcode">Enter your old passcode</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ Este proceso solo recoge informaci&#243;n que no permite identificar al usuario<
<string name="header_report_settings">Reports</string>
<string name="label_report_currency">Select currency</string>
<string name="title_use_account_color">Account color in reports</string>
<string name="summary_use_account_color">Use account color in the pie chart</string>
<string name="summary_use_account_color">Use account color in the bar/pie chart</string>
<string name="label_confirm_passcode">Confirme su contrase&#241;a</string>
<string name="label_new_passcode">Enter your new passcode</string>
<string name="label_old_passcode">Enter your old passcode</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ Aucune information permettant d\'identifier l\'utilisateur ne sera recueillis da
<string name="header_report_settings">Rapports</string>
<string name="label_report_currency">Sélectionnez la monnaie</string>
<string name="title_use_account_color">Couleur du compte dans les rapports</string>
<string name="summary_use_account_color">utiliser la couleur du compte dans le diagramme circulaire</string>
<string name="summary_use_account_color">utiliser la couleur du compte dans le diagramme bandes/circulaire</string>
<string name="label_confirm_passcode">Veuillez confirmer vorte code</string>
<string name="label_new_passcode">Entrez votre nouveau code</string>
<string name="label_old_passcode">Entrez votre ancien mot de passe</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ No user-identifiable information will be collected as part of this process!
<string name="header_report_settings">Reports</string>
<string name="label_report_currency">Select currency</string>
<string name="title_use_account_color">Account color in reports</string>
<string name="summary_use_account_color">Use account color in the pie chart</string>
<string name="summary_use_account_color">Use account color in the bar/pie chart</string>
<string name="label_confirm_passcode">Please confirm your passcode</string>
<string name="label_new_passcode">Enter your new passcode</string>
<string name="label_old_passcode">Enter your old passcode</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ No user-identifiable information will be collected as part of this process!
<string name="header_report_settings">Reports</string>
<string name="label_report_currency">Select currency</string>
<string name="title_use_account_color">Account color in reports</string>
<string name="summary_use_account_color">Use account color in the pie chart</string>
<string name="summary_use_account_color">Use account color in the bar/pie chart</string>
<string name="label_confirm_passcode">Please confirm your passcode</string>
<string name="label_new_passcode">Enter your new passcode</string>
<string name="label_old_passcode">Enter your old passcode</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ No user-identifiable information will be collected as part of this process!
<string name="header_report_settings">Reports</string>
<string name="label_report_currency">Select currency</string>
<string name="title_use_account_color">Account color in reports</string>
<string name="summary_use_account_color">Use account color in the pie chart</string>
<string name="summary_use_account_color">Use account color in the bar/pie chart</string>
<string name="label_confirm_passcode">Please confirm your passcode</string>
<string name="label_new_passcode">Enter your new passcode</string>
<string name="label_old_passcode">Enter your old passcode</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ Nenhuma informação de identificação do usuário será coletada neste proces
<string name="header_report_settings">Relatórios</string>
<string name="label_report_currency">Selecionar moeda</string>
<string name="title_use_account_color">Cor de contas nos relatórios</string>
<string name="summary_use_account_color">Utilizar cor de contas no gráfico de pizza</string>
<string name="summary_use_account_color">Utilizar cor de contas no gráfico de barras/pizza</string>
<string name="nav_menu_scheduled_backups">Backups agendados</string>
<string name="title_scheduled_exports">Exportações agendadas</string>
<string name="label_no_scheduled_exports_to_display">Sem exportações agendadas para mostrar</string>
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@
</plurals>
<string name="title_enable_crashlytics">启用崩溃日志</string>
<string name="msg_enable_crashlytics">Enable to send information about malfunctions to the developers for improvement (recommended).
No user-identifiable information will be collected as part of this process!</string>
No user-identifiable information will be collected as part of this process!
</string>
<string name="label_export_format">导出格式</string>
<string name="toast_backup_folder_not_found">找不到备份目录,请确认SD卡正常。</string>
<string name="label_old_passcode">先输入现在的密码</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@
<string name="title_report_prefs">Report Preferences</string>
<string name="label_report_currency">Select currency</string>
<string name="title_use_account_color">Account color in reports</string>
<string name="summary_use_account_color">Use account color in the pie chart</string>
<string name="summary_use_account_color">Use account color in the bar/pie chart</string>
<string name="header_report_settings">Reports</string>
<string name="menu_order_by_size">Order by size</string>
<string name="menu_toggle_legend">Toggle legend</string>
Expand Down

0 comments on commit 1ff057b

Please sign in to comment.