From 1a6027d380f946f9061e76066ff930bbd0578ef0 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Tue, 6 Apr 2010 01:00:23 +0200 Subject: [PATCH 1/7] Dummy code for history scrollback --- src/org/yaaic/activity/ConversationActivity.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/org/yaaic/activity/ConversationActivity.java b/src/org/yaaic/activity/ConversationActivity.java index 8e3913d..ea3e035 100644 --- a/src/org/yaaic/activity/ConversationActivity.java +++ b/src/org/yaaic/activity/ConversationActivity.java @@ -362,6 +362,16 @@ public class ConversationActivity extends Activity implements ServiceConnection, */ public boolean onKey(View view, int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_DPAD_UP && event.getAction() == KeyEvent.ACTION_UP) { + // XXX: History up (Implement me..) + return true; + } + + if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN && event.getAction() == KeyEvent.ACTION_UP) { + // XXX: History down (Implement me..) + return true; + } + if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) { if (!server.isConnected()) { Message message = new Message("Not connected"); From c26edf0abf43711c1620cc0211eb091e34c18ca8 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Tue, 6 Apr 2010 19:43:39 +0200 Subject: [PATCH 2/7] Moved some strings from strings.xml to application.xml (No need to translate) --- res/values/application.xml | 8 ++++++++ res/values/strings.xml | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 res/values/application.xml diff --git a/res/values/application.xml b/res/values/application.xml new file mode 100644 index 0000000..ce9589b --- /dev/null +++ b/res/values/application.xml @@ -0,0 +1,8 @@ + + + Yaaic + Yet Another Android IRC Client + 0.2 + http://www.yaaic.org + (C) 2009-2010 Sebastian Kaspari + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index f0cf65e..14c20e5 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1,11 +1,5 @@ - Yaaic - Yet Another Android IRC Client - 0.2 - http://www.yaaic.org - (C) 2009-2010 Sebastian Kaspari - Add server Settings About From beee987dd92028baed396d6e4102ee101213e47a Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Tue, 6 Apr 2010 19:48:38 +0200 Subject: [PATCH 3/7] Moved licence information to application.xml --- res/values/application.xml | 5 +++++ res/values/strings.xml | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/res/values/application.xml b/res/values/application.xml index ce9589b..48e2c4d 100644 --- a/res/values/application.xml +++ b/res/values/application.xml @@ -5,4 +5,9 @@ 0.2 http://www.yaaic.org (C) 2009-2010 Sebastian Kaspari + + + Yaaic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + Yaaic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 14c20e5..890ec0c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -21,18 +21,14 @@ Join Join Channel Close + Users Connect Disconnect Edit Delete About - - - Yaaic is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - Yaaic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - + Settings Join channel From 9022bb8f581b83445c445569b31bb37a8988af81 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Tue, 6 Apr 2010 19:48:55 +0200 Subject: [PATCH 4/7] Removed unused animations --- res/anim/slide_left_in.xml | 19 ------------------- res/anim/slide_left_out.xml | 19 ------------------- res/anim/slide_right_in.xml | 19 ------------------- res/anim/slide_right_out.xml | 19 ------------------- 4 files changed, 76 deletions(-) delete mode 100644 res/anim/slide_left_in.xml delete mode 100644 res/anim/slide_left_out.xml delete mode 100644 res/anim/slide_right_in.xml delete mode 100644 res/anim/slide_right_out.xml diff --git a/res/anim/slide_left_in.xml b/res/anim/slide_left_in.xml deleted file mode 100644 index 8760491..0000000 --- a/res/anim/slide_left_in.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/res/anim/slide_left_out.xml b/res/anim/slide_left_out.xml deleted file mode 100644 index e523759..0000000 --- a/res/anim/slide_left_out.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/res/anim/slide_right_in.xml b/res/anim/slide_right_in.xml deleted file mode 100644 index 7aaacdb..0000000 --- a/res/anim/slide_right_in.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/res/anim/slide_right_out.xml b/res/anim/slide_right_out.xml deleted file mode 100644 index b8f06f6..0000000 --- a/res/anim/slide_right_out.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - From 4072ee6c5f9c5c5c970947745d5beb10fd2f5f84 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Tue, 6 Apr 2010 20:00:57 +0200 Subject: [PATCH 5/7] ConversationActivity: Added "Users" to menu --- res/drawable/menu_users.png | Bin 0 -> 2257 bytes res/menu/conversations.xml | 4 ++++ src/org/yaaic/activity/ConversationActivity.java | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 res/drawable/menu_users.png diff --git a/res/drawable/menu_users.png b/res/drawable/menu_users.png new file mode 100644 index 0000000000000000000000000000000000000000..a5bd331f252f6e4f2b4132acf88c38f03376a6e1 GIT binary patch literal 2257 zcmV;?2rl=DP)vR&2Gc7MNIz6;U*q)&2~Z3f26>BBJPb zm}#P>X=>W_-n-{H`#yKL-Sl3&3}Sxpa=ho9@B7~8eV_No`BWVahw?rTgYuq_VF1Gb z{_g;c?=V+&`tA6S=MM>hD!k?+=K6?xHX(hyZr!@or84{X?^ktmjbbf_elEoB2^iIb zI-rV8{UK(`v17+#dwP1zQ>RXSvS`t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11u%F4Qg)cAk}OG{a9D9==i_-R|XaA7GZ`7yH4NLk^TjhJSUEZAn}?Ay05 zNf!@p1JLLLSLU$zP6MopCY5mCf-kIMROuG{E~XM9pSu*U!RO$4 zG5VwWpD}Phk`~wZSh7Rq-l*C!x^Ho}yHTxpMMp=g>|xkG%f4Md*cPDiiadS#bRvST z4EiKO$rNNLmy6QUSf?sIJ^eS(Zz@1clkGV@^G5Lj5OlWcKyAg_zQ}w8?*fJUj02=H zd5T~Lox;zYIrFCsYUjb)k&%&+j1Kjw`0kaKRo_-T#UVkLsLVEZ0my}oZ^^^*nV&de z7=P~Exlhse$AZJDsHXjt(~r8kI$HV<(Cy}uB}*>MpFh7*DA=nzQgH@h(|un%-sM=u zS^2=4nwkj2z?Y!Wa;#$@6-Wt+D@w5Xf)WbSCOcUxQtwVh&D#fCk~(IT z_fTY<)2N(tSvB>_y9(R^TU_kTf>>Ky%lTFC=yKd{6(@9dca`$w95o<6KYs%(HOUR5Aw1~=kg!vyPJQ5sUY;DUJHS^|CXe8T{S0Sp5e f2JpuCTYv!o#k_Iy. android:id="@+id/join" android:title="@string/join_channel" android:icon="@android:drawable/ic_menu_add" /> + Date: Tue, 6 Apr 2010 20:31:44 +0200 Subject: [PATCH 6/7] ConversationActivity: onPause(): Prevent null pointer exception --- src/org/yaaic/activity/ConversationActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/yaaic/activity/ConversationActivity.java b/src/org/yaaic/activity/ConversationActivity.java index 484e301..be42bba 100644 --- a/src/org/yaaic/activity/ConversationActivity.java +++ b/src/org/yaaic/activity/ConversationActivity.java @@ -169,7 +169,9 @@ public class ConversationActivity extends Activity implements ServiceConnection, { super.onPause(); - binder.getService().checkServiceStatus(); + if (binder != null && binder.getService() != null) { + binder.getService().checkServiceStatus(); + } /*if (!binder.getService().hasConnections()) { Log.d("Yaaic", "Stopping service"); From 94920feff224a175501d49c9ccdb30cbec1f13e2 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Tue, 6 Apr 2010 20:32:10 +0200 Subject: [PATCH 7/7] Added empty UserActivity --- AndroidManifest.xml | 5 +++ res/values/strings.xml | 2 ++ .../yaaic/activity/ConversationActivity.java | 13 +++++--- src/org/yaaic/activity/UsersActivity.java | 33 +++++++++++++++++++ 4 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 src/org/yaaic/activity/UsersActivity.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index dfca2e6..07b047d 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -63,6 +63,11 @@ along with Yaaic. If not, see . android:label="@string/join_label" android:theme="@android:style/Theme.Dialog"> + + diff --git a/res/values/strings.xml b/res/values/strings.xml index 890ec0c..dde54c0 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -32,4 +32,6 @@ Settings Join channel + + Users diff --git a/src/org/yaaic/activity/ConversationActivity.java b/src/org/yaaic/activity/ConversationActivity.java index be42bba..6922fdc 100644 --- a/src/org/yaaic/activity/ConversationActivity.java +++ b/src/org/yaaic/activity/ConversationActivity.java @@ -237,9 +237,9 @@ public class ConversationActivity extends Activity implements ServiceConnection, finish(); break; case R.id.close: - Conversation conversation = deckAdapter.getItem(deck.getSelectedItemPosition()); - if (conversation.getType() != Conversation.TYPE_SERVER) { - onRemoveConversation(conversation.getName()); + Conversation conversationToClose = deckAdapter.getItem(deck.getSelectedItemPosition()); + if (conversationToClose.getType() != Conversation.TYPE_SERVER) { + onRemoveConversation(conversationToClose.getName()); } else { Toast.makeText(this, "You can not close the server info window", Toast.LENGTH_SHORT).show(); } @@ -248,7 +248,12 @@ public class ConversationActivity extends Activity implements ServiceConnection, startActivityForResult(new Intent(this, JoinActivity.class), 0); break; case R.id.users: - // XXX: Todo, launch an user activity.. + Conversation conversationForUserList = deckAdapter.getItem(deck.getSelectedItemPosition()); + if (conversationForUserList.getType() == Conversation.TYPE_CHANNEL) { + startActivity(new Intent(this, UsersActivity.class)); + } else { + Toast.makeText(this, "Only usable from within a channel", Toast.LENGTH_SHORT).show(); + } break; } diff --git a/src/org/yaaic/activity/UsersActivity.java b/src/org/yaaic/activity/UsersActivity.java new file mode 100644 index 0000000..49853dd --- /dev/null +++ b/src/org/yaaic/activity/UsersActivity.java @@ -0,0 +1,33 @@ +/* +Yaaic - Yet Another Android IRC Client + +Copyright 2009-2010 Sebastian Kaspari + +This file is part of Yaaic. + +Yaaic is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Yaaic is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Yaaic. If not, see . +*/ +package org.yaaic.activity; + +import android.app.Activity; + +/** + * User Activity - Shows a list of users in the current channel + * + * @author Sebastian Kaspari + */ +public class UsersActivity extends Activity +{ + +}