mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
[MSUTB] Disable Desk Band (#6472)
Supporting Language Bar... JIRA issue: CORE-19363 - Add IDD_CLOSELANGBARNOBAND and IDD_MINIMIZELANGBARNOBAND resource dialogs. - Add IDB_BITMAP154 and IDB_BITMAP155 resource bitmaps. - Disable Desk Band by using g_bEnableDeskBand global variable.
This commit is contained in:
parent
152af475b1
commit
b548b05e89
6 changed files with 110 additions and 32 deletions
|
@ -34,6 +34,17 @@ BEGIN
|
|||
IDS_LEFTCLICK "Left Click"
|
||||
END
|
||||
|
||||
IDD_CLOSELANGBARNOBAND DIALOGEX 0, 0, 200, 105
|
||||
CAPTION "Language Bar"
|
||||
STYLE WS_POPUPWINDOW | WS_CAPTION | DS_MODALFRAME
|
||||
FONT 8, "MS Shell Dlg"
|
||||
{
|
||||
LTEXT "You have closed Language Bar.\r\n\r\nTo use Language Bar later, check ""Show Language Bar on the desktop"" in Language Bar Settings dialog, which you can find within Text Services control panel.", -1, 5, 5, 190, 60
|
||||
AUTOCHECKBOX "&Don't show me this message again", IDC_CLOSELANGBAR_CHECK, 5, 70, 145, 10
|
||||
DEFPUSHBUTTON "OK", IDOK, 80, 85, 55, 15
|
||||
PUSHBUTTON "Cancel", IDCANCEL, 140, 85, 55, 15
|
||||
}
|
||||
|
||||
IDD_CLOSELANGBAR DIALOGEX 0, 0, 200, 105
|
||||
CAPTION "Language Bar"
|
||||
STYLE WS_POPUPWINDOW | WS_CAPTION | DS_MODALFRAME
|
||||
|
@ -45,12 +56,24 @@ FONT 8, "MS Shell Dlg"
|
|||
PUSHBUTTON "Cancel", IDCANCEL, 140, 85, 55, 15
|
||||
}
|
||||
|
||||
IDD_MINIMIZELANGBAR DIALOGEX 0, 0, 205, 84
|
||||
IDD_MINIMIZELANGBARNOBAND DIALOGEX 0, 0, 205, 124
|
||||
CAPTION "Language Bar"
|
||||
STYLE WS_POPUPWINDOW | WS_CAPTION | DS_MODALFRAME
|
||||
FONT 8, "MS Shell Dlg"
|
||||
{
|
||||
LTEXT "You have minimized Language Bar. To restore it, just click Language Bar icon (near the clock) and choose ""Restore Language Bar"" from the pop-up menu.", -1, 5, 5, 190, 50
|
||||
AUTOCHECKBOX "Don't show me this message again", IDC_MINIMIZELANGBAR_CHECK, 5, 65, 125, 10
|
||||
DEFPUSHBUTTON "OK", IDOK, 140, 65, 60, 15
|
||||
LTEXT "You have minimized Language Bar. To restore it, just click Language Bar icon (near the clock) and select ""Restore Language Bar"" from the pop-up menu.", -1, 5, 5, 190, 50
|
||||
CONTROL IDB_BITMAP154, -1, "STATIC", SS_BITMAP, 72, 63, 60, 60, WS_EX_STATICEDGE
|
||||
AUTOCHECKBOX "Don't show me this message again", IDC_MINIMIZELANGBAR_CHECK, 5, 105, 125, 10
|
||||
DEFPUSHBUTTON "OK", IDOK, 140, 105, 60, 15
|
||||
}
|
||||
|
||||
IDD_MINIMIZELANGBAR DIALOGEX 0, 0, 205, 124
|
||||
CAPTION "Language Bar"
|
||||
STYLE WS_POPUPWINDOW | WS_CAPTION | DS_MODALFRAME
|
||||
FONT 8, "MS Shell Dlg"
|
||||
{
|
||||
LTEXT "You have minimized Language Bar. To restore it, just click Language Bar icon (near the clock) and select ""Restore Language Bar"" from the pop-up menu.", -1, 5, 5, 190, 50
|
||||
CONTROL IDB_BITMAP155, -1, "STATIC", SS_BITMAP, 53, 67, 60, 60, WS_EX_STATICEDGE
|
||||
AUTOCHECKBOX "Don't show me this message again", IDC_MINIMIZELANGBAR_CHECK, 5, 105, 125, 10
|
||||
DEFPUSHBUTTON "OK", IDOK, 140, 105, 60, 15
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msutb);
|
||||
|
||||
//#define ENABLE_DESKBAND
|
||||
|
||||
HINSTANCE g_hInst = NULL;
|
||||
UINT g_wmTaskbarCreated = 0;
|
||||
UINT g_uACP = CP_ACP;
|
||||
|
@ -18,6 +20,11 @@ LONG g_DllRefCount = 0;
|
|||
BOOL g_bWinLogon = FALSE;
|
||||
BOOL g_fInClosePopupTipbar = FALSE;
|
||||
HWND g_hwndParent = NULL;
|
||||
#ifdef ENABLE_DESKBAND
|
||||
BOOL g_bEnableDeskBand = TRUE;
|
||||
#else
|
||||
BOOL g_bEnableDeskBand = FALSE;
|
||||
#endif
|
||||
|
||||
BOOL g_bShowTipbar = TRUE;
|
||||
BOOL g_bShowDebugMenu = FALSE;
|
||||
|
@ -67,10 +74,6 @@ class CMsUtbModule : public CComModule
|
|||
{
|
||||
};
|
||||
|
||||
BEGIN_OBJECT_MAP(ObjectMap)
|
||||
//OBJECT_ENTRY(CLSID_MSUTBDeskBand, CDeskBand) // FIXME: Implement this
|
||||
END_OBJECT_MAP()
|
||||
|
||||
CMsUtbModule gModule;
|
||||
|
||||
class CCicLibMenuItem;
|
||||
|
@ -138,7 +141,11 @@ void InitSkipRedrawHKLArray(void)
|
|||
if (!g_prghklSkipRedrawing)
|
||||
return;
|
||||
|
||||
g_prghklSkipRedrawing->Add((HKL)UlongToHandle(0xE0010411)); // Japanese IME will be skipped
|
||||
if (g_bEnableDeskBand && (g_dwOSInfo & CIC_OSINFO_XPPLUS))
|
||||
{
|
||||
// Japanese IME will be skipped
|
||||
g_prghklSkipRedrawing->Add((HKL)UlongToHandle(0xE0010411));
|
||||
}
|
||||
|
||||
CicRegKey regKey;
|
||||
LSTATUS error = regKey.Open(HKEY_LOCAL_MACHINE,
|
||||
|
@ -387,7 +394,7 @@ BOOL CheckEAFonts(void)
|
|||
|
||||
BOOL IsDeskBandFromReg()
|
||||
{
|
||||
if (!(g_dwOSInfo & CIC_OSINFO_XPPLUS)) // Desk band is for XP+
|
||||
if (!g_bEnableDeskBand || !(g_dwOSInfo & CIC_OSINFO_XPPLUS)) // Desk band is for XP+
|
||||
return FALSE;
|
||||
|
||||
CicRegKey regKey;
|
||||
|
@ -536,12 +543,15 @@ BOOL InitFromReg(void)
|
|||
error = regKey2.QueryDword(TEXT("TimerElapseENSUREFOCUS"), &dwValue);
|
||||
if (error == ERROR_SUCCESS)
|
||||
g_uTimerElapseENSUREFOCUS = dwValue;
|
||||
error = regKey2.QueryDword(TEXT("ShowDeskBand"), &dwValue);
|
||||
if (error == ERROR_SUCCESS)
|
||||
g_bShowDeskBand = !!dwValue;
|
||||
error = regKey2.QueryDword(TEXT("TimerElapseSHOWWDESKBAND"), &dwValue);
|
||||
if (error == ERROR_SUCCESS)
|
||||
g_uTimerElapseSHOWDESKBAND = dwValue;
|
||||
if (g_bEnableDeskBand && (g_dwOSInfo & CIC_OSINFO_XPPLUS))
|
||||
{
|
||||
error = regKey2.QueryDword(TEXT("ShowDeskBand"), &dwValue);
|
||||
if (error == ERROR_SUCCESS)
|
||||
g_bShowDeskBand = !!dwValue;
|
||||
error = regKey2.QueryDword(TEXT("TimerElapseSHOWWDESKBAND"), &dwValue);
|
||||
if (error == ERROR_SUCCESS)
|
||||
g_uTimerElapseSHOWDESKBAND = dwValue;
|
||||
}
|
||||
}
|
||||
|
||||
CicRegKey regKey3;
|
||||
|
@ -1432,6 +1442,16 @@ public:
|
|||
STDMETHOD_(void, HandleMouseMsg)(UINT uMsg, LONG x, LONG y) override;
|
||||
};
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
#ifdef ENABLE_DESKBAND
|
||||
class CDeskBand
|
||||
{
|
||||
public:
|
||||
// FIXME: Implement this
|
||||
};
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
* CUTBLangBarDlg
|
||||
*/
|
||||
|
@ -1518,7 +1538,11 @@ CUTBLangBarDlg::DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
CUTBCloseLangBarDlg::CUTBCloseLangBarDlg()
|
||||
{
|
||||
m_cRefs = 1;
|
||||
m_pszDialogName = MAKEINTRESOURCE(IDD_CLOSELANGBAR);
|
||||
|
||||
if (!(g_dwOSInfo & CIC_OSINFO_XPPLUS))
|
||||
m_pszDialogName = MAKEINTRESOURCE(IDD_CLOSELANGBARNOBAND);
|
||||
else
|
||||
m_pszDialogName = MAKEINTRESOURCE(IDD_CLOSELANGBAR);
|
||||
}
|
||||
|
||||
STDMETHODIMP_(BOOL) CUTBCloseLangBarDlg::DoModal(HWND hDlg)
|
||||
|
@ -1581,7 +1605,10 @@ STDMETHODIMP_(void) CUTBCloseLangBarDlg::SetDlgShown(BOOL bShown)
|
|||
CUTBMinimizeLangBarDlg::CUTBMinimizeLangBarDlg()
|
||||
{
|
||||
m_cRefs = 1;
|
||||
m_pszDialogName = MAKEINTRESOURCE(IDD_MINIMIZELANGBAR);
|
||||
if (!(g_dwOSInfo & CIC_OSINFO_XPPLUS))
|
||||
m_pszDialogName = MAKEINTRESOURCE(IDD_MINIMIZELANGBARNOBAND);
|
||||
else
|
||||
m_pszDialogName = MAKEINTRESOURCE(IDD_MINIMIZELANGBAR);
|
||||
}
|
||||
|
||||
STDMETHODIMP_(BOOL) CUTBMinimizeLangBarDlg::DoModal(HWND hDlg)
|
||||
|
@ -2752,13 +2779,20 @@ BOOL CUTBContextMenu::SelectMenuItem(UINT nCommandId)
|
|||
|
||||
case ID_DESKBAND:
|
||||
{
|
||||
DWORD dwStatus;
|
||||
m_pTipbarWnd->m_pLangBarMgr->GetShowFloatingStatus(&dwStatus);
|
||||
if (!g_bEnableDeskBand || !(g_dwOSInfo & CIC_OSINFO_XPPLUS))
|
||||
{
|
||||
m_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_MINIMIZED);
|
||||
}
|
||||
else
|
||||
{
|
||||
DWORD dwStatus;
|
||||
m_pTipbarWnd->m_pLangBarMgr->GetShowFloatingStatus(&dwStatus);
|
||||
|
||||
if (dwStatus & TF_SFT_DESKBAND)
|
||||
break;
|
||||
if (dwStatus & TF_SFT_DESKBAND)
|
||||
break;
|
||||
|
||||
m_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_DESKBAND);
|
||||
m_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_DESKBAND);
|
||||
}
|
||||
|
||||
CUTBMinimizeLangBarDlg *pDialog = new(cicNoThrow) CUTBMinimizeLangBarDlg();
|
||||
if (pDialog)
|
||||
|
@ -3667,15 +3701,19 @@ STDMETHODIMP_(void) CTipbarGripper::OnLButtonUp(LONG x, LONG y)
|
|||
{
|
||||
m_pTipbarWnd->RestoreFromStub();
|
||||
|
||||
APPBARDATA AppBar = { sizeof(AppBar) };
|
||||
AppBar.hWnd = ::FindWindowW(L"Shell_TrayWnd", NULL);
|
||||
if (::SHAppBarMessage(ABM_GETTASKBARPOS, &AppBar))
|
||||
if (g_bEnableDeskBand && (g_dwOSInfo & CIC_OSINFO_XPPLUS))
|
||||
{
|
||||
RECT rc = AppBar.rc;
|
||||
POINT pt;
|
||||
::GetCursorPos(&pt);
|
||||
if (g_pTipbarWnd && ::PtInRect(&rc, pt))
|
||||
g_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_DESKBAND | TF_SFT_EXTRAICONSONMINIMIZED);
|
||||
APPBARDATA AppBar = { sizeof(AppBar) };
|
||||
AppBar.hWnd = ::FindWindowW(L"Shell_TrayWnd", NULL);
|
||||
if (::SHAppBarMessage(ABM_GETTASKBARPOS, &AppBar))
|
||||
{
|
||||
RECT rc = AppBar.rc;
|
||||
POINT pt;
|
||||
::GetCursorPos(&pt);
|
||||
if (g_pTipbarWnd && ::PtInRect(&rc, pt))
|
||||
g_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_DESKBAND |
|
||||
TF_SFT_EXTRAICONSONMINIMIZED);
|
||||
}
|
||||
}
|
||||
|
||||
CUIFGripper::OnLButtonUp(x, y);
|
||||
|
@ -4159,6 +4197,10 @@ BOOL CTipbarWnd::KillTimer(UINT_PTR uIDEvent)
|
|||
/// @unimplemented
|
||||
void CTipbarWnd::MoveToTray()
|
||||
{
|
||||
if (!g_bEnableDeskBand || !(g_dwOSInfo & CIC_OSINFO_XPPLUS))
|
||||
{
|
||||
//FIXME
|
||||
}
|
||||
}
|
||||
|
||||
void CTipbarWnd::MyClientToScreen(LPPOINT lpPoint, LPRECT prc)
|
||||
|
@ -4858,7 +4900,7 @@ SetRegisterLangBand(BOOL bRegister)
|
|||
{
|
||||
TRACE("(%d)\n", bRegister);
|
||||
|
||||
if (!(g_dwOSInfo & CIC_OSINFO_XPPLUS)) // Desk band is for XP+
|
||||
if (!g_bEnableDeskBand || !(g_dwOSInfo & CIC_OSINFO_XPPLUS)) // Desk band is for XP+
|
||||
return E_FAIL;
|
||||
|
||||
BOOL bDeskBand = IsDeskBandFromReg();
|
||||
|
@ -4968,6 +5010,12 @@ MsUtbCoCreateInstance(
|
|||
return cicRealCoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv);
|
||||
}
|
||||
|
||||
BEGIN_OBJECT_MAP(ObjectMap)
|
||||
#ifdef ENABLE_DESKBAND
|
||||
OBJECT_ENTRY(CLSID_MSUTBDeskBand, CDeskBand) // FIXME: Implement this
|
||||
#endif
|
||||
END_OBJECT_MAP()
|
||||
|
||||
/// @implemented
|
||||
BOOL ProcessAttach(HINSTANCE hinstDLL)
|
||||
{
|
||||
|
|
|
@ -21,6 +21,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
#include <reactos/manifest_hosted.rc>
|
||||
|
||||
IDI_MAINICON ICON "res/earth.ico"
|
||||
IDB_BITMAP154 BITMAP "res/Bitmap-154.bmp"
|
||||
IDB_BITMAP155 BITMAP "res/Bitmap-155.bmp"
|
||||
|
||||
/* UTF-8 */
|
||||
#pragma code_page(65001)
|
||||
|
|
BIN
dll/win32/msutb/res/Bitmap-154.bmp
Normal file
BIN
dll/win32/msutb/res/Bitmap-154.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
dll/win32/msutb/res/Bitmap-155.bmp
Normal file
BIN
dll/win32/msutb/res/Bitmap-155.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
|
@ -1,5 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#define IDB_BITMAP154 154
|
||||
#define IDB_BITMAP155 155
|
||||
|
||||
#define IDS_OK 100
|
||||
#define IDS_CANCEL 101
|
||||
#define IDS_ABORT 102
|
||||
|
@ -39,7 +42,9 @@
|
|||
#define ID_ADJUSTDESKBAND 219
|
||||
#define ID_SETTINGS 2000
|
||||
|
||||
#define IDD_CLOSELANGBARNOBAND 1000
|
||||
#define IDD_CLOSELANGBAR 1001
|
||||
#define IDD_MINIMIZELANGBARNOBAND 1003
|
||||
#define IDD_MINIMIZELANGBAR 1004
|
||||
|
||||
#define IDC_CLOSELANGBAR_CHECK 1002
|
||||
|
|
Loading…
Reference in a new issue