linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #05877
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3010: Remove the search spy in favor of the dev plugin - works on ADC too
------------------------------------------------------------
revno: 3010
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2012-07-20 16:03:59 +0200
message:
Remove the search spy in favor of the dev plugin - works on ADC too
removed:
help/window_search_spy.html
res/SearchSpy.ico
win32/SpyFrame.cpp
win32/SpyFrame.h
modified:
changelog.txt
dcpp/ClientManager.cpp
dcpp/ClientManagerListener.h
help/DCPlusPlus.hhp
help/index.html
help/resource.h
help/settings_tabs.html
help/window_main.html
win32/DCPlusPlus.rc
win32/MainWindow.cpp
win32/resource.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 'changelog.txt'
--- changelog.txt 2012-07-20 13:55:11 +0000
+++ changelog.txt 2012-07-20 14:03:59 +0000
@@ -28,6 +28,7 @@
* More Alt+I shortcuts for list filters (emtee)
* Increase the chat buffer limit (iceman50)
* Eliminate GUI freezes when opening large file lists (poy)
+* Remove the search spy in favor of the dev plugin - works on ADC too (poy)
-- 0.799 2012-05-05 --
* Add icons (iceman50)
=== modified file 'dcpp/ClientManager.cpp'
--- dcpp/ClientManager.cpp 2012-07-01 18:41:13 +0000
+++ dcpp/ClientManager.cpp 2012-07-20 14:03:59 +0000
@@ -459,8 +459,6 @@
void ClientManager::on(NmdcSearch, Client* aClient, const string& aSeeker, int aSearchType, int64_t aSize,
int aFileType, const string& aString) noexcept
{
- Speaker<ClientManagerListener>::fire(ClientManagerListener::IncomingSearch(), aString);
-
bool isPassive = (aSeeker.compare(0, 4, "Hub:") == 0);
// We don't wan't to answer passive searches if we're in passive mode...
=== modified file 'dcpp/ClientManagerListener.h'
--- dcpp/ClientManagerListener.h 2012-01-13 20:55:20 +0000
+++ dcpp/ClientManagerListener.h 2012-07-20 14:03:59 +0000
@@ -22,12 +22,8 @@
#include "forward.h"
#include "noexcept.h"
-#include <string>
-
namespace dcpp {
-using std::string;
-
class ClientManagerListener {
public:
virtual ~ClientManagerListener() { }
@@ -36,17 +32,15 @@
typedef X<0> UserConnected;
typedef X<1> UserUpdated;
typedef X<2> UserDisconnected;
- typedef X<3> IncomingSearch;
- typedef X<4> ClientConnected;
- typedef X<5> ClientUpdated;
- typedef X<6> ClientDisconnected;
+ typedef X<3> ClientConnected;
+ typedef X<4> ClientUpdated;
+ typedef X<5> ClientDisconnected;
/** User online in at least one hub */
virtual void on(UserConnected, const UserPtr&) noexcept { }
virtual void on(UserUpdated, const OnlineUser&) noexcept { }
/** User offline in all hubs */
virtual void on(UserDisconnected, const UserPtr&) noexcept { }
- virtual void on(IncomingSearch, const string&) noexcept { }
virtual void on(ClientConnected, Client*) noexcept { }
virtual void on(ClientUpdated, Client*) noexcept { }
virtual void on(ClientDisconnected, Client*) noexcept { }
=== modified file 'help/DCPlusPlus.hhp'
--- help/DCPlusPlus.hhp 2011-12-03 21:53:57 +0000
+++ help/DCPlusPlus.hhp 2012-07-20 14:03:59 +0000
@@ -39,7 +39,6 @@
IDH_FINISHED_UL=window_finished_uploads.html
IDH_SEARCH=window_search.html
IDH_ADL_SEARCH=window_adlsearch.html
-IDH_SEARCH_SPY=window_search_spy.html
IDH_NOTEPAD=window_notepad.html
IDH_TEXT_VIEWER=window_text_viewer.html
IDH_SYSTEM_LOG=window_system_log.html
=== modified file 'help/index.html'
--- help/index.html 2011-12-18 17:04:43 +0000
+++ help/index.html 2012-07-20 14:03:59 +0000
@@ -37,7 +37,6 @@
<li><placeholder><a href="window_finished_uploads.html">Finished Uploads</a></placeholder></li>
<li><placeholder><a href="window_search.html">Search</a></placeholder></li>
<li><placeholder><a href="window_adlsearch.html">ADLSearch</a></placeholder></li>
-<li><placeholder><a href="window_search_spy.html">Search Spy</a></placeholder></li>
<li><placeholder><a href="window_notepad.html">Notepad</a></placeholder></li>
<li><placeholder><a href="window_text_viewer.html">Text viewer</a></placeholder></li>
<li><placeholder><a href="window_system_log.html">System Log</a></placeholder></li>
=== modified file 'help/resource.h'
--- help/resource.h 2011-12-03 21:53:57 +0000
+++ help/resource.h 2012-07-20 14:03:59 +0000
@@ -24,13 +24,12 @@
#define IDH_FINISHED_UL 10110
#define IDH_SEARCH 10111
#define IDH_ADL_SEARCH 10112
-#define IDH_SEARCH_SPY 10113
-#define IDH_NOTEPAD 10114
-#define IDH_TEXT_VIEWER 10115
-#define IDH_SYSTEM_LOG 10116
-#define IDH_NET_STATS 10117
-#define IDH_CONNECTIONS 10118
-#define IDH_DOWNLOADS 10119
+#define IDH_NOTEPAD 10113
+#define IDH_TEXT_VIEWER 10114
+#define IDH_SYSTEM_LOG 10115
+#define IDH_NET_STATS 10116
+#define IDH_CONNECTIONS 10117
+#define IDH_DOWNLOADS 10118
// dialogs
#define IDH_HASH_PROGRESS 10200
=== modified file 'help/settings_tabs.html'
--- help/settings_tabs.html 2011-12-03 20:40:54 +0000
+++ help/settings_tabs.html 2012-07-20 14:03:59 +0000
@@ -51,9 +51,6 @@
<dt>Search</dt>
<dd cshelp="IDH_SETTINGS_TABS_BOLD_SEARCH">When a search result is received in a
<a href="window_search.html">Search</a> window that's not focused, the tab will be highlighted if you have this option selected.</dd>
-<dt>Search Spy</dt>
- <dd cshelp="IDH_SETTINGS_TABS_BOLD_SEARCH_SPY">When an entry is added to the
-<a href="window_search_spy.html">Search Spy</a> window while it is out of focus, the tab will be highlighted if you have this option selected.</dd>
<dt>System log</dt>
<dd cshelp="IDH_SETTINGS_TABS_BOLD_SYSTEM_LOG">When an entry is added to the
<a href="window_system_log.html">System Log</a> window while it is out of focus, the tab will be highlighted if you have this option selected.</dd>
=== modified file 'help/window_main.html'
--- help/window_main.html 2012-07-07 16:36:41 +0000
+++ help/window_main.html 2012-07-20 14:03:59 +0000
@@ -95,10 +95,6 @@
<dd><div>Open the <placeholder><a href="window_adlsearch.html">ADL Search</a></placeholder> window.</div>
<div>It incorporates a tool for filtering file lists downloaded from users.</div></dd>
- <dt><img src="SearchSpy.ico" width="16" height="16" alt="Search Spy"/> Search Spy</dt>
- <dd><div>Open the <placeholder><a href="window_search_spy.html">Search Spy</a></placeholder> window.</div>
- <div>In there, you are able to spy other users' searches.</div></dd>
-
<dt><img src="Notepad.ico" width="16" height="16" alt="Notepad"/> Notepad</dt>
<dd><div>Open the <placeholder><a href="window_notepad.html">Notepad</a></placeholder> window.</div>
<div>In there, you can store random text. The text will be kept even if you close DC++.</div></dd>
@@ -212,7 +208,6 @@
<a href="window_finished_uploads.html" title="Finished Uploads"><img src="FinishedUL.ico" width="20" height="20" alt="Finished Uploads"/></a>
<a href="window_search.html" title="Search"><img src="Search.ico" width="20" height="20" alt="Search"/></a>
<a href="window_adlsearch.html" title="ADL Search"><img src="ADLSearch.ico" width="20" height="20" alt="ADL Search"/></a>
-<a href="window_search_spy.html" title="Search Spy"><img src="SearchSpy.ico" width="20" height="20" alt="Search Spy"/></a>
<a href="window_network_stats.html" title="Network Statistics"><img src="NetStats.ico" width="20" height="20" alt="Network Statistics"/></a>
<a href="#tb_openfl" title="Open file list..."><img src="OpenFileList.ico" width="20" height="20" alt="Open file list..."/></a>
<a href="#tb_recent" title="Recent windows"><img src="Recents.ico" width="20" height="20" alt="Recent windows"/></a>
@@ -261,9 +256,6 @@
<dt>ADL Search</dt>
<dd cshelp="IDH_TOOLBAR_ADL_SEARCH">Open the <placeholder><a href="window_adlsearch.html">ADL Search</a></placeholder> window.</dd>
- <dt>Search Spy</dt>
- <dd cshelp="IDH_TOOLBAR_SEARCH_SPY">Open the <placeholder><a href="window_search_spy.html">Search Spy</a></placeholder> window.</dd>
-
<dt>Network Statistics</dt>
<dd cshelp="IDH_TOOLBAR_NET_STATS">Open the <placeholder><a href="window_network_stats.html">Network Statistics</a></placeholder> window.</dd>
=== removed file 'help/window_search_spy.html'
--- help/window_search_spy.html 2009-01-17 19:12:34 +0000
+++ help/window_search_spy.html 1970-01-01 00:00:00 +0000
@@ -1,42 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link type="text/css" rel="stylesheet" href="office11.css"/>
-<link type="text/css" rel="stylesheet" href="style.css"/>
-</head>
-<body>
- <h1>
- <img src="SearchSpy.ico" width="16" height="16" alt="Search spy"/>
- Search spy
- </h1>
-The search spy will display other users' searches. Note that the window's information is cleared when closed.
-<h2>Columns</h2>
-<dl style="margin-left: 40px;">
- <dt>Search string</dt>
- <dd>The search string that was searched for.</dd>
- <dt>Count</dt>
- <dd>The amount of times this item has been searched for.</dd>
- <dt>Time</dt>
- <dd>The last time this item was searched for.</dd>
-</dl>
-<h2>Context menu commands</h2>
-<dl style="margin-left: 40px;">
- <dt>Search</dt>
- <dd>This will make DC++ search for the item you've selected.</dd>
-</dl>
-<h2>Status bar</h2>
-<dl style="margin-left: 40px;">
- <dt>Ignore TTH searches</dt>
- <dd cshelp="IDH_SPY_IGNORE_TTH">Check this checkbox to filter out TTH searches. Note that DC++ will still respond to them; you will just not see them in this window.</dd>
- <dt>Total</dt>
- <dd cshelp="IDH_SPY_TOTAL">The amount of total searches performed.</dd>
- <dt>Average/s</dt>
- <dd cshelp="IDH_SPY_AVG_PER_SECOND">The amount of searches performed divided by the amount of seconds you have had this window open.</dd>
- <dt>Hits</dt>
- <dd cshelp="IDH_SPY_HITS">The amount of search results your copy of DC++ has sent out in response to the searches you see in this window.</dd>
- <dt>Hit Ratio</dt>
- <dd cshelp="IDH_SPY_HIT_RATIO">Ratio between the total amount of searches versus the amount of hits.</dd>
-</dl>
-</body>
-</html>
=== removed file 'res/SearchSpy.ico'
Binary files res/SearchSpy.ico 2010-03-11 17:25:17 +0000 and res/SearchSpy.ico 1970-01-01 00:00:00 +0000 differ
=== modified file 'win32/DCPlusPlus.rc'
--- win32/DCPlusPlus.rc 2012-07-20 13:55:11 +0000
+++ win32/DCPlusPlus.rc 2012-07-20 14:03:59 +0000
@@ -30,7 +30,6 @@
IDI_ADLSEARCH ICON "res/ADLSearch.ico"
IDI_FINISHED_UL ICON "res/FinishedUL.ico"
IDI_USERS ICON "res/Users.ico"
-IDI_SPY ICON "res/SearchSpy.ico"
IDI_NET_STATS ICON "res/NetStats.ico"
IDI_MAGNET ICON "res/Magnet.ico"
IDI_HUB_OFF ICON "res/HubOff.ico"
=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp 2012-07-20 13:55:11 +0000
+++ win32/MainWindow.cpp 2012-07-20 14:03:59 +0000
@@ -75,7 +75,6 @@
#include "PublicHubsFrame.h"
#include "QueueFrame.h"
#include "SearchFrame.h"
-#include "SpyFrame.h"
#include "StatsFrame.h"
#include "SystemFrame.h"
#include "UsersFrame.h"
@@ -332,8 +331,6 @@
viewMenu->appendItem(T_("&Search\tCtrl+S"), [this] { SearchFrame::openWindow(getTabView()); }, WinUtil::menuIcon(IDI_SEARCH));
viewIndexes[ADLSearchFrame::id] = viewMenu->appendItem(T_("ADL Search"),
[this] { ADLSearchFrame::openWindow(getTabView()); }, WinUtil::menuIcon(IDI_ADLSEARCH));
- viewIndexes[SpyFrame::id] = viewMenu->appendItem(T_("Search Spy"),
- [this] { SpyFrame::openWindow(getTabView()); }, WinUtil::menuIcon(IDI_SPY));
viewMenu->appendSeparator();
viewIndexes[NotepadFrame::id] = viewMenu->appendItem(T_("&Notepad\tCtrl+N"),
[this] { NotepadFrame::openWindow(getTabView()); }, WinUtil::menuIcon(IDI_NOTEPAD));
@@ -437,8 +434,6 @@
IDH_TOOLBAR_SEARCH, [this] { SearchFrame::openWindow(getTabView()); });
toolbar->addButton(ADLSearchFrame::id, WinUtil::toolbarIcon(IDI_ADLSEARCH), 0, T_("ADL Search"), false,
IDH_TOOLBAR_ADL_SEARCH, [this] { ADLSearchFrame::openWindow(getTabView()); });
- toolbar->addButton(SpyFrame::id, WinUtil::toolbarIcon(IDI_SPY), 0, T_("Search Spy"), false,
- IDH_TOOLBAR_SEARCH_SPY, [this] { SpyFrame::openWindow(getTabView()); });
toolbar->addButton(StatsFrame::id, WinUtil::toolbarIcon(IDI_NET_STATS), 0, T_("Network Statistics"), false,
IDH_TOOLBAR_NET_STATS, [this] { StatsFrame::openWindow(getTabView()); });
toolbar->addButton("OpenFL", WinUtil::toolbarIcon(IDI_OPEN_FILE_LIST), 0, T_("Open file list..."), false,
@@ -470,7 +465,6 @@
comma +
SearchFrame::id + comma +
ADLSearchFrame::id + comma +
- SpyFrame::id + comma +
comma +
StatsFrame::id + comma +
comma +
@@ -1761,7 +1755,6 @@
compare_id(FinishedDLFrame);
compare_id(FinishedULFrame);
compare_id(ADLSearchFrame);
- compare_id(SpyFrame);
compare_id(NotepadFrame);
compare_id(SystemFrame);
compare_id(StatsFrame);
=== removed file 'win32/SpyFrame.cpp'
--- win32/SpyFrame.cpp 2012-07-11 17:13:42 +0000
+++ win32/SpyFrame.cpp 1970-01-01 00:00:00 +0000
@@ -1,219 +0,0 @@
-/*
- * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include "stdafx.h"
-#include "resource.h"
-
-#include "SpyFrame.h"
-
-#include <numeric>
-
-#include <dcpp/format.h>
-#include <dcpp/ShareManager.h>
-#include <dcpp/ClientManager.h>
-
-#include "SearchFrame.h"
-
-const string SpyFrame::id = "SearchSpy";
-const string& SpyFrame::getId() const { return id; }
-
-#ifdef __MINGW32__
-const size_t SpyFrame::AVG_TIME; // TODO gcc needs this - why?
-#endif
-
-static const ColumnInfo searchesColumns[] = {
- { N_("Search string"), 305, false },
- { N_("Count"), 70, true },
- { N_("Time"), 85, false }
-};
-
-SpyFrame::SpyFrame(TabViewPtr parent) :
- BaseType(parent, T_("Search Spy"), IDH_SEARCH_SPY, IDI_SPY),
- searches(0),
- ignoreTTH(0),
- bIgnoreTTH(SETTING(SPY_FRAME_IGNORE_TTH_SEARCHES)),
- total(0),
- cur(0)
-{
- memset(perSecond, 0, sizeof(perSecond));
-
- {
- Table::Seed cs = WinUtil::Seeds::table;
- cs.style |= LVS_SINGLESEL;
- searches = addChild(cs);
- addWidget(searches);
-
- WinUtil::makeColumns(searches, searchesColumns, COLUMN_LAST, SETTING(SPYFRAME_ORDER), SETTING(SPYFRAME_WIDTHS));
- searches->setSort(COLUMN_COUNT, dwt::Table::SORT_INT, false);
-
- searches->onColumnClick([this](int column) { handleColumnClick(column); });
- searches->onContextMenu([this](const dwt::ScreenCoordinate &sc) { return handleContextMenu(sc); });
- }
-
- initStatus();
-
- {
- CheckBox::Seed seed = WinUtil::Seeds::checkBox;
- seed.caption = T_("Ignore TTH searches");
- ignoreTTH = addChild(seed);
- ignoreTTH->setHelpId(IDH_SPY_IGNORE_TTH);
- ignoreTTH->setChecked(bIgnoreTTH);
- ignoreTTH->onClicked([this] { handleIgnoreTTHClicked(); });
- status->setWidget(STATUS_IGNORE_TTH, ignoreTTH);
- }
-
- status->setHelpId(STATUS_TOTAL, IDH_SPY_TOTAL);
- status->setHelpId(STATUS_AVG_PER_SECOND, IDH_SPY_AVG_PER_SECOND);
- status->setHelpId(STATUS_HITS, IDH_SPY_HITS);
- status->setHelpId(STATUS_HIT_RATIO, IDH_SPY_HIT_RATIO);
-
- layout();
-
- ShareManager::getInstance()->setHits(0);
-
- ClientManager::getInstance()->addListener(this);
-
- initSecond();
-}
-
-SpyFrame::~SpyFrame() {
-}
-
-void SpyFrame::layout() {
- dwt::Rectangle r(this->getClientSize());
-
- r.size.y -= status->refresh();
-
- searches->resize(r);
-}
-
-void SpyFrame::initSecond() {
- setTimer([this] { return eachSecond(); }, 1000);
-}
-
-bool SpyFrame::eachSecond() {
- size_t tot = std::accumulate(perSecond, perSecond + AVG_TIME, 0u);
- size_t t = std::max(static_cast<size_t>(1), std::min(cur, AVG_TIME));
-
- float x = static_cast<float>(tot)/t;
-
- cur++;
- perSecond[cur % AVG_TIME] = 0;
- status->setText(STATUS_AVG_PER_SECOND, str(TF_("Average/s: %1%") % x));
- return true;
-}
-
-bool SpyFrame::preClosing() {
- ClientManager::getInstance()->removeListener(this);
- return true;
-}
-
-void SpyFrame::postClosing() {
- searches->clear();
-
- SettingsManager::getInstance()->set(SettingsManager::SPYFRAME_ORDER, WinUtil::toString(searches->getColumnOrder()));
- SettingsManager::getInstance()->set(SettingsManager::SPYFRAME_WIDTHS, WinUtil::toString(searches->getColumnWidths()));
-
- SettingsManager::getInstance()->set(SettingsManager::SPY_FRAME_IGNORE_TTH_SEARCHES, bIgnoreTTH);
-}
-
-void SpyFrame::handleColumnClick(int column) {
- if(column == searches->getSortColumn()) {
- if (!searches->isAscending())
- searches->setSort(-1, searches->getSortType());
- else
- searches->setSort(searches->getSortColumn(), searches->getSortType(), false);
- } else {
- if(column == COLUMN_COUNT) {
- searches->setSort(column, dwt::Table::SORT_INT);
- } else {
- searches->setSort(column, dwt::Table::SORT_STRING);
- }
- }
-}
-
-bool SpyFrame::handleContextMenu(dwt::ScreenCoordinate pt) {
- if(searches->countSelected() == 1) {
- if(pt.x() == -1 && pt.y() == -1) {
- pt = searches->getContextMenuPos();
- }
-
- tstring selText = searches->getText(searches->getSelected(), COLUMN_STRING);
-
- auto menu = addChild(WinUtil::Seeds::menu);
- menu->setTitle(escapeMenu(selText), getParent()->getIcon(this));
- menu->appendItem(T_("&Search"), [=] { handleSearch(selText); }, WinUtil::menuIcon(IDI_SEARCH));
-
- menu->open(pt);
- return true;
- }
- return false;
-}
-
-void SpyFrame::handleSearch(const tstring& searchString) {
- if(Util::strnicmp(searchString.c_str(), _T("TTH:"), 4) == 0)
- SearchFrame::openWindow(getParent(), searchString.substr(4), SearchManager::TYPE_TTH);
- else
- SearchFrame::openWindow(getParent(), searchString, SearchManager::TYPE_ANY);
-}
-
-void SpyFrame::handleIgnoreTTHClicked() {
- bIgnoreTTH = ignoreTTH->getChecked();
-}
-
-void SpyFrame::add(const tstring& x) {
- total++;
-
- // Not thread safe, but who cares really...
- perSecond[cur % AVG_TIME]++;
-
- int j = searches->find(x);
- if(j == -1) {
- TStringList a;
- a.push_back(x);
- a.push_back(Text::toT(Util::toString(1)));
- a.push_back(Text::toT(Util::getTimeString()));
- searches->insert(a);
- if(searches->size() > 500) {
- searches->erase(searches->size() - 1);
- }
- } else {
- searches->setText(j, COLUMN_COUNT, Text::toT(Util::toString(Util::toInt(Text::fromT(searches->getText(j, COLUMN_COUNT))) + 1)));
- searches->setText(j, COLUMN_TIME, Text::toT(Util::getTimeString()));
- if(searches->getSortColumn() == COLUMN_COUNT || searches->getSortColumn() == COLUMN_TIME )
- searches->resort();
- }
-
- status->setText(STATUS_TOTAL, str(TF_("Total: %1%") % total));
- status->setText(STATUS_HITS, str(TF_("Hits: %1%") % ShareManager::getInstance()->getHits()));
- double ratio = total > 0 ? ((double)ShareManager::getInstance()->getHits()) / (double)total : 0.0;
- status->setText(STATUS_HIT_RATIO, str(TF_("Hit Ratio: %1%") % ratio));
-
- setDirty(SettingsManager::BOLD_SEARCH_SPY);
-}
-
-void SpyFrame::on(ClientManagerListener::IncomingSearch, const string& s) noexcept {
- if(bIgnoreTTH && s.compare(0, 4, "TTH:") == 0)
- return;
- tstring x = Text::toT(s);
- tstring::size_type i = 0;
- while( (i=x.find(_T('$'))) != string::npos) {
- x[i] = _T(' ');
- }
- callAsync([=] { add(x); });
-}
=== removed file 'win32/SpyFrame.h'
--- win32/SpyFrame.h 2012-01-13 20:55:20 +0000
+++ win32/SpyFrame.h 1970-01-01 00:00:00 +0000
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef DCPLUSPLUS_WIN32_SPY_FRAME_H
-#define DCPLUSPLUS_WIN32_SPY_FRAME_H
-
-#include <dcpp/ClientManagerListener.h>
-
-#include "StaticFrame.h"
-
-class SpyFrame : public StaticFrame<SpyFrame>, private ClientManagerListener {
- typedef StaticFrame<SpyFrame> BaseType;
-public:
- enum Status {
- STATUS_IGNORE_TTH,
- STATUS_STATUS,
- STATUS_TOTAL,
- STATUS_AVG_PER_SECOND,
- STATUS_HITS,
- STATUS_HIT_RATIO,
- STATUS_LAST
- };
-
- static const string id;
- const string& getId() const;
-
-protected:
- friend class StaticFrame<SpyFrame>;
- friend class MDIChildFrame<SpyFrame>;
-
- SpyFrame(TabViewPtr parent);
- virtual ~SpyFrame();
-
- void layout();
-
- bool preClosing();
- void postClosing();
-
-private:
- static const size_t AVG_TIME = 60;
-
- enum {
- COLUMN_FIRST,
- COLUMN_STRING = COLUMN_FIRST,
- COLUMN_COUNT,
- COLUMN_TIME,
- COLUMN_LAST
- };
-
- TablePtr searches;
-
- CheckBoxPtr ignoreTTH;
- bool bIgnoreTTH;
-
- size_t total, cur, perSecond[AVG_TIME];
-
- void initSecond();
- bool eachSecond();
-
- void handleColumnClick(int column);
- bool handleContextMenu(dwt::ScreenCoordinate pt);
-
- void handleSearch(const tstring& searchString);
-
- void handleIgnoreTTHClicked();
-
- void add(const tstring& x);
-
- // ClientManagerListener
- virtual void on(ClientManagerListener::IncomingSearch, const string& s) noexcept;
-};
-
-#endif // !defined(DCPLUSPLUS_WIN32_SPY_FRAME_H)
=== modified file 'win32/resource.h'
--- win32/resource.h 2012-07-02 18:13:18 +0000
+++ win32/resource.h 2012-07-20 14:03:59 +0000
@@ -18,7 +18,6 @@
#define IDI_FINISHED_UL 110
#define IDI_ADLSEARCH 111
#define IDI_USERS 112
-#define IDI_SPY 113
#define IDI_NET_STATS 114
#define IDI_MAGNET 116
#define IDI_HUB_OFF 117
@@ -81,7 +80,6 @@
#define IDI_SOUND 174
#define IDI_ULIMIT 175
#define IDI_DLIMIT 176
-#define IDI_DEBUG 177
#define IDI_PLUGINS 178
// Stuff that uses multiple id's