diff --git a/res/drawable-hdpi/ic_menu_publish_light.png b/res/drawable-hdpi/ic_menu_publish_light.png
deleted file mode 100644
index 72acf3dc..00000000
Binary files a/res/drawable-hdpi/ic_menu_publish_light.png and /dev/null differ
diff --git a/res/drawable-hdpi/ic_menu_published_light.png b/res/drawable-hdpi/ic_menu_published_light.png
new file mode 100644
index 00000000..599ca764
Binary files /dev/null and b/res/drawable-hdpi/ic_menu_published_light.png differ
diff --git a/res/drawable-hdpi/ic_menu_unpublished_light.png b/res/drawable-hdpi/ic_menu_unpublished_light.png
new file mode 100644
index 00000000..6d10cb92
Binary files /dev/null and b/res/drawable-hdpi/ic_menu_unpublished_light.png differ
diff --git a/res/drawable-hdpi/ic_read_light.png b/res/drawable-hdpi/ic_read_light.png
new file mode 100644
index 00000000..9ef52959
Binary files /dev/null and b/res/drawable-hdpi/ic_read_light.png differ
diff --git a/res/drawable-hdpi/ic_unread_light.png b/res/drawable-hdpi/ic_unread_light.png
new file mode 100644
index 00000000..d516f770
Binary files /dev/null and b/res/drawable-hdpi/ic_unread_light.png differ
diff --git a/res/drawable-xhdpi/ic_menu_publish_light.png b/res/drawable-xhdpi/ic_menu_publish_light.png
deleted file mode 100644
index 8c82c450..00000000
Binary files a/res/drawable-xhdpi/ic_menu_publish_light.png and /dev/null differ
diff --git a/res/drawable-xhdpi/ic_menu_published_light.png b/res/drawable-xhdpi/ic_menu_published_light.png
new file mode 100644
index 00000000..938ec3e3
Binary files /dev/null and b/res/drawable-xhdpi/ic_menu_published_light.png differ
diff --git a/res/drawable-xhdpi/ic_menu_unpublished_light.png b/res/drawable-xhdpi/ic_menu_unpublished_light.png
new file mode 100644
index 00000000..7b32106b
Binary files /dev/null and b/res/drawable-xhdpi/ic_menu_unpublished_light.png differ
diff --git a/res/drawable-xhdpi/ic_read_light.png b/res/drawable-xhdpi/ic_read_light.png
new file mode 100644
index 00000000..62e3d1ad
Binary files /dev/null and b/res/drawable-xhdpi/ic_read_light.png differ
diff --git a/res/drawable-xhdpi/ic_unread_light.png b/res/drawable-xhdpi/ic_unread_light.png
new file mode 100644
index 00000000..606c902c
Binary files /dev/null and b/res/drawable-xhdpi/ic_unread_light.png differ
diff --git a/res/drawable/s_menu_published_light.svg b/res/drawable/s_menu_published_light.svg
new file mode 100644
index 00000000..752fe0f6
--- /dev/null
+++ b/res/drawable/s_menu_published_light.svg
@@ -0,0 +1,189 @@
+
+
diff --git a/res/drawable/s_menu_publish_light.svg b/res/drawable/s_menu_unpublished_light.svg
similarity index 95%
rename from res/drawable/s_menu_publish_light.svg
rename to res/drawable/s_menu_unpublished_light.svg
index a0d818e2..6981beaf 100644
--- a/res/drawable/s_menu_publish_light.svg
+++ b/res/drawable/s_menu_unpublished_light.svg
@@ -13,10 +13,10 @@
id="RSSicon"
viewBox="0 0 32 32"
inkscape:version="0.48.4 r9939"
- sodipodi:docname="s_menu_publish_light.svg"
- inkscape:export-filename="C:\Users\fox\workspace\org.fox.ttrss\res\drawable-xhdpi\ic_menu_publish_light.png"
- inkscape:export-xdpi="475.98999"
- inkscape:export-ydpi="475.98999">
+ sodipodi:docname="s_menu_unpublished_light.svg"
+ inkscape:export-filename="C:\Users\fox\workspace\org.fox.ttrss\res\drawable-hdpi\ic_menu_unpublished_light.png"
+ inkscape:export-xdpi="270"
+ inkscape:export-ydpi="270">
diff --git a/res/menu/headlines_action_menu.xml b/res/menu/headlines_action_menu.xml
index 5764e179..c4e6d3c4 100644
--- a/res/menu/headlines_action_menu.xml
+++ b/res/menu/headlines_action_menu.xml
@@ -14,7 +14,7 @@
diff --git a/res/menu/main_menu.xml b/res/menu/main_menu.xml
index 7d41f16f..d7d5389e 100644
--- a/res/menu/main_menu.xml
+++ b/res/menu/main_menu.xml
@@ -87,7 +87,7 @@
android:title="@string/selection_toggle_marked"/>
diff --git a/res/menu/offline_menu.xml b/res/menu/offline_menu.xml
index a4dbd0f1..5a952e08 100644
--- a/res/menu/offline_menu.xml
+++ b/res/menu/offline_menu.xml
@@ -41,7 +41,7 @@
android:title="@string/selection_toggle_marked"/>
- 0) {
toggleArticlesUnread(tmp);
hf.notifyUpdated();
+ initMenu();
}
}
}
@@ -960,10 +964,13 @@ public class OnlineActivity extends CommonActivity {
case R.id.set_unread:
if (ap != null && ap.getSelectedArticle() != null) {
Article a = ap.getSelectedArticle();
- a.unread = true;
- saveArticleUnread(a);
+
+ if (a != null) {
+ a.unread = !a.unread;
+ saveArticleUnread(a);
+ }
+
if (hf != null) hf.notifyUpdated();
- //if (ap != null) ap.notifyUpdated();
}
return true;
case R.id.set_labels:
@@ -1188,7 +1195,8 @@ public class OnlineActivity extends CommonActivity {
public void saveArticleUnread(final Article article) {
ApiRequest req = new ApiRequest(getApplicationContext()) {
protected void onPostExecute(JsonElement result) {
- toast(R.string.article_set_unread);
+ //toast(R.string.article_set_unread);
+ initMenu();
}
};
@@ -1210,6 +1218,7 @@ public class OnlineActivity extends CommonActivity {
ApiRequest req = new ApiRequest(getApplicationContext()) {
protected void onPostExecute(JsonElement result) {
toast(article.marked ? R.string.notify_article_marked : R.string.notify_article_unmarked);
+ initMenu();
}
};
@@ -1232,6 +1241,7 @@ public class OnlineActivity extends CommonActivity {
ApiRequest req = new ApiRequest(getApplicationContext()) {
protected void onPostExecute(JsonElement result) {
toast(article.published ? R.string.notify_article_published : R.string.notify_article_unpublished);
+ initMenu();
}
};
@@ -1446,6 +1456,23 @@ public class OnlineActivity extends CommonActivity {
MenuItem search = m_menu.findItem(R.id.search);
search.setEnabled(getApiLevel() >= 2);
+ ArticlePager ap = (ArticlePager) getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
+
+ if (ap != null) {
+ Article article = ap.getSelectedArticle();
+
+ if (article != null) {
+ m_menu.findItem(R.id.toggle_marked).setIcon(article.marked ? R.drawable.ic_important_light :
+ R.drawable.ic_unimportant_light);
+
+ m_menu.findItem(R.id.toggle_published).setIcon(article.published ? R.drawable.ic_menu_published_light :
+ R.drawable.ic_menu_unpublished_light);
+
+ m_menu.findItem(R.id.set_unread).setIcon(article.unread ? R.drawable.ic_unread_light :
+ R.drawable.ic_read_light);
+ }
+ }
+
/* if (android.os.Build.VERSION.SDK_INT >= 14) {
ShareActionProvider shareProvider = (ShareActionProvider) m_menu.findItem(R.id.share_article).getActionProvider();