|
From: <dos...@us...> - 2013-03-05 22:46:23
|
Revision: 4524
http://sourceforge.net/p/mp-plugins/code/4524
Author: doskabouter
Date: 2013-03-05 22:46:21 +0000 (Tue, 05 Mar 2013)
Log Message:
-----------
- cleanup
- fixed bug: goto previous window unnecessarily shows bookmarks and webpage again
Modified Paths:
--------------
trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIBookmark.cs
trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIPlugin.cs
Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIBookmark.cs
===================================================================
--- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIBookmark.cs 2013-01-26 17:41:24 UTC (rev 4523)
+++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIBookmark.cs 2013-03-05 22:46:21 UTC (rev 4524)
@@ -39,11 +39,13 @@
[SkinControlAttribute(3)]
protected GUISortButtonControl btnSortBy = null;
+ public const int BookmarkWindowId = 54537688;
+
public override int GetID
{
get
{
- return 54537688;
+ return BookmarkWindowId;
}
set
{
@@ -79,7 +81,10 @@
else
{
GUIPlugin.StartupLink = item.Path;
- GUIWindowManager.ActivateWindow(54537689);
+ if (GUIWindowManager.GetPreviousActiveWindow() == GUIPlugin.PluginWindowId)
+ GUIWindowManager.ShowPreviousWindow();
+ else
+ GUIWindowManager.ActivateWindow(GUIPlugin.PluginWindowId);
}
}
}
Modified: trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIPlugin.cs
===================================================================
--- trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIPlugin.cs 2013-01-26 17:41:24 UTC (rev 4523)
+++ trunk/plugins/BrowseTheWeb/Source/BrowseTheWeb/GUIPlugin.cs 2013-03-05 22:46:21 UTC (rev 4524)
@@ -61,6 +61,7 @@
#region Constants
private const string _spanstyle = "font-family: arial,sans-serif; font-size: 12px ! important; line-height: 130% ! important; border-width: 1px ! important; border-style: solid ! important; -moz-border-radius: 2px 2px 2px 2px ! important; padding: 0px 2px ! important; margin-right: 2px; max-width: 20px; max-height: 10px ! important; overflow: visible ! important; float: none ! important; display: inline;";
+ public const int PluginWindowId = 54537689;
#endregion
#region declare vars
@@ -86,7 +87,7 @@
public string Author()
{
- return "Mark Koenig (kroko) 2010";
+ return "Doskabouter";
}
public bool CanEnable()
{
@@ -133,7 +134,7 @@
{
get
{
- return 54537689;
+ return PluginWindowId;
}
set
{
@@ -346,7 +347,7 @@
protected override void OnPageDestroy(int new_windowId)
{
- if (new_windowId != 54537688)
+ if (new_windowId != GUIBookmark.BookmarkWindowId)
{ // not if you got favs
if (settings.BlankBrowser)
{
@@ -483,7 +484,7 @@
}
if (action.wID == settings.Remote_Bookmark)
{
- GUIWindowManager.ActivateWindow(54537688);
+ GUIWindowManager.ActivateWindow(GUIBookmark.BookmarkWindowId);
return;
}
if ((action.wID == settings.Remote_Zoom_In) ||
@@ -636,7 +637,7 @@
if (e.KeyCode == (uint)Keys.Left) OnMoveLeft();
if (e.KeyCode == (uint)Keys.Right) OnMoveRight();
- if (e.KeyCode == (uint)Keys.F3) GUIWindowManager.ActivateWindow(54537688);
+ if (e.KeyCode == (uint)Keys.F3) GUIWindowManager.ActivateWindow(GUIBookmark.BookmarkWindowId);
if (e.KeyCode == (uint)Keys.F7) webBrowser.GoBack();
if (e.KeyCode == (uint)Keys.F8) webBrowser.GoForward();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|