linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #03741
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2466: proper arrow for the Find button
------------------------------------------------------------
revno: 2466
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sat 2011-03-19 16:32:48 +0100
message:
proper arrow for the Find button
modified:
help/window_file_list.html
win32/DirectoryListingFrame.cpp
win32/Mapper_WinUPnP.cpp
win32/Mapper_WinUPnP.h
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'help/window_file_list.html'
--- help/window_file_list.html 2011-03-18 21:48:06 +0000
+++ help/window_file_list.html 2011-03-19 15:32:48 +0000
@@ -30,7 +30,7 @@
<h2>Search row (optional - below the toolbar)</h2>
A search row may be shown right below the toolbar to allow looking for files in the current file
-list. Its visibility is controlled by the "Find ∇" button.
+list. Its visibility is controlled by the "Find" button.
<dl style="margin-left: 40px;">
<dt>Text-box (left)</dt>
<dd cshelp="IDH_FILE_LIST_SEARCH_BOX">Enter your search terms here. The most recent searches can
=== modified file 'win32/DirectoryListingFrame.cpp'
--- win32/DirectoryListingFrame.cpp 2011-03-19 14:51:42 +0000
+++ win32/DirectoryListingFrame.cpp 2011-03-19 15:32:48 +0000
@@ -290,11 +290,10 @@
StringList ids;
auto addButton = [&toolbar, &ids](unsigned icon, const tstring& text, bool showText,
- unsigned helpId, const dwt::Dispatchers::VoidVoid<>::F& f) -> string
+ unsigned helpId, const dwt::Dispatchers::VoidVoid<>::F& f)
{
ids.push_back(std::string(1, '0' + ids.size()));
toolbar->addButton(ids.back(), icon ? WinUtil::toolbarIcon(icon) : 0, 0, text, showText, helpId, f);
- return ids.back();
};
addButton(IDI_LEFT, T_("Back"), false, IDH_FILE_LIST_BACK, [this] { back(); });
@@ -320,7 +319,10 @@
ids.clear();
addButton(0, T_("Subtract list"), true, IDH_FILE_LIST_SUBSTRACT, [this] { handleListDiff(); });
addButton(0, T_("Match queue"), true, IDH_FILE_LIST_MATCH_QUEUE, [this] { handleMatchQueue(); });
- auto findId = addButton(IDI_SEARCH, T_("Find") + _T(" \u2207") /* down arrow */, true, IDH_FILE_LIST_FIND, [this] { handleFindToggle(); });
+ ids.push_back("Find");
+ auto findId = ids.back();
+ toolbar->addButton(findId, WinUtil::toolbarIcon(IDI_SEARCH), 0, T_("Find"), true, IDH_FILE_LIST_FIND,
+ 0, [this](const dwt::ScreenCoordinate&) { handleFindToggle(); });
toolbar->setLayout(ids);
rebar->add(toolbar, RBBS_NOGRIPPER);
=== modified file 'win32/Mapper_WinUPnP.cpp'
--- win32/Mapper_WinUPnP.cpp 2011-02-20 17:37:48 +0000
+++ win32/Mapper_WinUPnP.cpp 2011-03-19 15:32:48 +0000
@@ -31,7 +31,7 @@
#include <natupnp.h>
bool Mapper_WinUPnP::init() {
- if(initialized)
+ if(pUN)
return true;
// Lacking the __uuidof in mingw...
@@ -45,8 +45,7 @@
HRESULT hr = CoCreateInstance(upnp, 0, CLSCTX_INPROC_SERVER, iupnp, reinterpret_cast<LPVOID*>(&pUN));
if(FAILED(hr))
pUN = 0;
- initialized = pUN;
- return initialized;
+ return pUN;
}
void Mapper_WinUPnP::uninit() {
=== modified file 'win32/Mapper_WinUPnP.h'
--- win32/Mapper_WinUPnP.h 2011-02-20 17:37:48 +0000
+++ win32/Mapper_WinUPnP.h 2011-03-19 15:32:48 +0000
@@ -28,7 +28,7 @@
class Mapper_WinUPnP : public Mapper
{
public:
- Mapper_WinUPnP() : Mapper(), initialized(false), pUN(0), lastPort(0) { }
+ Mapper_WinUPnP() : Mapper(), pUN(0), lastPort(0) { }
private:
bool init();
@@ -45,10 +45,8 @@
static const string name;
const string& getName() const { return name; }
- bool initialized;
-
IUPnPNAT* pUN;
- // this one can become invalidated so we can't cache it
+ // this one can become invalid so we can't cache it
IStaticPortMappingCollection* getStaticPortMappingCollection();
// need to save these to get the external IP...