|
From: <arn...@us...> - 2008-03-26 14:04:49
|
Revision: 1061
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1061&view=rev
Author: arnetheduck
Date: 2008-03-26 07:04:21 -0700 (Wed, 26 Mar 2008)
Log Message:
-----------
setHelpIds only for dialogs
Modified Paths:
--------------
dcplusplus/trunk/help/settings_tabs.html
dcplusplus/trunk/help/window_favorite_hubs.html
dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectDialog.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDialog.h
dcplusplus/trunk/win32/Advanced3Page.cpp
dcplusplus/trunk/win32/Appearance2Page.cpp
dcplusplus/trunk/win32/AppearancePage.cpp
dcplusplus/trunk/win32/CertificatesPage.cpp
dcplusplus/trunk/win32/CommandDlg.cpp
dcplusplus/trunk/win32/DownloadPage.cpp
dcplusplus/trunk/win32/FavoriteDirsPage.cpp
dcplusplus/trunk/win32/GeneralPage.cpp
dcplusplus/trunk/win32/LogPage.cpp
dcplusplus/trunk/win32/NetworkPage.cpp
dcplusplus/trunk/win32/QueuePage.cpp
dcplusplus/trunk/win32/SettingsDialog.cpp
dcplusplus/trunk/win32/UCPage.cpp
dcplusplus/trunk/win32/UploadPage.cpp
dcplusplus/trunk/win32/WinUtil.cpp
dcplusplus/trunk/win32/WinUtil.h
Property Changed:
----------------
dcplusplus/trunk/
Property changes on: dcplusplus/trunk
___________________________________________________________________
Name: bzr:revision-info
- timestamp: 2008-03-24 18:59:36.282999992 +0100
committer: zouzou123gen
properties:
branch-nick: bzr
+ timestamp: 2008-03-25 01:46:02.440000057 +0100
committer: zouzou123gen
properties:
branch-nick: bzr
Name: bzr:revision-id:v3-trunk1
- 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn
1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn
1029 zouzou123gen-20080323221249-0su72zaj13e706mk
1030 arn...@gm...-20080324140623-muba1dl46m000o8c
1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6
1032 arn...@gm...-20080324153706-siidja05n84i00b1
1033 arn...@gm...-20080324153823-lhn3awurnu77riln
1034 arn...@gm...-20080324165650-zapppziji67yf5a2
1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2
+ 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn
1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn
1029 zouzou123gen-20080323221249-0su72zaj13e706mk
1030 arn...@gm...-20080324140623-muba1dl46m000o8c
1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6
1032 arn...@gm...-20080324153706-siidja05n84i00b1
1033 arn...@gm...-20080324153823-lhn3awurnu77riln
1034 arn...@gm...-20080324165650-zapppziji67yf5a2
1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2
1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3
Modified: dcplusplus/trunk/help/settings_tabs.html
===================================================================
--- dcplusplus/trunk/help/settings_tabs.html 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/help/settings_tabs.html 2008-03-26 14:04:21 UTC (rev 1061)
@@ -10,29 +10,27 @@
<dl style="margin-left: 40px;">
<dt>Hub</dt>
<dd>When a chat message appears in a hub that's
-not focused the tab will become bold if you have this option selected.</dd>
+not focused the tab will be highlighted if you have this option selected.</dd>
<dt>Private message</dt>
<dd>When a private message appears that's
-not focused the tab will become bold if you have this option selected.</dd>
+not focused the tab will be highlighted if you have this option selected.</dd>
<dt>Search</dt>
<dd>If more search result appear in an open search window that's
-not focused the tab will become bold if you have this option selected.</dd>
+not focused the tab will be highlighted if you have this option selected.</dd>
<dt>System log</dt>
- <dd>If an system log entry is added while the tab is not focused, the tab will become bold if you have this option selected.</dd>
+ <dd>If an system log entry is added while the tab is not focused, the tab will be highlighted if you have this option selected.</dd>
<dt>Download Queue</dt>
<dd>This option controls whether or not the Download Queue's tab will
highlight itself when a queue item changes state or finishes.</dd>
<dt>Finished Downloads</dt>
<dd>When a download completes, the Finished
-Downloads tab will turn bold if this option is selected.</dd>
+Downloads tab will be highlighted if this option is selected.</dd>
<dt>Waiting users</dt>
<dd>If a user or an item is added or removed while the tab is not
-focused, the tab will become bold if you have this option selected.</dd>
+focused, the tab will be highlighted if you have this option selected.</dd>
<dt>Finished Uploads</dt>
<dd>When a upload completes, the Finished
-Uploads tab will turn bold if this option is selected.</dd>
+Uploads tab will be highlighted if this option is selected.</dd>
</dl>
</body>
</html>
-
-
Modified: dcplusplus/trunk/help/window_favorite_hubs.html
===================================================================
--- dcplusplus/trunk/help/window_favorite_hubs.html 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/help/window_favorite_hubs.html 2008-03-26 14:04:21 UTC (rev 1061)
@@ -24,18 +24,18 @@
</dl>
<h2>Buttons</h2>
<dl style="margin-left: 40px;">
+ <dt>Connect</dt>
+ <dd>Connects to selected hubs.<dd>
<dt>New</dt>
<dd>Create a new favorite hub.</dd>
<dt>Properties</dt>
- <dd>Change pre-existing hub properties.</dd>
- <dt>Remove</dt>
- <dd>Removes the chosen favorite hub.</dd>
+ <dd>Change pre-existing hub properties for the selected hub.</dd>
<dt>Move up</dt>
- <dd>Move up a hub in the list. If several hubs have <a href=#autoconnect>auto connect</a> enabled, the highest hub will be connected to first.</dd>
+ <dd>Move up selected hubs in the list. If several hubs have <a href=#autoconnect>auto connect</a> enabled, the highest hub will be connected to first.</dd>
<dt>Move down</dt>
- <dd>Move down a hub in the list. If several hubs have <a href=#autoconnect>auto connect</a> enabled, the lowest hub will be connected to last.</dd>
- <dt>Connect</dt>
- <dd>Connects to chosen hubs.<dd>
+ <dd>Move down selected hubs in the list. If several hubs have <a href=#autoconnect>auto connect</a> enabled, the lowest hub will be connected to last.</dd>
+ <dt>Remove</dt>
+ <dd>Removes selected hubs from the favorite hubs list.</dd>
</dl>
</body>
</html>
Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectDialog.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectDialog.h 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectDialog.h 2008-03-26 14:04:21 UTC (rev 1061)
@@ -8,10 +8,15 @@
template<typename T>
class AspectDialog {
public:
+ HWND getItem(int id) {
+ return ::GetDlgItem(static_cast<T*>(this)->handle(), id);
+ }
+
void setItemText(int id, const SmartUtil::tstring& text) {
::SetDlgItemText(static_cast<T*>(this)->handle(), id, text.c_str());
}
-
};
+
}
+
#endif /*ASPECTDIALOG_H_*/
Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDialog.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDialog.h 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetDialog.h 2008-03-26 14:04:21 UTC (rev 1061)
@@ -28,6 +28,7 @@
#ifndef WidgetDialog_h
#define WidgetDialog_h
+#include "../aspects/AspectDialog.h"
#include "WidgetWindowBase.h"
namespace SmartWin
@@ -43,8 +44,9 @@
* Class is a public superclass of WidgetWindowBase and therefor can use all features
* of WidgetWindowBase.
*/
-class WidgetDialog
- : public WidgetWindowBase< Policies::Dialog >
+class WidgetDialog :
+ public WidgetWindowBase< Policies::Dialog >,
+ public AspectDialog<WidgetDialog >
{
public:
typedef WidgetWindowBase< Policies::Dialog > BaseType;
Modified: dcplusplus/trunk/win32/Advanced3Page.cpp
===================================================================
--- dcplusplus/trunk/win32/Advanced3Page.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/Advanced3Page.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -113,7 +113,7 @@
createDialog(IDD_ADVANCED3PAGE);
setHelpId(IDH_ADVANCED3PAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
PropPage::translate(handle(), texts);
PropPage::read(handle(), items, 0, 0);
Modified: dcplusplus/trunk/win32/Appearance2Page.cpp
===================================================================
--- dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/Appearance2Page.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -66,7 +66,7 @@
createDialog(IDD_APPEARANCE2PAGE);
setHelpId(IDH_APPEARANCE2PAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
PropPage::translate(handle(), texts);
PropPage::read(handle(), items, 0, 0);
Modified: dcplusplus/trunk/win32/AppearancePage.cpp
===================================================================
--- dcplusplus/trunk/win32/AppearancePage.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/AppearancePage.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -72,7 +72,7 @@
createDialog(IDD_APPEARANCEPAGE);
setHelpId(IDH_APPEARANCEPAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
PropPage::translate(handle(), texts);
PropPage::read(handle(), items, listItems, ::GetDlgItem(handle(), IDC_APPEARANCE_BOOLEANS));
Modified: dcplusplus/trunk/win32/CertificatesPage.cpp
===================================================================
--- dcplusplus/trunk/win32/CertificatesPage.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/CertificatesPage.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -65,7 +65,7 @@
createDialog(IDD_CERTIFICATESPAGE);
setHelpId(IDH_CERTIFICATESPAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
PropPage::translate(handle(), texts);
PropPage::read(handle(), items, listItems, ::GetDlgItem(handle(), IDC_TLS_OPTIONS));
Modified: dcplusplus/trunk/win32/CommandDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/CommandDlg.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/CommandDlg.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -86,7 +86,7 @@
bool CommandDlg::handleInitDialog() {
setHelpId(IDH_USER_COMMAND);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
// Translate
setText(T_("Create / Modify User Command"));
Modified: dcplusplus/trunk/win32/DownloadPage.cpp
===================================================================
--- dcplusplus/trunk/win32/DownloadPage.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/DownloadPage.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -76,7 +76,7 @@
createDialog(IDD_DOWNLOADPAGE);
setHelpId(IDH_DOWNLOADPAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
PropPage::translate(handle(), texts);
PropPage::read(handle(), items);
Modified: dcplusplus/trunk/win32/FavoriteDirsPage.cpp
===================================================================
--- dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -49,7 +49,7 @@
createDialog(IDD_FAVORITE_DIRSPAGE);
setHelpId(IDH_FAVORITE_DIRSPAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
PropPage::translate(handle(), texts);
directories = attachList(IDC_FAVORITE_DIRECTORIES);
Modified: dcplusplus/trunk/win32/GeneralPage.cpp
===================================================================
--- dcplusplus/trunk/win32/GeneralPage.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/GeneralPage.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -61,7 +61,7 @@
createDialog(IDD_GENERALPAGE);
setHelpId(IDH_GENERALPAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
PropPage::translate(handle(), texts);
PropPage::read(handle(), items);
Modified: dcplusplus/trunk/win32/LogPage.cpp
===================================================================
--- dcplusplus/trunk/win32/LogPage.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/LogPage.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -63,7 +63,7 @@
createDialog(IDD_LOGPAGE);
setHelpId(IDH_LOGPAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
PropPage::translate(handle(), texts);
PropPage::read(handle(), items, listItems, ::GetDlgItem(handle(), IDC_LOG_OPTIONS));
Modified: dcplusplus/trunk/win32/NetworkPage.cpp
===================================================================
--- dcplusplus/trunk/win32/NetworkPage.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/NetworkPage.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -95,7 +95,7 @@
createDialog(IDD_NETWORKPAGE);
setHelpId(IDH_NETWORKPAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
PropPage::translate(handle(), texts);
if(!(WinUtil::getOsMajor() >= 5 && WinUtil::getOsMinor() >= 1 //WinXP & WinSvr2003
Modified: dcplusplus/trunk/win32/QueuePage.cpp
===================================================================
--- dcplusplus/trunk/win32/QueuePage.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/QueuePage.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -118,7 +118,7 @@
createDialog(IDD_QUEUEPAGE);
setHelpId(IDH_QUEUEPAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
PropPage::translate(handle(), texts);
PropPage::read(handle(), items, 0, 0);
PropPage::read(handle(), items, optionItems, ::GetDlgItem(handle(), IDC_OTHER_QUEUE_OPTIONS));
Modified: dcplusplus/trunk/win32/SettingsDialog.cpp
===================================================================
--- dcplusplus/trunk/win32/SettingsDialog.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/SettingsDialog.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -66,7 +66,7 @@
// set this to IDH_STARTPAGE so that clicking in an empty space of the dialog generates a WM_HELP message with no error; then SettingsDialog::handleHelp will convert IDH_STARTPAGE to the current page's help id
setHelpId(IDH_STARTPAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
setText(T_("Settings"));
Modified: dcplusplus/trunk/win32/UCPage.cpp
===================================================================
--- dcplusplus/trunk/win32/UCPage.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/UCPage.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -55,7 +55,7 @@
createDialog(IDD_UCPAGE);
setHelpId(IDH_UCPAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
PropPage::translate(handle(), texts);
PropPage::read(handle(), items);
Modified: dcplusplus/trunk/win32/UploadPage.cpp
===================================================================
--- dcplusplus/trunk/win32/UploadPage.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/UploadPage.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -74,7 +74,7 @@
createDialog(IDD_UPLOADPAGE);
setHelpId(IDH_UPLOADPAGE);
- WinUtil::setHelpIds(handle(), helpItems);
+ WinUtil::setHelpIds(this, helpItems);
PropPage::translate(handle(), texts);
PropPage::read(handle(), items);
Modified: dcplusplus/trunk/win32/WinUtil.cpp
===================================================================
--- dcplusplus/trunk/win32/WinUtil.cpp 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/WinUtil.cpp 2008-03-26 14:04:21 UTC (rev 1061)
@@ -198,12 +198,6 @@
}
}
-void WinUtil::setHelpIds(HWND hWnd, const HelpItem* items) {
- dcassert(hWnd && items);
- for(size_t i = 0; items[i].ctrlId != 0; ++i)
- ::SetWindowContextHelpId(::GetDlgItem(hWnd, items[i].ctrlId), items[i].helpId);
-}
-
#define LINE2 _T("-- http://dcplusplus.sourceforge.net <DC++ ") _T(VERSIONSTRING) _T(">")
const TCHAR *msgs[] = { _T("\r\n-- I'm a happy dc++ user. You could be happy too.\r\n") LINE2,
_T("\r\n-- Neo-...what? Nope...never heard of it...\r\n") LINE2,
Modified: dcplusplus/trunk/win32/WinUtil.h
===================================================================
--- dcplusplus/trunk/win32/WinUtil.h 2008-03-26 13:59:32 UTC (rev 1060)
+++ dcplusplus/trunk/win32/WinUtil.h 2008-03-26 14:04:21 UTC (rev 1061)
@@ -87,7 +87,12 @@
static tstring encodeFont(LOGFONT const& font);
static void decodeFont(const tstring& setting, LOGFONT &dest);
- static void setHelpIds(HWND hWnd, const HelpItem* items);
+ template<typename A>
+ static void setHelpIds(SmartWin::AspectDialog<A>* dialog, const HelpItem* items) {
+ dcassert(dialog && items);
+ for(size_t i = 0; items[i].ctrlId != 0; ++i)
+ ::SetWindowContextHelpId(dialog->getItem(items[i].ctrlId), items[i].helpId);
+ }
/**
* Check if this is a common /-command.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|