[smuxi: 1/2] Frontend-STFL: Handle image message parts (closes #1035).
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi: 1/2] Frontend-STFL: Handle image message parts (closes #1035).
- Date: Mon, 16 Mar 2015 23:59:21 +0000 (UTC)
commit 37d8d28982e28ce0a9f3a62bcc48ffcf6c9084e2
Author: Ondřej Hošek <ondra hosek gmail com>
Date: Mon Mar 16 00:16:58 2015 +0100
Frontend-STFL: Handle image message parts (closes #1035).
Whenever an ImageMessagePartModel is encountered, output the
AlternativeText.
src/Frontend-STFL/Views/ChatView.cs | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/Frontend-STFL/Views/ChatView.cs b/src/Frontend-STFL/Views/ChatView.cs
index 950aa76..1cca5e6 100644
--- a/src/Frontend-STFL/Views/ChatView.cs
+++ b/src/Frontend-STFL/Views/ChatView.cs
@@ -314,6 +314,11 @@ namespace Smuxi.Frontend.Stfl
line.Append(escapedText);
}
msgLength += txtPart.Text.Length;
+ } else if (msgPart is ImageMessagePartModel) {
+ var imgPart = (ImageMessagePartModel)msgPart;
+ string escapedAltText = StflApi.EscapeRichText(imgPart.AlternativeText);
+ line.Append(escapedAltText);
+ msgLength += escapedAltText.Length;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]