Skip to content

Commit d308f08

Browse files
committed
Merge branch 'develop' into feature/qif_export
2 parents 4ebd206 + b81f44f commit d308f08

7 files changed

Lines changed: 47 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
11
Change Log
22
===============================================================================
3+
Version 1.2.5 *(2013-09-17)*
4+
----------------------------
5+
* Feature: Search accounts by name
6+
* Fixed: crash when deleting accounts
7+
* Fixed: auto-completing transaction names does not copy the time or export flag
8+
* Fixed: random crash when opening app (or loading accounts)
9+
10+
Version 1.2.4 *(2013-09-05)*
11+
----------------------------
12+
* Added support for detecting placeholder accounts during import
13+
* Use full qualified account names in account selection spinners
14+
* Loads complete transaction as a template when the autocomplete suggestion is selected
15+
* Fixed: selecting items from lists caused multiple to be selected in the wrong positions
16+
* Fixed: widgets not updated when all accounts or all transactions are deleted
17+
* Other minor bug fixes.
18+
319
Version 1.2.3 *(2013-08-28)*
420
----------------------------
521
* Fixed: crashes when editing/creating transactions
622
* Feature: Added Chinese language translation
723
* Feature: Autocomplete transaction descriptions
824
* Improved reliability of importing stock accounts
925
* Improved speed of loading account balance
10-
* Improved incrased touch target area of "new transaction" button in accounts list view
26+
* Improved increased touch target area of "new transaction" button in accounts list view
1127

1228
Version 1.2.2 *(2013-06-23)*
1329
----------------------------

app/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
1919
package="org.gnucash.android"
20-
android:versionCode="14"
21-
android:versionName="1.2.4" >
20+
android:versionCode="16"
21+
android:versionName="1.2.5" >
2222

2323
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15"/>
2424

app/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<description>Gnucash Android companion application</description>
2323

2424
<parent>
25-
<version>1.2.4-SNAPSHOT</version>
25+
<version>1.2.6-SNAPSHOT</version>
2626
<groupId>org.gnucash.android</groupId>
2727
<artifactId>gnucash-android-parent</artifactId>
2828
</parent>

app/src/org/gnucash/android/ui/accounts/AccountsListFragment.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ protected void deleteAccount(long rowId) {
310310
mAccountsDbAdapter.reassignParent(accountUID, null);
311311
Toast.makeText(getActivity(), R.string.toast_account_deleted, Toast.LENGTH_SHORT).show();
312312
WidgetConfigurationActivity.updateAllWidgets(getActivity().getApplicationContext());
313+
getLoaderManager().destroyLoader(0);
313314
}
314315
refreshList();
315316
}
@@ -729,7 +730,15 @@ protected Money doInBackground(Long... params) {
729730
cancel(true);
730731
return Money.getZeroInstance();
731732
}
732-
Money balance = accountsDbAdapter.getAccountBalance(params[0]);
733+
Money balance = Money.getZeroInstance();
734+
735+
try {
736+
balance = accountsDbAdapter.getAccountBalance(params[0]);
737+
} catch (IllegalArgumentException ex){
738+
//sometimes a load computation has been started and the data set changes.
739+
//the account ID may no longer exist. So we catch that exception here and do nothing
740+
Log.e(TAG, "Error computing account balance: " + ex);
741+
}
733742
return balance;
734743
}
735744

app/src/org/gnucash/android/ui/transactions/NewTransactionFragment.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,16 @@ public class NewTransactionFragment extends SherlockFragment implements
163163
*/
164164
private Spinner mDoubleAccountSpinner;
165165

166+
/**
167+
* Flag to note if double entry accounting is in use or not
168+
*/
166169
private boolean mUseDoubleEntry;
167170

171+
/**
172+
* Flag to note if the user has manually edited the amount of the transaction
173+
*/
174+
boolean mAmountManuallyEdited = false;
175+
168176
/**
169177
* Create the view and retrieve references to the UI elements
170178
*/
@@ -252,6 +260,8 @@ public Cursor runQuery(CharSequence name) {
252260
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
253261
mTransaction = mTransactionsDbAdapter.getTransaction(id);
254262
mTransaction.setUID(UUID.randomUUID().toString());
263+
mTransaction.setExported(false);
264+
mTransaction.setTime(System.currentTimeMillis());
255265
long accountId = ((TransactionsActivity)getSherlockActivity()).getCurrentAccountID();
256266
mTransaction.setAccountUID(mTransactionsDbAdapter.getAccountUID(accountId));
257267
initializeViewsWithTransaction();
@@ -269,7 +279,10 @@ private void initializeViewsWithTransaction(){
269279

270280
mNameEditText.setText(mTransaction.getName());
271281
mTransactionTypeButton.setChecked(mTransaction.getTransactionType() == TransactionType.DEBIT);
272-
mAmountEditText.setText(mTransaction.getAmount().toPlainString());
282+
if (!mAmountManuallyEdited){
283+
//when autocompleting, only change the amount if the user has not manually changed it already
284+
mAmountEditText.setText(mTransaction.getAmount().toPlainString());
285+
}
273286
mCurrencyTextView.setText(mTransaction.getAmount().getCurrency().getSymbol(Locale.getDefault()));
274287
mDescriptionEditText.setText(mTransaction.getDescription());
275288
mDateTextView.setText(DATE_FORMATTER.format(mTransaction.getTimeMillis()));
@@ -643,7 +656,7 @@ public void beforeTextChanged(CharSequence s, int start, int count,
643656
public void onTextChanged(CharSequence s, int start, int before,
644657
int count) {
645658
// nothing to see here, move along
646-
659+
mAmountManuallyEdited = true;
647660
}
648661

649662
}

integration-tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1818
<modelVersion>4.0.0</modelVersion>
1919
<parent>
20-
<version>1.2.4-SNAPSHOT</version>
20+
<version>1.2.6-SNAPSHOT</version>
2121
<groupId>org.gnucash.android</groupId>
2222
<artifactId>gnucash-android-parent</artifactId>
2323
</parent>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1919
<modelVersion>4.0.0</modelVersion>
20-
<version>1.2.4-SNAPSHOT</version>
20+
<version>1.2.6-SNAPSHOT</version>
2121
<groupId>org.gnucash.android</groupId>
2222
<artifactId>gnucash-android-parent</artifactId>
2323
<name>GnuCash Android parent</name>

0 commit comments

Comments
 (0)