aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-05 12:49:43 +0200
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-06 15:28:19 +0200
commit77491039097734ce746b5b46791464bd236d4703 (patch)
tree2f97f49b740cc66fcf8618b6811a8f189106d830
parentcc977eee9094b4c006fc56d87772a11c7ac11a08 (diff)
added attach file action
-rw-r--r--res/drawable-hdpi/ic_action_new_attachment.pngbin0 -> 648 bytes
-rw-r--r--res/drawable-mdpi/ic_action_new_attachment.pngbin0 -> 468 bytes
-rw-r--r--res/drawable-xhdpi/ic_action_new_attachment.pngbin0 -> 789 bytes
-rw-r--r--res/drawable-xxhdpi/ic_action_new_attachment.pngbin0 -> 1112 bytes
-rw-r--r--res/menu/conversations.xml7
-rw-r--r--res/values/strings.xml1
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java4
7 files changed, 12 insertions, 0 deletions
diff --git a/res/drawable-hdpi/ic_action_new_attachment.png b/res/drawable-hdpi/ic_action_new_attachment.png
new file mode 100644
index 000000000..28507da2d
--- /dev/null
+++ b/res/drawable-hdpi/ic_action_new_attachment.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_action_new_attachment.png b/res/drawable-mdpi/ic_action_new_attachment.png
new file mode 100644
index 000000000..330586555
--- /dev/null
+++ b/res/drawable-mdpi/ic_action_new_attachment.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_action_new_attachment.png b/res/drawable-xhdpi/ic_action_new_attachment.png
new file mode 100644
index 000000000..4948feec2
--- /dev/null
+++ b/res/drawable-xhdpi/ic_action_new_attachment.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_action_new_attachment.png b/res/drawable-xxhdpi/ic_action_new_attachment.png
new file mode 100644
index 000000000..785538862
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_action_new_attachment.png
Binary files differ
diff --git a/res/menu/conversations.xml b/res/menu/conversations.xml
index 5902e74f4..3dfc12ddb 100644
--- a/res/menu/conversations.xml
+++ b/res/menu/conversations.xml
@@ -15,6 +15,13 @@
android:title="@string/action_secure" />
<item
+ android:id="@+id/action_attach_file"
+ android:orderInCategory="30"
+ android:showAsAction="ifRoom"
+ android:icon="@drawable/ic_action_new_attachment"
+ android:title="@string/action_attach_file" />
+
+ <item
android:id="@+id/action_contact_details"
android:orderInCategory="40"
android:showAsAction="ifRoom"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 9d1b42ac8..e2424f532 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -47,4 +47,5 @@
<string name="problem_connecting_to_account">Unable to connect to account</string>
<string name="problem_connecting_to_accounts">Unable to connect to multiple accounts</string>
<string name="touch_to_fix">Touch here to manage your accounts</string>
+ <string name="action_attach_file">Attach file</string>
</resources>
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index f47e8a8cd..41ee6336d 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -234,6 +234,7 @@ public class ConversationActivity extends XmppActivity {
MenuItem menuMucDetails = (MenuItem) menu.findItem(R.id.action_muc_details);
MenuItem menuContactDetails = (MenuItem) menu.findItem(R.id.action_contact_details);
MenuItem menuInviteContacts = (MenuItem) menu.findItem(R.id.action_invite);
+ MenuItem menuAttach = (MenuItem) menu.findItem(R.id.action_attach_file);
if ((spl.isOpen()&&(spl.isSlideable()))) {
menuArchive.setVisible(false);
@@ -241,6 +242,7 @@ public class ConversationActivity extends XmppActivity {
menuContactDetails.setVisible(false);
menuSecure.setVisible(false);
menuInviteContacts.setVisible(false);
+ menuAttach.setVisible(false);
} else {
((MenuItem) menu.findItem(R.id.action_add)).setVisible(!spl.isSlideable());
if (this.getSelectedConversation()!=null) {
@@ -249,10 +251,12 @@ public class ConversationActivity extends XmppActivity {
menuContactDetails.setVisible(false);
menuSecure.setVisible(false);
menuInviteContacts.setVisible(true);
+ menuAttach.setVisible(false);
} else {
menuContactDetails.setVisible(true);
menuMucDetails.setVisible(false);
menuInviteContacts.setVisible(false);
+ menuAttach.setVisible(true);
if (this.getSelectedConversation().getLatestMessage().getEncryption() != Message.ENCRYPTION_NONE) {
menuSecure.setIcon(R.drawable.ic_action_secure);
}