[smuxi: 4/6] Frontend-SWF: Stubby but functional topic support



commit bc6dca6c3a3e6b1fd5b92b4e70b5a636867faa6c
Author: Calvin B <calvin imaginarycode com>
Date:   Sat Sep 28 15:30:15 2013 -0300

    Frontend-SWF: Stubby but functional topic support
    
    It's not exactly the best, but it's a start. Third try for style compliance.

 src/Frontend-SWF/Chats/GroupChatView.cs |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/Frontend-SWF/Chats/GroupChatView.cs b/src/Frontend-SWF/Chats/GroupChatView.cs
index a9047f8..2d7985b 100644
--- a/src/Frontend-SWF/Chats/GroupChatView.cs
+++ b/src/Frontend-SWF/Chats/GroupChatView.cs
@@ -40,6 +40,7 @@ namespace Smuxi.Frontend.Swf
     {
         private TextBox _TopicTextView;
         private ListBox _PersonListBox;
+        private MessageModel _Topic;
 
         public GroupChatView(ChatModel chat) :
                         base(chat)
@@ -119,6 +120,7 @@ namespace Smuxi.Frontend.Swf
             foreach (PersonModel person in persons.Values) {
                 _PersonListBox.Items.Add(person.IdentityName);
             }
+            Topic = GroupChatModel.Topic;
         }
 
         public override void Disable()
@@ -137,5 +139,22 @@ namespace Smuxi.Frontend.Swf
                 return new List<PersonModel>(participants.OrderBy(x => x));
             }
         }
+
+        public MessageModel Topic
+        {
+            get {
+                return _Topic;
+            }
+            set {
+                _Topic = value;
+                _TopicTextView.Clear();
+                if (value != null) {
+                    // TODO: Convert the TextBox into a rich one, and then add parsing code (like in 
ChatView)
+                    // TODO: And also wrapping
+                    _TopicTextView.Text = value.ToString();
+                }
+                _TopicTextView.Visible = !(_TopicTextView.Text == String.Empty);
+            }
+        }
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]