[smuxi: 99/179] Frontend-SWF: fix warnings



commit c00260515bf22152c361ffbc2adcd9ed31cb1daf
Author: Andres G. Aragoneses <knocte gmail com>
Date:   Tue Oct 18 13:48:18 2016 +0800

    Frontend-SWF: fix warnings

 src/Frontend-SWF/Chats/ChatView.cs |    2 --
 src/Frontend-SWF/Entry.cs          |    6 +++---
 src/Frontend-SWF/Frontend.cs       |    5 +----
 src/Frontend-SWF/MainWindow.cs     |    3 +--
 src/Frontend-SWF/SwfUI.cs          |    7 -------
 5 files changed, 5 insertions(+), 18 deletions(-)
---
diff --git a/src/Frontend-SWF/Chats/ChatView.cs b/src/Frontend-SWF/Chats/ChatView.cs
index 73884cd..fdafd9c 100644
--- a/src/Frontend-SWF/Chats/ChatView.cs
+++ b/src/Frontend-SWF/Chats/ChatView.cs
@@ -250,10 +250,8 @@ namespace Smuxi.Frontend.Swf
                 }
                 font = new Font(FontFamily.GenericMonospace, defaultSize.Value);
             } else {
-                string fontWeigth = null;
                 if (fontStyle.Contains(" ")) {
                     int pos = fontStyle.IndexOf(" ");
-                    fontWeigth = fontStyle.Substring(0, pos);
                     fontStyle = fontStyle.Substring(pos + 1);
                 }
                 FontStyle style = (FontStyle) Enum.Parse(typeof(FontStyle), fontStyle);
diff --git a/src/Frontend-SWF/Entry.cs b/src/Frontend-SWF/Entry.cs
index 88168f5..acfc9d2 100644
--- a/src/Frontend-SWF/Entry.cs
+++ b/src/Frontend-SWF/Entry.cs
@@ -195,10 +195,8 @@ namespace Smuxi.Frontend.Swf
                 }
                 font = new Font(FontFamily.GenericMonospace, defaultSize.Value);
             } else {
-                string fontWeigth = null;
                 if (fontStyle.Contains(" ")) {
                     int pos = fontStyle.IndexOf(" ");
-                    fontWeigth = fontStyle.Substring(0, pos);
                     fontStyle = fontStyle.Substring(pos + 1);
                 }
                 FontStyle style = (FontStyle) Enum.Parse(typeof(FontStyle), fontStyle);
@@ -437,6 +435,7 @@ namespace Smuxi.Frontend.Swf
                 if (Text.IndexOf("\n") != -1) {
                     // seems to be a paste, so let's break it apart
                     string[] msgParts = Text.Split(new char[] {'\n'});
+                    /* TODO?
                     if (msgParts.Length > 3) {
                        string msg = String.Format(_("You are going to paste {0} lines, do you want to 
continue?"),
                                                                           msgParts.Length);
@@ -453,8 +452,9 @@ namespace Smuxi.Frontend.Swf
                                Text = String.Empty;
                                return;
                                        }
-                        */
+
                        }
+                    */
                        foreach (string msg in msgParts) {
                            ExecuteCommand(msg);
                        }
diff --git a/src/Frontend-SWF/Frontend.cs b/src/Frontend-SWF/Frontend.cs
index 1905e00..8cd73ca 100644
--- a/src/Frontend-SWF/Frontend.cs
+++ b/src/Frontend-SWF/Frontend.cs
@@ -43,7 +43,6 @@ namespace Smuxi.Frontend.Swf
         private static readonly string    _Name = "smuxi";
         private static readonly string    _UIName = "SWF (WinForms)";
         private static Version            _Version;
-        private static string             _VersionNumber;
         private static string             _VersionString;
         private static Version            _EngineVersion;
         private static MainWindow         _MainWindow;
@@ -51,8 +50,7 @@ namespace Smuxi.Frontend.Swf
         private static Session            _Session;
         private static UserConfig         _UserConfig;
         private static FrontendManager    _FrontendManager;
-        private static object             _UnhandledExceptionSyncRoot = new Object();
-        
+
         public static string Name {
             get {
                 return _Name;
@@ -138,7 +136,6 @@ namespace Smuxi.Frontend.Swf
             AssemblyProductAttribute pr = (AssemblyProductAttribute)asm.
                 GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0];
             _Version = asm_name.Version;
-            _VersionNumber = asm_name.Version.ToString();
             _VersionString = pr.Product + " - " + _UIName + " frontend " + _Version;
 
 #if LOG4NET
diff --git a/src/Frontend-SWF/MainWindow.cs b/src/Frontend-SWF/MainWindow.cs
index cf61251..ca74506 100644
--- a/src/Frontend-SWF/MainWindow.cs
+++ b/src/Frontend-SWF/MainWindow.cs
@@ -12,7 +12,6 @@ namespace Smuxi.Frontend.Swf
 #if LOG4NET
         private static readonly log4net.ILog _Logger = 
log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
 #endif
-        private bool             _CaretMode;
         private ChatViewManager  _ChatViewManager;
         private IFrontendUI      _UI;
         private Notebook         _Notebook;
@@ -20,7 +19,7 @@ namespace Smuxi.Frontend.Swf
         
         public bool CaretMode {
             get {
-                return _CaretMode;
+                return false;
             }
         }
         
diff --git a/src/Frontend-SWF/SwfUI.cs b/src/Frontend-SWF/SwfUI.cs
index aefb468..02e0567 100644
--- a/src/Frontend-SWF/SwfUI.cs
+++ b/src/Frontend-SWF/SwfUI.cs
@@ -48,7 +48,6 @@ namespace Smuxi.Frontend.Swf
 #endif
         private int _Version = 0;
         private ChatViewManager _ChatViewManager;
-        private IList<ChatView> _SyncedChatViews;
         private Control         _Control;
         
         public int Version {
@@ -57,12 +56,6 @@ namespace Smuxi.Frontend.Swf
             }
         }
         
-        public IList<ChatView> SyncedChatViews {
-            get {
-                return _SyncedChatViews;
-            }
-        }
-        
         public SwfUI(ChatViewManager chatViewManager, Control control)
         {
             _ChatViewManager = chatViewManager;


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