From 20a66a8dc20924e688c2afe457f4195daa4b08c1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 30 Nov 2011 12:59:23 +0300 Subject: [PATCH] add several menu icons from http://www.androidicons.com/freebies.php --- README | 5 +++- res/drawable-hdpi/ic_menu_database.png | Bin 0 -> 1977 bytes res/drawable-hdpi/ic_menu_exit.png | Bin 0 -> 1704 bytes res/drawable-hdpi/ic_menu_tick.png | Bin 0 -> 3283 bytes res/menu/main_menu.xml | 16 +++++++----- res/values/strings.xml | 4 +-- src/org/fox/ttrss/HeadlinesFragment.java | 2 +- src/org/fox/ttrss/MainActivity.java | 31 +++++++++++------------ 8 files changed, 31 insertions(+), 27 deletions(-) create mode 100644 res/drawable-hdpi/ic_menu_database.png create mode 100644 res/drawable-hdpi/ic_menu_exit.png create mode 100644 res/drawable-hdpi/ic_menu_tick.png diff --git a/README b/README index f4638435..576bca0b 100644 --- a/README +++ b/README @@ -1,3 +1,6 @@ Tiny Tiny RSS client for Android tablets -Licensed under GNU GPL version 2. \ No newline at end of file +Uses several free android icons from http://www.androidicons.com/freebies.php + +Licensed under GNU GPL version 2. + diff --git a/res/drawable-hdpi/ic_menu_database.png b/res/drawable-hdpi/ic_menu_database.png new file mode 100644 index 0000000000000000000000000000000000000000..8f89ade5c56d8595dda7c65ab2c1332820a73e95 GIT binary patch literal 1977 zcmV;q2S)gbP)PL4~w>`fAW9BeQge?xqVU5XJS|M3* z%Vm$8I3|doM2fQr6h{gSMnMsKh^38Ca>zB8ND==55|fmh+H$dDmJhC>E23?nyg z-1tVL(fC~u1k+mU5+MYH>@=;l9>!E(39U5wS>?K$KEYNLr=(wppV}gVb zV2lkW~V7vrQ@ejB~zgG9NaQ zZJsd(%d#HB@EiBM#0Vi;YaO3BaiaSA_3LwtF;^)Cr4&k~5`+-&eV+q><2aB~f^*|N z;axuU2qJ{E$H&L30OI}~^@DAiIHa|v0L0U$Pp4K^R&Fb$z5}4p{oi1?n@sf~*r1gD z`Pi{zKRQ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i)^J^%1%{U=9Ojn$m5Sc{w#oT)DWC)P3v@r1xW-DI)424E2^rl&StZY zENN0_rg5Igwj8T;^6vWe>o)_4;}#_sNAIn!KaJ>j}yRV+UhV z6!l;*`0T?EKYR=~ET=Aw)%_SS00Dsf{`>FuT)lerXPTznZyy4;L6s(uRd>{K!!j@+ zg#4qet?lQ%y}cg*Pypn2JpSL)Sh#*U$uqyZ8D-|5q*A5A8ceY&o%%;j>vQfspA zpS1ce{dt0IHG&`{MNvHG^ZEX|X3d&6Q2?W28q@ggG~?%Vt=Pn)U{P*e*FERYpI6EGTTsG)`$YN(-x8fvI&{U6gYcvmS7 RY9s&v002ovPDHLkV1jW}8YTb$ literal 0 HcmV?d00001 diff --git a/res/menu/main_menu.xml b/res/menu/main_menu.xml index 607dce2b..09a7050d 100644 --- a/res/menu/main_menu.xml +++ b/res/menu/main_menu.xml @@ -24,32 +24,34 @@ - + android:title="@string/load_more_articles"/> --> + android:title="@string/headlines_mark_as_read"/> - + android:title="@string/show_all_articles"/> --> diff --git a/res/values/strings.xml b/res/values/strings.xml index b7cc41be..82793a07 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -34,7 +34,7 @@ Refresh feeds Close article Share article - Mark as read + Mark read Sort feeds by unread count Load more Show all articles @@ -70,7 +70,7 @@ No headlines to display Browse categories like feeds Use category context menu to override this setting - Catchup + Mark read No error Error: Unknown error (see log) Error: 401 unauthorized diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index 73b6da4a..d205ce07 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -222,7 +222,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener { ListView list = (ListView)getView().findViewById(R.id.headlines); - if (list != null && m_offset != 0) { + if (list != null && m_offset != 0 && articles.size() > 0) { list.setSelection(last_position-1); } diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index 370c441f..f51ef307 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -443,13 +443,13 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe item.setTitle(R.string.menu_unread_feeds); } - item = menu.findItem(R.id.show_all_articles); + /* item = menu.findItem(R.id.show_all_articles); if (getUnreadArticlesOnly()) { item.setTitle(R.string.show_all_articles); } else { item.setTitle(R.string.show_unread_articles); - } + } */ return true; } @@ -588,28 +588,30 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe } return true; - case R.id.catchup_and_load: + case R.id.headlines_mark_as_read: if (hf != null) { - final ArticleList articles = hf.getUnreadArticles(); + ArticleList articles = hf.getUnreadArticles(); + for (Article a : articles) + a.unread = false; + ApiRequest req = new ApiRequest(getApplicationContext()) { @Override protected void onPostExecute(JsonElement result) { if (result != null) { - for (Article a : articles) - a.unread = false; - viewFeed(m_activeFeed, true); } } }; - + + final String articleIds = articlesToIdString(articles); + @SuppressWarnings("serial") HashMap map = new HashMap() { { put("sid", m_sessionId); put("op", "updateArticle"); - put("article_ids", articlesToIdString(articles)); + put("article_ids", articleIds); put("mode", "0"); put("field", "2"); } @@ -619,9 +621,6 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe } return true; - case R.id.load_more_articles: - viewFeed(m_activeFeed, true); - return true; case R.id.share_article: shareArticle(m_selectedArticle); return true; @@ -695,7 +694,7 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe } return true; - case R.id.show_all_articles: + /* case R.id.show_all_articles: setUnreadArticlesOnly(!getUnreadArticlesOnly()); if (getUnreadArticlesOnly()) { @@ -704,7 +703,7 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe item.setTitle(R.string.show_unread_articles); } - return true; + return true; */ default: return super.onOptionsItemSelected(item); } @@ -754,8 +753,8 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe m_menu.setGroupVisible(R.id.menu_group_logged_out, false); if (m_activeFeed != null) { - m_menu.findItem(R.id.load_more_articles).setVisible(m_canLoadMore); - m_menu.findItem(R.id.show_all_articles).setVisible(true); + //m_menu.findItem(R.id.load_more_articles).setVisible(m_canLoadMore); + //m_menu.findItem(R.id.show_all_articles).setVisible(true); } else { m_menu.setGroupVisible(R.id.menu_group_headlines, false); m_menu.setGroupVisible(R.id.menu_group_headlines_selection, false);