mirror of
https://github.com/reactos/reactos.git
synced 2024-08-16 08:29:38 +00:00
Revert files that shouldn't have been included. I blame an ongoing headache for it.
svn path=/trunk/; revision=66017
This commit is contained in:
parent
a1fe1d888b
commit
1cab840681
|
@ -82,7 +82,7 @@ public:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL AddButton(IN CONST NOTIFYICONDATA *iconData)
|
VOID AddButton(IN CONST NOTIFYICONDATA *iconData)
|
||||||
{
|
{
|
||||||
TBBUTTON tbBtn;
|
TBBUTTON tbBtn;
|
||||||
NOTIFYICONDATA * notifyItem;
|
NOTIFYICONDATA * notifyItem;
|
||||||
|
@ -91,7 +91,8 @@ public:
|
||||||
int index = FindItemByIconData(iconData, ¬ifyItem);
|
int index = FindItemByIconData(iconData, ¬ifyItem);
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
return UpdateButton(iconData);
|
UpdateButton(iconData);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyItem = new NOTIFYICONDATA();
|
notifyItem = new NOTIFYICONDATA();
|
||||||
|
@ -137,11 +138,9 @@ public:
|
||||||
|
|
||||||
CToolbar::AddButton(&tbBtn);
|
CToolbar::AddButton(&tbBtn);
|
||||||
SetButtonSize(ICON_SIZE, ICON_SIZE);
|
SetButtonSize(ICON_SIZE, ICON_SIZE);
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL UpdateButton(IN CONST NOTIFYICONDATA *iconData)
|
VOID UpdateButton(IN CONST NOTIFYICONDATA *iconData)
|
||||||
{
|
{
|
||||||
NOTIFYICONDATA * notifyItem;
|
NOTIFYICONDATA * notifyItem;
|
||||||
TBBUTTONINFO tbbi = { 0 };
|
TBBUTTONINFO tbbi = { 0 };
|
||||||
|
@ -149,7 +148,8 @@ public:
|
||||||
int index = FindItemByIconData(iconData, ¬ifyItem);
|
int index = FindItemByIconData(iconData, ¬ifyItem);
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return AddButton(iconData);
|
AddButton(iconData);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
tbbi.cbSize = sizeof(tbbi);
|
tbbi.cbSize = sizeof(tbbi);
|
||||||
|
@ -197,17 +197,15 @@ public:
|
||||||
/* TODO: support NIF_INFO, NIF_GUID, NIF_REALTIME, NIF_SHOWTIP */
|
/* TODO: support NIF_INFO, NIF_GUID, NIF_REALTIME, NIF_SHOWTIP */
|
||||||
|
|
||||||
SetButtonInfo(index, &tbbi);
|
SetButtonInfo(index, &tbbi);
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL RemoveButton(IN CONST NOTIFYICONDATA *iconData)
|
VOID RemoveButton(IN CONST NOTIFYICONDATA *iconData)
|
||||||
{
|
{
|
||||||
NOTIFYICONDATA * notifyItem;
|
NOTIFYICONDATA * notifyItem;
|
||||||
|
|
||||||
int index = FindItemByIconData(iconData, ¬ifyItem);
|
int index = FindItemByIconData(iconData, ¬ifyItem);
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
return FALSE;
|
return;
|
||||||
|
|
||||||
DeleteButton(index);
|
DeleteButton(index);
|
||||||
|
|
||||||
|
@ -217,8 +215,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
delete notifyItem;
|
delete notifyItem;
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID GetTooltipText(int index, LPTSTR szTip, DWORD cchTip)
|
VOID GetTooltipText(int index, LPTSTR szTip, DWORD cchTip)
|
||||||
|
@ -436,11 +432,20 @@ public:
|
||||||
switch (data->notify_code)
|
switch (data->notify_code)
|
||||||
{
|
{
|
||||||
case NIM_ADD:
|
case NIM_ADD:
|
||||||
return Toolbar.AddButton(iconData);
|
{
|
||||||
|
Toolbar.AddButton(iconData);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case NIM_MODIFY:
|
case NIM_MODIFY:
|
||||||
return Toolbar.UpdateButton(iconData);
|
{
|
||||||
|
Toolbar.UpdateButton(iconData);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case NIM_DELETE:
|
case NIM_DELETE:
|
||||||
return Toolbar.RemoveButton(iconData);
|
{
|
||||||
|
Toolbar.RemoveButton(iconData);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
TRACE("NotifyMessage received with unknown code %d.\n", data->notify_code);
|
TRACE("NotifyMessage received with unknown code %d.\n", data->notify_code);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -338,8 +338,6 @@ HRESULT STDMETHODCALLTYPE CMenuDeskBar::Popup(POINTL *ppt, RECTL *prcExclude, MP
|
||||||
x = ppt->x + rc.left;
|
x = ppt->x + rc.left;
|
||||||
y = ppt->y + rc.top;
|
y = ppt->y + rc.top;
|
||||||
break;
|
break;
|
||||||
case MPPF_TOP:
|
|
||||||
break;
|
|
||||||
case MPPF_TOP | MPPF_ALIGN_LEFT:
|
case MPPF_TOP | MPPF_ALIGN_LEFT:
|
||||||
x = ppt->x - rc.right;
|
x = ppt->x - rc.right;
|
||||||
y = ppt->y + rc.top;
|
y = ppt->y + rc.top;
|
||||||
|
|
Loading…
Reference in a new issue