Skip to content

Commit

Permalink
Remove inapplicable options from scheduled actions context menu
Browse files Browse the repository at this point in the history
Update CHANGELOG
  • Loading branch information
codinguser committed Dec 1, 2015
1 parent 8b8f194 commit 3624798
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Change Log
===============================================================================
Version 2.0.4 *(2015-12-xx)*
Version 2.0.4 *(2015-12-02)*
----------------------------
* Fixed: Transaction export time not always working reliably
* Fixed: Renaming account causes transactions to be deleted
* Fixed: Progress dialog not displayed during initial import
* Fixed: Unable to finish first-run wizard if choosing to create accounts manually
* Fixed: Removed inapplicable options in scheduled actions context menu

Version 2.0.3 *(2015-11-21)*
----------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,12 +643,10 @@ public Timestamp getTimestampOfLastModification(){
new String[]{"MAX(" + TransactionEntry.COLUMN_MODIFIED_AT + ")"},
null, null, null, null, null);

Timestamp timestamp = null;
Timestamp timestamp = new Timestamp(System.currentTimeMillis());
if (cursor.moveToFirst()){
String timeString = cursor.getString(0);
if (timeString == null) //in case there were no transactions in the XML file (account structure only)
timestamp = new Timestamp(System.currentTimeMillis());
else {
if (timeString != null){ //in case there were no transactions in the XML file (account structure only)
timestamp = Timestamp.valueOf(timeString);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public class ScheduledActionsListFragment extends ListFragment implements
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater inflater = mode.getMenuInflater();
inflater.inflate(R.menu.transactions_context_menu, menu);
inflater.inflate(R.menu.schedxactions_context_menu, menu);
return true;
}

Expand Down
26 changes: 26 additions & 0 deletions app/src/main/res/menu/schedxactions_context_menu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2015 Ngewi Fet <ngewif@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.
-->

<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">

<item android:id="@+id/context_menu_delete"
android:icon="@drawable/content_discard_holo_dark"
android:title="@string/menu_delete"
app:showAsAction="always"
android:orderInCategory="3"/>
</menu>
3 changes: 1 addition & 2 deletions app/src/main/res/menu/transactions_context_menu.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2012 Ngewi Fet <ngewif@gmail.com>
Copyright (c) 2012 - 2015 Ngewi Fet <ngewif@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -26,7 +26,6 @@
android:title="@string/menu_duplicate_transaction"
app:showAsAction="always"
android:orderInCategory="2" />
<!-- TODO: Add duplicate option -->
<item android:id="@+id/context_menu_delete"
android:icon="@drawable/content_discard_holo_dark"
android:title="@string/menu_delete"
Expand Down

0 comments on commit 3624798

Please sign in to comment.