Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
codinguser committed Dec 19, 2013
2 parents bf79477 + 2136375 commit 9cfaed2
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 30 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Change Log
===============================================================================
Version 1.2.7 *(2013-12-18)*
----------------------------
* Fixed: Export format always defaults to QIF, ignoring user preference
* Improved: Better responsiveness of add transaction and add account buttons
* Improved: Russian translation

Version 1.2.6 *(2013-12-06)*
----------------------------
* Feature: Support for QIF export format
Expand Down
4 changes: 2 additions & 2 deletions app/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.gnucash.android"
android:versionCode="21"
android:versionName="1.2.6" >
android:versionCode="22"
android:versionName="1.2.7" >

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

Expand Down
2 changes: 1 addition & 1 deletion app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<description>Gnucash Android companion application</description>

<parent>
<version>1.2.6-SNAPSHOT</version>
<version>1.2.7-SNAPSHOT</version>
<groupId>org.gnucash.android</groupId>
<artifactId>gnucash-android-parent</artifactId>
</parent>
Expand Down
24 changes: 12 additions & 12 deletions app/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<string name="title_selected">%1$d выбрано</string>
<string name="label_transactions_total">Общая сумма:</string>
<string name="label_export_destination">Экспортировать в</string>
<string name="title_export_dialog">Export Transactions</string>
<string name="title_export_dialog">Экспорт проводок</string>
<string name="option_export_all_transactions">Экспортировать все</string>
<string name="hint_export_choice">Экспортировать все проводки, а не только новые.</string>
<string name="error_exporting">Ошибка при экспорте OFX</string>
Expand Down Expand Up @@ -331,17 +331,17 @@
<string name="summary_delete_all_transactions">Все проводки во всех счетах будут удалены!</string>
<string name="title_delete_all_transactions">Удалить все проводки</string>
<string name="toast_all_transactions_deleted">Все проводки удалены!</string>
<string name="title_progress_importing_accounts">Importing accounts</string>
<string name="toast_tap_again_to_confirm_delete">Tap again to confirm. ALL entries will be deleted!!</string>
<string name="section_header_transactions">Transactions</string>
<string name="section_header_accounts">Sub-Accounts</string>
<string name="menu_search_accounts">Search</string>
<string name="title_default_export_format">Default Export Format</string>
<string name="summary_default_export_format">File format to use by default when exporting transactions</string>
<string name="menu_export_transactions">Export transactions...</string>
<string name="title_progress_importing_accounts">Импортируются счета</string>
<string name="toast_tap_again_to_confirm_delete">Нажмите езё раз для подтверждения. ВСЕ записи будут удалены!</string>
<string name="section_header_transactions">Проводки</string>
<string name="section_header_accounts">Дочерние счета</string>
<string name="menu_search_accounts">Поиск</string>
<string name="title_default_export_format">Формат экспорта по умолчанию</string>
<string name="summary_default_export_format">Формат файла, используемый по умолчанию при экспорте</string>
<string name="menu_export_transactions">Экспортировать проводки...</string>
<!-- This should be the same name used by GnuCash desktop for imbalance accounts -->
<string name="imbalance_account_name">Imbalance</string>
<string name="title_progress_exporting_transactions">Exporting transactions</string>
<string name="imbalance_account_name">Дисбаланс</string>
<string name="title_progress_exporting_transactions">Проводки экспортируются</string>
<plurals name="label_sub_accounts">
<item quantity="one">%d дочерний счёт</item>
<item quantity="other">%d шт. дочерних счетов</item>
Expand All @@ -353,7 +353,7 @@
<item>АКТИВ</item>
<item>ПАССИВ</item>
<item>ДОХОДЫ</item>
<item>ТРАТЫ</item>
<item>РАСХОДЫ</item>
<item>PAYABLE</item>
<item>RECEIVABLE</item>
<item>EQUITY</item>
Expand Down
7 changes: 4 additions & 3 deletions app/src/org/gnucash/android/export/ExportDialogFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ public void onClick(View v) {
exportParameters.setExportTarget(position == 0 ? ExportParams.ExportTarget.SHARING : ExportParams.ExportTarget.SD_CARD);
exportParameters.setDeleteTransactionsAfterExport(mDeleteAllCheckBox.isChecked());

dismiss();

Log.i(TAG, "Commencing async export of transactions");
new ExporterTask(getActivity()).execute(exportParameters);

dismiss();
}

}
Expand All @@ -126,9 +126,9 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
bindViews();
mFilePath = getActivity().getExternalFilesDir(null) + "/" + buildExportFilename(mExportFormat);
getDialog().setTitle(R.string.title_export_dialog);
bindViews();
}

/**
Expand Down Expand Up @@ -164,6 +164,7 @@ public void onClick(View v) {
mSaveButton.setOnClickListener(new ExportClickListener());

String defaultExportFormat = sharedPrefs.getString(getString(R.string.key_default_export_format), ExportFormat.QIF.name());
mExportFormat = ExportFormat.valueOf(defaultExportFormat);
View.OnClickListener clickListener = new View.OnClickListener() {
@Override
public void onClick(View view) {
Expand Down
3 changes: 2 additions & 1 deletion app/src/org/gnucash/android/export/ExporterTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ protected Boolean doInBackground(ExportParams... params) {
*/
@Override
protected void onPostExecute(Boolean exportResult) {
mProgressDialog.dismiss();

if (!exportResult){
Toast.makeText(mContext,
Expand Down Expand Up @@ -176,6 +175,8 @@ protected void onPostExecute(Boolean exportResult) {
alertFragment.show(fragmentManager, "transactions_delete_confirmation_dialog");
}

mProgressDialog.dismiss();

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,14 @@ public void onUpdate(Context context, AppWidgetManager appWidgetManager,
WidgetConfigurationActivity.updateWidget(context, appWidgetId, accountId);
}
}

@Override

@Override
public void onEnabled(Context context) {
super.onEnabled(context);
WidgetConfigurationActivity.updateAllWidgets(context);
}

@Override
public void onDeleted(Context context, int[] appWidgetIds) {
super.onDeleted(context, appWidgetIds);
Editor editor = PreferenceManager.getDefaultSharedPreferences(context).edit();
Expand Down
25 changes: 23 additions & 2 deletions app/src/org/gnucash/android/ui/accounts/AccountsListFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.Rect;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
Expand All @@ -36,6 +37,7 @@
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.TouchDelegate;
import android.view.View;
import android.view.ViewGroup;
import android.widget.*;
Expand Down Expand Up @@ -666,9 +668,9 @@ public void bindView(View v, Context context, Cursor cursor) {
subAccountTextView.setVisibility(View.GONE);

// add a summary of transactions to the account view
TextView summary = (TextView) v
TextView accountBalanceTextView = (TextView) v
.findViewById(R.id.transactions_summary);
new AccountBalanceTask(summary, getActivity()).execute(accountId);
new AccountBalanceTask(accountBalanceTextView, getActivity()).execute(accountId);

boolean isPlaceholderAccount = mAccountsDbAdapter.isPlaceholderAccount(accountId);

Expand Down Expand Up @@ -705,6 +707,25 @@ public View getView(int position, View convertView, ViewGroup parent) {
secondaryText.setTextColor(getResources().getColor(android.R.color.secondary_text_light_nodisable));
}


//increase the touch target area for the add new transaction button

final View addTransactionButton = convertView.findViewById(R.id.btn_new_transaction);
final View parentView = convertView;
parentView.post(new Runnable() {
@Override
public void run() {
final android.graphics.Rect hitRect = new Rect();
float extraPadding = getResources().getDimension(R.dimen.edge_padding);
addTransactionButton.getHitRect(hitRect);
hitRect.right += extraPadding;
hitRect.bottom += extraPadding;
hitRect.top -= extraPadding;
hitRect.left -= extraPadding;
parentView.setTouchDelegate(new TouchDelegate(hitRect, addTransactionButton));
}
});

return convertView;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,15 @@

package org.gnucash.android.ui.settings;

import com.actionbarsherlock.app.SherlockFragmentActivity;
import org.gnucash.android.R;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;

import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockPreferenceActivity;
import org.gnucash.android.ui.transactions.TransactionsDeleteConfirmationDialog;
import org.gnucash.android.R;

/**
* Fragment for displaying transaction preferences
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import android.app.Activity;
import android.content.Context;
import android.database.Cursor;
import android.graphics.Rect;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
Expand All @@ -31,6 +32,7 @@
import android.util.Log;
import android.util.SparseBooleanArray;
import android.view.LayoutInflater;
import android.view.TouchDelegate;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
Expand Down Expand Up @@ -402,6 +404,24 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
checkbox.setChecked(false);
}

//increase the touch target area for the add new transaction button

final View checkBoxView = checkbox;
final View parentView = view;
parentView.post(new Runnable() {
@Override
public void run() {
float extraPadding = getResources().getDimension(R.dimen.edge_padding);
final android.graphics.Rect hitRect = new Rect();
checkBoxView.getHitRect(hitRect);
hitRect.right += extraPadding;
hitRect.bottom += 3*extraPadding;
hitRect.top -= extraPadding;
hitRect.left -= 2*extraPadding;
parentView.setTouchDelegate(new TouchDelegate(hitRect, checkBoxView));
}
});

return view;
}

Expand Down
2 changes: 1 addition & 1 deletion integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<version>1.2.6-SNAPSHOT</version>
<version>1.2.7-SNAPSHOT</version>
<groupId>org.gnucash.android</groupId>
<artifactId>gnucash-android-parent</artifactId>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<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">
<modelVersion>4.0.0</modelVersion>
<version>1.2.6-SNAPSHOT</version>
<version>1.2.7-SNAPSHOT</version>
<groupId>org.gnucash.android</groupId>
<artifactId>gnucash-android-parent</artifactId>
<name>GnuCash Android parent</name>
Expand Down

0 comments on commit 9cfaed2

Please sign in to comment.