[smuxi: 8/8] Frontend-GNOME: implemented message counter
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi: 8/8] Frontend-GNOME: implemented message counter
- Date: Fri, 28 Nov 2014 11:26:31 +0000 (UTC)
commit e352d54944fd7fc2d56ca832d443f8bd61cf10ff
Author: Mirco Bauer <meebey meebey net>
Date: Fri Nov 28 12:23:09 2014 +0100
Frontend-GNOME: implemented message counter
src/Frontend-GNOME/Views/ChatTreeView.cs | 5 ++++-
src/Frontend-GNOME/Views/Chats/ChatView.cs | 10 +++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/src/Frontend-GNOME/Views/ChatTreeView.cs b/src/Frontend-GNOME/Views/ChatTreeView.cs
index e93f42b..bb5db29 100644
--- a/src/Frontend-GNOME/Views/ChatTreeView.cs
+++ b/src/Frontend-GNOME/Views/ChatTreeView.cs
@@ -300,9 +300,12 @@ namespace Smuxi.Frontend.Gnome
Gdk.Color color;
string text = null;
- if (chat.HighlightCount > 1) {
+ if (chat.HighlightCount >= 1) {
color = ThemeSettings.HighlightColor;
text = chat.HighlightCount.ToString();
+ } else if (chat.ActivityCount >= 1) {
+ color = ThemeSettings.ActivityColor;
+ text = chat.ActivityCount.ToString();
} else {
// no highlight counter
renderer.Markup = String.Empty;
diff --git a/src/Frontend-GNOME/Views/Chats/ChatView.cs b/src/Frontend-GNOME/Views/Chats/ChatView.cs
index 7c82217..bb0fe77 100644
--- a/src/Frontend-GNOME/Views/Chats/ChatView.cs
+++ b/src/Frontend-GNOME/Views/Chats/ChatView.cs
@@ -1,7 +1,7 @@
/*
* Smuxi - Smart MUltipleXed Irc
*
- * Copyright (c) 2005-2013 Mirco Bauer <meebey meebey net>
+ * Copyright (c) 2005-2014 Mirco Bauer <meebey meebey net>
*
* Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
*
@@ -42,6 +42,7 @@ namespace Smuxi.Frontend.Gnome
private bool _HasHighlight;
public int HighlightCount { get; private set; }
private bool _HasActivity;
+ public int ActivityCount { get; private set; }
private bool _HasEvent;
private bool _IsSynced;
private Gtk.TextMark _EndMark;
@@ -146,6 +147,13 @@ namespace Smuxi.Frontend.Gnome
return _HasActivity;
}
set {
+ if (value) {
+ ActivityCount++;
+ OnStatusChanged(EventArgs.Empty);
+ } else {
+ ActivityCount = 0;
+ }
+
if (_HasActivity == value) {
// nothing to update
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]