[smuxi: 4/26] Engine, Frontend-GNOME: allow to hide the activity counter



commit dfacd123b5d6138c7d9614a596111efce280e207
Author: Mirco Bauer <meebey meebey net>
Date:   Thu Sep 24 11:42:50 2015 +0200

    Engine, Frontend-GNOME: allow to hide the activity counter
    
    The activity counter for messages and highlights can be hidden with:
    
        /config Interface/ShowActivityCounter=false
        /config save

 src/Engine/Config/Config.cs              |    2 ++
 src/Frontend-GNOME/Views/ChatTreeView.cs |    6 +++++-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/Engine/Config/Config.cs b/src/Engine/Config/Config.cs
index 1ed1c1d..0441882 100644
--- a/src/Engine/Config/Config.cs
+++ b/src/Engine/Config/Config.cs
@@ -248,6 +248,7 @@ namespace Smuxi.Engine
 
             prefix = "Engine/Users/DEFAULT/Interface/";
             Get(prefix+"ShowAdvancedSettings", false);
+            Get(prefix+"ShowActivityCounter", true);
 
             prefix = "Engine/Users/DEFAULT/Interface/Notebook/";
             Get(prefix+"TimestampFormat", "HH:mm");
@@ -508,6 +509,7 @@ namespace Smuxi.Engine
                 }
 
                 LoadUserEntry(user, "Interface/ShowAdvancedSettings", null);
+                LoadUserEntry(user, "Interface/ShowActivityCounter", null);
                 LoadUserEntry(user, "Interface/Notebook/TimestampFormat", null);
                 LoadUserEntry(user, "Interface/Notebook/TabPosition", null);
                 LoadUserEntry(user, "Interface/Notebook/BufferLines", null);
diff --git a/src/Frontend-GNOME/Views/ChatTreeView.cs b/src/Frontend-GNOME/Views/ChatTreeView.cs
index bb5db29..d2a72f7 100644
--- a/src/Frontend-GNOME/Views/ChatTreeView.cs
+++ b/src/Frontend-GNOME/Views/ChatTreeView.cs
@@ -1,6 +1,6 @@
 // Smuxi - Smart MUltipleXed Irc
 //
-// Copyright (c) 2013-2014 Mirco Bauer <meebey meebey net>
+// Copyright (c) 2013-2015 Mirco Bauer <meebey meebey net>
 //
 // Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
 //
@@ -27,6 +27,7 @@ namespace Smuxi.Frontend.Gnome
     {
         public Gtk.TreeStore TreeStore { get; private set; }
         ThemeSettings ThemeSettings { get; set; }
+        Gtk.TreeViewColumn ActivityColumn { get; set; }
         int f_CurrentChatNumber;
 
         public ChatView CurrentChatView {
@@ -114,6 +115,7 @@ namespace Smuxi.Frontend.Gnome
             column.Sizing = Gtk.TreeViewColumnSizing.Autosize;
             column.SetCellDataFunc(cellRenderer, new Gtk.TreeCellDataFunc(RenderChatViewActivity));
             AppendColumn(column);
+            ActivityColumn = column;
         }
 
         public virtual void Append(ChatView chatView)
@@ -214,6 +216,8 @@ namespace Smuxi.Frontend.Gnome
                 ModifyText(Gtk.StateType.Normal, ThemeSettings.ForegroundColor.Value);
             }
             ModifyFont(ThemeSettings.FontDescription);
+
+            ActivityColumn.Visible = (bool) config["Interface/ShowActivityCounter"];
         }
 
         protected virtual void RenderChatViewIcon(Gtk.TreeViewColumn column,


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