Author: dquintana
Date: Fri Aug 15 10:49:04 2014
New Revision: 63891
URL:
http://svn.reactos.org/svn/reactos?rev=63891&view=rev
Log:
[STOBJECT]
* Turn some debug prints to traces.
* New resources by Robert Naumann, for future use.
Modified:
branches/shell-experiments/dll/shellext/stobject/csystray.cpp
branches/shell-experiments/dll/shellext/stobject/lang/de-DE.rc
branches/shell-experiments/dll/shellext/stobject/lang/en-US.rc
branches/shell-experiments/dll/shellext/stobject/resource.h
branches/shell-experiments/dll/shellext/stobject/volume.cpp
Modified: branches/shell-experiments/dll/shellext/stobject/csystray.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/shellext/…
==============================================================================
--- branches/shell-experiments/dll/shellext/stobject/csystray.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/shellext/stobject/csystray.cpp [iso-8859-1] Fri Aug 15
10:49:04 2014
@@ -133,7 +133,7 @@
HRESULT CSysTray::CreateSysTrayThread()
{
- DbgPrint("CSysTray Init TODO: Initialize tray icon handlers.\n");
+ TRACE("CSysTray Init TODO: Initialize tray icon handlers.\n");
HANDLE hThread = CreateThread(NULL, 0, s_SysTrayThreadProc, this, 0, NULL);
@@ -192,7 +192,7 @@
return TRUE;
}
- DbgPrint("SysTray message received %u (%08p %08p)\n", uMsg, wParam,
lParam);
+ TRACE("SysTray message received %u (%08p %08p)\n", uMsg, wParam, lParam);
hr = ProcessIconMessage(uMsg, wParam, lParam);
if (FAILED(hr))
Modified: branches/shell-experiments/dll/shellext/stobject/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/shellext/…
==============================================================================
--- branches/shell-experiments/dll/shellext/stobject/lang/de-DE.rc [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/shellext/stobject/lang/de-DE.rc [iso-8859-1] Fri Aug 15
10:49:04 2014
@@ -1,2 +1,51 @@
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
+IDD_POWER_METER DIALOGEX 0, 0, 252, 218
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_CONTEXTHELP
+CAPTION "Energieanzeige"
+FONT 8, "Ms Shell Dlg"
+BEGIN
+ CONTROL "Energiestand", 1001, BUTTON, BS_GROUPBOX | WS_CHILD | WS_VISIBLE,
9, 20, 234, 189
+ CONTROL "Symbol in der &Taskleiste anzeigen", 1002, BUTTON,
BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 6, 6, 123, 10
+ CONTROL "&Details für jede Batterie anzeigen", 1002, BUTTON,
BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 129, 6, 123, 10
+ CONTROL "", 1000, STATIC, SS_LEFT | WS_CHILD | WS_GROUP, 11, 29, 229, 178
+END
+
+STRINGTABLE
+BEGIN
+ //Power related strings
+ IDS_PWR_PROPERTIES "&Energieverwaltungseigenschaften
einstellen"
+ IDS_PWR_METER "Batterieanzeige ö&ffnen"
+ IDS_PWR_RUN "shell32.dll,Control_RunDLL PowerCfg.cpl"
+ IDS_PWR_PERCENT_REMAINING "%1!u!%% verbleibend"
+ IDS_PWR_CHARGING " (wird aufgeladen)"
+ IDS_PWR_UNKNOWN_REMAINING "Unbekannt verbleibend"
+ IDS_PWR_AC "Mit Wechselstrom"
+ IDS_PWR_HOURS_REMAINING "%1!u!:%2!02u! Stunden (%3!u!%%) verbleibend"
+ IDS_PWR_MINUTES_REMAINING "%1!u! Min. (%2!u!%%) verbleibend"
+
+ //Hotplug related strings
+ IDS_HOTPLUG_REMOVE_1 "Hardware sicher entfernen"
+ IDS_HOTPLUG_REMOVE_2 "&Hardware sicher entfernen"
+ IDS_HOTPLUG_REMOVE_3 "%s entfernen"
+ IDS_HOTPLUG_RUN "shell32.dll,Control_RunDLL hotplug.dll"
+ IDS_HOTPLUG_COMMA ", "
+ IDS_HOTPLUG_DRIVE " - Laufwerk (%s)"
+ IDS_HOTPLUG_DRIVES " - Laufwerke (%s)"
+ IDS_HOTPLUG_A "A:"
+ IDS_HOTPLUG_REQUIERES "Diese Hardware erfordert \"Sicheres
Entfernen\""
+ IDS_HOTPLUG_CLICK "Klicken Sie auf dieses Symbol, und wählen Sie die zu
entfernende Hardware, bevor Sie diese Hardware entfernen."
+
+ //Volume related strings
+ IDS_VOL_VOLUME "Lautstärke"
+ IDS_VOL_ADJUST "&Audioeigenschaften einstellen"
+ IDS_VOL_OPEN "&Lautstärkeregelung öffnen"
+ IDS_VOL_RUN "SNDVOL32.EXE"
+ IDS_VOL_MUTED "Lautstärke (ausgeschaltet)"
+
+ //Keyboard-Mouse related strings
+ IDS_KEYS_STICKY "Einrastfunktion"
+ IDS_KEYS_MOUSE "Tastaturmaus"
+ IDS_KEYS_FILTER "Anschlagverzögerung"
+END
Modified: branches/shell-experiments/dll/shellext/stobject/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/shellext/…
==============================================================================
--- branches/shell-experiments/dll/shellext/stobject/lang/en-US.rc [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/shellext/stobject/lang/en-US.rc [iso-8859-1] Fri Aug 15
10:49:04 2014
@@ -1 +1,52 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+IDD_POWER_METER DIALOGEX 0, 0, 252, 218
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_CONTEXTHELP
+CAPTION "Power Meter"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "Power status", 1001, BUTTON, BS_GROUPBOX | WS_CHILD | WS_VISIBLE,
9, 20, 234, 189
+ CONTROL "&Always show icon on the taskbar.", 1002, BUTTON,
BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 6, 6, 120, 10
+ CONTROL "Show details for each &battery.", 1003, BUTTON,
BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 135, 6, 120, 8
+ CONTROL "", 1000, STATIC, SS_LEFT | WS_CHILD | WS_GROUP, 11, 29, 229, 178
+END
+
+STRINGTABLE
+BEGIN
+ //Power related strings
+ IDS_PWR_PROPERTIES "&Adjust Power Properties"
+ IDS_PWR_METER "&Open Power Meter"
+ IDS_PWR_RUN "shell32.dll,Control_RunDLL PowerCfg.cpl"
+ IDS_PWR_PERCENT_REMAINING "%1!u!%% remaining"
+ IDS_PWR_CHARGING " (charging)"
+ IDS_PWR_UNKNOWN_REMAINING "Unknown remaining"
+ IDS_PWR_AC "On AC power"
+ IDS_PWR_HOURS_REMAINING "%1!u!:%2!02u! hours (%3!u!%%) remaining"
+ IDS_PWR_MINUTES_REMAINING "%1!u! min (%2!u!%%) remaining"
+
+ //Hotplug related strings
+ IDS_HOTPLUG_REMOVE_1 "Safely Remove Hardware"
+ IDS_HOTPLUG_REMOVE_2 "&Safely Remove Hardware"
+ IDS_HOTPLUG_REMOVE_3 "Safely remove %s"
+ IDS_HOTPLUG_RUN "shell32.dll,Control_RunDLL hotplug.dll"
+ IDS_HOTPLUG_COMMA ", "
+ IDS_HOTPLUG_DRIVE " - Drive(%s)"
+ IDS_HOTPLUG_DRIVES " - Drives(%s)"
+ IDS_HOTPLUG_A "A:"
+ IDS_HOTPLUG_REQUIERES "This hardware requires \"Safe Removal\""
+ IDS_HOTPLUG_CLICK "Before removing this hardware, click on this icon and select
the hardware you want to remove."
+
+ //Volume related strings
+ IDS_VOL_VOLUME "Volume"
+ IDS_VOL_ADJUST "&Adjust Audio Properties"
+ IDS_VOL_OPEN "&Open Volume Control"
+ IDS_VOL_RUN "SNDVOL32.EXE"
+ IDS_VOL_MUTED "Volume (muted)"
+
+ //Keyboard-Mouse related strings
+ IDS_KEYS_STICKY "StickyKeys"
+ IDS_KEYS_MOUSE "MouseKeys"
+ IDS_KEYS_FILTER "FilterKeys"
+END
+
Modified: branches/shell-experiments/dll/shellext/stobject/resource.h
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/shellext/…
==============================================================================
--- branches/shell-experiments/dll/shellext/stobject/resource.h [iso-8859-1] (original)
+++ branches/shell-experiments/dll/shellext/stobject/resource.h [iso-8859-1] Fri Aug 15
10:49:04 2014
@@ -1,8 +1,42 @@
#pragma once
-#define IDI_BATTERY 200
-#define IDI_EXTRACT 210
-#define IDI_VOLUME 230
-#define IDI_VOLMUTE 231
+#define IDD_POWER_METER 100
-#define IDR_SYSTRAY 11001
+#define IDS_PWR_PROPERTIES 152
+#define IDS_PWR_METER 153
+#define IDS_PWR_RUN 157
+#define IDS_PWR_PERCENT_REMAINING 158
+#define IDS_PWR_CHARGING 159
+#define IDS_PWR_UNKNOWN_REMAINING 160
+#define IDS_PWR_AC 161
+#define IDS_PWR_HOURS_REMAINING 162
+#define IDS_PWR_MINUTES_REMAINING 163
+
+#define IDI_BATTERY 200
+#define IDI_EXTRACT 210
+
+#define IDS_HOTPLUG_REMOVE_1 211
+#define IDS_HOTPLUG_REMOVE_2 215
+#define IDS_HOTPLUG_REMOVE_3 216
+#define IDS_HOTPLUG_RUN 217
+#define IDS_HOTPLUG_COMMA 218
+#define IDS_HOTPLUG_DRIVE 219
+#define IDS_HOTPLUG_DRIVES 220
+#define IDS_HOTPLUG_A 221
+#define IDS_HOTPLUG_REQUIERES 222
+#define IDS_HOTPLUG_CLICK 223
+
+#define IDI_VOLUME 230
+#define IDI_VOLMUTE 231
+
+#define IDS_VOL_VOLUME 252
+#define IDS_VOL_ADJUST 255
+#define IDS_VOL_OPEN 256
+#define IDS_VOL_RUN 257
+#define IDS_VOL_MUTED 258
+
+#define IDS_KEYS_STICKY 330
+#define IDS_KEYS_MOUSE 331
+#define IDS_KEYS_FILTER 332
+
+#define IDR_SYSTRAY 11001
Modified: branches/shell-experiments/dll/shellext/stobject/volume.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/shellext/…
==============================================================================
--- branches/shell-experiments/dll/shellext/stobject/volume.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/shellext/stobject/volume.cpp [iso-8859-1] Fri Aug 15
10:49:04 2014
@@ -32,7 +32,7 @@
DWORD waveOutId = 0;
DWORD param2 = 0;
- DbgPrint("Volume_FindDefaultMixerID\n");
+ TRACE("Volume_FindDefaultMixerID\n");
result = waveOutMessage((HWAVEOUT) WAVE_MAPPER, DRVM_MAPPER_PREFERRED_GET,
(DWORD_PTR) &waveOutId, (DWORD_PTR) ¶m2);
if (result)
@@ -40,19 +40,19 @@
if (waveOutId == (DWORD)-1)
{
- DbgPrint("WARNING: waveOut has no default device, trying with first
available device...\n", waveOutId);
+ TRACE("WARNING: waveOut has no default device, trying with first available
device...\n", waveOutId);
mixerId = 0;
}
else
{
- DbgPrint("waveOut default device is %d\n", waveOutId);
+ TRACE("waveOut default device is %d\n", waveOutId);
result = mixerGetID((HMIXEROBJ) waveOutId, &mixerId, MIXER_OBJECTF_WAVEOUT);
if (result)
return E_FAIL;
- DbgPrint("mixerId for waveOut default device is %d\n", mixerId);
+ TRACE("mixerId for waveOut default device is %d\n", mixerId);
}
g_mixerId = mixerId;
@@ -72,7 +72,7 @@
if (mixerCaps.cDestinations == 0)
return S_FALSE;
- DbgPrint("mixerCaps.cDestinations %d\n", mixerCaps.cDestinations);
+ TRACE("mixerCaps.cDestinations %d\n", mixerCaps.cDestinations);
DWORD idx;
for (idx = 0; idx < mixerCaps.cDestinations; idx++)
@@ -84,14 +84,14 @@
if (mixerLine.dwComponentType >= MIXERLINE_COMPONENTTYPE_DST_SPEAKERS
&&
mixerLine.dwComponentType <= MIXERLINE_COMPONENTTYPE_DST_HEADPHONES)
break;
- DbgPrint("Destination %d was not speakers or headphones.\n");
+ TRACE("Destination %d was not speakers or headphones.\n");
}
}
if (idx >= mixerCaps.cDestinations)
return E_FAIL;
- DbgPrint("Valid destination %d found.\n");
+ TRACE("Valid destination %d found.\n");
g_mixerLineID = mixerLine.dwLineID;
@@ -105,7 +105,7 @@
if (mixerGetLineControlsW((HMIXEROBJ) g_mixerId, &mixerLineControls,
MIXER_GETLINECONTROLSF_ONEBYTYPE))
return E_FAIL;
- DbgPrint("Found control id %d for mute: %d\n", mixerControl.dwControlID);
+ TRACE("Found control id %d for mute: %d\n", mixerControl.dwControlID);
g_muteControlID = mixerControl.dwControlID;
@@ -128,7 +128,7 @@
if (mixerGetControlDetailsW((HMIXEROBJ) g_mixerId, &mixerControlDetails, 0))
return E_FAIL;
- DbgPrint("Obtained mute status %d\n", detailsResult);
+ TRACE("Obtained mute status %d\n", detailsResult);
g_IsMute = detailsResult != 0;
}
@@ -140,7 +140,7 @@
{
HRESULT hr;
- DbgPrint("Volume_Init\n");
+ TRACE("Volume_Init\n");
if (!g_hMixer)
{
@@ -168,7 +168,7 @@
HRESULT STDMETHODCALLTYPE Volume_Update(_In_ CSysTray * pSysTray)
{
- DbgPrint("Volume_Update\n");
+ TRACE("Volume_Update\n");
Volume_IsMute();
@@ -183,7 +183,7 @@
HRESULT STDMETHODCALLTYPE Volume_Shutdown(_In_ CSysTray * pSysTray)
{
- DbgPrint("Volume_Shutdown\n");
+ TRACE("Volume_Shutdown\n");
return pSysTray->NotifyIcon(NIM_DELETE, ID_ICON_VOLUME, NULL, NULL);
}
@@ -201,9 +201,9 @@
if (uMsg != ID_ICON_VOLUME)
return S_FALSE;
- DbgPrint("Volume_Message\n");
-
- DbgPrint("Calling update...\n");
+ TRACE("Volume_Message\n");
+
+ TRACE("Calling update...\n");
Volume_Update(pSysTray);
switch (lParam)
@@ -211,7 +211,7 @@
case WM_LBUTTONDOWN:
break;
case WM_LBUTTONUP:
- DbgPrint("TODO: display volume slider\n");
+ TRACE("TODO: display volume slider\n");
break;
case WM_LBUTTONDBLCLK:
// FIXME: ensure we are loading the right one