Skip to content

Commit 6db5483

Browse files
committed
Added WindowInfo (23) to get creating plugin ID
1 parent a9bfa67 commit 6db5483

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

miniwindow.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,7 @@ void CMiniWindow::Info (long InfoType, VARIANT & vaResult)
10141014
case 21: SetUpVariantDate (vaResult, COleDateTime (m_tDateInstalled.GetTime ())); break;
10151015

10161016
case 22: SetUpVariantLong (vaResult, m_ZOrder); break; // Z-Order
1017+
case 23: SetUpVariantString (vaResult, m_sCreatingPlugin.c_str ()); break; // creating plugin ID
10171018

10181019
default:
10191020
vaResult.vt = VT_NULL;

miniwindow.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ class CMiniWindow
116116
bool m_bExecutingScript; // so windows don't delete themselves
117117

118118
string m_sCallbackPlugin; // plugin we are using
119+
string m_sCreatingPlugin; // plugin that created the miniwindow
119120

120121
const long GetWidth () const { return m_iWidth; }
121122
const long GetHeight () const { return m_iHeight; }

scripting/methods/methods_miniwindows.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ long CMUSHclientDoc::WindowCreate(LPCTSTR Name,
127127
Position, Flags,
128128
BackgroundColour);
129129

130+
pMiniWindow->m_sCreatingPlugin.erase ();
131+
if (m_CurrentPlugin)
132+
pMiniWindow->m_sCreatingPlugin = m_CurrentPlugin->m_strID;
133+
130134
SortWindows (); // need to re-make sorted list in Z-order
131135
UpdateAllViews (NULL);
132136

0 commit comments

Comments
 (0)