From: <hor...@us...> - 2012-01-21 10:50:56
|
Revision: 4416 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4416&view=rev Author: horned-reaper Date: 2012-01-21 10:50:48 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/plugins/FritzBox/Build/Build FritzBoxManager.bat trunk/plugins/FritzBox/Build/Build.log trunk/plugins/FritzBox/Docs/Ausstehend.txt trunk/plugins/FritzBox/Docs/Changes.txt trunk/plugins/FritzBox/FritzBox/FritzBox.cs trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs trunk/plugins/FritzBox/FritzBox/Properties/AssemblyInfo.cs trunk/plugins/FritzBox/FritzBox/Settings.cs trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.dll trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.pdb trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.dll trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.pdb trunk/plugins/FritzBox/FritzBox/obj/Debug/GenerateResource-ResGen.read.1.tlog trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.dll trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.pdb trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBox.dll trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBox.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBoxConfigTester.exe trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Debug/FritzBoxConfigTester.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBox.dll trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBox.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBoxConfigTester.exe trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/bin/Release/FritzBoxConfigTester.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/FritzBoxConfigTester.exe trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/FritzBoxConfigTester.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Debug/ResolveAssemblyReference.cache trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.exe trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/FritzBoxConfigTester.pdb trunk/plugins/FritzBox/Tools/FritzBoxConfigTester/obj/Release/ResolveAssemblyReference.cache trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBox.dll trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBox.pdb trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBoxDebugger.exe trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Debug/FritzBoxDebugger.pdb trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBox.dll trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBox.pdb trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBoxDebugger.exe trunk/plugins/FritzBox/Tools/FritzBoxDebugger/bin/Release/FritzBoxDebugger.pdb trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/FritzBoxDebugger.exe trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Debug/FritzBoxDebugger.pdb trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.exe trunk/plugins/FritzBox/Tools/FritzBoxDebugger/obj/Release/FritzBoxDebugger.pdb trunk/plugins/FritzBox/releases/update.xml Added Paths: ----------- trunk/plugins/FritzBox/Docs/Documentation/Call strings.xls trunk/plugins/FritzBox/releases/FritzBox_v0.4.1.4415.mpe1 Modified: trunk/plugins/FritzBox/Build/Build FritzBoxManager.bat =================================================================== --- trunk/plugins/FritzBox/Build/Build FritzBoxManager.bat 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/Build/Build FritzBoxManager.bat 2012-01-21 10:50:48 UTC (rev 4416) @@ -3,61 +3,5 @@ D: cd \FritzBox\Build -REM Set program path based on current machine environment -set ProgramDir=%ProgramFiles% -if not "%ProgramFiles(x86)%".=="". set ProgramDir=%ProgramFiles(x86)% - -REM Set build path -set BuildPath=..\FritzBox\bin\Release - -REM Set plugin DLL path -set PluginDLL=%BuildPath%\FritzBox.dll - -REM set log file where the infos are written to, and clear that file -set LOG=Build.log -echo. > %LOG% - -echo. -echo -= FRITZ!Box Manager =- -echo -=====================- -echo. - -echo. -echo Writing SVN revision assemblies... -DeployVersionSVN.exe /svn=".." >> %LOG% - -echo. -echo Building FRITZ!Box Manager... -"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBUILD.exe" /target:Rebuild /property:Configuration=Release;AllowUnsafeBlocks=true "..\FritzBox.sln" >> %LOG% - -echo. -echo Reverting assemblies... -DeployVersionSVN.exe /svn=".." /revert >> %LOG% - -rmdir /S /Q ..\_release -xcopy "%PluginDLL%" ..\_release\plugins\windows\ >> %LOG% -xcopy ..\FritzBox\Resources\speexdec.exe ..\_release\base\ >> %LOG% -xcopy ..\FritzBox\Skin ..\_release\skin /S /I >> %LOG% -xcopy ..\FritzBox\Languages ..\_release\language /S /I >> %LOG% - -echo. -echo Reading the version number... -if not exist "%PluginDLL%" goto version_error -for /f "Tokens=5" %%a in ('filever "%PluginDLL%"') do set version=%%a -goto :version_done -:version_error -echo FritzBox.dll not found. version could not be read >> %LOG% -echo FritzBox.dll not found. version could not be read. Build is cancelled -pause -goto :EOF -:version_done - -echo. -echo Building MpeExtension package including update.xml... -del "..\MpeRelease\update.xml" /Q -"%ProgramDir%\Team MediaPortal\MediaPortal\MpeMaker.exe" "..\MpeRelease\FritzBox.xmp2" /V=%version% /B /UpdateXML >> %LOG% - -echo. -echo Move installer and update.xml files to the releases folder -move /Y "..\MpeRelease\FritzBox.mpe1" "..\releases\FritzBox_v%Version%.mpe1" -move /Y "..\MpeRelease\update.xml" "..\releases\update.xml" +echo Updating SVN path... +TortoiseProc.exe /path:".." /command:commit /closeonend:1 Modified: trunk/plugins/FritzBox/Build/Build.log =================================================================== --- trunk/plugins/FritzBox/Build/Build.log 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/Build/Build.log 2012-01-21 10:50:48 UTC (rev 4416) @@ -1,6 +1,6 @@ Running : C:\Program Files\TortoiseSVN\bin\SubWCRev.exe -SVN Version: 4414 +SVN Version: 4415 Updating: D:\FritzBox\FritzBox\Properties\AssemblyInfo.cs Updating: D:\FritzBox\MP2version\Listeners\FritzBox\Properties\AssemblyInfo.cs Updating: D:\FritzBox\MP2version\Properties\AssemblyInfo.cs @@ -10,7 +10,7 @@ [Microsoft .NET Framework, Version 4.0.30319.239] Copyright (C) Microsoft Corporation 2007. All rights reserved. -Build started 18.01.2012 12:14:44. +Build started 21.01.2012 11:32:07. Project "D:\FritzBox\FritzBox.sln" on node 1 (Rebuild target(s)). ValidateSolutionConfiguration: Building solution configuration "Release|Mixed Platforms". @@ -195,7 +195,7 @@ 0 Warning(s) 0 Error(s) -Time Elapsed 00:00:02.47 +Time Elapsed 00:00:02.53 Reverting to build 0 Updating: D:\FritzBox\FritzBox\Properties\AssemblyInfo.cs Updating: D:\FritzBox\MP2version\Listeners\FritzBox\Properties\AssemblyInfo.cs @@ -280,7 +280,7 @@ ..\FritzBox\Languages\Unsupported\strings_zh-CN.xml 36 File(s) copied MpeMaker version: 1.2.1.0 -Build started at 12:14:48 +Build started at 11:32:12 Building "D:\FritzBox\MpeRelease\FritzBox.xmp2" Output: "..\MpeRelease\FritzBox.mpe1" Writing UpdateXML to "update.xml" Modified: trunk/plugins/FritzBox/Docs/Ausstehend.txt =================================================================== --- trunk/plugins/FritzBox/Docs/Ausstehend.txt 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/Docs/Ausstehend.txt 2012-01-21 10:50:48 UTC (rev 4416) @@ -3,16 +3,17 @@ Fehler beheben: - auch bei einem "Unbekannten Anrufer" (unterdr\xFCckte bzw. nicht \xFCbertragene Rufnummer) \xF6ffnet sich \xFCber das Kontextrufen "zur\xFCckrufen". Sollte man deaktivieren -- btnModus umbenennen? - ObjectDisposed-Exception bei Client-Stop - ein kleiner schwarzer Balken \xFCberdeckt das erste Zeichen oder die erste Ziffer zur H\xE4lfte - Problem beim Laden gro\xDFer meta0-Dateien, siehe "Problembeschreibung 1.txt" + +Optimierungen: +- btnModus umbenennen? - blauer Hintergrund f\xFCr Default und DefaultWide Skins - GUI-Properties \xFCberpr\xFCfen und Dokumentation vervollst\xE4ndigen - vertrauliche Daten im Log trotz "Extensive Logging"-Einstellung Neue Funktionen/Erweiterungen: -- Schalter zum Deaktivieren von Benachrichtigungen bei ausgehenden Anrufen - Rufnummer-Typ hinzuf\xFCgen - GUI-Adressbuch - Anruf-Benachrichtigungen @@ -68,4 +69,7 @@ Ich h\xE4tte noch Idee, wei\xDF nicht ob dies M\xF6glich ist. Aber sch\xF6n w\xE4re es wenn Mediaportal aus dem Standby oder Hibernate erwacht anzeigen w\xFCrde wenn es verpasste Anrufe gibt. Also das vlt. ein Popup Fenster sich \xF6ffnet und anzeigt das es verpasste Anrufe gibt... Ist dies wohl M\xF6glich ? IchBinsShort, 17.01.2012, 15:23: -Eventuell w\xE4re es dann auch noch gut wenn neue Anrufe in der Anrufliste als Neu markiert werden k\xF6nnen. Also so was wie ein "gelesen Status" woraus ersichtlich welche der Anrufe seit dem letztem Aufruf der Anrufliste neu hinzugekommen sind :-) \ No newline at end of file +Eventuell w\xE4re es dann auch noch gut wenn neue Anrufe in der Anrufliste als Neu markiert werden k\xF6nnen. Also so was wie ein "gelesen Status" woraus ersichtlich welche der Anrufe seit dem letztem Aufruf der Anrufliste neu hinzugekommen sind :-) + +IchBinsShort, 20.01.2012, 12:38: +Nebenstelle in der Anrufliste anzeigen \ No newline at end of file Modified: trunk/plugins/FritzBox/Docs/Changes.txt =================================================================== --- trunk/plugins/FritzBox/Docs/Changes.txt 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/Docs/Changes.txt 2012-01-21 10:50:48 UTC (rev 4416) @@ -1,12 +0,0 @@ -Fixed bugs: -- on multiple contact deletions multiple synchronisations are necessary -- multiple contacts with the same name cause update actions on every synchronization -- multiple MSN filter entries when FRITZ!Box Manager configuration window is closed and re-opened without closing the MediaPortal Configuration window -- MediaPortal crashes on calls with phone numbers not contained in the phone book - -Optimizations: -- phone book is now saved on every change instead of MediaPortal exit -- entry checks for the following settings: - - update interval - - dial port -- first MSN filter entry is automatically displayed when Configuration window is opened \ No newline at end of file Added: trunk/plugins/FritzBox/Docs/Documentation/Call strings.xls =================================================================== (Binary files differ) Property changes on: trunk/plugins/FritzBox/Docs/Documentation/Call strings.xls ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/plugins/FritzBox/FritzBox/FritzBox.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2012-01-21 10:50:48 UTC (rev 4416) @@ -63,12 +63,12 @@ #region Variables private readonly List<CallAction> _actionList = new List<CallAction>(); - private readonly List<CallAction> _notifyQueue = new List<CallAction>(); - private bool _showNotify = true; - private object _tempNotify; + private readonly List<CallAction> _notificationQueue = new List<CallAction>(); + private bool _showNotification = true; + private object _tempNotification; private static bool windowIsDisplayed = false; - private int notifyCount = 0; + private int notificationCount = 0; #endregion Variables @@ -80,15 +80,15 @@ private void OnStartExternal(Process proc, bool waitForExit) { - if (waitForExit) _showNotify = false; - else _showNotify = true; + if (waitForExit) _showNotification = false; + else _showNotification = true; } private void OnStopExternal(Process proc, bool waitForExit) { - _showNotify = true; + _showNotification = true; - _notifyQueue.Clear(); + _notificationQueue.Clear(); } private void OnCallAction(CallAction callAction) @@ -96,33 +96,29 @@ Log.Info("FRITZ!Box: OnCallAction()"); callAction.WriteToLog(); - if (!_showNotify) + if (!_showNotification) { Log.Info("External process is running. Notification is queued and will be shown later"); - _notifyQueue.Add(callAction); + _notificationQueue.Add(callAction); return; } switch (callAction.Type) { case CallAction.CallType.Incoming: - if (Settings.PhoneBookEnabled) callAction.Caller = phoneBook.FindContactEntry(callAction.Caller); - OnCall(callAction); break; case CallAction.CallType.Outgoing: - if (Settings.PhoneBookEnabled) callAction.Caller = phoneBook.FindContactEntry(callAction.Caller); - OnCall(callAction); break; case CallAction.CallType.ConnectionStarted: break; case CallAction.CallType.ConnectionClosed: - if (Settings.CloseOnConnectionClosed) + if (Settings.CloseNotificationOnConnectionClosed) { Log.Info("\"Close On Connection Close\" setting is enabled. Try to close active notification"); - if (_tempNotify != null) + if (_tempNotification != null) { MediaPortal.GUI.Library.Action act = new MediaPortal.GUI.Library.Action(); act.wID = MediaPortal.GUI.Library.Action.ActionType.ACTION_CLOSE_DIALOG; @@ -168,11 +164,9 @@ private void OnCall(CallAction callAction) { - PhoneBookItem phoneBookItem = callAction.Caller.PhoneBookItem; - - Log.Info("FRITZ!Box: OnCall()"); + Log.Info("New call"); - if (_tempNotify != null) + if (_tempNotification != null) { Log.Info("Yet another dialog is active. Action is sent to queue"); @@ -183,6 +177,10 @@ if (isMSNEnabled(callAction.MSN)) // check if MSN is enabled { + // find contact in phone book + if (Settings.PhoneBookEnabled) callAction.Caller = phoneBook.FindContactEntry(callAction.Caller); + PhoneBookItem phoneBookItem = callAction.Caller.PhoneBookItem; + // play sound string incomingSoundPath = null; @@ -193,7 +191,7 @@ if (!String.IsNullOrEmpty(incomingSoundPath) && File.Exists(incomingSoundPath)) { - Log.Debug("Playing sound for incoming call: {0}", incomingSoundPath); + Log.Debug("Playing sound on incoming call: {0}", incomingSoundPath); Utils.PlaySound(incomingSoundPath, false, true); } } @@ -201,57 +199,71 @@ // check if call notification shall be shown bool showNotification = false; - if (!Settings.PhoneBookEnabled) + switch (callAction.Type) { - Log.Info("Phone book is disabled. Notify will be shown"); - showNotification = true; + case CallAction.CallType.Incoming: + showNotification = Settings.ShowNotficationOnIncomingCall; + break; + case CallAction.CallType.Outgoing: + showNotification = Settings.ShowNotficationOnOutgoingCall; + break; } - else + + if (showNotification) { - if (phoneBookItem != null) // phone book entry exists + if (!Settings.PhoneBookEnabled) { - if (Settings.ExtensiveLogging) Log.Info("Caller is identified by phone book as {0}", phoneBookItem.Name); + Log.Info("Phone book is disabled. Notification will be shown"); + showNotification = true; + } + else + { + if (phoneBookItem != null) + { + if (Settings.ExtensiveLogging) Log.Info("Caller is identified by phone book as {0}", phoneBookItem.Name); - if (phoneBookItem.ShowCallNotification) showNotification = true; + if (phoneBookItem.ShowCallNotification) showNotification = true; + } + else if (Settings.ShowUnknownCaller) showNotification = true; // unknown caller } - else if (Settings.ShowUnknownCaller) showNotification = true; // unknown caller - } - // configure call notificaton - if (showNotification) - { - string strHeading = string.Empty; - string strImage = string.Empty; - string strText = string.Empty; - - // ...heading - switch (callAction.Type) + // configure call notificaton + if (showNotification) { - case CallAction.CallType.Incoming: - strHeading = GUILocalizeStrings.Get(1); // 1 = Incoming call - break; - case CallAction.CallType.Outgoing: - strHeading = GUILocalizeStrings.Get(2); // 2 = Outgoing call - break; - } + string strHeading = string.Empty; + string strImage = string.Empty; + string strText = string.Empty; - // ..image - strImage = phoneBook.GetCallerImagePath(callAction.Caller); + // ...heading + switch (callAction.Type) + { + case CallAction.CallType.Incoming: + strHeading = GUILocalizeStrings.Get(1); // 1 = Incoming call + break; + case CallAction.CallType.Outgoing: + strHeading = GUILocalizeStrings.Get(2); // 2 = Outgoing call + break; + } - // ...message text - strText = Environment.NewLine; + // ..image + strImage = phoneBook.GetCallerImagePath(callAction.Caller); - if (callAction.Caller.PhoneNumber != "") - { - if (phoneBookItem != null) strText += phoneBookItem.Name; + // ...message text + strText = Environment.NewLine; - if (Settings.ShowPhoneNumberOnNotify) strText += Environment.NewLine + callAction.Caller.PhoneNumber; + if (callAction.Caller.PhoneNumber != "") + { + if (phoneBookItem != null) strText += phoneBookItem.Name; + + if (Settings.ShowPhoneNumberOnNotification) strText += Environment.NewLine + callAction.Caller.PhoneNumber; + } + else strText += GUILocalizeStrings.Get(3); // 3 = Unknown + + // show call notification + showNotificationWindow(callAction.Type, strHeading, strImage, strText); } - else strText += GUILocalizeStrings.Get(3); // 3 = Unknown - - // show call notification - ShowNotify(callAction.Type, strHeading, strImage, strText); } + // update call list and voice box items and refresh GUI worker.queue.Enqueue(new Task(Task.TaskAction.LoadCallListItems, null)); worker.queue.Enqueue(new Task(Task.TaskAction.LoadVoiceBoxItems, null)); @@ -278,80 +290,96 @@ } else { - Log.Info("MSN is not on the list. Notify won't be shown"); + Log.Info("MSN is not on the list. Notification won't be shown"); return false; } } - - private void ShowNotify(CallAction.CallType callType, string strHeading, string strImage, string strText) + private void showNotificationWindow(CallAction.CallType callType, string strHeading, string strImage, string strText) { bool resumePlayer = false; + + if (notificationCount >= Settings.MaxNotifies) return; - if (notifyCount >= Settings.MaxNotifies) return; - - // pause player - if (g_Player.Playing && !g_Player.Paused) + if (!isMovingPicturesOrMPTVSeriesDialogOpened()) // this check avoids that the current movie starts when dialog asking if the movie shall be continued on the last position is opened { - switch (callType) + // pause player + if (g_Player.Playing && !g_Player.Paused) { - case CallAction.CallType.Incoming: - if (Settings.PauseMediaOnIncomingCall) - { - g_Player.Pause(); - resumePlayer = true; - } - break; - case CallAction.CallType.Outgoing: - if (Settings.PauseMediaOnOutgoingCall) - { - g_Player.Pause(); - resumePlayer = true; - } - break; + switch (callType) + { + case CallAction.CallType.Incoming: + if (Settings.PauseMediaOnIncomingCall) + { + g_Player.Pause(); + resumePlayer = true; + } + break; + case CallAction.CallType.Outgoing: + if (Settings.PauseMediaOnOutgoingCall) + { + g_Player.Pause(); + resumePlayer = true; + } + break; + } } - } - // show dialog - GUIDialogNotify dlgNotify = (GUIDialogNotify)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY); - if (dlgNotify == null) return; + // show dialog + GUIDialogNotify dlgNotification = (GUIDialogNotify)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY); + if (dlgNotification == null) return; - dlgNotify.Reset(); - dlgNotify.ClearAll(); - dlgNotify.SetHeading(strHeading); - dlgNotify.SetImage(strImage); - dlgNotify.SetText(strText); - if (Settings.CloseOnTimeout) dlgNotify.TimeOut = Settings.NotifyTimeout; - else dlgNotify.TimeOut = -1; + dlgNotification.Reset(); + dlgNotification.ClearAll(); + dlgNotification.SetHeading(strHeading); + dlgNotification.SetImage(strImage); + dlgNotification.SetText(strText); + if (Settings.CloseNotificationOnTimeout) dlgNotification.TimeOut = Settings.NotificationTimeout; + else dlgNotification.TimeOut = -1; - _tempNotify = dlgNotify; - dlgNotify.DoModal(GUIWindowManager.ActiveWindow); + _tempNotification = dlgNotification; + dlgNotification.DoModal(GUIWindowManager.ActiveWindow); - // resume player - if (resumePlayer && g_Player.Playing && g_Player.Paused) - { - switch (callType) + // resume player + if (resumePlayer && g_Player.Playing && g_Player.Paused) { - case CallAction.CallType.Incoming: - if (Settings.ResumeMediaOnIncomingCall) g_Player.Pause(); - break; - case CallAction.CallType.Outgoing: - if (Settings.ResumeMediaOnOutgoingCall) g_Player.Pause(); - break; + switch (callType) + { + case CallAction.CallType.Incoming: + if (Settings.ResumeMediaOnIncomingCall) g_Player.Pause(); + break; + case CallAction.CallType.Outgoing: + if (Settings.ResumeMediaOnOutgoingCall) g_Player.Pause(); + break; + } } + + _tempNotification = null; + + if (_actionList.Count > 0) + { + CallAction tmpAction = _actionList[0]; + _actionList.RemoveAt(0); + OnCallAction(tmpAction); + } } + else Log.Info("Moving Pictures or MP-TV Series dialog is opened, call notification won't be shown"); + } - _tempNotify = null; - - if (_actionList.Count > 0) + private bool isMovingPicturesOrMPTVSeriesDialogOpened() + { + if (GUIWindowManager.IsRouted) // check if dialog window is opened { - CallAction tmpAction = _actionList[0]; - _actionList.RemoveAt(0); - OnCallAction(tmpAction); + if (GUIWindowManager.ActiveWindow == 96742 || GUIWindowManager.ActiveWindow == 9811) // 96742 = window ID of "Moving Pictures", 9811 = window ID of "MP-TV Series" + { + if (GUIWindowManager.ActiveWindowEx == (int)GUIWindow.Window.WINDOW_DIALOG_YES_NO) return true; + } } + + return false; } - #endregion + #endregion Helper Methods #endregion CallMonitor @@ -365,7 +393,7 @@ public void Start() { Log.Info("FRITZ!Box Manager {0} plugin is starting", Assembly.GetExecutingAssembly().GetName().Version); - + Settings.Load(); // register events Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.Designer.cs 2012-01-21 10:50:48 UTC (rev 4416) @@ -42,11 +42,11 @@ this.groupBoxPhonebook = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.checkBoxShowUnknownCaller = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.checkBoxUsePhonebook = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.groupBoxNotify = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.groupBoxNotification = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.checkBoxCloseOnConnectionClosed = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.lblMaxNotifies = new MediaPortal.UserInterface.Controls.MPLabel(); this.numericUpDownMaxNotifies = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); - this.checkBoxShowPhoneNumberOnNotify = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.checkBoxShowPhoneNumberOnNotification = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.buttonMSNsRemove = new MediaPortal.UserInterface.Controls.MPButton(); this.checkBoxFilterMSNs = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.buttonMSNsAdd = new MediaPortal.UserInterface.Controls.MPButton(); @@ -77,11 +77,13 @@ this.label4 = new System.Windows.Forms.Label(); this.dialPortNumericUpDown = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); this.updateInterval = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); + this.checkBoxShowNotificationOnOutgoingCall = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.checkBoxShowNotificationOnIncomingCall = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.tabPageDiagnostics.SuspendLayout(); this.tabPagePhoneBook.SuspendLayout(); this.tabPageCallNotification.SuspendLayout(); this.groupBoxPhonebook.SuspendLayout(); - this.groupBoxNotify.SuspendLayout(); + this.groupBoxNotification.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxNotifies)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).BeginInit(); this.groupBoxMedia.SuspendLayout(); @@ -197,7 +199,7 @@ // tabPageCallNotification // this.tabPageCallNotification.Controls.Add(this.groupBoxPhonebook); - this.tabPageCallNotification.Controls.Add(this.groupBoxNotify); + this.tabPageCallNotification.Controls.Add(this.groupBoxNotification); this.tabPageCallNotification.Controls.Add(this.groupBoxMedia); this.tabPageCallNotification.Location = new System.Drawing.Point(4, 22); this.tabPageCallNotification.Name = "tabPageCallNotification"; @@ -212,7 +214,7 @@ this.groupBoxPhonebook.Controls.Add(this.checkBoxShowUnknownCaller); this.groupBoxPhonebook.Controls.Add(this.checkBoxUsePhonebook); this.groupBoxPhonebook.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.groupBoxPhonebook.Location = new System.Drawing.Point(7, 229); + this.groupBoxPhonebook.Location = new System.Drawing.Point(7, 250); this.groupBoxPhonebook.Name = "groupBoxPhonebook"; this.groupBoxPhonebook.Size = new System.Drawing.Size(177, 67); this.groupBoxPhonebook.TabIndex = 2; @@ -242,33 +244,35 @@ this.checkBoxUsePhonebook.UseVisualStyleBackColor = true; this.checkBoxUsePhonebook.CheckedChanged += new System.EventHandler(this.checkBoxUsePhonebook_CheckedChanged); // - // groupBoxNotify + // groupBoxNotification // - this.groupBoxNotify.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.groupBoxNotification.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.groupBoxNotify.Controls.Add(this.checkBoxCloseOnConnectionClosed); - this.groupBoxNotify.Controls.Add(this.lblMaxNotifies); - this.groupBoxNotify.Controls.Add(this.numericUpDownMaxNotifies); - this.groupBoxNotify.Controls.Add(this.checkBoxShowPhoneNumberOnNotify); - this.groupBoxNotify.Controls.Add(this.buttonMSNsRemove); - this.groupBoxNotify.Controls.Add(this.checkBoxFilterMSNs); - this.groupBoxNotify.Controls.Add(this.buttonMSNsAdd); - this.groupBoxNotify.Controls.Add(this.comboBoxMSNs); - this.groupBoxNotify.Controls.Add(this.numericUpDownTimeout); - this.groupBoxNotify.Controls.Add(this.checkBoxCloseOnTimout); - this.groupBoxNotify.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.groupBoxNotify.Location = new System.Drawing.Point(6, 6); - this.groupBoxNotify.Name = "groupBoxNotify"; - this.groupBoxNotify.Size = new System.Drawing.Size(561, 114); - this.groupBoxNotify.TabIndex = 0; - this.groupBoxNotify.TabStop = false; - this.groupBoxNotify.Text = "Notify settings"; + this.groupBoxNotification.Controls.Add(this.checkBoxShowNotificationOnOutgoingCall); + this.groupBoxNotification.Controls.Add(this.checkBoxCloseOnConnectionClosed); + this.groupBoxNotification.Controls.Add(this.checkBoxShowNotificationOnIncomingCall); + this.groupBoxNotification.Controls.Add(this.lblMaxNotifies); + this.groupBoxNotification.Controls.Add(this.numericUpDownMaxNotifies); + this.groupBoxNotification.Controls.Add(this.checkBoxShowPhoneNumberOnNotification); + this.groupBoxNotification.Controls.Add(this.buttonMSNsRemove); + this.groupBoxNotification.Controls.Add(this.checkBoxFilterMSNs); + this.groupBoxNotification.Controls.Add(this.buttonMSNsAdd); + this.groupBoxNotification.Controls.Add(this.comboBoxMSNs); + this.groupBoxNotification.Controls.Add(this.numericUpDownTimeout); + this.groupBoxNotification.Controls.Add(this.checkBoxCloseOnTimout); + this.groupBoxNotification.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.groupBoxNotification.Location = new System.Drawing.Point(6, 6); + this.groupBoxNotification.Name = "groupBoxNotification"; + this.groupBoxNotification.Size = new System.Drawing.Size(561, 135); + this.groupBoxNotification.TabIndex = 0; + this.groupBoxNotification.TabStop = false; + this.groupBoxNotification.Text = "Notification settings"; // // checkBoxCloseOnConnectionClosed // this.checkBoxCloseOnConnectionClosed.AutoSize = true; this.checkBoxCloseOnConnectionClosed.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkBoxCloseOnConnectionClosed.Location = new System.Drawing.Point(6, 43); + this.checkBoxCloseOnConnectionClosed.Location = new System.Drawing.Point(7, 66); this.checkBoxCloseOnConnectionClosed.Name = "checkBoxCloseOnConnectionClosed"; this.checkBoxCloseOnConnectionClosed.Size = new System.Drawing.Size(198, 17); this.checkBoxCloseOnConnectionClosed.TabIndex = 9; @@ -279,7 +283,7 @@ // lblMaxNotifies // this.lblMaxNotifies.AutoSize = true; - this.lblMaxNotifies.Location = new System.Drawing.Point(21, 68); + this.lblMaxNotifies.Location = new System.Drawing.Point(22, 91); this.lblMaxNotifies.Name = "lblMaxNotifies"; this.lblMaxNotifies.Size = new System.Drawing.Size(90, 13); this.lblMaxNotifies.TabIndex = 8; @@ -287,7 +291,7 @@ // // numericUpDownMaxNotifies // - this.numericUpDownMaxNotifies.Location = new System.Drawing.Point(206, 66); + this.numericUpDownMaxNotifies.Location = new System.Drawing.Point(207, 89); this.numericUpDownMaxNotifies.Maximum = new decimal(new int[] { 20, 0, @@ -308,21 +312,21 @@ 0, 0}); // - // checkBoxShowPhoneNumberOnNotify + // checkBoxShowPhoneNumberOnNotification // - this.checkBoxShowPhoneNumberOnNotify.AutoSize = true; - this.checkBoxShowPhoneNumberOnNotify.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkBoxShowPhoneNumberOnNotify.Location = new System.Drawing.Point(6, 88); - this.checkBoxShowPhoneNumberOnNotify.Name = "checkBoxShowPhoneNumberOnNotify"; - this.checkBoxShowPhoneNumberOnNotify.Size = new System.Drawing.Size(122, 17); - this.checkBoxShowPhoneNumberOnNotify.TabIndex = 6; - this.checkBoxShowPhoneNumberOnNotify.Text = "Show phone number"; - this.checkBoxShowPhoneNumberOnNotify.UseVisualStyleBackColor = true; + this.checkBoxShowPhoneNumberOnNotification.AutoSize = true; + this.checkBoxShowPhoneNumberOnNotification.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxShowPhoneNumberOnNotification.Location = new System.Drawing.Point(7, 111); + this.checkBoxShowPhoneNumberOnNotification.Name = "checkBoxShowPhoneNumberOnNotification"; + this.checkBoxShowPhoneNumberOnNotification.Size = new System.Drawing.Size(122, 17); + this.checkBoxShowPhoneNumberOnNotification.TabIndex = 6; + this.checkBoxShowPhoneNumberOnNotification.Text = "Show phone number"; + this.checkBoxShowPhoneNumberOnNotification.UseVisualStyleBackColor = true; // // buttonMSNsRemove // this.buttonMSNsRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonMSNsRemove.Location = new System.Drawing.Point(386, 66); + this.buttonMSNsRemove.Location = new System.Drawing.Point(387, 86); this.buttonMSNsRemove.Name = "buttonMSNsRemove"; this.buttonMSNsRemove.Size = new System.Drawing.Size(63, 21); this.buttonMSNsRemove.TabIndex = 5; @@ -334,18 +338,18 @@ // this.checkBoxFilterMSNs.AutoSize = true; this.checkBoxFilterMSNs.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkBoxFilterMSNs.Location = new System.Drawing.Point(302, 20); + this.checkBoxFilterMSNs.Location = new System.Drawing.Point(303, 43); this.checkBoxFilterMSNs.Name = "checkBoxFilterMSNs"; - this.checkBoxFilterMSNs.Size = new System.Drawing.Size(195, 17); + this.checkBoxFilterMSNs.Size = new System.Drawing.Size(221, 17); this.checkBoxFilterMSNs.TabIndex = 2; - this.checkBoxFilterMSNs.Text = "Show notify only for following MSNs:"; + this.checkBoxFilterMSNs.Text = "Show notification only for following MSNs:"; this.checkBoxFilterMSNs.UseVisualStyleBackColor = true; this.checkBoxFilterMSNs.Click += new System.EventHandler(this.checkBoxFilterMSNs_CheckedChanged); // // buttonMSNsAdd // this.buttonMSNsAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonMSNsAdd.Location = new System.Drawing.Point(302, 66); + this.buttonMSNsAdd.Location = new System.Drawing.Point(303, 89); this.buttonMSNsAdd.Name = "buttonMSNsAdd"; this.buttonMSNsAdd.Size = new System.Drawing.Size(63, 21); this.buttonMSNsAdd.TabIndex = 4; @@ -359,7 +363,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.comboBoxMSNs.BorderColor = System.Drawing.Color.Empty; this.comboBoxMSNs.FormattingEnabled = true; - this.comboBoxMSNs.Location = new System.Drawing.Point(302, 39); + this.comboBoxMSNs.Location = new System.Drawing.Point(303, 62); this.comboBoxMSNs.Name = "comboBoxMSNs"; this.comboBoxMSNs.Size = new System.Drawing.Size(226, 21); this.comboBoxMSNs.Sorted = true; @@ -368,7 +372,7 @@ // numericUpDownTimeout // this.numericUpDownTimeout.Enabled = false; - this.numericUpDownTimeout.Location = new System.Drawing.Point(206, 20); + this.numericUpDownTimeout.Location = new System.Drawing.Point(207, 43); this.numericUpDownTimeout.Minimum = new decimal(new int[] { 1, 0, @@ -388,7 +392,7 @@ // this.checkBoxCloseOnTimout.AutoSize = true; this.checkBoxCloseOnTimout.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkBoxCloseOnTimout.Location = new System.Drawing.Point(6, 20); + this.checkBoxCloseOnTimout.Location = new System.Drawing.Point(7, 43); this.checkBoxCloseOnTimout.Name = "checkBoxCloseOnTimout"; this.checkBoxCloseOnTimout.Size = new System.Drawing.Size(172, 17); this.checkBoxCloseOnTimout.TabIndex = 0; @@ -407,7 +411,7 @@ this.groupBoxMedia.Controls.Add(this.checkBoxResumeMediaOnIncomingCall); this.groupBoxMedia.Controls.Add(this.checkBoxPauseMediaOnIncomingCall); this.groupBoxMedia.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.groupBoxMedia.Location = new System.Drawing.Point(6, 126); + this.groupBoxMedia.Location = new System.Drawing.Point(6, 147); this.groupBoxMedia.Name = "groupBoxMedia"; this.groupBoxMedia.Size = new System.Drawing.Size(561, 97); this.groupBoxMedia.TabIndex = 1; @@ -690,6 +694,28 @@ 0, 0}); // + // checkBoxShowNotificationOnOutgoingCall + // + this.checkBoxShowNotificationOnOutgoingCall.AutoSize = true; + this.checkBoxShowNotificationOnOutgoingCall.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxShowNotificationOnOutgoingCall.Location = new System.Drawing.Point(207, 20); + this.checkBoxShowNotificationOnOutgoingCall.Name = "checkBoxShowNotificationOnOutgoingCall"; + this.checkBoxShowNotificationOnOutgoingCall.Size = new System.Drawing.Size(183, 17); + this.checkBoxShowNotificationOnOutgoingCall.TabIndex = 13; + this.checkBoxShowNotificationOnOutgoingCall.Text = "Show notification on outgoing call"; + this.checkBoxShowNotificationOnOutgoingCall.UseVisualStyleBackColor = true; + // + // checkBoxShowNotificationOnIncomingCall + // + this.checkBoxShowNotificationOnIncomingCall.AutoSize = true; + this.checkBoxShowNotificationOnIncomingCall.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxShowNotificationOnIncomingCall.Location = new System.Drawing.Point(7, 20); + this.checkBoxShowNotificationOnIncomingCall.Name = "checkBoxShowNotificationOnIncomingCall"; + this.checkBoxShowNotificationOnIncomingCall.Size = new System.Drawing.Size(184, 17); + this.checkBoxShowNotificationOnIncomingCall.TabIndex = 12; + this.checkBoxShowNotificationOnIncomingCall.Text = "Show notification on incoming call"; + this.checkBoxShowNotificationOnIncomingCall.UseVisualStyleBackColor = true; + // // FritzBoxConfig // this.AcceptButton = this.okButton; @@ -715,8 +741,8 @@ this.tabPageCallNotification.ResumeLayout(false); this.groupBoxPhonebook.ResumeLayout(false); this.groupBoxPhonebook.PerformLayout(); - this.groupBoxNotify.ResumeLayout(false); - this.groupBoxNotify.PerformLayout(); + this.groupBoxNotification.ResumeLayout(false); + this.groupBoxNotification.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxNotifies)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).EndInit(); this.groupBoxMedia.ResumeLayout(false); @@ -745,11 +771,11 @@ private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxPhonebook; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowUnknownCaller; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxUsePhonebook; - private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxNotify; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxNotification; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxCloseOnConnectionClosed; private MediaPortal.UserInterface.Controls.MPLabel lblMaxNotifies; private MediaPortal.UserInterface.Controls.MPNumericUpDown numericUpDownMaxNotifies; - private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowPhoneNumberOnNotify; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowPhoneNumberOnNotification; private MediaPortal.UserInterface.Controls.MPButton buttonMSNsRemove; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxFilterMSNs; private MediaPortal.UserInterface.Controls.MPButton buttonMSNsAdd; @@ -784,5 +810,7 @@ private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxExtensiveLogging; private MediaPortal.UserInterface.Controls.MPNumericUpDown dialPortNumericUpDown; private MediaPortal.UserInterface.Controls.MPNumericUpDown updateInterval; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowNotificationOnOutgoingCall; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowNotificationOnIncomingCall; } } \ No newline at end of file Modified: trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxConfig.cs 2012-01-21 10:50:48 UTC (rev 4416) @@ -62,10 +62,13 @@ vBPath.Text = Settings.VBPath; // call notification settings + checkBoxShowNotificationOnIncomingCall.Checked = Settings.ShowNotficationOnIncomingCall; + checkBoxShowNotificationOnOutgoingCall.Checked = Settings.ShowNotficationOnOutgoingCall; + numericUpDownMaxNotifies.Value = Settings.MaxNotifies; - checkBoxCloseOnTimout.Checked = Settings.CloseOnTimeout; - numericUpDownTimeout.Value = Settings.NotifyTimeout; - checkBoxCloseOnConnectionClosed.Checked = Settings.CloseOnConnectionClosed; + checkBoxCloseOnTimout.Checked = Settings.CloseNotificationOnTimeout; + numericUpDownTimeout.Value = Settings.NotificationTimeout; + checkBoxCloseOnConnectionClosed.Checked = Settings.CloseNotificationOnConnectionClosed; numericUpDownTimeout.Enabled = checkBoxCloseOnTimout.Checked; @@ -78,7 +81,7 @@ comboBoxMSNs.Items.AddRange(Settings.MSNList.ToArray()); if (comboBoxMSNs.Items.Count > 0) comboBoxMSNs.Text = Settings.MSNList[0]; // select the first entry - checkBoxShowPhoneNumberOnNotify.Checked = Settings.ShowPhoneNumberOnNotify; + checkBoxShowPhoneNumberOnNotification.Checked = Settings.ShowPhoneNumberOnNotification; checkBoxPauseMediaOnIncomingCall.Checked = Settings.PauseMediaOnIncomingCall; checkBoxResumeMediaOnIncomingCall.Checked = Settings.ResumeMediaOnIncomingCall; @@ -109,10 +112,13 @@ Settings.VBPath = vBPath.Text; // call notification settings + Settings.ShowNotficationOnIncomingCall = checkBoxShowNotificationOnIncomingCall.Checked; + Settings.ShowNotficationOnOutgoingCall = checkBoxShowNotificationOnOutgoingCall.Checked; + Settings.MaxNotifies = (int)numericUpDownMaxNotifies.Value; - Settings.CloseOnTimeout = checkBoxCloseOnTimout.Checked; - Settings.NotifyTimeout = (int)numericUpDownTimeout.Value; - Settings.CloseOnConnectionClosed = checkBoxCloseOnConnectionClosed.Checked; + Settings.CloseNotificationOnTimeout = checkBoxCloseOnTimout.Checked; + Settings.NotificationTimeout = (int)numericUpDownTimeout.Value; + Settings.CloseNotificationOnConnectionClosed = checkBoxCloseOnConnectionClosed.Checked; Settings.FilterMSN = checkBoxFilterMSNs.Checked; @@ -123,7 +129,7 @@ Settings.MSNList.Add(item); } - Settings.ShowPhoneNumberOnNotify = checkBoxShowPhoneNumberOnNotify.Checked; + Settings.ShowPhoneNumberOnNotification = checkBoxShowPhoneNumberOnNotification.Checked; Settings.PauseMediaOnIncomingCall = checkBoxPauseMediaOnIncomingCall.Checked; Settings.ResumeMediaOnIncomingCall = checkBoxResumeMediaOnIncomingCall.Checked; @@ -196,7 +202,7 @@ private void buttonMSNsAdd_Click(object sender, EventArgs e) { - if (isMSNValid(comboBoxMSNs.Text)) comboBoxMSNs.Items.Add(comboBoxMSNs.Text); + if (isMSNValid(comboBoxMSNs.Text) && !comboBoxMSNs.Items.Contains(comboBoxMSNs.Text)) comboBoxMSNs.Items.Add(comboBoxMSNs.Text); } private void buttonMSNsRemove_Click(object sender, EventArgs e) Modified: trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/FritzBox/FritzCallMonitor/FritzBoxClient.cs 2012-01-21 10:50:48 UTC (rev 4416) @@ -337,19 +337,16 @@ { case "RING": callAction.Type = CallAction.CallType.Incoming; - callAction.Caller.PhoneNumber = strList[3]; callAction.MSN = strList[4]; break; case "CALL": callAction.Type = CallAction.CallType.Outgoing; - callAction.Caller.PhoneNumber = strList[5]; callAction.MSN = strList[4]; break; case "CONNECT": callAction.Type = CallAction.CallType.ConnectionStarted; - callAction.Caller.PhoneNumber = strList[4]; break; case "DISCONNECT": Modified: trunk/plugins/FritzBox/FritzBox/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/Properties/AssemblyInfo.cs 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/FritzBox/Properties/AssemblyInfo.cs 2012-01-21 10:50:48 UTC (rev 4416) @@ -57,8 +57,8 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.4.0.0")] -[assembly: AssemblyFileVersion("0.4.0.0")] +[assembly: AssemblyVersion("0.4.1.0")] +[assembly: AssemblyFileVersion("0.4.1.0")] // specifiy comp tags for [assembly: CompatibleVersion("1.1.7.0","1.1.0.0")] Modified: trunk/plugins/FritzBox/FritzBox/Settings.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox/Settings.cs 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/FritzBox/Settings.cs 2012-01-21 10:50:48 UTC (rev 4416) @@ -51,12 +51,22 @@ public static bool ExtensiveLogging { get; set; } /// <summary> + /// show notification on incoming call + /// </summary> + public static bool ShowNotficationOnIncomingCall { get; set; } + + /// <summary> + /// show notification on incoming call + /// </summary> + public static bool ShowNotficationOnOutgoingCall { get; set; } + + /// <summary> /// stop media on incoming call when an event happend /// </summary> public static bool PauseMediaOnIncomingCall { get; set; } /// <summary> - /// resume media on incoming call when notify is closed + /// resume media on incoming call when notification is closed /// </summary> public static bool ResumeMediaOnIncomingCall { get; set; } @@ -66,7 +76,7 @@ public static bool PauseMediaOnOutgoingCall { get; set; } /// <summary> - /// resume media on outgoing call when notify is closed + /// resume media on outgoing call when notification is closed /// </summary> /// public static bool ResumeMediaOnOutgoingCall { get; set; } @@ -76,13 +86,13 @@ /// <summary> /// autoclose the dialog after the timeout expired /// </summary> - public static int NotifyTimeout { get; set; } + public static int NotificationTimeout { get; set; } - public static bool CloseOnTimeout { get; set; } + public static bool CloseNotificationOnTimeout { get; set; } - public static bool CloseOnConnectionClosed { get; set; } + public static bool CloseNotificationOnConnectionClosed { get; set; } - public static bool ShowPhoneNumberOnNotify { get; set; } + public static bool ShowPhoneNumberOnNotification { get; set; } public static bool ShowUnknownCaller { get; set; } @@ -135,7 +145,7 @@ PauseMediaOnOutgoingCall = true; ResumeMediaOnOutgoingCall = true; MaxNotifies = 20; - NotifyTimeout = 10; + NotificationTimeout = 10; } #endregion @@ -161,20 +171,28 @@ PhoneBookFilePath = Config.GetFolder(Config.Dir.Config) + "\\FRITZ!Box Manager Phone Book.xml"; // call notification settings + ShowNotficationOnIncomingCall = xmlreader.GetValueAsBool("fritzbox", "showNotificationOnIncomingCall", true); + ShowNotficationOnOutgoingCall = xmlreader.GetValueAsBool("fritzbox", "showNotificationOnOutgoingCall", true); + MaxNotifies = xmlreader.GetValueAsInt("fritzbox", "maxNotifies", 20); - CloseOnTimeout = xmlreader.GetValueAsBool("fritzbox", "closeOnTimeout", false); - NotifyTimeout = xmlreader.GetValueAsInt("fritzbox", "timeout", 10); - CloseOnConnectionClosed = xmlreader.GetValueAsBool("fritzbox", "closeOnConnectionClosed", true); + CloseNotificationOnTimeout = xmlreader.GetValueAsBool("fritzbox", "closeOnTimeout", false); + NotificationTimeout = xmlreader.GetValueAsInt("fritzbox", "notificationTimeout", 10); + CloseNotificationOnConnectionClosed = xmlreader.GetValueAsBool("fritzbox", "closeOnConnectionClosed", true); FilterMSN = xmlreader.GetValueAsBool("fritzbox", "filterMSNs", false); string strMSN = xmlreader.GetValueAsString("fritzbox", "MSN", ""); char[] charSeparators = new[] { ';' }; MSNList.Clear(); // necessary to avoid multiple entries when FRITZ!Box Manager configuration window is closed and re-opened without closing the MediaPortal Configuration window - MSNList.AddRange(strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries)); + //MSNList.AddRange(strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries)); - ShowPhoneNumberOnNotify = xmlreader.GetValueAsBool("fritzbox", "showPhoneNumberOnNotify", true); + foreach (string mSN in strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries)) + { + if (!MSNList.Contains(mSN)) MSNList.Add(mSN); + } + ShowPhoneNumberOnNotification = xmlreader.GetValueAsBool("fritzbox", "showPhoneNumberOnNotification", true); + ShowUnknownCaller = xmlreader.GetValueAsBool("fritzbox", "showUnknownCaller", true); PhoneBookEnabled = xmlreader.GetValueAsBool("fritzbox", "usePhonebook", true); @@ -231,6 +249,12 @@ xmlreader.RemoveEntry("fritzbox", "saveUnknownCaller"); xmlreader.RemoveEntry("fritzbox", "showMSNOnNotify"); + + xmlreader.RemoveEntry("fritzbox", "timeout"); + + xmlreader.RemoveEntry("fritzbox", "showPhoneNumberOnNotify"); + + xmlreader.RemoveEntry("fritzbox", "showPhoneNumberOnNotify"); } } @@ -249,10 +273,13 @@ xmlwriter.SetValue("fritzbox", "port", FritzBoxClient.Port); // call notification settings + xmlwriter.SetValueAsBool("fritzbox", "showNotificationOnIncomingCall", ShowNotficationOnIncomingCall); + xmlwriter.SetValueAsBool("fritzbox", "showNotificationOnOutgoingCall", ShowNotficationOnOutgoingCall); + xmlwriter.SetValue("fritzbox", "maxNotifies", MaxNotifies); - xmlwriter.SetValueAsBool("fritzbox", "closeOnTimeout", CloseOnTimeout); - xmlwriter.SetValue("fritzbox", "timeout", NotifyTimeout); - xmlwriter.SetValueAsBool("fritzbox", "closeOnConnectionClosed", CloseOnConnectionClosed); + xmlwriter.SetValueAsBool("fritzbox", "closeOnTimeout", CloseNotificationOnTimeout); + xmlwriter.SetValue("fritzbox", "notificationTimeout", NotificationTimeout); + xmlwriter.SetValueAsBool("fritzbox", "closeOnConnectionClosed", CloseNotificationOnConnectionClosed); xmlwriter.SetValueAsBool("fritzbox", "filterMSNs", FilterMSN); @@ -265,7 +292,7 @@ xmlwriter.SetValue("fritzbox", "MSN", strMSN); - xmlwriter.SetValueAsBool("fritzbox", "showPhoneNumberOnNotify", ShowPhoneNumberOnNotify); + xmlwriter.SetValueAsBool("fritzbox", "showPhoneNumberOnNotification", ShowPhoneNumberOnNotification); xmlwriter.SetValueAsBool("fritzbox", "usePhonebook", PhoneBookEnabled); Modified: trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/bin/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Debug/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Debug/GenerateResource-ResGen.read.1.tlog =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.dll =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/FritzBox/obj/Release/FritzBox.pdb =================================================================== (Binary files differ) Modified: trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 =================================================================== --- trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 2012-01-18 11:29:15 UTC (rev 4415) +++ trunk/plugins/FritzBox/MpeRelease/FritzBox.xmp2 2012-01-21 10:50:48 UTC (rev 4416) @@ -559,7 +559,7 @@ <Items> <CompatibleVersionItem> <MinRequiredVersion>1.1.0.0</MinRequiredVersion> - <DesignedForVersion>1.1.7.4414</DesignedForVersion> + <DesignedForVersion>1.1.7.4415</DesignedForVersion> </CompatibleVersionItem> </Items> </CompatibleVersion> @@ -581,8 +581,8 @@ <Vers... [truncated message content] |