|
From: <arn...@us...> - 2007-12-29 22:04:07
|
Revision: 954
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=954&view=rev
Author: arnetheduck
Date: 2007-12-29 14:04:05 -0800 (Sat, 29 Dec 2007)
Log Message:
-----------
Fix language selector
Modified Paths:
--------------
dcplusplus/trunk/SConstruct
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/DCPlusPlus.cpp
dcplusplus/trunk/dcpp/DCPlusPlus.h
dcplusplus/trunk/dcpp/File.cpp
dcplusplus/trunk/dcpp/SettingsManager.cpp
dcplusplus/trunk/dcpp/SettingsManager.h
dcplusplus/trunk/dcpp/Util.cpp
dcplusplus/trunk/dcpp/Util.h
dcplusplus/trunk/win32/AppearancePage.cpp
dcplusplus/trunk/win32/AppearancePage.h
dcplusplus/trunk/win32/DCPlusPlus.rc
dcplusplus/trunk/win32/stdafx.h
Modified: dcplusplus/trunk/SConstruct
===================================================================
--- dcplusplus/trunk/SConstruct 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/SConstruct 2007-12-29 22:04:05 UTC (rev 954)
@@ -158,7 +158,7 @@
pot_args = ['xgettext','--from-code=UTF-8', '--foreign-user', '--package-name=$PACKAGE',
'--copyright-holder=Jacek Sieka', '--msg...@li...',
- '--no-wrap', '--keyword=_', '--output=$TARGET', '$SOURCES']
+ '--no-wrap', '--keyword=_', '--keyword=T_', '--output=$TARGET', '$SOURCES']
pot_bld = Builder (action = Action([pot_args], 'Extracting messages to $TARGET from $SOURCES'))
env.Append(BUILDERS = {'PotBuild' : pot_bld})
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/changelog.txt 2007-12-29 22:04:05 UTC (rev 954)
@@ -6,7 +6,8 @@
* [ADC] Searches filtered by token if available so that each search window only gets its own results
* [ADC] Implemented test version of bloom filters which will dramatically reduce hub bandwidth usage for TTH searches
* Fixed a crash with partial list browsing
-
+* Replaced homegrown i18n solution with gettext
+§
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
* Use system header arrows on common controls 6+ (thanks poy)
Modified: dcplusplus/trunk/dcpp/DCPlusPlus.cpp
===================================================================
--- dcplusplus/trunk/dcpp/DCPlusPlus.cpp 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/dcpp/DCPlusPlus.cpp 2007-12-29 22:04:05 UTC (rev 954)
@@ -89,12 +89,10 @@
_nl_msg_cat_cntr++;
}
- printf(_("test"));
+ //if(!SETTING(LANGUAGE_FILE).empty()) {
+ //ResourceManager::getInstance()->loadLanguage(SETTING(LANGUAGE_FILE));
+ //}
- if(!SETTING(LANGUAGE_FILE).empty()) {
- ResourceManager::getInstance()->loadLanguage(SETTING(LANGUAGE_FILE));
- }
-
FavoriteManager::getInstance()->load();
CryptoManager::getInstance()->loadCertificates();
Modified: dcplusplus/trunk/dcpp/DCPlusPlus.h
===================================================================
--- dcplusplus/trunk/dcpp/DCPlusPlus.h 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/dcpp/DCPlusPlus.h 2007-12-29 22:04:05 UTC (rev 954)
@@ -170,7 +170,7 @@
#ifdef BUILDING_DCPP
#define PACKAGE "dcpp"
-#define LOCALEDIR (Util::getDataPath() + "/locale/").c_str()
+#define LOCALEDIR Util::getLocalePath().c_str()
#define _(String) dgettext(PACKAGE, String)
#endif
Modified: dcplusplus/trunk/dcpp/File.cpp
===================================================================
--- dcplusplus/trunk/dcpp/File.cpp 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/dcpp/File.cpp 2007-12-29 22:04:05 UTC (rev 954)
@@ -419,7 +419,8 @@
hFind = ::FindFirstFile(Text::toT(path + pattern).c_str(), &data);
if(hFind != INVALID_HANDLE_VALUE) {
do {
- ret.push_back(path + Text::fromT(data.cFileName));
+ const char* extra = (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? "\\" : "";
+ ret.push_back(path + Text::fromT(data.cFileName) + extra);
} while(::FindNextFile(hFind, &data));
::FindClose(hFind);
@@ -429,7 +430,8 @@
if (dir) {
while (struct dirent* ent = readdir(dir)) {
if (fnmatch(pattern.c_str(), ent->d_name, 0) == 0) {
- ret.push_back(path + Text::toUtf8(ent->d_name));
+ const char* extra = (ent->d_type & DT_DIR) ? "/" : "";
+ ret.push_back(path + Text::toUtf8(ent->d_name) + extra);
}
}
closedir(dir);
Modified: dcplusplus/trunk/dcpp/SettingsManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/SettingsManager.cpp 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/dcpp/SettingsManager.cpp 2007-12-29 22:04:05 UTC (rev 954)
@@ -37,7 +37,7 @@
// Strings
"Nick", "UploadSpeed", "Description", "DownloadDirectory", "EMail", "ExternalIp",
"Font", "MainFrameOrder", "MainFrameWidths", "HubFrameOrder", "HubFrameWidths",
- "LanguageFile", "SearchFrameOrder", "SearchFrameWidths", "FavHubsFrameOrder", "FavHubsFrameWidths",
+ "SearchFrameOrder", "SearchFrameWidths", "FavHubsFrameOrder", "FavHubsFrameWidths",
"HublistServers", "QueueFrameOrder", "QueueFrameWidths", "PublicHubsFrameOrder", "PublicHubsFrameWidths",
"UsersFrameOrder", "UsersFrameWidths", "HttpProxy", "LogDirectory", "LogFormatPostDownload",
"LogFormatPostUpload", "LogFormatMainChat", "LogFormatPrivateChat", "FinishedOrder", "FinishedWidths",
@@ -335,11 +335,14 @@
xml.stepOut();
}
+ if(SETTING(PRIVATE_ID).length() != 39 || CID(SETTING(PRIVATE_ID)).isZero()) {
+ set(PRIVATE_ID, CID::generate().toBase32());
+ }
+
double v = Util::toDouble(SETTING(CONFIG_VERSION));
// if(v < 0.x) { // Fix old settings here }
- if(v <= 0.674 || SETTING(PRIVATE_ID).length() != 39 || CID(SETTING(PRIVATE_ID)).isZero()) {
- set(PRIVATE_ID, CID::generate().toBase32());
+ if(v <= 0.674) {
// Formats changed, might as well remove these...
set(LOG_FORMAT_POST_DOWNLOAD, Util::emptyString);
Modified: dcplusplus/trunk/dcpp/SettingsManager.h
===================================================================
--- dcplusplus/trunk/dcpp/SettingsManager.h 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/dcpp/SettingsManager.h 2007-12-29 22:04:05 UTC (rev 954)
@@ -48,7 +48,7 @@
enum StrSetting { STR_FIRST,
NICK = STR_FIRST, UPLOAD_SPEED, DESCRIPTION, DOWNLOAD_DIRECTORY, EMAIL, EXTERNAL_IP,
TEXT_FONT, MAINFRAME_ORDER, MAINFRAME_WIDTHS, HUBFRAME_ORDER, HUBFRAME_WIDTHS,
- LANGUAGE_FILE, SEARCHFRAME_ORDER, SEARCHFRAME_WIDTHS, FAVHUBSFRAME_ORDER, FAVHUBSFRAME_WIDTHS,
+ SEARCHFRAME_ORDER, SEARCHFRAME_WIDTHS, FAVHUBSFRAME_ORDER, FAVHUBSFRAME_WIDTHS,
HUBLIST_SERVERS, QUEUEFRAME_ORDER, QUEUEFRAME_WIDTHS, PUBLICHUBSFRAME_ORDER, PUBLICHUBSFRAME_WIDTHS,
USERSFRAME_ORDER, USERSFRAME_WIDTHS, HTTP_PROXY, LOG_DIRECTORY, LOG_FORMAT_POST_DOWNLOAD,
LOG_FORMAT_POST_UPLOAD, LOG_FORMAT_MAIN_CHAT, LOG_FORMAT_PRIVATE_CHAT, FINISHED_ORDER, FINISHED_WIDTHS,
Modified: dcplusplus/trunk/dcpp/Util.cpp
===================================================================
--- dcplusplus/trunk/dcpp/Util.cpp 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/dcpp/Util.cpp 2007-12-29 22:04:05 UTC (rev 954)
@@ -63,6 +63,7 @@
string Util::configPath;
string Util::systemPath;
string Util::dataPath;
+string Util::localePath;
static void sgenrand(unsigned long seed);
@@ -88,12 +89,14 @@
systemPath = Util::getFilePath(Text::fromT(buf));
configPath = systemPath;
dataPath = systemPath;
+ localePath = dataPath + "locale\\";
#else
systemPath = "/etc/";
char* home = getenv("HOME");
configPath = home ? Text::toUtf8(home) + "/.dc++/" : "/tmp/";
dataPath = configPath; // dataPath in linux is usually prefix + /share/app_name, so we can't represent it here
+ localePath = dataPath; // TODO no good default here either, fix
#endif
// Load boot settings
Modified: dcplusplus/trunk/dcpp/Util.h
===================================================================
--- dcplusplus/trunk/dcpp/Util.h 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/dcpp/Util.h 2007-12-29 22:04:05 UTC (rev 954)
@@ -127,6 +127,7 @@
static const string& getConfigPath() { return configPath; }
static const string& getDataPath() { return dataPath; }
static const string& getSystemPath() { return systemPath; }
+ static const string& getLocalePath() { return localePath; }
/** Path of file lists */
static string getListPath() { return getConfigPath() + "FileLists" PATH_SEPARATOR_STR; }
@@ -379,6 +380,8 @@
static string systemPath;
/** Various resources (help files etc) */
static string dataPath;
+ /** Translations */
+ static string localePath;
static bool away;
static bool manualAway;
Modified: dcplusplus/trunk/win32/AppearancePage.cpp
===================================================================
--- dcplusplus/trunk/win32/AppearancePage.cpp 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/win32/AppearancePage.cpp 2007-12-29 22:04:05 UTC (rev 954)
@@ -23,6 +23,8 @@
#include "AppearancePage.h"
#include <dcpp/SettingsManager.h>
+#include <dcpp/File.h>
+
#include "WinUtil.h"
PropPage::TextItem AppearancePage::texts[] = {
@@ -30,7 +32,6 @@
{ IDC_SETTINGS_DEFAULT_AWAY_MSG, ResourceManager::SETTINGS_DEFAULT_AWAY_MSG },
{ IDC_SETTINGS_TIME_STAMPS_FORMAT, ResourceManager::SETTINGS_TIME_STAMPS_FORMAT },
{ IDC_SETTINGS_LANGUAGE_FILE, ResourceManager::SETTINGS_LANGUAGE_FILE },
- { IDC_BROWSE, ResourceManager::BROWSE_ACCEL },
{ IDC_SETTINGS_REQUIRES_RESTART, ResourceManager::SETTINGS_REQUIRES_RESTART },
{ 0, ResourceManager::SETTINGS_AUTO_AWAY }
};
@@ -38,7 +39,6 @@
PropPage::Item AppearancePage::items[] = {
{ IDC_DEFAULT_AWAY_MESSAGE, SettingsManager::DEFAULT_AWAY_MESSAGE, PropPage::T_STR },
{ IDC_TIME_STAMPS_FORMAT, SettingsManager::TIME_STAMPS_FORMAT, PropPage::T_STR },
- { IDC_LANGUAGE, SettingsManager::LANGUAGE_FILE, PropPage::T_STR },
{ 0, 0, PropPage::T_END }
};
@@ -57,13 +57,44 @@
{ 0, ResourceManager::SETTINGS_AUTO_AWAY }
};
-AppearancePage::AppearancePage(SmartWin::Widget* parent) : PropPage(parent) {
+AppearancePage::AppearancePage(SmartWin::Widget* parent) : PropPage(parent), languages(0) {
createDialog(IDD_APPEARANCEPAGE);
PropPage::translate(handle(), texts);
PropPage::read(handle(), items, listItems, ::GetDlgItem(handle(), IDC_APPEARANCE_BOOLEANS));
- attachButton(IDC_BROWSE)->onClicked(std::tr1::bind(&AppearancePage::handleBrowse, this));
+ languages = attachComboBox(IDC_LANGUAGE);
+
+ StringList dirs = File::findFiles(Util::getLocalePath(), "*");
+
+ TStringList langs;
+
+ langs.push_back(_T("en"));
+
+ for(StringList::const_iterator i = dirs.begin(); i != dirs.end(); ++i) {
+ string dir = *i + "LC_MESSAGES" PATH_SEPARATOR_STR;
+ StringList files = File::findFiles(dir, "*.mo");
+ if(find(files.begin(), files.end(), dir + "dcpp.mo") == files.end() && find(files.begin(), files.end(), dir + "dcpp-win32.mo") == files.end()) {
+ continue;
+ }
+ // TODO Convert to real language name?
+ langs.push_back(Text::toT(Util::getLastDir(*i)));
+ }
+
+ std::sort(langs.begin(), langs.end(), noCaseStringLess());
+
+ languages->addValue(T_("Default"));
+
+ int selected = 0, j = 1;
+ const tstring cur = Text::toT(SETTING(LANGUAGE));
+ for(TStringList::const_iterator i = langs.begin(); i != langs.end(); ++i, ++j) {
+ languages->addValue(*i);
+ if(selected != 0 && *i == cur || (*i == _T("en") && cur == _T("C"))) {
+ selected = j;
+ }
+ }
+
+ languages->setSelectedIndex(selected);
}
AppearancePage::~AppearancePage() {
@@ -72,16 +103,14 @@
void AppearancePage::write()
{
PropPage::write(handle(), items, listItems, ::GetDlgItem(handle(), IDC_APPEARANCE_BOOLEANS));
-}
-void AppearancePage::handleBrowse() {
- TCHAR buf[MAX_PATH];
- static const TCHAR types[] = _T("Language Files\0*.xml\0All Files\0*.*\0");
-
- ::GetDlgItemText(handle(), IDC_LANGUAGE, buf, MAX_PATH);
- tstring x = buf;
-
- if(WinUtil::browseFile(x, handle(), false, Text::toT(Util::getDataPath()), types) == IDOK) {
- ::SetDlgItemText(handle(), IDC_LANGUAGE, x.c_str());
+ tstring lang = languages->getText();
+
+ if(lang == T_("Default")) {
+ SettingsManager::getInstance()->set(SettingsManager::LANGUAGE, "");
+ } else if(lang == _T("en")) {
+ SettingsManager::getInstance()->set(SettingsManager::LANGUAGE, "C");
+ } else {
+ SettingsManager::getInstance()->set(SettingsManager::LANGUAGE, Text::fromT(lang));
}
}
Modified: dcplusplus/trunk/win32/AppearancePage.h
===================================================================
--- dcplusplus/trunk/win32/AppearancePage.h 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/win32/AppearancePage.h 2007-12-29 22:04:05 UTC (rev 954)
@@ -35,7 +35,7 @@
static TextItem texts[];
static ListItem listItems[];
- void handleBrowse();
+ WidgetComboBox* languages;
};
#endif // !defined(DCPLUSPLUS_WIN32_APPEARANCE_PAGE_H)
Modified: dcplusplus/trunk/win32/DCPlusPlus.rc
===================================================================
--- dcplusplus/trunk/win32/DCPlusPlus.rc 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/win32/DCPlusPlus.rc 2007-12-29 22:04:05 UTC (rev 954)
@@ -188,9 +188,8 @@
EDITTEXT IDC_DEFAULT_AWAY_MESSAGE,16,152,145,14,ES_MULTILINE | ES_AUTOHSCROLL | WS_VSCROLL
GROUPBOX "Set timestamps",IDC_SETTINGS_TIME_STAMPS_FORMAT,174,141,96,32
EDITTEXT IDC_TIME_STAMPS_FORMAT,180,152,80,15,ES_AUTOHSCROLL
- GROUPBOX "Language file",IDC_SETTINGS_LANGUAGE_FILE,7,174,261,32
- EDITTEXT IDC_LANGUAGE,16,185,188,14,ES_AUTOHSCROLL
- PUSHBUTTON "&Browse...",IDC_BROWSE,210,185,50,14
+ GROUPBOX "Language",IDC_SETTINGS_LANGUAGE_FILE,7,174,261,32
+ COMBOBOX IDC_LANGUAGE,16,185,238,14,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
LTEXT "Note; most of these options require that you restart DC++",IDC_SETTINGS_REQUIRES_RESTART,7,210,253,8
END
Modified: dcplusplus/trunk/win32/stdafx.h
===================================================================
--- dcplusplus/trunk/win32/stdafx.h 2007-12-29 14:47:58 UTC (rev 953)
+++ dcplusplus/trunk/win32/stdafx.h 2007-12-29 22:04:05 UTC (rev 954)
@@ -44,8 +44,9 @@
using std::tr1::placeholders::_1;
using std::tr1::placeholders::_2;
-#define LOCALEDIR (dcpp::Util::getDataPath() + "/locale/").c_str()
+#define LOCALEDIR dcpp::Util::getLocalePath().c_str()
#define PACKAGE "dcpp-win32"
#define _(String) gettext(String)
+#define T_(String) Text::toT(gettext(String))
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arn...@us...> - 2008-01-03 19:21:34
|
Revision: 955
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=955&view=rev
Author: arnetheduck
Date: 2008-01-03 11:21:30 -0800 (Thu, 03 Jan 2008)
Log Message:
-----------
Start work on a downloadsframe
Modified Paths:
--------------
dcplusplus/trunk/SConstruct
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/ConnectionManager.cpp
dcplusplus/trunk/dcpp/DCPlusPlus.h
dcplusplus/trunk/dcpp/NmdcHub.cpp
dcplusplus/trunk/dcpp/SettingsManager.cpp
dcplusplus/trunk/dcpp/SettingsManager.h
dcplusplus/trunk/dcpp/UserConnection.cpp
dcplusplus/trunk/dcpp/stdinc.h
dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMDIFrame.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRadioButton.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRichTextBox.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetWindow.h
dcplusplus/trunk/win32/DirectoryListingFrame.h
dcplusplus/trunk/win32/FinishedFrameBase.h
dcplusplus/trunk/win32/HubFrame.h
dcplusplus/trunk/win32/MainWindow.cpp
dcplusplus/trunk/win32/PublicHubsFrame.h
dcplusplus/trunk/win32/QueueFrame.h
dcplusplus/trunk/win32/SearchFrame.h
dcplusplus/trunk/win32/StaticFrame.h
dcplusplus/trunk/win32/TransferView.cpp
dcplusplus/trunk/win32/TransferView.h
dcplusplus/trunk/win32/TypedListView.h
dcplusplus/trunk/win32/TypedTreeView.h
dcplusplus/trunk/win32/UsersFrame.h
dcplusplus/trunk/win32/WinUtil.cpp
dcplusplus/trunk/win32/WinUtil.h
dcplusplus/trunk/win32/main.cpp
dcplusplus/trunk/win32/stdafx.h
Added Paths:
-----------
dcplusplus/trunk/win32/DownloadsFrame.cpp
dcplusplus/trunk/win32/DownloadsFrame.h
dcplusplus/trunk/win32/po/dcpp-win32.pot
Removed Paths:
-------------
dcplusplus/trunk/dcpp/po/dcpp.pot
Modified: dcplusplus/trunk/SConstruct
===================================================================
--- dcplusplus/trunk/SConstruct 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/SConstruct 2008-01-03 19:21:30 UTC (rev 955)
@@ -156,9 +156,10 @@
mo_bld = Builder (action = Action([mo_args], 'Compiling message catalog $TARGET from $SOURCES'))
env.Append(BUILDERS = {'MoBuild' : mo_bld})
-pot_args = ['xgettext','--from-code=UTF-8', '--foreign-user', '--package-name=$PACKAGE',
+pot_args = ['xgettext', '--from-code=UTF-8', '--foreign-user', '--package-name=$PACKAGE',
'--copyright-holder=Jacek Sieka', '--msg...@li...',
- '--no-wrap', '--keyword=_', '--keyword=T_', '--output=$TARGET', '$SOURCES']
+ '--no-wrap', '--keyword=_', '--keyword=T_', '--keyword=TF_', '--keyword=TFN_:1,2',
+ '--keyword=F_', '--boost', '--output=$TARGET', '$SOURCES']
pot_bld = Builder (action = Action([pot_args], 'Extracting messages to $TARGET from $SOURCES'))
env.Append(BUILDERS = {'PotBuild' : pot_bld})
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/changelog.txt 2008-01-03 19:21:30 UTC (rev 955)
@@ -7,7 +7,8 @@
* [ADC] Implemented test version of bloom filters which will dramatically reduce hub bandwidth usage for TTH searches
* Fixed a crash with partial list browsing
* Replaced homegrown i18n solution with gettext
-§
+* Fixed an issue with nick encodings and nmdc connections (thanks stanislav maslovski)
+
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
* Use system header arrows on common controls 6+ (thanks poy)
Modified: dcplusplus/trunk/dcpp/ConnectionManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/ConnectionManager.cpp 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/dcpp/ConnectionManager.cpp 2008-01-03 19:21:30 UTC (rev 955)
@@ -423,9 +423,12 @@
}
aSource->setToken(i.first);
aSource->setHubUrl(i.second);
+ aSource->setEncoding(ClientManager::getInstance()->findHubEncoding(i.second));
}
- CID cid = ClientManager::getInstance()->makeCid(aNick, aSource->getHubUrl());
+ string nick = Text::toUtf8(aNick, aSource->getEncoding());
+ CID cid = ClientManager::getInstance()->makeCid(nick, aSource->getHubUrl());
+
// First, we try looking in the pending downloads...hopefully it's one of them...
{
Lock l(cs);
@@ -445,7 +448,7 @@
aSource->setUser(ClientManager::getInstance()->findUser(cid));
if(!aSource->getUser() || !ClientManager::getInstance()->isOnline(aSource->getUser())) {
- dcdebug("CM::onMyNick Incoming connection from unknown user %s\n", aNick.c_str());
+ dcdebug("CM::onMyNick Incoming connection from unknown user %s\n", nick.c_str());
putConnection(aSource);
return;
}
Modified: dcplusplus/trunk/dcpp/DCPlusPlus.h
===================================================================
--- dcplusplus/trunk/dcpp/DCPlusPlus.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/dcpp/DCPlusPlus.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -171,7 +171,8 @@
#ifdef BUILDING_DCPP
#define PACKAGE "dcpp"
#define LOCALEDIR Util::getLocalePath().c_str()
-#define _(String) dgettext(PACKAGE, String)
+#define _(String) dgettext(PACKAGE, String)
+#define F_(String) boost::format(dgettext(PACKAGE, String))
#endif
} // namespace dcpp
Modified: dcplusplus/trunk/dcpp/NmdcHub.cpp
===================================================================
--- dcplusplus/trunk/dcpp/NmdcHub.cpp 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/dcpp/NmdcHub.cpp 2008-01-03 19:21:30 UTC (rev 955)
@@ -738,8 +738,9 @@
void NmdcHub::connectToMe(const OnlineUser& aUser) {
checkstate();
dcdebug("NmdcHub::connectToMe %s\n", aUser.getIdentity().getNick().c_str());
- ConnectionManager::getInstance()->nmdcExpect(aUser.getIdentity().getNick(), getMyNick(), getHubUrl());
- send("$ConnectToMe " + fromUtf8(aUser.getIdentity().getNick()) + " " + getLocalIp() + ":" + Util::toString(ConnectionManager::getInstance()->getPort()) + "|");
+ string nick = fromUtf8(aUser.getIdentity().getNick());
+ ConnectionManager::getInstance()->nmdcExpect(nick, getMyNick(), getHubUrl());
+ send("$ConnectToMe " + nick + " " + getLocalIp() + ":" + Util::toString(ConnectionManager::getInstance()->getPort()) + "|");
}
void NmdcHub::revConnectToMe(const OnlineUser& aUser) {
Modified: dcplusplus/trunk/dcpp/SettingsManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/SettingsManager.cpp 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/dcpp/SettingsManager.cpp 2008-01-03 19:21:30 UTC (rev 955)
@@ -47,7 +47,7 @@
"LogFilePrivateChat", "LogFileStatus", "LogFileUpload", "LogFileDownload", "LogFileSystem",
"LogFormatSystem", "LogFormatStatus", "DirectoryListingFrameOrder", "DirectoryListingFrameWidths",
"TLSPrivateKeyFile", "TLSCertificateFile", "TLSTrustedCertificatesPath", "BeepFile",
- "Language",
+ "Language", "DownloadsFrameOrder", "DownloadsFrameWidth",
"SENTRY",
// Ints
"IncomingConnections", "InPort", "Slots", "AutoFollow", "ClearSearch",
Modified: dcplusplus/trunk/dcpp/SettingsManager.h
===================================================================
--- dcplusplus/trunk/dcpp/SettingsManager.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/dcpp/SettingsManager.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -58,7 +58,7 @@
LOG_FILE_PRIVATE_CHAT, LOG_FILE_STATUS, LOG_FILE_UPLOAD, LOG_FILE_DOWNLOAD, LOG_FILE_SYSTEM,
LOG_FORMAT_SYSTEM, LOG_FORMAT_STATUS, DIRECTORLISTINGFRAME_ORDER, DIRECTORLISTINGFRAME_WIDTHS,
TLS_PRIVATE_KEY_FILE, TLS_CERTIFICATE_FILE, TLS_TRUSTED_CERTIFICATES_PATH, BEEPFILE,
- LANGUAGE,
+ LANGUAGE, DOWNLOADSFRAME_ORDER, DOWNLOADSFRAME_WIDTHS,
STR_LAST };
enum IntSetting { INT_FIRST = STR_LAST + 1,
@@ -90,7 +90,7 @@
USE_TLS, AUTO_SEARCH_LIMIT, ALT_SORT_ORDER, AUTO_KICK_NO_FAVS, PROMPT_PASSWORD, SPY_FRAME_IGNORE_TTH_SEARCHES,
DONT_DL_ALREADY_QUEUED, MAX_COMMAND_LENGTH, ALLOW_UNTRUSTED_HUBS, ALLOW_UNTRUSTED_CLIENTS,
TLS_PORT, FAST_HASH, SORT_FAVUSERS_FIRST, SHOW_SHELL_MENU, MIN_SEGMENT_SIZE, FOLLOW_LINKS,
- SEND_BLOOM,
+ SEND_BLOOM,
INT_LAST };
enum Int64Setting { INT64_FIRST = INT_LAST + 1,
Modified: dcplusplus/trunk/dcpp/UserConnection.cpp
===================================================================
--- dcplusplus/trunk/dcpp/UserConnection.cpp 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/dcpp/UserConnection.cpp 2008-01-03 19:21:30 UTC (rev 955)
@@ -75,7 +75,7 @@
if(cmd == "$MyNick") {
if(!param.empty())
- fire(UserConnectionListener::MyNick(), this, Text::toUtf8(param, encoding));
+ fire(UserConnectionListener::MyNick(), this, param);
} else if(cmd == "$Direction") {
x = param.find(" ");
if(x != string::npos) {
Deleted: dcplusplus/trunk/dcpp/po/dcpp.pot
===================================================================
--- dcplusplus/trunk/dcpp/po/dcpp.pot 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/dcpp/po/dcpp.pot 2008-01-03 19:21:30 UTC (rev 955)
@@ -1,22 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Jacek Sieka
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: dcpp\n"
-"Report-Msgid-Bugs-To: dcp...@li...\n"
-"POT-Creation-Date: 2007-12-29 13:55+0100\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL...@li...>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: dcpp/DCPlusPlus.cpp:92
-#, c-format
-msgid "test"
-msgstr ""
Modified: dcplusplus/trunk/dcpp/stdinc.h
===================================================================
--- dcplusplus/trunk/dcpp/stdinc.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/dcpp/stdinc.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -119,6 +119,8 @@
#include <limits>
#include <libintl.h>
+#include <boost/format.hpp>
+
#ifdef _STLPORT_VERSION
#include <unordered_map>
Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -99,7 +99,7 @@
/// Creates a Rich Edit Control and returns a pointer to it.
/** DON'T delete the returned pointer!!!
*/
- WidgetRichTextBoxPtr createRichTextBox( const typename WidgetRichTextBox::Seed & cs = WidgetRichTextBox::getDefaultSeed() )
+ WidgetRichTextBoxPtr createRichTextBox( const typename WidgetRichTextBox::Seed & cs = WidgetRichTextBox::Seed() )
{
return WidgetCreator< WidgetRichTextBox >::create( this, cs );
}
@@ -138,7 +138,7 @@
/// Creates a Cool Bar and returns a pointer to it.
/** DON'T delete the returned pointer!!!
*/
- WidgetCoolbarPtr createCoolbar( const typename WidgetCoolbar::Seed & cs = WidgetCoolbar::getDefaultSeed() )
+ WidgetCoolbarPtr createCoolbar( const typename WidgetCoolbar::Seed & cs = WidgetCoolbar::Seed() )
{
return WidgetCreator< WidgetCoolbar >::create( this, cs );
}
Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetCoolbar.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -114,9 +114,6 @@
Seed();
};
- /// Default values for creation
- static const Seed & getDefaultSeed();
-
/// ComboBox object type.
typedef WidgetComboBox::ObjectType WidgetComboBoxPtr;
Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetListView.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -127,9 +127,6 @@
SORT_FLOAT
};
- /// Default values for creation
- static const Seed & getDefaultSeed();
-
// Aspect expectation implementation
static const Message & getSelectionChangedMessage();
@@ -478,7 +475,7 @@
* directly. <br>
* Only if you DERIVE from class you should call this function directly.
*/
- void create( const Seed & cs = getDefaultSeed() );
+ void create( const Seed & cs = Seed() );
// Constructor Taking pointer to parent
explicit WidgetListView( SmartWin::Widget * parent );
Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMDIFrame.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMDIFrame.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMDIFrame.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -101,7 +101,7 @@
* is ready, createInvisibleWindow() lets you add Widgets while
* the main Widget is not visible. Of course you could do code like <br>
*
- * Seed defInvisible = getDefaultSeed(); <br>
+ * Seed defInvisible = Seed(); <br>
* defInvisible.style= defInvisible.style & ( ~ WS_VISIBLE ); <br>
* createWindow( defInvisible ); <br>
*
Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRadioButton.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRadioButton.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRadioButton.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -73,9 +73,6 @@
Seed(const SmartUtil::tstring& caption_ = SmartUtil::tstring());
};
- /// Default values for creation
- static const Seed & getDefaultSeed();
-
/// Returns true if the RadioButton is selected
/** Call this function to determine if the RadioButton is selected or not,
* returns true if it is selected
Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRichTextBox.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRichTextBox.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetRichTextBox.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -85,15 +85,12 @@
Seed();
};
- /// Default values for creation
- static const Seed & getDefaultSeed();
-
/// Actually creates the Rich Edit Control
/** You should call WidgetFactory::createRichTextBox if you instantiate class
* directly. <br>
* Only if you DERIVE from class you should call this function directly.
*/
- void create( const Seed & cs = getDefaultSeed() );
+ void create( const Seed & cs = Seed() );
/// Sets the background color of the WidgetRichTextBox
/** Call this function to alter the background color of the WidgetRichEdit. <br>
Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetWindow.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetWindow.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetWindow.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -116,7 +116,7 @@
* is ready, createInvisibleWindow() lets you add Widgets while
* the main Widget is not visible. Of course you could do code like <br>
*
- * Seed defInvisible = getDefaultSeed(); <br>
+ * Seed defInvisible = Seed(); <br>
* defInvisible.style= defInvisible.style & ( ~ WS_VISIBLE ); <br>
* createWindow( defInvisible ); <br>
*
@@ -188,7 +188,7 @@
/// Actually creates the window
/** This one creates the window. It is implemented in case somebody wants to use
* createWindow() without parameters. If it wasn't declared, the compiler would
- * call WidgetWindow::create with WidgetWindow::getDefaultSeed, which wouldn't
+ * call WidgetWindow::create with WidgetWindow::Seed, which wouldn't
* create a child window.
*/
void createWindow( const Seed& cs = Seed() )
Modified: dcplusplus/trunk/win32/DirectoryListingFrame.h
===================================================================
--- dcplusplus/trunk/win32/DirectoryListingFrame.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/win32/DirectoryListingFrame.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -128,10 +128,10 @@
tstring columns[COLUMN_LAST];
};
- typedef TypedTreeView<DirectoryListingFrame, ItemInfo> WidgetDirs;
+ typedef TypedTreeView<ItemInfo> WidgetDirs;
typedef WidgetDirs* WidgetDirsPtr;
WidgetDirsPtr dirs;
- typedef TypedListView<DirectoryListingFrame, ItemInfo> WidgetFiles;
+ typedef TypedListView<ItemInfo> WidgetFiles;
typedef WidgetFiles* WidgetFilesPtr;
WidgetFilesPtr files;
Added: dcplusplus/trunk/win32/DownloadsFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/DownloadsFrame.cpp (rev 0)
+++ dcplusplus/trunk/win32/DownloadsFrame.cpp 2008-01-03 19:21:30 UTC (rev 955)
@@ -0,0 +1,204 @@
+/*
+ * Copyright (C) 2001-2007 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 <dcpp/SettingsManager.h>
+#include <dcpp/QueueItem.h>
+#include <dcpp/QueueManager.h>
+#include <dcpp/Download.h>
+
+#include "DownloadsFrame.h"
+#include "HoldRedraw.h"
+
+int DownloadsFrame::columnIndexes[] = { COLUMN_FILE, COLUMN_PATH, COLUMN_STATUS, COLUMN_TIMELEFT, COLUMN_SPEED, COLUMN_SIZE };
+int DownloadsFrame::columnSizes[] = { 200, 300, 150, 200, 125, 100};
+
+static ResourceManager::Strings columnNames[] = { ResourceManager::FILENAME, ResourceManager::PATH,
+ ResourceManager::STATUS, ResourceManager::TIME_LEFT, ResourceManager::SPEED, ResourceManager::SIZE };
+
+DownloadsFrame::DownloadsFrame(SmartWin::WidgetTabView* mdiParent) :
+ BaseType(mdiParent, T_("Downloads")),
+ downloads(0),
+ startup(true)
+{
+ {
+ downloads = SmartWin::WidgetCreator<WidgetDownloads>::create(this, WinUtil::Seeds::listView);
+ addWidget(downloads);
+
+ downloads->createColumns(ResourceManager::getInstance()->getStrings(columnNames));
+ downloads->setColumnOrder(WinUtil::splitTokens(SETTING(HUBFRAME_ORDER), columnIndexes));
+ downloads->setColumnWidths(WinUtil::splitTokens(SETTING(HUBFRAME_WIDTHS), columnSizes));
+ downloads->setSort(COLUMN_STATUS);
+ downloads->setColor(WinUtil::textColor, WinUtil::bgColor);
+
+ downloads->onKeyDown(std::tr1::bind(&DownloadsFrame::handleKeyDown, this, _1));
+ downloads->onContextMenu(std::tr1::bind(&DownloadsFrame::handleContextMenu, this, _1));
+ }
+
+ initStatus();
+
+ layout();
+
+ startup = false;
+
+ onSpeaker(std::tr1::bind(&DownloadsFrame::handleSpeaker, this, _1, _2));
+}
+
+DownloadsFrame::~DownloadsFrame() {
+
+}
+
+void DownloadsFrame::layout() {
+ SmartWin::Rectangle r(SmartWin::Point(0, 0), getClientAreaSize());
+
+ layoutStatus(r);
+
+ downloads->setBounds(r);
+}
+
+bool DownloadsFrame::preClosing() {
+ return true;
+}
+
+void DownloadsFrame::postClosing() {
+ SettingsManager::getInstance()->set(SettingsManager::DOWNLOADSFRAME_ORDER, WinUtil::toString(downloads->getColumnOrder()));
+ SettingsManager::getInstance()->set(SettingsManager::DOWNLOADSFRAME_WIDTHS, WinUtil::toString(downloads->getColumnWidths()));
+}
+
+DownloadsFrame::DownloadInfo::DownloadInfo(const string& filename, int64_t size_) : path(filename), done(0), size(size), users(0) {
+ columns[COLUMN_FILE] = Text::toT(Util::getFileName(filename));
+ columns[COLUMN_PATH] = Text::toT(Util::getFilePath(filename));
+ columns[COLUMN_SIZE] = Text::toT(Util::toString(size));
+}
+
+void DownloadsFrame::DownloadInfo::update(const DownloadsFrame::TickInfo& ti) {
+ users = ti.users;
+ done = ti.done; // TODO Add done from queuemanager...
+ bps = ti.bps;
+}
+
+void DownloadsFrame::DownloadInfo::update() {
+ if(users == 0) {
+ columns[COLUMN_STATUS] = T_("Waiting for slot");
+ columns[COLUMN_TIMELEFT].clear();
+ columns[COLUMN_SPEED].clear();
+ } else {
+ double timeleft = bps > 0 ? (size - done) / bps : 0;
+ columns[COLUMN_STATUS] = str(TFN_("Downloading from %1% user", "Downloading from %1% users", users) % users);
+ columns[COLUMN_TIMELEFT] = Text::toT(Util::formatSeconds(static_cast<int64_t>(timeleft)));
+ columns[COLUMN_SPEED] = str(TF_("%1%/s") % Text::toT(Util::formatBytes(static_cast<int64_t>(bps))));
+ }
+}
+
+bool DownloadsFrame::handleKeyDown(int c) {
+ switch(c) {
+ }
+ return false;
+}
+
+bool DownloadsFrame::handleContextMenu(SmartWin::ScreenCoordinate pt) {
+ if (downloads->hasSelection()) {
+ if(pt.x() == -1 && pt.y() == -1) {
+ pt = downloads->getContextMenuPos();
+ }
+
+ WidgetMenuPtr menu = createMenu(true);
+
+ menu->trackPopupMenu(this, pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON);
+
+ return true;
+ }
+ return false;
+}
+
+int DownloadsFrame::find(const string& path) {
+ for(size_t i = 0; i < downloads->size(); ++i) {
+ DownloadInfo* di = downloads->getData(i);
+ if(Util::stricmp(di->path, path) == 0) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+LRESULT DownloadsFrame::handleSpeaker(WPARAM wParam, LPARAM lParam) {
+ if(wParam == SPEAKER_TICK) {
+ boost::scoped_ptr<TickInfo> ti(reinterpret_cast<TickInfo*>(lParam));
+ int i = find(ti->path);
+ if(i == -1) {
+ // TODO get size
+ i = downloads->insert(new DownloadInfo(ti->path, 0));
+ }
+ DownloadInfo* di = downloads->getData(i);
+ di->update(*ti);
+ } else if(wParam == SPEAKER_DISCONNECTED) {
+ boost::scoped_ptr<string> path(reinterpret_cast<string*>(lParam));
+
+ int i = find(*path);
+ if(i != -1) {
+ DownloadInfo* di = downloads->getData(i);
+ di->users--;
+ di->update();
+ }
+ } else if(wParam == SPEAKER_REMOVED) {
+ boost::scoped_ptr<string> path(reinterpret_cast<string*>(lParam));
+ int i = find(*path);
+ if(i != -1) {
+ downloads->erase(i);
+ }
+ }
+ return 0;
+}
+
+void DownloadsFrame::on(DownloadManagerListener::Tick, const DownloadList& l) throw() {
+ std::vector<TickInfo*> dis;
+ for(DownloadList::const_iterator i = l.begin(); i != l.end(); ++i) {
+ Download* d = *i;
+ TickInfo* ti = 0;
+ for(std::vector<TickInfo*>::iterator j = dis.begin(); j != dis.end(); ++j) {
+ TickInfo* ti2 = *j;
+ if(Util::stricmp(ti2->path, d->getPath()) == 0) {
+ ti = ti2;
+ break;
+ }
+ }
+ if(!ti) {
+ ti = new TickInfo(d->getPath());
+ }
+ ti->users++;
+ ti->bps += d->getAverageSpeed();
+ ti->done += d->getPos();
+ }
+
+ for(std::vector<TickInfo*>::iterator i = dis.begin(); i != dis.end(); ++i) {
+ speak(SPEAKER_TICK, reinterpret_cast<LPARAM>(*i));
+ }
+}
+
+void DownloadsFrame::on(DownloadManagerListener::Complete, Download* d) throw() {
+ speak(SPEAKER_DISCONNECTED, reinterpret_cast<LPARAM>(new string(d->getPath())));
+}
+
+void DownloadsFrame::on(DownloadManagerListener::Failed, Download* d, const string&) throw() {
+ speak(SPEAKER_DISCONNECTED, reinterpret_cast<LPARAM>(new string(d->getPath())));
+}
+
+void DownloadsFrame::on(QueueManagerListener::Removed, QueueItem* qi) throw() {
+ speak(SPEAKER_REMOVED, reinterpret_cast<LPARAM>(new string(qi->getTarget())));
+}
Added: dcplusplus/trunk/win32/DownloadsFrame.h
===================================================================
--- dcplusplus/trunk/win32/DownloadsFrame.h (rev 0)
+++ dcplusplus/trunk/win32/DownloadsFrame.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2001-2007 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_DOWNLOADS_FRAME_H
+#define DCPLUSPLUS_WIN32_DOWNLOADS_FRAME_H
+
+#include <dcpp/DownloadManagerListener.h>
+#include <dcpp/ConnectionManagerListener.h>
+#include <dcpp/forward.h>
+#include <dcpp/ResourceManager.h>
+
+#include "TypedListView.h"
+#include "StaticFrame.h"
+#include "AspectSpeaker.h"
+
+class DownloadsFrame :
+ public StaticFrame<DownloadsFrame>,
+ private DownloadManagerListener,
+ private ConnectionManagerListener
+{
+public:
+ enum Status {
+ STATUS_STATUS,
+ STATUS_LAST
+ };
+ static const unsigned ICON_RESOURCE = IDR_QUEUE;
+
+protected:
+ typedef StaticFrame<DownloadsFrame> BaseType;
+ friend class StaticFrame<DownloadsFrame>;
+ friend class MDIChildFrame<DownloadsFrame>;
+
+ DownloadsFrame(SmartWin::WidgetTabView* mdiParent);
+ virtual ~DownloadsFrame();
+
+ void layout();
+
+ bool preClosing();
+ void postClosing();
+
+private:
+ enum {
+ COLUMN_FIRST,
+ COLUMN_FILE = COLUMN_FIRST,
+ COLUMN_PATH,
+ COLUMN_STATUS,
+ COLUMN_TIMELEFT,
+ COLUMN_SPEED,
+ COLUMN_SIZE,
+ COLUMN_LAST
+ };
+
+ enum {
+ SPEAKER_DISCONNECTED,
+ SPEAKER_REMOVED,
+ SPEAKER_TICK
+ };
+
+ struct TickInfo {
+ TickInfo(const string& path_) : path(path_), done(0), bps(0), users(0) { }
+
+ string path;
+ int64_t done;
+ double bps;
+ int users;
+ };
+
+ class DownloadInfo {
+ public:
+ DownloadInfo(const string& filename, int64_t size);
+
+ const tstring& getText(int col) const {
+ return columns[col];
+ }
+
+ int getImage() const {
+ return 0;
+ }
+
+ static int compareItems(DownloadInfo* a, DownloadInfo* b, int col) {
+ return lstrcmpi(a->columns[col].c_str(), b->columns[col].c_str());
+ }
+
+ void update();
+ void update(const TickInfo& ti);
+
+ string path;
+ int64_t done;
+ int64_t size;
+ double bps;
+ int users;
+
+ tstring columns[COLUMN_LAST];
+ };
+
+ typedef TypedListView<DownloadInfo> WidgetDownloads;
+ typedef WidgetDownloads* WidgetDownloadsPtr;
+ WidgetDownloadsPtr downloads;
+
+ static int columnSizes[COLUMN_LAST];
+ static int columnIndexes[COLUMN_LAST];
+
+ bool startup;
+
+ int find(const string& path);
+
+ bool handleKeyDown(int c);
+ bool handleContextMenu(SmartWin::ScreenCoordinate pt);
+ LRESULT handleSpeaker(WPARAM wParam, LPARAM lParam);
+
+ virtual void on(DownloadManagerListener::Tick, const DownloadList&) throw();
+ virtual void on(DownloadManagerListener::Complete, Download*) throw();
+ virtual void on(DownloadManagerListener::Failed, Download*, const string&) throw();
+
+ virtual void on(QueueManagerListener::Removed, QueueItem*) throw();
+};
+
+#endif
Modified: dcplusplus/trunk/win32/FinishedFrameBase.h
===================================================================
--- dcplusplus/trunk/win32/FinishedFrameBase.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/win32/FinishedFrameBase.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -173,7 +173,7 @@
tstring columns[COLUMN_LAST];
};
- typedef TypedListView<T, ItemInfo> WidgetItems;
+ typedef TypedListView<ItemInfo> WidgetItems;
typedef WidgetItems* WidgetItemsPtr;
WidgetItemsPtr items;
Modified: dcplusplus/trunk/win32/HubFrame.h
===================================================================
--- dcplusplus/trunk/win32/HubFrame.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/win32/HubFrame.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -149,7 +149,7 @@
WidgetVPanedPtr paned;
WidgetCheckBoxPtr showUsers;
- typedef TypedListView<HubFrame, UserInfo, false> WidgetUsers;
+ typedef TypedListView<UserInfo, false> WidgetUsers;
typedef WidgetUsers* WidgetUsersPtr;
WidgetUsersPtr users;
Modified: dcplusplus/trunk/win32/MainWindow.cpp
===================================================================
--- dcplusplus/trunk/win32/MainWindow.cpp 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/win32/MainWindow.cpp 2008-01-03 19:21:30 UTC (rev 955)
@@ -59,6 +59,7 @@
#include <dcpp/ShareManager.h>
#include <dcpp/QueueManager.h>
#include <dcpp/ClientManager.h>
+#include <dcpp/Download.h>
MainWindow::MainWindow() :
WidgetFactory<SmartWin::WidgetWindow>(0),
Modified: dcplusplus/trunk/win32/PublicHubsFrame.h
===================================================================
--- dcplusplus/trunk/win32/PublicHubsFrame.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/win32/PublicHubsFrame.h 2008-01-03 19:21:30 UTC (rev 955)
@@ -94,7 +94,7 @@
tstring columns[COLUMN_LAST];
};
- typedef TypedListView<PublicHubsFrame, HubInfo> WidgetHubs;
+ typedef TypedListView<HubInfo> WidgetHubs;
typedef WidgetHubs* WidgetHubsPtr;
WidgetHubsPtr hubs;
Modified: dcplusplus/trunk/win32/QueueFrame.h
===================================================================
--- dcplusplus/trunk/win32/QueueFrame.h 2007-12-29 22:04:05 UTC (rev 954)
+++ dcplusplus/trunk/...
[truncated message content] |
|
From: <arn...@us...> - 2008-01-03 21:59:31
|
Revision: 956
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=956&view=rev
Author: arnetheduck
Date: 2008-01-03 13:59:28 -0800 (Thu, 03 Jan 2008)
Log Message:
-----------
Add some more download frame stuff
Modified Paths:
--------------
dcplusplus/trunk/Compile.txt
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/QueueManager.cpp
dcplusplus/trunk/dcpp/QueueManager.h
dcplusplus/trunk/dcpp/SettingsManager.cpp
dcplusplus/trunk/dcpp/SettingsManager.h
dcplusplus/trunk/win32/DownloadsFrame.cpp
dcplusplus/trunk/win32/DownloadsFrame.h
dcplusplus/trunk/win32/MainWindow.cpp
dcplusplus/trunk/win32/TypedListView.h
dcplusplus/trunk/win32/WindowsPage.cpp
dcplusplus/trunk/win32/po/dcpp-win32.pot
Added Paths:
-----------
dcplusplus/trunk/win32/MainWindowFactory.cpp
Modified: dcplusplus/trunk/Compile.txt
===================================================================
--- dcplusplus/trunk/Compile.txt 2008-01-03 19:21:30 UTC (rev 955)
+++ dcplusplus/trunk/Compile.txt 2008-01-03 21:59:28 UTC (rev 956)
@@ -9,6 +9,9 @@
but if you want to experiment you can try the potentially slower sjlj. After installing gcc, you will
need to go to the bin folder of your mingw installation and copy g++-dw2/sjlj.exe and gcc-dw2/sjlj.exe to g++.exe
and gcc.exe respectively.
+ You will also need the gettext tools: gettext-0.16.1-1-bin.tar.bz2, gettext-0.16.1-1-dll.tar.bz2 and
+ libiconv-1.11-1-dll.tar.bz2. Extract and make sure they're in your PATH.
+
Note; Make sure gcc/g++ is in your path and before any cygwin installation.
1b) or install Microsoft Visual C++ 8.0 (I don't use it so there might be some compile problems)
@@ -25,7 +28,7 @@
3) Download HTML help workshop from http://msdn2.microsoft.com/en-us/library/ms670169.aspx. Copy the
include and library files to the respective directories in the htmlhelp folder. Make sure hhc.exe is
in your PATH.
-
+
4) Open a command prompt and type "scons" followed by some options:
"tools=mingw" - Use mingw for building (default)
"tools=default" - Use msvc for building (yes, the option value is strange)
@@ -35,8 +38,6 @@
To see more options, type "scons -h".
Tip: You can create a file custom.py and put your options in there.
-If you get a linking error citing missing references on the first compile, run scons again.
-
Note; If you have problems, use google. It works for me.
By the way, with doxygen, graphviz and some luck you can use the supplied doxygen configuration file
@@ -65,5 +66,6 @@
In order to avoid future licensing issues, I ask you to give me copyright over any submitted code.
If you don't like this policy, you are free to start your own distribution (as
many have done), and if you're lucky it might become more popular than the original =). Please
-state explicitly when submitting the patch that you give me copyright over the code if the submission is larger than trivial.
+state explicitly when submitting the patch that you give me copyright over the code if the submission is larger
+than trivial.
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-01-03 19:21:30 UTC (rev 955)
+++ dcplusplus/trunk/changelog.txt 2008-01-03 21:59:28 UTC (rev 956)
@@ -8,6 +8,7 @@
* Fixed a crash with partial list browsing
* Replaced homegrown i18n solution with gettext
* Fixed an issue with nick encodings and nmdc connections (thanks stanislav maslovski)
+* Added download view which shows per-file download information
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
Modified: dcplusplus/trunk/dcpp/QueueManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/QueueManager.cpp 2008-01-03 19:21:30 UTC (rev 955)
+++ dcplusplus/trunk/dcpp/QueueManager.cpp 2008-01-03 21:59:28 UTC (rev 956)
@@ -602,6 +602,25 @@
return matches;
}
+int64_t QueueManager::getPos(const string& target) throw() {
+ Lock l(cs);
+ QueueItem* qi = fileQueue.find(target);
+ if(qi) {
+ return qi->getDownloadedBytes();
+ }
+ return -1;
+}
+
+int64_t QueueManager::getSize(const string& target) throw() {
+ Lock l(cs);
+ QueueItem* qi = fileQueue.find(target);
+ if(qi) {
+ return qi->getSize();
+ }
+ return -1;
+}
+
+
void QueueManager::move(const string& aSource, const string& aTarget) throw() {
string target = Util::validateFileName(aTarget);
if(aSource == target)
Modified: dcplusplus/trunk/dcpp/QueueManager.h
===================================================================
--- dcplusplus/trunk/dcpp/QueueManager.h 2008-01-03 19:21:30 UTC (rev 955)
+++ dcplusplus/trunk/dcpp/QueueManager.h 2008-01-03 21:59:28 UTC (rev 956)
@@ -87,6 +87,9 @@
int matchListing(const DirectoryListing& dl) throw();
bool getTTH(const string& name, TTHValue& tth) throw();
+
+ int64_t getSize(const string& target) throw();
+ int64_t getPos(const string& target) throw();
/** Move the target location of a queued item. Running items are silently ignored */
void move(const string& aSource, const string& aTarget) throw();
Modified: dcplusplus/trunk/dcpp/SettingsManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/SettingsManager.cpp 2008-01-03 19:21:30 UTC (rev 955)
+++ dcplusplus/trunk/dcpp/SettingsManager.cpp 2008-01-03 21:59:28 UTC (rev 956)
@@ -78,7 +78,7 @@
"UseTLS", "AutoSearchLimit", "AltSortOrder", "AutoKickNoFavs", "PromptPassword", "SpyFrameIgnoreTthSearches",
"DontDlAlreadyQueued", "MaxCommandLength", "AllowUntrustedHubs", "AllowUntrustedClients",
"TLSPort", "FastHash", "SortFavUsersFirst", "ShowShellMenu", "MinSegmentSize", "FollowLinks",
- "SendBloom",
+ "SendBloom", "OpenDownloads",
"SENTRY",
// Int64
"TotalUpload", "TotalDownload",
@@ -274,6 +274,7 @@
setDefault(MIN_SEGMENT_SIZE, 1024);
setDefault(FOLLOW_LINKS, false);
setDefault(SEND_BLOOM, true);
+ setDefault(OPEN_DOWNLOADS, true);
#ifdef _WIN32
setDefault(MAIN_WINDOW_STATE, SW_SHOWNORMAL);
Modified: dcplusplus/trunk/dcpp/SettingsManager.h
===================================================================
--- dcplusplus/trunk/dcpp/SettingsManager.h 2008-01-03 19:21:30 UTC (rev 955)
+++ dcplusplus/trunk/dcpp/SettingsManager.h 2008-01-03 21:59:28 UTC (rev 956)
@@ -90,7 +90,7 @@
USE_TLS, AUTO_SEARCH_LIMIT, ALT_SORT_ORDER, AUTO_KICK_NO_FAVS, PROMPT_PASSWORD, SPY_FRAME_IGNORE_TTH_SEARCHES,
DONT_DL_ALREADY_QUEUED, MAX_COMMAND_LENGTH, ALLOW_UNTRUSTED_HUBS, ALLOW_UNTRUSTED_CLIENTS,
TLS_PORT, FAST_HASH, SORT_FAVUSERS_FIRST, SHOW_SHELL_MENU, MIN_SEGMENT_SIZE, FOLLOW_LINKS,
- SEND_BLOOM,
+ SEND_BLOOM, OPEN_DOWNLOADS,
INT_LAST };
enum Int64Setting { INT64_FIRST = INT_LAST + 1,
Modified: dcplusplus/trunk/win32/DownloadsFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/DownloadsFrame.cpp 2008-01-03 19:21:30 UTC (rev 955)
+++ dcplusplus/trunk/win32/DownloadsFrame.cpp 2008-01-03 21:59:28 UTC (rev 956)
@@ -22,9 +22,11 @@
#include <dcpp/QueueItem.h>
#include <dcpp/QueueManager.h>
#include <dcpp/Download.h>
+#include <dcpp/DownloadManager.h>
#include "DownloadsFrame.h"
#include "HoldRedraw.h"
+#include "WinUtil.h"
int DownloadsFrame::columnIndexes[] = { COLUMN_FILE, COLUMN_PATH, COLUMN_STATUS, COLUMN_TIMELEFT, COLUMN_SPEED, COLUMN_SIZE };
int DownloadsFrame::columnSizes[] = { 200, 300, 150, 200, 125, 100};
@@ -46,8 +48,8 @@
downloads->setColumnWidths(WinUtil::splitTokens(SETTING(HUBFRAME_WIDTHS), columnSizes));
downloads->setSort(COLUMN_STATUS);
downloads->setColor(WinUtil::textColor, WinUtil::bgColor);
+ downloads->setSmallImageList(WinUtil::fileImages);
- downloads->onKeyDown(std::tr1::bind(&DownloadsFrame::handleKeyDown, this, _1));
downloads->onContextMenu(std::tr1::bind(&DownloadsFrame::handleContextMenu, this, _1));
}
@@ -58,10 +60,14 @@
startup = false;
onSpeaker(std::tr1::bind(&DownloadsFrame::handleSpeaker, this, _1, _2));
+
+ QueueManager::getInstance()->addListener(this);
+ DownloadManager::getInstance()->addListener(this);
}
DownloadsFrame::~DownloadsFrame() {
-
+ QueueManager::getInstance()->removeListener(this);
+ DownloadManager::getInstance()->removeListener(this);
}
void DownloadsFrame::layout() {
@@ -81,16 +87,22 @@
SettingsManager::getInstance()->set(SettingsManager::DOWNLOADSFRAME_WIDTHS, WinUtil::toString(downloads->getColumnWidths()));
}
-DownloadsFrame::DownloadInfo::DownloadInfo(const string& filename, int64_t size_) : path(filename), done(0), size(size), users(0) {
- columns[COLUMN_FILE] = Text::toT(Util::getFileName(filename));
- columns[COLUMN_PATH] = Text::toT(Util::getFilePath(filename));
- columns[COLUMN_SIZE] = Text::toT(Util::toString(size));
+DownloadsFrame::DownloadInfo::DownloadInfo(const string& target, int64_t size_) : path(target), done(QueueManager::getInstance()->getPos(target)), size(size_), users(0) {
+ columns[COLUMN_FILE] = Text::toT(Util::getFileName(target));
+ columns[COLUMN_PATH] = Text::toT(Util::getFilePath(target));
+ columns[COLUMN_SIZE] = Text::toT(Util::formatBytes(size));
+ update();
}
+int DownloadsFrame::DownloadInfo::getImage() const {
+ return WinUtil::getIconIndex(Text::toT(path));
+}
+
void DownloadsFrame::DownloadInfo::update(const DownloadsFrame::TickInfo& ti) {
users = ti.users;
- done = ti.done; // TODO Add done from queuemanager...
+ done = ti.done + QueueManager::getInstance()->getInstance()->getPos(ti.path);
bps = ti.bps;
+ update();
}
void DownloadsFrame::DownloadInfo::update() {
@@ -99,19 +111,12 @@
columns[COLUMN_TIMELEFT].clear();
columns[COLUMN_SPEED].clear();
} else {
- double timeleft = bps > 0 ? (size - done) / bps : 0;
columns[COLUMN_STATUS] = str(TFN_("Downloading from %1% user", "Downloading from %1% users", users) % users);
- columns[COLUMN_TIMELEFT] = Text::toT(Util::formatSeconds(static_cast<int64_t>(timeleft)));
+ columns[COLUMN_TIMELEFT] = Text::toT(Util::formatSeconds(static_cast<int64_t>(timeleft())));
columns[COLUMN_SPEED] = str(TF_("%1%/s") % Text::toT(Util::formatBytes(static_cast<int64_t>(bps))));
}
}
-bool DownloadsFrame::handleKeyDown(int c) {
- switch(c) {
- }
- return false;
-}
-
bool DownloadsFrame::handleContextMenu(SmartWin::ScreenCoordinate pt) {
if (downloads->hasSelection()) {
if(pt.x() == -1 && pt.y() == -1) {
@@ -142,19 +147,26 @@
boost::scoped_ptr<TickInfo> ti(reinterpret_cast<TickInfo*>(lParam));
int i = find(ti->path);
if(i == -1) {
- // TODO get size
- i = downloads->insert(new DownloadInfo(ti->path, 0));
+ int64_t size = QueueManager::getInstance()->getSize(ti->path);
+ if(size == -1) {
+ return 0;
+ }
+ i = downloads->insert(new DownloadInfo(ti->path, size));
}
DownloadInfo* di = downloads->getData(i);
di->update(*ti);
+ downloads->update(i);
} else if(wParam == SPEAKER_DISCONNECTED) {
boost::scoped_ptr<string> path(reinterpret_cast<string*>(lParam));
int i = find(*path);
if(i != -1) {
DownloadInfo* di = downloads->getData(i);
- di->users--;
+ if(--di->users == 0) {
+ di->bps = 0;
+ }
di->update();
+ downloads->update(i);
}
} else if(wParam == SPEAKER_REMOVED) {
boost::scoped_ptr<string> path(reinterpret_cast<string*>(lParam));
@@ -170,6 +182,10 @@
std::vector<TickInfo*> dis;
for(DownloadList::const_iterator i = l.begin(); i != l.end(); ++i) {
Download* d = *i;
+ if(d->getType() != Transfer::TYPE_FILE) {
+ continue;
+ }
+
TickInfo* ti = 0;
for(std::vector<TickInfo*>::iterator j = dis.begin(); j != dis.end(); ++j) {
TickInfo* ti2 = *j;
@@ -180,6 +196,7 @@
}
if(!ti) {
ti = new TickInfo(d->getPath());
+ dis.push_back(ti);
}
ti->users++;
ti->bps += d->getAverageSpeed();
Modified: dcplusplus/trunk/win32/DownloadsFrame.h
===================================================================
--- dcplusplus/trunk/win32/DownloadsFrame.h 2008-01-03 19:21:30 UTC (rev 955)
+++ dcplusplus/trunk/win32/DownloadsFrame.h 2008-01-03 21:59:28 UTC (rev 956)
@@ -20,7 +20,7 @@
#define DCPLUSPLUS_WIN32_DOWNLOADS_FRAME_H
#include <dcpp/DownloadManagerListener.h>
-#include <dcpp/ConnectionManagerListener.h>
+#include <dcpp/QueueManagerListener.h>
#include <dcpp/forward.h>
#include <dcpp/ResourceManager.h>
@@ -30,8 +30,8 @@
class DownloadsFrame :
public StaticFrame<DownloadsFrame>,
- private DownloadManagerListener,
- private ConnectionManagerListener
+ public DownloadManagerListener,
+ public QueueManagerListener
{
public:
enum Status {
@@ -88,17 +88,22 @@
return columns[col];
}
- int getImage() const {
- return 0;
- }
+ int getImage() const;
static int compareItems(DownloadInfo* a, DownloadInfo* b, int col) {
- return lstrcmpi(a->columns[col].c_str(), b->columns[col].c_str());
+ switch(col) {
+ case COLUMN_STATUS: return compare(a->users, b->users);
+ case COLUMN_TIMELEFT: return compare(a->timeleft(), b->timeleft());
+ case COLUMN_SPEED: return compare(a->bps, b->bps);
+ case COLUMN_SIZE: return compare(a->size, b->size);
+ default: return lstrcmpi(a->columns[col].c_str(), b->columns[col].c_str());
+ }
}
void update();
void update(const TickInfo& ti);
+ int64_t timeleft() { return bps == 0 ? 0 : (size - done) / bps; }
string path;
int64_t done;
int64_t size;
@@ -119,7 +124,6 @@
int find(const string& path);
- bool handleKeyDown(int c);
bool handleContextMenu(SmartWin::ScreenCoordinate pt);
LRESULT handleSpeaker(WPARAM wParam, LPARAM lParam);
Modified: dcplusplus/trunk/win32/MainWindow.cpp
===================================================================
--- dcplusplus/trunk/win32/MainWindow.cpp 2008-01-03 19:21:30 UTC (rev 955)
+++ dcplusplus/trunk/win32/MainWindow.cpp 2008-01-03 21:59:28 UTC (rev 956)
@@ -21,30 +21,18 @@
#include "MainWindow.h"
#include "resource.h"
-#include "SystemFrame.h"
-#include "NotepadFrame.h"
-#include "HubFrame.h"
-#include "PublicHubsFrame.h"
-#include "FavHubsFrame.h"
-#include "QueueFrame.h"
-#include "SearchFrame.h"
-#include "ADLSearchFrame.h"
-#include "SpyFrame.h"
-#include "FinishedDLFrame.h"
-#include "FinishedULFrame.h"
#include "LineDlg.h"
#include "HashProgressDlg.h"
#include "SettingsDialog.h"
#include "TextFrame.h"
-#include "DirectoryListingFrame.h"
-#include "PrivateFrame.h"
#include "SingleInstance.h"
-#include "StatsFrame.h"
-#include "UsersFrame.h"
-#include "WaitingUsersFrame.h"
#include "AboutDlg.h"
#include "UPnP.h"
#include "TransferView.h"
+#include "HubFrame.h"
+#include "PrivateFrame.h"
+#include "DirectoryListingFrame.h"
+#include "SearchFrame.h"
#include <dcpp/SettingsManager.h>
#include <dcpp/ResourceManager.h>
@@ -134,6 +122,7 @@
if(BOOLSETTING(OPEN_NOTEPAD)) postMessage(WM_COMMAND, IDC_NOTEPAD);
if(BOOLSETTING(OPEN_PUBLIC)) postMessage(WM_COMMAND, IDC_PUBLIC_HUBS);
if(BOOLSETTING(OPEN_FAVORITE_HUBS)) postMessage(WM_COMMAND, IDC_FAVORITE_HUBS);
+ if(BOOLSETTING(OPEN_DOWNLOADS)) postMessage(WM_COMMAND, IDC_DOWNLOADS);
if (!WinUtil::isShift())
speak(AUTO_CONNECT);
@@ -226,8 +215,9 @@
view->appendItem(IDC_NOTEPAD, TSTRING(MENU_NOTEPAD), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
view->appendItem(IDC_SYSTEM_LOG, TSTRING(MENU_SYSTEM_LOG), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
view->appendItem(IDC_NET_STATS, TSTRING(MENU_NETWORK_STATISTICS), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_DOWNLOADS, T_("Downloads"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
view->appendItem(IDC_HASH_PROGRESS, TSTRING(MENU_HASH_PROGRESS), std::tr1::bind(&MainWindow::handleHashProgress, this));
-
+
WidgetMenuPtr window = mainMenu->appendPopup(CTSTRING(MENU_WINDOW));
window->appendItem(IDC_CLOSE_ALL_DISCONNECTED, TSTRING(MENU_CLOSE_DISCONNECTED), std::tr1::bind(&MainWindow::handleCloseWindows, this, _1));
@@ -834,53 +824,6 @@
WinUtil::openFile(Text::toT(SETTING(DOWNLOAD_DIRECTORY)));
}
-void MainWindow::handleOpenWindow(unsigned id) {
- switch (id) {
- case IDC_PUBLIC_HUBS:
- PublicHubsFrame::openWindow(getMDIParent());
- break;
- case IDC_FAVORITE_HUBS:
- FavHubsFrame::openWindow(getMDIParent());
- break;
- case IDC_FAVUSERS:
- UsersFrame::openWindow(getMDIParent());
- break;
- case IDC_QUEUE:
- QueueFrame::openWindow(getMDIParent());
- break;
- case IDC_FINISHED_DL:
- FinishedDLFrame::openWindow(getMDIParent());
- break;
- case IDC_WAITING_USERS:
- WaitingUsersFrame::openWindow(getMDIParent());
- break;
- case IDC_FINISHED_UL:
- FinishedULFrame::openWindow(getMDIParent());
- break;
- case IDC_SEARCH:
- SearchFrame::openWindow(getMDIParent());
- break;
- case IDC_ADL_SEARCH:
- ADLSearchFrame::openWindow(getMDIParent());
- break;
- case IDC_SEARCH_SPY:
- SpyFrame::openWindow(getMDIParent());
- break;
- case IDC_NOTEPAD:
- NotepadFrame::openWindow(getMDIParent());
- break;
- case IDC_SYSTEM_LOG:
- SystemFrame::openWindow(getMDIParent());
- break;
- case IDC_NET_STATS:
- StatsFrame::openWindow(getMDIParent());
- break;
- default:
- dcassert(0);
- break;
- }
-}
-
void MainWindow::on(HttpConnectionListener::Complete, HttpConnection* /*aConn*/, const string&) throw() {
try {
SimpleXML xml;
Added: dcplusplus/trunk/win32/MainWindowFactory.cpp
===================================================================
--- dcplusplus/trunk/win32/MainWindowFactory.cpp (rev 0)
+++ dcplusplus/trunk/win32/MainWindowFactory.cpp 2008-01-03 21:59:28 UTC (rev 956)
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2001-2007 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 "MainWindow.h"
+
+#include "ADLSearchFrame.h"
+#include "DownloadsFrame.h"
+#include "FavHubsFrame.h"
+#include "FinishedDLFrame.h"
+#include "FinishedULFrame.h"
+#include "NotepadFrame.h"
+#include "PublicHubsFrame.h"
+#include "QueueFrame.h"
+#include "SearchFrame.h"
+#include "SpyFrame.h"
+#include "StatsFrame.h"
+#include "SystemFrame.h"
+#include "UsersFrame.h"
+#include "WaitingUsersFrame.h"
+
+void MainWindow::handleOpenWindow(unsigned id) {
+ switch (id) {
+ case IDC_PUBLIC_HUBS:
+ PublicHubsFrame::openWindow(getMDIParent());
+ break;
+ case IDC_FAVORITE_HUBS:
+ FavHubsFrame::openWindow(getMDIParent());
+ break;
+ case IDC_FAVUSERS:
+ UsersFrame::openWindow(getMDIParent());
+ break;
+ case IDC_QUEUE:
+ QueueFrame::openWindow(getMDIParent());
+ break;
+ case IDC_FINISHED_DL:
+ FinishedDLFrame::openWindow(getMDIParent());
+ break;
+ case IDC_WAITING_USERS:
+ WaitingUsersFrame::openWindow(getMDIParent());
+ break;
+ case IDC_FINISHED_UL:
+ FinishedULFrame::openWindow(getMDIParent());
+ break;
+ case IDC_SEARCH:
+ SearchFrame::openWindow(getMDIParent());
+ break;
+ case IDC_ADL_SEARCH:
+ ADLSearchFrame::openWindow(getMDIParent());
+ break;
+ case IDC_SEARCH_SPY:
+ SpyFrame::openWindow(getMDIParent());
+ break;
+ case IDC_NOTEPAD:
+ NotepadFrame::openWindow(getMDIParent());
+ break;
+ case IDC_SYSTEM_LOG:
+ SystemFrame::openWindow(getMDIParent());
+ break;
+ case IDC_NET_STATS:
+ StatsFrame::openWindow(getMDIParent());
+ break;
+ case IDC_DOWNLOADS:
+ DownloadsFrame::openWindow(getMDIParent());
+ break;
+ default:
+ dcassert(0);
+ break;
+ }
+}
Modified: dcplusplus/trunk/win32/TypedListView.h
===================================================================
--- dcplusplus/trunk/win32/TypedListView.h 2008-01-03 19:21:30 UTC (rev 955)
+++ dcplusplus/trunk/win32/TypedListView.h 2008-01-03 21:59:28 UTC (rev 956)
@@ -112,9 +112,7 @@
}
void update(int i) {
- unsigned k = this->getColumnCount();
- for(unsigned j = 0; j < k; ++j)
- ListView_SetItemText(this->handle(), i, j, LPSTR_TEXTCALLBACK);
+ redraw(i, i);
}
void update(ContentType* item) { int i = find(item); if(i != -1) update(i); }
Modified: dcplusplus/trunk/win32/WindowsPage.cpp
===================================================================
--- dcplusplus/trunk/win32/WindowsPage.cpp 2008-01-03 19:21:30 UTC (rev 955)
+++ dcplusplus/trunk/win32/WindowsPage.cpp 2008-01-03 21:59:28 UTC (rev 956)
@@ -45,6 +45,7 @@
{ SettingsManager::OPEN_NOTEPAD, ResourceManager::NOTEPAD },
{ SettingsManager::OPEN_PUBLIC, ResourceManager::PUBLIC_HUBS },
{ SettingsManager::OPEN_FAVORITE_HUBS, ResourceManager::FAVORITE_HUBS },
+ { SettingsManager::OPEN_DOWNLOADS, ResourceManager::DOWNLOADS },
{ 0, ResourceManager::SETTINGS_AUTO_AWAY }
};
Modified: dcplusplus/trunk/win32/po/dcpp-win32.pot
===================================================================
--- dcplusplus/trunk/win32/po/dcpp-win32.pot 2008-01-03 19:21:30 UTC (rev 955)
+++ dcplusplus/trunk/win32/po/dcpp-win32.pot 2008-01-03 21:59:28 UTC (rev 956)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: dcpp-win32\n"
"Report-Msgid-Bugs-To: dcp...@li...\n"
-"POT-Creation-Date: 2008-01-03 20:12+0100\n"
+"POT-Creation-Date: 2008-01-03 22:52+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL...@li...>\n"
@@ -17,22 +17,22 @@
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-#: win32/DownloadsFrame.cpp:36
+#: win32/MainWindow.cpp:218 win32/DownloadsFrame.cpp:38
msgid "Downloads"
msgstr ""
-#: win32/DownloadsFrame.cpp:98
+#: win32/DownloadsFrame.cpp:110
msgid "Waiting for slot"
msgstr ""
-#: win32/DownloadsFrame.cpp:103
+#: win32/DownloadsFrame.cpp:114
#, boost-format
msgid "Downloading from %1% user"
msgid_plural "Downloading from %1% users"
msgstr[0] ""
msgstr[1] ""
-#: win32/DownloadsFrame.cpp:105
+#: win32/DownloadsFrame.cpp:116
#, boost-format
msgid "%1%/s"
msgstr ""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arn...@us...> - 2008-01-04 09:31:43
|
Revision: 957
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=957&view=rev
Author: arnetheduck
Date: 2008-01-04 01:31:40 -0800 (Fri, 04 Jan 2008)
Log Message:
-----------
Some more translations
Modified Paths:
--------------
dcplusplus/trunk/SConstruct
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/SettingsManager.cpp
dcplusplus/trunk/dcpp/StringDefs.h
dcplusplus/trunk/dcpp/Text.h
dcplusplus/trunk/win32/FavHubsFrame.cpp
dcplusplus/trunk/win32/SplashWindow.cpp
dcplusplus/trunk/win32/WinUtil.h
dcplusplus/trunk/win32/po/dcpp-win32.pot
dcplusplus/trunk/win32/stdafx.h
Modified: dcplusplus/trunk/SConstruct
===================================================================
--- dcplusplus/trunk/SConstruct 2008-01-03 21:59:28 UTC (rev 956)
+++ dcplusplus/trunk/SConstruct 2008-01-04 09:31:40 UTC (rev 957)
@@ -156,10 +156,11 @@
mo_bld = Builder (action = Action([mo_args], 'Compiling message catalog $TARGET from $SOURCES'))
env.Append(BUILDERS = {'MoBuild' : mo_bld})
-pot_args = ['xgettext', '--from-code=UTF-8', '--foreign-user', '--package-name=$PACKAGE',
+pot_args = ['xgettext', '--from-code=UTF-8', '--foreign-user',# '--package-name=$PACKAGE',
'--copyright-holder=Jacek Sieka', '--msg...@li...',
'--no-wrap', '--keyword=_', '--keyword=T_', '--keyword=TF_', '--keyword=TFN_:1,2',
- '--keyword=F_', '--boost', '--output=$TARGET', '$SOURCES']
+ '--keyword=F_', '--keyword=gettext_noop', '--keyword=N_', '--boost',
+ '--output=$TARGET', '$SOURCES']
pot_bld = Builder (action = Action([pot_args], 'Extracting messages to $TARGET from $SOURCES'))
env.Append(BUILDERS = {'PotBuild' : pot_bld})
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-01-03 21:59:28 UTC (rev 956)
+++ dcplusplus/trunk/changelog.txt 2008-01-04 09:31:40 UTC (rev 957)
@@ -9,6 +9,7 @@
* Replaced homegrown i18n solution with gettext
* Fixed an issue with nick encodings and nmdc connections (thanks stanislav maslovski)
* Added download view which shows per-file download information
+* Chat timestamps on by default
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
Modified: dcplusplus/trunk/dcpp/SettingsManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/SettingsManager.cpp 2008-01-03 21:59:28 UTC (rev 956)
+++ dcplusplus/trunk/dcpp/SettingsManager.cpp 2008-01-04 09:31:40 UTC (rev 957)
@@ -129,7 +129,7 @@
setDefault(FILTER_MESSAGES, true);
setDefault(MINIMIZE_TRAY, true);
setDefault(AUTO_SEARCH, false);
- setDefault(TIME_STAMPS, false);
+ setDefault(TIME_STAMPS, true);
setDefault(CONFIRM_EXIT, true);
setDefault(POPUP_HUB_PMS, true);
setDefault(POPUP_BOT_PMS, true);
Modified: dcplusplus/trunk/dcpp/StringDefs.h
===================================================================
--- dcplusplus/trunk/dcpp/StringDefs.h 2008-01-03 21:59:28 UTC (rev 956)
+++ dcplusplus/trunk/dcpp/StringDefs.h 2008-01-04 09:31:40 UTC (rev 957)
@@ -434,7 +434,7 @@
SETTINGS_DOWNLOADS, // "Downloads"
SETTINGS_DOWNLOADS_MAX, // "Maximum simultaneous downloads (0 = infinite)"
SETTINGS_DOWNLOADS_SPEED_PAUSE, // "No new downloads if speed exceeds (KiB/s, 0 = disable)"
- SETTINGS_EXAMPLE_TEXT, // "Donate :s! (ok, dirty dollars are fine as well =) (see help menu)"
+ SETTINGS_EXAMPLE_TEXT, // "Donate \342\202\254\342\202\254\342\202\254:s! (ok, dirty dollars are fine as well =) (see help menu)"
SETTINGS_EXTERNAL_IP, // "External / WAN IP"
SETTINGS_FAV_SHOW_JOINS, // "Only show joins / parts for favorite users"
SETTINGS_FAVORITE_DIRS_PAGE, // "Downloads\\Favorites"
Modified: dcplusplus/trunk/dcpp/Text.h
===================================================================
--- dcplusplus/trunk/dcpp/Text.h 2008-01-03 21:59:28 UTC (rev 956)
+++ dcplusplus/trunk/dcpp/Text.h 2008-01-04 09:31:40 UTC (rev 957)
@@ -81,7 +81,7 @@
#ifdef UNICODE
inline const tstring& toT(const string& str, tstring& tmp) throw() { return utf8ToWide(str, tmp); }
inline tstring toT(const string& str) throw() { return utf8ToWide(str); }
-
+
inline const string& fromT(const tstring& str, string& tmp) throw() { return wideToUtf8(str, tmp); }
inline string fromT(const tstring& str) throw() { return wideToUtf8(str); }
#else
Modified: dcplusplus/trunk/win32/FavHubsFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/FavHubsFrame.cpp 2008-01-03 21:59:28 UTC (rev 956)
+++ dcplusplus/trunk/win32/FavHubsFrame.cpp 2008-01-04 09:31:40 UTC (rev 957)
@@ -15,7 +15,7 @@
* 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 "FavHubsFrame.h"
@@ -28,11 +28,16 @@
int FavHubsFrame::columnIndexes[] = { COLUMN_NAME, COLUMN_DESCRIPTION, COLUMN_NICK, COLUMN_PASSWORD, COLUMN_SERVER, COLUMN_USERDESCRIPTION };
int FavHubsFrame::columnSizes[] = { 200, 290, 125, 100, 100, 125 };
-static ResourceManager::Strings columnNames[] = { ResourceManager::AUTO_CONNECT, ResourceManager::DESCRIPTION,
- ResourceManager::NICK, ResourceManager::PASSWORD, ResourceManager::SERVER, ResourceManager::USER_DESCRIPTION
+static const char* columnNames[] = {
+ N_("Auto connect / Name"),
+ N_("Description"),
+ N_("Nick"),
+ N_("Password"),
+ N_("Server"),
+ N_("User Description")
};
-FavHubsFrame::FavHubsFrame(SmartWin::WidgetTabView* mdiParent) :
+FavHubsFrame::FavHubsFrame(SmartWin::WidgetTabView* mdiParent) :
BaseType(mdiParent),
hubs(0),
connect(0),
@@ -50,7 +55,7 @@
hubs = createListView(cs);
addWidget(hubs);
- hubs->createColumns(ResourceManager::getInstance()->getStrings(columnNames));
+ hubs->createColumns(WinUtil::getStrings(columnNames));
hubs->setColumnOrder(WinUtil::splitTokens(SETTING(FAVHUBSFRAME_ORDER), columnIndexes));
hubs->setColumnWidths(WinUtil::splitTokens(SETTING(FAVHUBSFRAME_WIDTHS), columnSizes));
hubs->setColor(WinUtil::textColor, WinUtil::bgColor);
@@ -63,32 +68,32 @@
{
WidgetButton::Seed cs = WinUtil::Seeds::button;
- cs.caption = TSTRING(CONNECT);
+ cs.caption = T_("&Connect");
connect = createButton(cs);
connect->onClicked(std::tr1::bind(&FavHubsFrame::openSelected, this));
addWidget(connect);
- cs.caption = TSTRING(NEW);
+ cs.caption = T_("&New...");
add = createButton(cs);
add->onClicked(std::tr1::bind(&FavHubsFrame::handleAdd, this));
addWidget(add);
- cs.caption = TSTRING(PROPERTIES);
+ cs.caption = T_("&Properties");
properties = createButton(cs);
properties->onClicked(std::tr1::bind(&FavHubsFrame::handleProperties, this));
addWidget(properties);
- cs.caption = TSTRING(MOVE_UP);
+ cs.caption = T_("Move &Up");
up = createButton(cs);
up->onClicked(std::tr1::bind(&FavHubsFrame::handleUp, this));
addWidget(up);
- cs.caption = TSTRING(MOVE_DOWN);
+ cs.caption = T_("Move &Down");
down = createButton(cs);
down->onClicked(std::tr1::bind(&FavHubsFrame::handleDown, this));
addWidget(down);
- cs.caption = TSTRING(REMOVE);
+ cs.caption = T_("&Remove");
remove = createButton(cs);
remove->onClicked(std::tr1::bind(&FavHubsFrame::handleRemove, this));
addWidget(remove);
@@ -105,20 +110,20 @@
FavoriteManager::getInstance()->addListener(this);
hubsMenu = createMenu(true);
- hubsMenu->appendItem(IDC_CONNECT, TSTRING(CONNECT), std::tr1::bind(&FavHubsFrame::openSelected, this));
+ hubsMenu->appendItem(IDC_CONNECT, T_("&Connect"), std::tr1::bind(&FavHubsFrame::openSelected, this));
hubsMenu->appendSeparatorItem();
- hubsMenu->appendItem(IDC_NEWFAV, TSTRING(NEW), std::tr1::bind(&FavHubsFrame::handleAdd, this));
- hubsMenu->appendItem(IDC_EDIT, TSTRING(PROPERTIES), std::tr1::bind(&FavHubsFrame::handleProperties, this));
- hubsMenu->appendItem(IDC_MOVE_UP, TSTRING(MOVE_UP), std::tr1::bind(&FavHubsFrame::handleUp, this));
- hubsMenu->appendItem(IDC_MOVE_DOWN, TSTRING(MOVE_DOWN), std::tr1::bind(&FavHubsFrame::handleDown, this));
+ hubsMenu->appendItem(IDC_NEWFAV, T_("&New..."), std::tr1::bind(&FavHubsFrame::handleAdd, this));
+ hubsMenu->appendItem(IDC_EDIT, T_("&Properties"), std::tr1::bind(&FavHubsFrame::handleProperties, this));
+ hubsMenu->appendItem(IDC_MOVE_UP, T_("Move &Up"), std::tr1::bind(&FavHubsFrame::handleUp, this));
+ hubsMenu->appendItem(IDC_MOVE_DOWN, T_("Move &Down"), std::tr1::bind(&FavHubsFrame::handleDown, this));
hubsMenu->appendSeparatorItem();
- hubsMenu->appendItem(IDC_REMOVE, CTSTRING(REMOVE), std::tr1::bind(&FavHubsFrame::handleRemove, this));
+ hubsMenu->appendItem(IDC_REMOVE, T_("&Remove"), std::tr1::bind(&FavHubsFrame::handleRemove, this));
hubsMenu->setDefaultItem(IDC_CONNECT);
hubs->onContextMenu(std::tr1::bind(&FavHubsFrame::handleContextMenu, this, _1));
}
FavHubsFrame::~FavHubsFrame() {
-
+
}
void FavHubsFrame::layout() {
@@ -171,7 +176,7 @@
while(true) {
if(dlg.run() == IDOK) {
if(FavoriteManager::getInstance()->isFavoriteHub(e.getServer())) {
- createMessageBox().show(TSTRING(FAVORITE_HUB_ALREADY_EXISTS), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONEXCLAMATION);
+ createMessageBox().show(T_("Hub already exists as a favorite"), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONEXCLAMATION);
} else {
FavoriteManager::getInstance()->addFavorite(e);
break;
@@ -235,7 +240,7 @@
}
void FavHubsFrame::handleRemove() {
- if(hubs->hasSelection() && (!BOOLSETTING(CONFIRM_HUB_REMOVAL) || createMessageBox().show(TSTRING(REALLY_REMOVE), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_YESNO, WidgetMessageBox::BOX_ICONQUESTION) == WidgetMessageBox::RETBOX_YES)) {
+ if(hubs->hasSelection() && (!BOOLSETTING(CONFIRM_HUB_REMOVAL) || createMessageBox().show(T_("Really remove?"), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_YESNO, WidgetMessageBox::BOX_ICONQUESTION) == WidgetMessageBox::RETBOX_YES)) {
int i;
while((i = hubs->getNext(-1, LVNI_SELECTED)) != -1)
FavoriteManager::getInstance()->removeFavorite(reinterpret_cast<FavoriteHubEntryPtr>(hubs->getData(i)));
@@ -312,7 +317,7 @@
return;
if(SETTING(NICK).empty()) {
- createMessageBox().show(TSTRING(ENTER_NICK), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONSTOP);
+ createMessageBox().show(T_("Please enter a nickname in the settings dialog!"), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONSTOP);
return;
}
Modified: dcplusplus/trunk/win32/SplashWindow.cpp
===================================================================
--- dcplusplus/trunk/win32/SplashWindow.cpp 2008-01-03 21:59:28 UTC (rev 956)
+++ dcplusplus/trunk/win32/SplashWindow.cpp 2008-01-04 09:31:40 UTC (rev 957)
@@ -74,7 +74,7 @@
tmp->close();
}
-void SplashWindow::operator()(const string& str) {
- text->setText(Text::toT(STRING(LOADING) + "(" + str + ")"));
+void SplashWindow::operator()(const string& status) {
+ text->setText(str(TF_("Loading DC++, please wait... (%1%)") % Text::toT(status) ));
text->updateWidget();
}
Modified: dcplusplus/trunk/win32/WinUtil.h
===================================================================
--- dcplusplus/trunk/win32/WinUtil.h 2008-01-03 21:59:28 UTC (rev 956)
+++ dcplusplus/trunk/win32/WinUtil.h 2008-01-04 09:31:40 UTC (rev 957)
@@ -108,6 +108,16 @@
static std::string toString(const std::vector<int>& tokens);
static void splitTokens(int* array, const string& tokens, int maxItems = -1) throw();
+ template<typename T>
+ static TStringList getStrings(const T& t) {
+ const size_t n = sizeof(t) / sizeof(t[0]);
+ TStringList ret(n);
+ for(size_t i = 0; i < n; ++i) {
+ ret[i] = T_(t[i]);
+ }
+ return ret;
+ }
+
static int getIconIndex(const tstring& aFileName);
static int getDirIconIndex() { return dirIconIndex; }
static int getDirMaskedIndex() { return dirMaskedIndex; }
Modified: dcplusplus/trunk/win32/po/dcpp-win32.pot
===================================================================
--- dcplusplus/trunk/win32/po/dcpp-win32.pot 2008-01-03 21:59:28 UTC (rev 956)
+++ dcplusplus/trunk/win32/po/dcpp-win32.pot 2008-01-04 09:31:40 UTC (rev 957)
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: dcpp-win32\n"
+"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: dcp...@li...\n"
-"POT-Creation-Date: 2008-01-03 22:52+0100\n"
+"POT-Creation-Date: 2008-01-04 10:23+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL...@li...>\n"
@@ -21,6 +21,66 @@
msgid "Downloads"
msgstr ""
+#: win32/FavHubsFrame.cpp:32
+msgid "Auto connect / Name"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:33
+msgid "Description"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:34
+msgid "Nick"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:35
+msgid "Password"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:36
+msgid "Server"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:37
+msgid "User Description"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:71 win32/FavHubsFrame.cpp:113
+msgid "&Connect"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:76 win32/FavHubsFrame.cpp:115
+msgid "&New..."
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:81 win32/FavHubsFrame.cpp:116
+msgid "&Properties"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:86 win32/FavHubsFrame.cpp:117
+msgid "Move &Up"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:91 win32/FavHubsFrame.cpp:118
+msgid "Move &Down"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:96 win32/FavHubsFrame.cpp:120
+msgid "&Remove"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:179
+msgid "Hub already exists as a favorite"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:243
+msgid "Really remove?"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:320
+msgid "Please enter a nickname in the settings dialog!"
+msgstr ""
+
#: win32/DownloadsFrame.cpp:110
msgid "Waiting for slot"
msgstr ""
@@ -37,6 +97,11 @@
msgid "%1%/s"
msgstr ""
+#: win32/SplashWindow.cpp:78
+#, boost-format
+msgid "Loading DC++, please wait... (%1%)"
+msgstr ""
+
#: win32/AppearancePage.cpp:86 win32/AppearancePage.cpp:109
msgid "Default"
msgstr ""
Modified: dcplusplus/trunk/win32/stdafx.h
===================================================================
--- dcplusplus/trunk/win32/stdafx.h 2008-01-03 21:59:28 UTC (rev 956)
+++ dcplusplus/trunk/win32/stdafx.h 2008-01-04 09:31:40 UTC (rev 957)
@@ -47,11 +47,14 @@
#define LOCALEDIR dcpp::Util::getLocalePath().c_str()
#define PACKAGE "dcpp-win32"
#define _(String) gettext(String)
+#define gettext_noop(String) String
+#define N_(String) gettext_noop (String)
#define T_(String) Text::toT(gettext(String))
#ifdef UNICODE
#define TF_(String) boost::wformat(Text::toT(gettext(String)))
#define TFN_(String1,String2, N) boost::wformat(Text::toT(ngettext(String1, String2, N)))
#else
#define TF_(String) boost::format(Text::toT(gettext(String)))
+#define TFN_(String1,String2, N) boost::format(Text::toT(ngettext(String1, String2, N)))
#endif
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zou...@us...> - 2008-01-04 21:02:19
|
Revision: 959
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=959&view=rev
Author: zouzou123gen
Date: 2008-01-04 07:55:23 -0800 (Fri, 04 Jan 2008)
Log Message:
-----------
removed empty po dirs from the repository
Removed Paths:
-------------
dcplusplus/trunk/dcpp/po/
dcplusplus/trunk/win32/po/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arn...@us...> - 2008-01-04 21:03:40
|
Revision: 960
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=960&view=rev
Author: arnetheduck
Date: 2008-01-04 13:03:38 -0800 (Fri, 04 Jan 2008)
Log Message:
-----------
tab drag/drop
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabView.h
dcplusplus/trunk/smartwin/source/widgets/WidgetTabView.cpp
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-01-04 15:55:23 UTC (rev 959)
+++ dcplusplus/trunk/changelog.txt 2008-01-04 21:03:38 UTC (rev 960)
@@ -10,6 +10,7 @@
* Fixed an issue with nick encodings and nmdc connections (thanks stanislav maslovski)
* Added download view which shows per-file download information
* Chat timestamps on by default
+* Added tab drag/drop (thanks poy)
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h 2008-01-04 15:55:23 UTC (rev 959)
+++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h 2008-01-04 21:03:38 UTC (rev 960)
@@ -165,7 +165,9 @@
*/
// the negative values are already covered by throwing an exception
unsigned int addPage( const SmartUtil::tstring & header, unsigned index, LPARAM lParam = 0, int image = -1 );
-
+
+ int getImage(unsigned idx) const;
+
LPARAM getData(unsigned idx);
void setData(unsigned idx, LPARAM data);
@@ -297,6 +299,16 @@
return buffer;
}
+inline int WidgetTabSheet::getImage(unsigned idx) const
+{
+ TCITEM item = { TCIF_IMAGE };
+ if ( !TabCtrl_GetItem( this->handle(), idx, & item ) )
+ {
+ throw xCeption( _T( "Couldn't get image of item." ) );
+ }
+ return item.iImage;
+}
+
inline LPARAM WidgetTabSheet::getData(unsigned idx)
{
TCITEM item = { TCIF_PARAM };
Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabView.h
===================================================================
--- dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabView.h 2008-01-04 15:55:23 UTC (rev 959)
+++ dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabView.h 2008-01-04 21:03:38 UTC (rev 960)
@@ -88,6 +88,7 @@
Rectangle clientSize;
std::vector<IconPtr> icons;
int active;
+ int dragging;
int findTab(WidgetChildWindow* w);
@@ -100,6 +101,8 @@
bool handleTextChanging(WidgetChildWindow* w, const SmartUtil::tstring& newText);
bool handleSized(const WidgetSizedEventResult&);
void handleTabSelected();
+ void handleLeftMouseDown(const MouseEventResult& mouseEventResult);
+ void handleLeftMouseUp(const MouseEventResult& mouseEventResult);
bool handleContextMenu(SmartWin::ScreenCoordinate pt);
void handleMiddleMouseDown(const MouseEventResult& mouseEventResult);
Modified: dcplusplus/trunk/smartwin/source/widgets/WidgetTabView.cpp
===================================================================
--- dcplusplus/trunk/smartwin/source/widgets/WidgetTabView.cpp 2008-01-04 15:55:23 UTC (rev 959)
+++ dcplusplus/trunk/smartwin/source/widgets/WidgetTabView.cpp 2008-01-04 21:03:38 UTC (rev 960)
@@ -16,7 +16,8 @@
PolicyType(w),
tab(0),
inTab(false),
- active(-1)
+ active(-1),
+ dragging(-1)
{ }
void WidgetTabView::create(const Seed & cs) {
@@ -30,6 +31,8 @@
tab->onSelectionChanged(std::tr1::bind(&WidgetTabView::handleTabSelected, this));
onSized(std::tr1::bind(&WidgetTabView::handleSized, this, _1));
+ tab->onLeftMouseDown(std::tr1::bind(&WidgetTabView::handleLeftMouseDown, this, _1));
+ tab->onLeftMouseUp(std::tr1::bind(&WidgetTabView::handleLeftMouseUp, this, _1));
tab->onContextMenu(std::tr1::bind(&WidgetTabView::handleContextMenu, this, _1));
tab->onMiddleMouseDown(std::tr1::bind(&WidgetTabView::handleMiddleMouseDown, this, _1));
}
@@ -269,6 +272,56 @@
return image;
}
+void WidgetTabView::handleLeftMouseDown(const MouseEventResult& mouseEventResult) {
+ int i = tab->hitTest(mouseEventResult.pos);
+ if(i != -1) {
+ if(mouseEventResult.isShiftPressed)
+ getTabInfo(i)->w->close();
+ else {
+ dragging = i;
+ ::SetCapture(tab->handle());
+ }
+ }
+}
+
+void WidgetTabView::handleLeftMouseUp(const MouseEventResult& mouseEventResult) {
+ ::ReleaseCapture();
+
+ if(dragging != -1) {
+ int dropPos = tab->hitTest(mouseEventResult.pos);
+
+ if(dropPos == -1) {
+ // not in the tab control; move the tab to the end
+ dropPos = tab->size() - 1;
+ }
+
+ if(dropPos == dragging) {
+ // the tab hasn't moved; select it
+ setActive(dropPos);
+ dragging = -1;
+ return;
+ }
+
+ // save some information about the tab before we erase it
+ TabInfo* ti = getTabInfo(dragging);
+ int image = tab->getImage(dragging);
+
+ tab->erase(dragging);
+
+ tab->addPage(cutTitle(ti->w->getText()), dropPos, reinterpret_cast<LPARAM>(ti), image);
+
+ // in case the active tab was moved
+ if(dragging == active)
+ active = dropPos;
+ else if(dropPos == active)
+ active = dragging;
+
+ layout();
+
+ dragging = -1;
+ }
+}
+
bool WidgetTabView::handleContextMenu(ScreenCoordinate pt) {
TabInfo* ti = 0;
if(pt.x() == -1 && pt.y() == -1) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arn...@us...> - 2008-01-04 21:04:59
|
Revision: 961
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=961&view=rev
Author: arnetheduck
Date: 2008-01-04 13:04:57 -0800 (Fri, 04 Jan 2008)
Log Message:
-----------
the po's should be there
Added Paths:
-----------
dcplusplus/trunk/dcpp/po/
dcplusplus/trunk/win32/po/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arn...@us...> - 2008-01-15 13:54:49
|
Revision: 965
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=965&view=rev
Author: arnetheduck
Date: 2008-01-15 05:54:45 -0800 (Tue, 15 Jan 2008)
Log Message:
-----------
Some translations, rework bloom filter implementation
Modified Paths:
--------------
dcplusplus/trunk/dcpp/AdcHub.cpp
dcplusplus/trunk/dcpp/HashBloom.cpp
dcplusplus/trunk/dcpp/HashBloom.h
dcplusplus/trunk/dcpp/HashManager.cpp
dcplusplus/trunk/dcpp/HashValue.h
dcplusplus/trunk/dcpp/MerkleTree.h
dcplusplus/trunk/dcpp/QueueManager.cpp
dcplusplus/trunk/dcpp/ShareManager.cpp
dcplusplus/trunk/dcpp/ShareManager.h
dcplusplus/trunk/dcpp/TigerHash.h
dcplusplus/trunk/win32/ADLSProperties.cpp
dcplusplus/trunk/win32/ADLSearchFrame.cpp
dcplusplus/trunk/win32/CommandDlg.cpp
dcplusplus/trunk/win32/DirectoryListingFrame.cpp
dcplusplus/trunk/win32/DownloadsFrame.cpp
dcplusplus/trunk/win32/FavHubProperties.cpp
dcplusplus/trunk/win32/FavoriteDirsPage.cpp
dcplusplus/trunk/win32/FinishedFrameBase.h
dcplusplus/trunk/win32/HashProgressDlg.cpp
dcplusplus/trunk/win32/HubListsDlg.cpp
dcplusplus/trunk/win32/QueueFrame.cpp
dcplusplus/trunk/win32/SearchFrame.cpp
dcplusplus/trunk/win32/SpyFrame.cpp
dcplusplus/trunk/win32/TransferView.cpp
dcplusplus/trunk/win32/UCPage.cpp
dcplusplus/trunk/win32/UsersFrame.cpp
Modified: dcplusplus/trunk/dcpp/AdcHub.cpp
===================================================================
--- dcplusplus/trunk/dcpp/AdcHub.cpp 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/dcpp/AdcHub.cpp 2008-01-15 13:54:45 UTC (rev 965)
@@ -484,26 +484,30 @@
return;
}
const string& type = c.getParam(0);
- string tmp;
- if(type == "blom" && c.getParam("BK", 4, tmp)) {
+ string sk, sh;
+ if(type == "blom" && c.getParam("BK", 4, sk) && c.getParam("BH", 4, sh)) {
ByteVector v;
size_t m = Util::toUInt32(c.getParam(3)) * 8;
- size_t k = Util::toUInt32(tmp);
+ size_t k = Util::toUInt32(sk);
+ size_t h = Util::toUInt32(sh);
if(k > 8 || k < 1) {
send(AdcCommand(AdcCommand::SEV_FATAL, AdcCommand::ERROR_TRANSFER_GENERIC, "Unsupported k"));
return;
}
-
+ if(h > 64 || h < 1) {
+ send(AdcCommand(AdcCommand::SEV_FATAL, AdcCommand::ERROR_TRANSFER_GENERIC, "Unsupported h"));
+ return;
+ }
size_t n = ShareManager::getInstance()->getSharedFiles();
// Ideal size for m is n * k / ln(2), but we allow some slack
- if(m > (5 * n * k / log(2))) {
+ if(m > (5 * n * k / log(2)) || m > (1 << h)) {
send(AdcCommand(AdcCommand::SEV_FATAL, AdcCommand::ERROR_TRANSFER_GENERIC, "Unsupported m"));
return;
}
- ShareManager::getInstance()->getBloom(v, k, m);
+ ShareManager::getInstance()->getBloom(v, k, m, h);
AdcCommand cmd(AdcCommand::CMD_SND, AdcCommand::TYPE_HUB);
cmd.addParam(c.getParam(0));
cmd.addParam(c.getParam(1));
@@ -618,7 +622,7 @@
}
th.update(pwd.data(), pwd.length());
th.update(buf, saltBytes);
- send(AdcCommand(AdcCommand::CMD_PAS, AdcCommand::TYPE_HUB).addParam(Encoder::toBase32(th.finalize(), TigerHash::HASH_SIZE)));
+ send(AdcCommand(AdcCommand::CMD_PAS, AdcCommand::TYPE_HUB).addParam(Encoder::toBase32(th.finalize(), TigerHash::BYTES)));
salt.clear();
}
}
Modified: dcplusplus/trunk/dcpp/HashBloom.cpp
===================================================================
--- dcplusplus/trunk/dcpp/HashBloom.cpp 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/dcpp/HashBloom.cpp 2008-01-15 13:54:45 UTC (rev 965)
@@ -5,8 +5,8 @@
namespace dcpp {
-size_t HashBloom::get_k(size_t n) {
- for(size_t k = TTHValue::SIZE/3; k > 1; --k) {
+size_t HashBloom::get_k(size_t n, size_t h) {
+ for(size_t k = TTHValue::BITS/h; k > 1; --k) {
uint64_t m = get_m(n, k);
if(m >> 24 == 0) {
return k;
@@ -17,7 +17,8 @@
uint64_t HashBloom::get_m(size_t n, size_t k) {
uint64_t m = (static_cast<uint64_t>(ceil(static_cast<double>(n) * k / log(2.))));
- return ((m / 8) + 1) * 8;
+ // 64-bit boundary as per spec
+ return ((m + 63 )/ 64) * 64;
}
void HashBloom::add(const TTHValue& tth) {
@@ -42,19 +43,29 @@
bloom.push_back(v);
}
-void HashBloom::reset(size_t k_, size_t m) {
+void HashBloom::reset(size_t k_, size_t m, size_t h_) {
bloom.resize(m);
k = k_;
+ h = h_;
}
size_t HashBloom::pos(const TTHValue& tth, size_t n) const {
- uint32_t x = 0;
- for(size_t i = n*3; i < TTHValue::SIZE; i += 3*k) {
- x ^= static_cast<uint32_t>(tth.data[i]) << 2*8;
- x ^= static_cast<uint32_t>(tth.data[i+1]) << 8;
- x ^= static_cast<uint32_t>(tth.data[i+2]);
+ uint64_t x = 0;
+
+ size_t start = n * h;
+ if((n+1)*h > TTHValue::BITS) {
+ return 0;
}
+ for(size_t i = 0; i < h; ++i) {
+ size_t bit = start + i;
+ size_t byte = bit / 8;
+ size_t pos = bit % 8;
+
+ if(tth.data[byte] & (1 << pos)) {
+ x |= (1 << i);
+ }
+ }
return x % bloom.size();
}
Modified: dcplusplus/trunk/dcpp/HashBloom.h
===================================================================
--- dcplusplus/trunk/dcpp/HashBloom.h 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/dcpp/HashBloom.h 2008-01-15 13:54:45 UTC (rev 965)
@@ -16,14 +16,16 @@
*/
class HashBloom {
public:
- /** Return the largest k such that get_m returns a value smaller than 2^(TTHValue::SIZE/k) */
- static size_t get_k(size_t n);
+ HashBloom() : k(0), h(0) { }
+
+ /** Return a suitable value for k based on n */
+ static size_t get_k(size_t n, size_t h);
/** Optimal number of bits to allocate for n elements when using k hashes */
static uint64_t get_m(size_t n, size_t k);
void add(const TTHValue& tth);
bool match(const TTHValue& tth) const;
- void reset(size_t k, size_t m);
+ void reset(size_t k, size_t m, size_t h);
void push_back(bool v);
void copy_to(ByteVector& v) const;
@@ -33,6 +35,7 @@
std::vector<bool> bloom;
size_t k;
+ size_t h;
};
}
Modified: dcplusplus/trunk/dcpp/HashManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/HashManager.cpp 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/dcpp/HashManager.cpp 2008-01-15 13:54:45 UTC (rev 965)
@@ -133,13 +133,13 @@
// Check if we should grow the file, we grow by a meg at a time...
int64_t datsz = f.getSize();
- if((pos + (int64_t)(tt.getLeaves().size() * TTHValue::SIZE)) >= datsz) {
+ if((pos + (int64_t)(tt.getLeaves().size() * TTHValue::BYTES)) >= datsz) {
f.setPos(datsz + 1024*1024);
f.setEOF();
}
f.setPos(pos);
dcassert(tt.getLeaves().size() > 1);
- f.write(tt.getLeaves()[0].data, (tt.getLeaves().size() * TTHValue::SIZE));
+ f.write(tt.getLeaves()[0].data, (tt.getLeaves().size() * TTHValue::BYTES));
int64_t p2 = f.getPos();
f.setPos(0);
f.write(&p2, sizeof(p2));
@@ -153,7 +153,7 @@
}
try {
f.setPos(ti.getIndex());
- size_t datalen = TigerTree::calcBlocks(ti.getSize(), ti.getBlockSize()) * TTHValue::SIZE;
+ size_t datalen = TigerTree::calcBlocks(ti.getSize(), ti.getBlockSize()) * TTHValue::BYTES;
AutoArray<uint8_t> buf(datalen);
f.read((uint8_t*)buf, datalen);
tt = TigerTree(ti.getSize(), ti.getBlockSize(), buf);
Modified: dcplusplus/trunk/dcpp/HashValue.h
===================================================================
--- dcplusplus/trunk/dcpp/HashValue.h 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/dcpp/HashValue.h 2008-01-15 13:54:45 UTC (rev 965)
@@ -26,21 +26,22 @@
template<class Hasher>
struct HashValue : FastAlloc<HashValue<Hasher> >{
- static const size_t SIZE = Hasher::HASH_SIZE;
+ static const size_t BITS = Hasher::BITS;
+ static const size_t BYTES = Hasher::BYTES;
HashValue() { }
- explicit HashValue(uint8_t* aData) { memcpy(data, aData, SIZE); }
- explicit HashValue(const std::string& base32) { Encoder::fromBase32(base32.c_str(), data, SIZE); }
- HashValue(const HashValue& rhs) { memcpy(data, rhs.data, SIZE); }
- HashValue& operator=(const HashValue& rhs) { memcpy(data, rhs.data, SIZE); return *this; }
+ explicit HashValue(uint8_t* aData) { memcpy(data, aData, BYTES); }
+ explicit HashValue(const std::string& base32) { Encoder::fromBase32(base32.c_str(), data, BYTES); }
+ HashValue(const HashValue& rhs) { memcpy(data, rhs.data, BYTES); }
+ HashValue& operator=(const HashValue& rhs) { memcpy(data, rhs.data, BYTES); return *this; }
bool operator!=(const HashValue& rhs) const { return !(*this == rhs); }
- bool operator==(const HashValue& rhs) const { return memcmp(data, rhs.data, SIZE) == 0; }
- bool operator<(const HashValue& rhs) const { return memcmp(data, rhs.data, SIZE) < 0; }
+ bool operator==(const HashValue& rhs) const { return memcmp(data, rhs.data, BYTES) == 0; }
+ bool operator<(const HashValue& rhs) const { return memcmp(data, rhs.data, BYTES) < 0; }
- std::string toBase32() const { return Encoder::toBase32(data, SIZE); }
- std::string& toBase32(std::string& tmp) const { return Encoder::toBase32(data, SIZE, tmp); }
+ std::string toBase32() const { return Encoder::toBase32(data, BYTES); }
+ std::string& toBase32(std::string& tmp) const { return Encoder::toBase32(data, BYTES, tmp); }
- uint8_t data[SIZE];
+ uint8_t data[BYTES];
};
} // namespace dcpp
Modified: dcplusplus/trunk/dcpp/MerkleTree.h
===================================================================
--- dcplusplus/trunk/dcpp/MerkleTree.h 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/dcpp/MerkleTree.h 2008-01-15 13:54:45 UTC (rev 965)
@@ -37,8 +37,9 @@
template<class Hasher, size_t baseBlockSize = 1024>
class MerkleTree {
public:
- enum { HASH_SIZE = Hasher::HASH_SIZE };
- enum { BASE_BLOCK_SIZE = baseBlockSize };
+ static const size_t BITS = Hasher::BITS;
+ static const size_t BYTES = Hasher::BYTES;
+ static const size_t BASE_BLOCK_SIZE = baseBlockSize;
typedef HashValue<Hasher> MerkleValue;
typedef vector<MerkleValue> MerkleList;
@@ -57,7 +58,7 @@
{
size_t n = calcBlocks(aFileSize, aBlockSize);
for(size_t i = 0; i < n; i++)
- leaves.push_back(MerkleValue(aData + i * Hasher::HASH_SIZE));
+ leaves.push_back(MerkleValue(aData + i * Hasher::BYTES));
calcRoot();
}
@@ -139,7 +140,7 @@
void setFileSize(int64_t aSize) { fileSize = aSize; }
bool verifyRoot(const uint8_t* aRoot) {
- return memcmp(aRoot, getRoot().data(), HASH_SIZE) == 0;
+ return memcmp(aRoot, getRoot().data(), BYTES) == 0;
}
void calcRoot() {
@@ -147,10 +148,10 @@
}
ByteVector getLeafData() {
- ByteVector buf(getLeaves().size() * HASH_SIZE);
+ ByteVector buf(getLeaves().size() * BYTES);
uint8_t* p = &buf[0];
for(size_t i = 0; i < getLeaves().size(); ++i) {
- memcpy(p + i * HASH_SIZE, &getLeaves()[i], HASH_SIZE);
+ memcpy(p + i * BYTES, &getLeaves()[i], BYTES);
}
return buf;
}
@@ -186,8 +187,8 @@
uint8_t one = 1;
Hasher h;
h.update(&one, 1);
- h.update(a.data, MerkleValue::SIZE);
- h.update(b.data, MerkleValue::SIZE);
+ h.update(a.data, MerkleValue::BYTES);
+ h.update(b.data, MerkleValue::BYTES);
return MerkleValue(h.finalize());
}
Modified: dcplusplus/trunk/dcpp/QueueManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/QueueManager.cpp 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/dcpp/QueueManager.cpp 2008-01-15 13:54:45 UTC (rev 965)
@@ -714,15 +714,15 @@
uint8_t* b = (uint8_t*)xbuf;
while(pos < len) {
size_t left = len - pos;
- if(bufPos == 0 && left >= TigerTree::HASH_SIZE) {
+ if(bufPos == 0 && left >= TigerTree::BYTES) {
tree.getLeaves().push_back(TTHValue(b + pos));
- pos += TigerTree::HASH_SIZE;
+ pos += TigerTree::BYTES;
} else {
- size_t bytes = min(TigerTree::HASH_SIZE - bufPos, left);
+ size_t bytes = min(TigerTree::BYTES - bufPos, left);
memcpy(buf + bufPos, b + pos, bytes);
bufPos += bytes;
pos += bytes;
- if(bufPos == TigerTree::HASH_SIZE) {
+ if(bufPos == TigerTree::BYTES) {
tree.getLeaves().push_back(TTHValue(buf));
bufPos = 0;
}
@@ -736,7 +736,7 @@
}
private:
TigerTree& tree;
- uint8_t buf[TigerTree::HASH_SIZE];
+ uint8_t buf[TigerTree::BYTES];
size_t bufPos;
};
Modified: dcplusplus/trunk/dcpp/ShareManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/ShareManager.cpp 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/dcpp/ShareManager.cpp 2008-01-15 13:54:45 UTC (rev 965)
@@ -832,12 +832,12 @@
return 0;
}
-void ShareManager::getBloom(ByteVector& v, size_t k, size_t m) const {
- dcdebug("Creating bloom filter, k=%u, m=%u\n", k, m);
+void ShareManager::getBloom(ByteVector& v, size_t k, size_t m, size_t h) const {
+ dcdebug("Creating bloom filter, k=%u, m=%u, h=%u\n", k, m, h);
Lock l(cs);
HashBloom bloom;
- bloom.reset(k, m);
+ bloom.reset(k, m, h);
for(HashFileMap::const_iterator i = tthIndex.begin(); i != tthIndex.end(); ++i) {
bloom.add(i->first);
}
Modified: dcplusplus/trunk/dcpp/ShareManager.h
===================================================================
--- dcplusplus/trunk/dcpp/ShareManager.h 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/dcpp/ShareManager.h 2008-01-15 13:54:45 UTC (rev 965)
@@ -81,7 +81,7 @@
string getShareSizeString() const { return Util::toString(getShareSize()); }
string getShareSizeString(const string& aDir) const { return Util::toString(getShareSize(aDir)); }
- void getBloom(ByteVector& v, size_t k, size_t m) const;
+ void getBloom(ByteVector& v, size_t k, size_t m, size_t h) const;
SearchManager::TypeModes getType(const string& fileName) const throw();
Modified: dcplusplus/trunk/dcpp/TigerHash.h
===================================================================
--- dcplusplus/trunk/dcpp/TigerHash.h 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/dcpp/TigerHash.h 2008-01-15 13:54:45 UTC (rev 965)
@@ -24,7 +24,8 @@
class TigerHash {
public:
/** Hash size in bytes */
- enum { HASH_SIZE = 24 };
+ static const size_t BITS = 192;
+ static const size_t BYTES = BITS / 8;
TigerHash() : pos(0) {
res[0]=_ULL(0x0123456789ABCDEF);
Modified: dcplusplus/trunk/win32/ADLSProperties.cpp
===================================================================
--- dcplusplus/trunk/win32/ADLSProperties.cpp 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/win32/ADLSProperties.cpp 2008-01-15 13:54:45 UTC (rev 965)
@@ -46,7 +46,7 @@
bool ADLSProperties::handleInitDialog() {
// Translate dialog
- setText(TSTRING(ADLS_PROPERTIES));
+ setText(T_("ADLSearch Properties"));
::SetDlgItemText(handle(), IDC_ADLSP_SEARCH, CTSTRING(ADLS_SEARCH_STRING));
::SetDlgItemText(handle(), IDC_ADLSP_TYPE, CTSTRING(ADLS_TYPE));
::SetDlgItemText(handle(), IDC_ADLSP_SIZE_MIN, CTSTRING(ADLS_SIZE_MIN));
@@ -59,9 +59,9 @@
searchString->setFocus();
searchType = attachComboBox(IDC_SOURCE_TYPE);
- searchType->addValue(TSTRING(FILENAME));
- searchType->addValue(TSTRING(DIRECTORY));
- searchType->addValue(TSTRING(ADLS_FULL_PATH));
+ searchType->addValue(T_("Filename"));
+ searchType->addValue(T_("Directory"));
+ searchType->addValue(T_("Full Path"));
searchType->setSelectedIndex(search->sourceType);
minSize = attachTextBox(IDC_MIN_FILE_SIZE);
@@ -71,21 +71,21 @@
maxSize->setText((search->maxFileSize > 0) ? Text::toT(Util::toString(search->maxFileSize)) : Util::emptyStringT);
sizeType = attachComboBox(IDC_SIZE_TYPE);
- sizeType->addValue(TSTRING(B));
- sizeType->addValue(TSTRING(KiB));
- sizeType->addValue(TSTRING(MiB));
- sizeType->addValue(TSTRING(GiB));
+ sizeType->addValue(T_("B"));
+ sizeType->addValue(T_("KiB"));
+ sizeType->addValue(T_("MiB"));
+ sizeType->addValue(T_("GiB"));
sizeType->setSelectedIndex(search->typeFileSize);
destDir = attachTextBox(IDC_DEST_DIR);
destDir->setText(Text::toT(search->destDir));
active = attachCheckBox(IDC_IS_ACTIVE);
- active->setText(TSTRING(ADLS_ENABLED));
+ active->setText(T_("Enabled"));
active->setChecked(search->isActive);
autoQueue = attachCheckBox(IDC_AUTOQUEUE);
- autoQueue->setText(TSTRING(ADLS_DOWNLOAD));
+ autoQueue->setText(T_("Download Matches"));
autoQueue->setChecked(search->isAutoQueue);
WidgetButtonPtr button = attachButton(IDOK);
Modified: dcplusplus/trunk/win32/ADLSearchFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-01-15 13:54:45 UTC (rev 965)
@@ -33,7 +33,7 @@
N_("Source Type"),
N_("Destination Directory"),
N_("Min Size"),
- N_("Max Size"),
+ N_("Max Size")
};
ADLSearchFrame::ADLSearchFrame(SmartWin::WidgetTabView* mdiParent) :
Modified: dcplusplus/trunk/win32/CommandDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/CommandDlg.cpp 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/win32/CommandDlg.cpp 2008-01-15 13:54:45 UTC (rev 965)
@@ -61,7 +61,7 @@
bool CommandDlg::handleInitDialog() {
// Translate
- setText(TSTRING(USER_CMD_WINDOW));
+ setText(T_("Create / Modify Command"));
::SetDlgItemText(handle(), IDC_SETTINGS_TYPE, CTSTRING(USER_CMD_TYPE));
::SetDlgItemText(handle(), IDC_SETTINGS_CONTEXT, CTSTRING(USER_CMD_CONTEXT));
::SetDlgItemText(handle(), IDC_SETTINGS_PARAMETERS, CTSTRING(USER_CMD_PARAMETERS));
@@ -72,32 +72,32 @@
::SetDlgItemText(handle(), IDC_USER_CMD_PREVIEW, CTSTRING(USER_CMD_PREVIEW));
separator = attachRadioButton(IDC_SETTINGS_SEPARATOR);
- separator->setText(TSTRING(SEPARATOR));
+ separator->setText(T_("Separator"));
separator->onClicked(std::tr1::bind(&CommandDlg::handleTypeChanged, this));
raw = attachRadioButton(IDC_SETTINGS_RAW);
- raw->setText(TSTRING(USER_CMD_RAW));
+ raw->setText(T_("Raw"));
raw->onClicked(std::tr1::bind(&CommandDlg::handleTypeChanged, this));
chat = attachRadioButton(IDC_SETTINGS_CHAT);
- chat->setText(TSTRING(USER_CMD_CHAT));
+ chat->setText(T_("Chat"));
chat->onClicked(std::tr1::bind(&CommandDlg::handleTypeChanged, this));
PM = attachRadioButton(IDC_SETTINGS_PM);
- PM->setText(TSTRING(USER_CMD_PM));
+ PM->setText(T_("PM"));
PM->onClicked(std::tr1::bind(&CommandDlg::handleTypeChanged, this));
hubMenu = attachCheckBox(IDC_SETTINGS_HUB_MENU);
- hubMenu->setText(TSTRING(USER_CMD_HUB_MENU));
+ hubMenu->setText(T_("Hub Menu"));
userMenu = attachCheckBox(IDC_SETTINGS_USER_MENU);
- userMenu->setText(TSTRING(USER_CMD_USER_MENU));
+ userMenu->setText(T_("User Menu"));
searchMenu = attachCheckBox(IDC_SETTINGS_SEARCH_MENU);
- searchMenu->setText(TSTRING(USER_CMD_SEARCH_MENU));
+ searchMenu->setText(T_("Search Menu"));
fileListMenu = attachCheckBox(IDC_SETTINGS_FILELIST_MENU);
- fileListMenu->setText(TSTRING(USER_CMD_FILELIST_MENU));
+ fileListMenu->setText(T_( "Filelist Menu"));
nameBox = attachTextBox(IDC_NAME);
@@ -110,12 +110,12 @@
nick->onTextChanged(std::tr1::bind(&CommandDlg::updateCommand, this));
once = attachCheckBox(IDC_SETTINGS_ONCE);
- once->setText(TSTRING(USER_CMD_ONCE));
+ once->setText(T_("Send once per nick"));
result = attachTextBox(IDC_RESULT);
openHelp = attachCheckBox(IDC_USER_CMD_OPEN_HELP);
- openHelp->setText(TSTRING(SETTINGS_OPEN_USER_CMD_HELP));
+ openHelp->setText(T_("Always open help file with this dialog"));
bool bOpenHelp = BOOLSETTING(OPEN_USER_CMD_HELP);
openHelp->setChecked(bOpenHelp);
Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-01-15 13:54:45 UTC (rev 965)
@@ -37,7 +37,13 @@
int DirectoryListingFrame::columnIndexes[] = { COLUMN_FILENAME, COLUMN_TYPE, COLUMN_EXACTSIZE, COLUMN_SIZE, COLUMN_TTH };
int DirectoryListingFrame::columnSizes[] = { 300, 60, 100, 100, 200 };
-static ResourceManager::Strings columnNames[] = { ResourceManager::FILE, ResourceManager::TYPE, ResourceManager::EXACT_SIZE, ResourceManager::SIZE, ResourceManager::TTH_ROOT };
+static const char* columnNames[] = {
+ N_("File"),
+ N_("Type"),
+ N_("Exact size"),
+ N_("Size"),
+ N_("TTH Root")
+};
DirectoryListingFrame::UserMap DirectoryListingFrame::lists;
@@ -137,7 +143,7 @@
paned->setSecond(files);
files->setSmallImageList(WinUtil::fileImages);
- files->createColumns(ResourceManager::getInstance()->getStrings(columnNames));
+ files->createColumns(WinUtil::getStrings(columnNames));
files->setColumnOrder(WinUtil::splitTokens(SETTING(QUEUEFRAME_ORDER), columnIndexes));
files->setColumnWidths(WinUtil::splitTokens(SETTING(QUEUEFRAME_WIDTHS), columnSizes));
files->setColor(WinUtil::textColor, WinUtil::bgColor);
@@ -152,19 +158,19 @@
{
WidgetButton::Seed cs = WinUtil::Seeds::button;
- cs.caption = TSTRING(FIND);
+ cs.caption = T_("Find");
find = createButton(cs);
find->onClicked(std::tr1::bind(&DirectoryListingFrame::handleFind, this));
- cs.caption = TSTRING(NEXT);
+ cs.caption = T_("Next");
findNext = createButton(cs);
findNext->onClicked(std::tr1::bind(&DirectoryListingFrame::handleFindNext, this));
- cs.caption = TSTRING(MATCH_QUEUE);
+ cs.caption = T_("Match queue");
matchQueue = createButton(cs);
matchQueue->onClicked(std::tr1::bind(&DirectoryListingFrame::handleMatchQueue, this));
- cs.caption = TSTRING(FILE_LIST_DIFF);
+ cs.caption = T_("Subtract list");
listDiff = createButton(cs);
listDiff->onClicked(std::tr1::bind(&DirectoryListingFrame::handleListDiff, this));
}
@@ -172,12 +178,11 @@
initStatus();
// This will set the widths correctly
- setStatus(STATUS_FILE_LIST_DIFF, TSTRING(FILE_LIST_DIFF));
+ setStatus(STATUS_FILE_LIST_DIFF, T_("Subtract list"));
+ setStatus(STATUS_MATCH_QUEUE, T_("Match queue"));
+ setStatus(STATUS_FIND, T_("Find"));
+ setStatus(STATUS_NEXT, T_("Next"));
- setStatus(STATUS_MATCH_QUEUE, TSTRING(MATCH_QUEUE));
- setStatus(STATUS_FIND, TSTRING(FIND));
- setStatus(STATUS_NEXT, TSTRING(NEXT));
-
files->onRaw(std::tr1::bind(&DirectoryListingFrame::handleXButtonUp, this, _1, _2), SmartWin::Message(WM_XBUTTONUP));
dirs->onRaw(std::tr1::bind(&DirectoryListingFrame::handleXButtonUp, this, _1, _2), SmartWin::Message(WM_XBUTTONUP));
string nick = ClientManager::getInstance()->getNicks(dl->getUser()->getCID())[0];
@@ -304,23 +309,23 @@
DirectoryListingFrame::WidgetMenuPtr DirectoryListingFrame::makeSingleMenu(ItemInfo* ii) {
WidgetMenuPtr menu = createMenu(true);
- menu->appendItem(IDC_DOWNLOAD, TSTRING(DOWNLOAD), std::tr1::bind(&DirectoryListingFrame::handleDownload, this));
+ menu->appendItem(IDC_DOWNLOAD, T_("Download"), std::tr1::bind(&DirectoryListingFrame::handleDownload, this));
addTargets(menu, ii);
if(ii->type == ItemInfo::FILE) {
- menu->appendItem(IDC_VIEW_AS_TEXT, TSTRING(VIEW_AS_TEXT), std::tr1::bind(&DirectoryListingFrame::handleViewAsText, this));
+ menu->appendItem(IDC_VIEW_AS_TEXT, T_("View as text"), std::tr1::bind(&DirectoryListingFrame::handleViewAsText, this));
menu->appendSeparatorItem();
- menu->appendItem(IDC_SEARCH_ALTERNATES, TSTRING(SEARCH_FOR_ALTERNATES), std::tr1::bind(&DirectoryListingFrame::handleSearchAlternates, this));
- menu->appendItem(IDC_BITZI_LOOKUP, TSTRING(LOOKUP_AT_BITZI), std::tr1::bind(&DirectoryListingFrame::handleLookupBitzi, this));
- menu->appendItem(IDC_COPY_MAGNET, TSTRING(COPY_MAGNET), std::tr1::bind(&DirectoryListingFrame::handleCopyMagnet, this));
+ menu->appendItem(IDC_SEARCH_ALTERNATES, T_("Search for alternates"), std::tr1::bind(&DirectoryListingFrame::handleSearchAlternates, this));
+ menu->appendItem(IDC_BITZI_LOOKUP, T_("Lookup TTH at Bitzi.com"), std::tr1::bind(&DirectoryListingFrame::handleLookupBitzi, this));
+ menu->appendItem(IDC_COPY_MAGNET, T_("Copy magnet link to clipboard"), std::tr1::bind(&DirectoryListingFrame::handleCopyMagnet, this));
}
if((ii->type == ItemInfo::FILE && ii->file->getAdls()) ||
(ii->type == ItemInfo::DIRECTORY && ii->dir->getAdls() && ii->dir->getParent() != dl->getRoot()) ) {
menu->appendSeparatorItem();
- menu->appendItem(IDC_GO_TO_DIRECTORY, TSTRING(GO_TO_DIRECTORY), std::tr1::bind(&DirectoryListingFrame::handleGoToDirectory, this));
+ menu->appendItem(IDC_GO_TO_DIRECTORY, T_("Go to directory"), std::tr1::bind(&DirectoryListingFrame::handleGoToDirectory, this));
}
addUserCommands(menu);
@@ -331,7 +336,7 @@
DirectoryListingFrame::WidgetMenuPtr DirectoryListingFrame::makeMultiMenu() {
WidgetMenuPtr menu = createMenu(true);
- menu->appendItem(IDC_DOWNLOAD, TSTRING(DOWNLOAD), std::tr1::bind(&DirectoryListingFrame::handleDownload, this));
+ menu->appendItem(IDC_DOWNLOAD, T_("Download"), std::tr1::bind(&DirectoryListingFrame::handleDownload, this));
addTargets(menu);
addUserCommands(menu);
@@ -343,7 +348,7 @@
DirectoryListingFrame::WidgetMenuPtr DirectoryListingFrame::makeDirMenu() {
WidgetMenuPtr menu = createMenu(true);
- menu->appendItem(IDC_DOWNLOAD, TSTRING(DOWNLOAD), std::tr1::bind(&DirectoryListingFrame::handleDownload, this));
+ menu->appendItem(IDC_DOWNLOAD, T_("Download"), std::tr1::bind(&DirectoryListingFrame::handleDownload, this));
addTargets(menu);
return menu;
}
@@ -353,7 +358,7 @@
}
void DirectoryListingFrame::addTargets(const WidgetMenuPtr& parent, ItemInfo* ii) {
- WidgetMenuPtr menu = parent->appendPopup(TSTRING(DOWNLOAD_TO));
+ WidgetMenuPtr menu = parent->appendPopup(T_("Download to..."));
StringPairList spl = FavoriteManager::getInstance()->getFavoriteDirs();
size_t i = 0;
for(; i < spl.size(); ++i) {
@@ -364,7 +369,7 @@
menu->appendSeparatorItem();
}
- menu->appendItem(IDC_DOWNLOAD_BROWSE, TSTRING(BROWSE), std::tr1::bind(&DirectoryListingFrame::handleDownloadBrowse, this));
+ menu->appendItem(IDC_DOWNLOAD_BROWSE, T_("Browse..."), std::tr1::bind(&DirectoryListingFrame::handleDownloadBrowse, this));
targets.clear();
@@ -709,12 +714,12 @@
if(dl->getUser()->isOnline()) {
try {
QueueManager::getInstance()->addPfs(dl->getUser(), dl->getPath(d));
- setStatus(STATUS_STATUS, TSTRING(DOWNLOADING_LIST));
+ setStatus(STATUS_STATUS, T_("Downloading list..."));
} catch(const QueueException& e) {
setStatus(STATUS_STATUS, Text::toT(e.getError()));
}
} else {
- setStatus(STATUS_STATUS, TSTRING(USER_OFFLINE));
+ setStatus(STATUS_STATUS, T_("User offline"));
}
}
}
@@ -811,7 +816,7 @@
{
if(!findNext) {
// Prompt for substring to find
- LineDlg dlg(this, TSTRING(SEARCH_FOR_FILE), TSTRING(ENTER_SEARCH_STRING));
+ LineDlg dlg(this, T_("Search for file"), T_("Enter search string"));
if(dlg.run() != IDOK)
return;
@@ -874,7 +879,7 @@
}
} else {
dirs->select(oldDir);
- createMessageBox().show(TSTRING(NO_MATCHES), TSTRING(SEARCH_FOR_FILE));
+ createMessageBox().show(T_("No matches"), T_("Search for file"));
}
}
Modified: dcplusplus/trunk/win32/DownloadsFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/DownloadsFrame.cpp 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/win32/DownloadsFrame.cpp 2008-01-15 13:54:45 UTC (rev 965)
@@ -31,8 +31,14 @@
int DownloadsFrame::columnIndexes[] = { COLUMN_FILE, COLUMN_PATH, COLUMN_STATUS, COLUMN_TIMELEFT, COLUMN_SPEED, COLUMN_SIZE };
int DownloadsFrame::columnSizes[] = { 200, 300, 150, 200, 125, 100};
-static ResourceManager::Strings columnNames[] = { ResourceManager::FILENAME, ResourceManager::PATH,
- ResourceManager::STATUS, ResourceManager::TIME_LEFT, ResourceManager::SPEED, ResourceManager::SIZE };
+static const char* columnNames[] = {
+ N_("Filename"),
+ N_("Path"),
+ N_("Status"),
+ N_("Time left"),
+ N_("Speed"),
+ N_("Size")
+};
DownloadsFrame::DownloadsFrame(SmartWin::WidgetTabView* mdiParent) :
BaseType(mdiParent, T_("Downloads")),
@@ -43,7 +49,7 @@
downloads = SmartWin::WidgetCreator<WidgetDownloads>::create(this, WinUtil::Seeds::listView);
addWidget(downloads);
- downloads->createColumns(ResourceManager::getInstance()->getStrings(columnNames));
+ downloads->createColumns(WinUtil::getStrings(columnNames));
downloads->setColumnOrder(WinUtil::splitTokens(SETTING(HUBFRAME_ORDER), columnIndexes));
downloads->setColumnWidths(WinUtil::splitTokens(SETTING(HUBFRAME_WIDTHS), columnSizes));
downloads->setSort(COLUMN_STATUS);
Modified: dcplusplus/trunk/win32/FavHubProperties.cpp
===================================================================
--- dcplusplus/trunk/win32/FavHubProperties.cpp 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/win32/FavHubProperties.cpp 2008-01-15 13:54:45 UTC (rev 965)
@@ -45,7 +45,7 @@
bool FavHubProperties::handleInitDialog() {
// Translate dialog
- setText(TSTRING(FAVORITE_HUB_PROPERTIES));
+ setText(T_("Favorite Hub Properties"));
::SetDlgItemText(handle(), IDC_FH_HUB, CTSTRING(HUB));
::SetDlgItemText(handle(), IDC_FH_IDENT, CTSTRING(FAVORITE_HUB_IDENTITY));
::SetDlgItemText(handle(), IDC_FH_NAME, CTSTRING(HUB_NAME));
@@ -117,7 +117,7 @@
void FavHubProperties::handleOKClicked() {
tstring addressText = address->getText();
if(addressText.empty()) {
- createMessageBox().show(TSTRING(INCOMPLETE_FAV_HUB), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONEXCLAMATION);
+ createMessageBox().show(T_("Hub address cannot be empty."), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONEXCLAMATION);
return;
}
entry->setServer(Text::fromT(addressText));
Modified: dcplusplus/trunk/win32/FavoriteDirsPage.cpp
===================================================================
--- dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-01-10 11:39:01 UTC (rev 964)
+++ dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-01-15 13:54:45 UTC (rev 965)
@@ -45,8 +45,8 @@
directories->setListViewStyle(LVS_EX_LABELTIP | LVS_EX_FULLROWSELECT);
TStringList columns;
- columns.push_back(TSTRING(FAVORITE_DIR_NAME));
- columns.push_back(TSTRING(DIRECTORY));
+ columns.push_back(T_("Favorite name"));
+ columns.push_back(T_("Directory"));
directories->createColumns(columns);
directories->setColumnWidth(0, 100);
directories->setColumnWidth(1, directories->getSize().x - 120);
@@ -117,13 +117,13 @@
int i = -1;
while((i = directories->getNext(i, LVNI_SELECTED)) != -1) {
...
[truncated message content] |
|
From: <arn...@us...> - 2008-01-17 21:49:05
|
Revision: 966
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=966&view=rev
Author: arnetheduck
Date: 2008-01-17 13:48:59 -0800 (Thu, 17 Jan 2008)
Log Message:
-----------
More translations
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/Text.h
dcplusplus/trunk/win32/AboutDlg.cpp
dcplusplus/trunk/win32/DirectoryListingFrame.cpp
dcplusplus/trunk/win32/DownloadsFrame.h
dcplusplus/trunk/win32/FavHubProperties.cpp
dcplusplus/trunk/win32/HubFrame.cpp
dcplusplus/trunk/win32/HubListsDlg.cpp
dcplusplus/trunk/win32/MagnetDlg.cpp
dcplusplus/trunk/win32/MainWindow.cpp
dcplusplus/trunk/win32/PublicHubsFrame.cpp
dcplusplus/trunk/win32/QueueFrame.cpp
dcplusplus/trunk/win32/SearchFrame.cpp
dcplusplus/trunk/win32/SettingsDialog.cpp
dcplusplus/trunk/win32/SplashWindow.cpp
dcplusplus/trunk/win32/TransferView.cpp
dcplusplus/trunk/win32/UploadPage.cpp
dcplusplus/trunk/win32/UserInfoBase.h
dcplusplus/trunk/win32/UsersFrame.cpp
dcplusplus/trunk/win32/WinUtil.cpp
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-01-15 13:54:45 UTC (rev 965)
+++ dcplusplus/trunk/changelog.txt 2008-01-17 21:48:59 UTC (rev 966)
@@ -104,9 +104,9 @@
* [bug 1066] Search for alternates not available on uploads (thanks ullner)
* [bug 1104] Better error message on dupe source (thanks ullner)
* [bug 1132] Download queue updated when users go offline (thanks stephan hohe)
-* [bug 1133] Fixed max tab rows being reset (thanks pothead)
+* [bug 1133] Fixed max tab rows being reset (thanks mikejj)
* [bug 1134] Use SO_REUSEADDR for connection manager socket (thanks mikael eman)
-* [bug 1136] Fixed dupe changelog rebuild (thanks pothead)
+* [bug 1136] Fixed dupe changelog rebuild (thanks mikejj)
* [bug 1139] Fixed download delay in some cases (thanks mikael eman)
* [bug 1144] Added possibility to add many hub lists in one go (use ; as separator) (thanks poy)
* [bug 1152] Only refresh if there are directories shared (thanks ullner)
@@ -188,7 +188,7 @@
-- 0.696 2006-09-22 --
* Fixed a possible deadlock
-* [bug 1058] Removed some whitespace (big thanks to pothead)
+* [bug 1058] Removed some whitespace (big thanks to mikejj)
* Removed the possibility to download files without TTH
* Removed the possibility to read *.DcLst files (no TTH, no i18n support)
* Files with no TTH no longer show up in search and directory listings
@@ -220,13 +220,13 @@
* [bug 1027] Improved unix socket support (thanks steven sheehy)
* [bug 1028] Improved big endian support (thanks steven sheehy)
* [bug 1029] Fixed BSD compile issue (thanks steven sheehy)
-* [bug 1031] Fixed a crash after closing hub window (thanks bigmuscle/pothead)
-* [bug 1032] Fixed certificates help (thanks pothead)
+* [bug 1031] Fixed a crash after closing hub window (thanks bigmuscle/mikejj)
+* [bug 1032] Fixed certificates help (thanks mikejj)
* Added possibility to store configuration files in separate directory
* Switched back to unicows for w9x users, opencow was missing too many functions
* [bug 876] Fixed lost tooltips (thanks poy and bigmuscle)
-* [bug 1041] Fixed about tab order (thanks pothead)
-* [bug 1042] Fixed experts tab order (thanks pothead)
+* [bug 1041] Fixed about tab order (thanks mikejj)
+* [bug 1042] Fixed experts tab order (thanks mikejj)
* [bug 1047] Fixed possible nmdc crash (thanks guitarm)
* [bug 1049] Added tooltip to tab bar (thanks poy)
* [bug 1053] Fixed vista detection (thanks ullner)
@@ -245,7 +245,7 @@
* Added language code to example language xml
-- 0.692 2006-07-09 --
-* [bug 927] Fixed OP detection bug really (thanks pothead)
+* [bug 927] Fixed OP detection bug really (thanks mikejj)
* [bug 938] Added a few more ADC info fields (thanks ullner)
* [bug 939] Fixed hub info update (thanks ullner)
* [bug 940] Fixed a 64-bit compile error (thanks steven sheehy)
@@ -254,10 +254,10 @@
* [bug 944] Fixed unix string conversion bug (thanks tobias nygren)
* [bug 945] Fixed unix mutex initialiser (thanks tobias nygren)
* [bug 946] Tiger hash supports big endian and 64-bit architectures (thanks tobias nygren)
-* [bug 941] Updated usercount display (thanks pothead)
+* [bug 941] Updated usercount display (thanks mikejj)
* [bug 951] Fixed issue with high port numbers (thanks tpo)
* [bug 958] Search spy tth option automagically saved (thanks ullner)
-* [bug 959] Code cleanup (thanks pothead)
+* [bug 959] Code cleanup (thanks mikejj)
* [bug 966] Max hash speed fixed when fast hashing method is not used (thanks steven sheehy)
* [bug 967] Fixed path case-sensitivity issue (thanks steven sheehy)
* Fixed auto-reconnect
@@ -270,8 +270,8 @@
* Fixed a crash bug when hash data cannot be saved
* Possibly fixed issues with queue items not being updated
* Added warning when someone tries to spam hublist.org or dcpp.net with your client
-* [bug 968] Fixed unix compile issue (thanks pothead)
-* [bug 975] Fixed silly warning (thanks pothead)
+* [bug 968] Fixed unix compile issue (thanks mikejj)
+* [bug 975] Fixed silly warning (thanks mikejj)
* [bug 978] Fixed 64-bit compiler issue (thanks steven sheehy)
* [bug 988] Only unique nicks diplayed in title bar
* Added protection from hubs/clients sending junk data resulting in high memory usage / crash
@@ -283,7 +283,7 @@
* [bug 949] Fixed a crash when reading invalid XML files
* TLS port may now be specified in settings and is only opened if TLS is enabled
* Added TLS port to /connection
-* [bug 977] Added copy hub address to hub right-click menu (thanks pothead)
+* [bug 977] Added copy hub address to hub right-click menu (thanks mikejj)
* [bug 1001] Fixed assertion on unix (thanks steven sheehy)
-- 0.691 2006-06-03 --
@@ -294,7 +294,7 @@
* [bug 878] Added close all ... to window menu (thanks trem)
* [bug 903] Holding shift while minimizing will use opposite tray setting (thanks joakim tosteberg)
* [bug 923] PM history always read (thanks trem)
-* [bug 927] Fixed OP detection bug (thanks pothead)
+* [bug 927] Fixed OP detection bug (thanks mikejj)
* [bug 929] Fixed list view flicker issues (thanks trem)
* [bug 931] Improved keyboard navigation (thanks trem)
* Added "all" to hub list field search (thanks trem)
@@ -335,7 +335,7 @@
* [bug 853] Fixed missing function in opencow
-- 0.688 2006-03-18 --
-* Fixed public hubs sorting (thanks pothead)
+* Fixed public hubs sorting (thanks mikejj)
* Fixed a ZPipe issue (thanks jove)
* [bug 858] Fixed a 100% cpu / crash bug
* [bug 872] Fixed a pm issue hopefully
@@ -374,7 +374,7 @@
* Added filelist download speed to filelist browser status bar
* Added advanced hublist filter (thanks trem)
* [bug 579] Fixed 0-byte files not being created if directory doesn't exist
-* [bug 804] Cleaned up project files (thanks pothead)
+* [bug 804] Cleaned up project files (thanks mikejj)
* Socket buffer size = 0 now means use system default
* [bug 789] Fixed wrong nick being copied (thanks ullner)
* [bug 794] [ADC] Fixed automatic reconnect (thanks ullner)
@@ -382,8 +382,8 @@
* Updated to latest ADC specs, this will break 0.68/0.681/0.6811 queue sources and fav users (for NMDC as well)
* Fixed a bufferedsocket crash
* [ADC] Fixed quitting user processing (thanks ullner)
-* Clarified upload speed setting (thanks pothead)
-* Manual away setting no longer cleared when un-minimizing (thanks pothead)
+* Clarified upload speed setting (thanks mikejj)
+* Manual away setting no longer cleared when un-minimizing (thanks mikejj)
* Search result automatching waits with match until file list is downloaded if auto-matching enabled
* Slight performance improvement when sending files
* Fixed an issue with nick names disappearing from hub
@@ -409,7 +409,7 @@
* [bug 484] Added a check for multiple refreshes running at the same time (thanks trem)
* Fixed a few crashes here and there
* Fixed no-slots message not being sent out always
-* Fixed yassl build locations (thanks pothead)
+* Fixed yassl build locations (thanks mikejj)
* Added ip resolve cache when searching (thanks trem)
* [bug 413] Failed file moves are now reported to the system log
@@ -438,8 +438,8 @@
* Updated bzip2 to 1.0.3 (thanks garg)
* Some small *nix fixes (thanks poison)
* Source path no longer saved for TTH enabled clients (saves memory and queue file space)
-* [bug 335] Search window settings saved automatically (thanks pothead)
-* Open folder selects file in explorer (thanks pothead)
+* [bug 335] Search window settings saved automatically (thanks mikejj)
+* Open folder selects file in explorer (thanks mikejj)
* Local echo in pm window formatted as the other side should see it (thanks paka)
* Fixed debug assertion (thanks tpo)
* Dirty tabs settings improved (thanks ullner)
@@ -474,11 +474,11 @@
* Improved hashing error reporting
* Fixed hash database rebuild
* Added /removefav command to remove a favorite hub (thanks ullner)
-* [bug 717] Fixed search combo box (thanks pothead)
+* [bug 717] Fixed search combo box (thanks mikejj)
* Added option to change auto-refresh interval (thanks ullner)
* [bug 740] Removed tab completion option (thanks ullner)
* [bug 743] Added registry key creation failure notification (thanks ullner)
-* [bug 717] Fixed dropdown sizes (thanks pothead)
+* [bug 717] Fixed dropdown sizes (thanks mikejj)
* [bug 760] Fixed list subtraction issue (thanks cologic)
* Added some right-to-left support, but it probably needs more work
* [NMDC] Minislots are no longer given to old DC++ clients (<0.304)
Modified: dcplusplus/trunk/dcpp/Text.h
===================================================================
--- dcplusplus/trunk/dcpp/Text.h 2008-01-15 13:54:45 UTC (rev 965)
+++ dcplusplus/trunk/dcpp/Text.h 2008-01-17 21:48:59 UTC (rev 966)
@@ -132,25 +132,7 @@
}
string toDOS(string tmp);
-
- template<typename T>
- tstring tformat(const tstring& src, T t) {
- tstring ret(src.size() + 64, _T('\0'));
- int n = _sntprintf(&ret[0], ret.size(), src.c_str(), t);
- if(n != -1 && n < static_cast<int>(ret.size())) {
- ret.resize(n);
- }
- return ret;
- }
- template<typename T, typename T2, typename T3>
- tstring tformat(const tstring& src, T t, T2 t2, T3 t3) {
- tstring ret(src.size() + 128, _T('\0'));
- int n = _sntprintf(&ret[0], ret.size(), src.c_str(), t, t2, t3);
- if(n != -1 && n < static_cast<int>(ret.size())) {
- ret.resize(n);
- }
- return ret;
- }
+
}
} // namespace dcpp
Modified: dcplusplus/trunk/win32/AboutDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/AboutDlg.cpp 2008-01-15 13:54:45 UTC (rev 965)
+++ dcplusplus/trunk/win32/AboutDlg.cpp 2008-01-17 21:48:59 UTC (rev 966)
@@ -40,7 +40,7 @@
"theparanoidone, gadget, naga, tremor, joakim tosteberg, pofis, psf8500, lauris ievins, "
"defr, ullner, fleetcommand, liny, xan, olle svensson, mark gillespie, jeremy huddleston, "
"bsod, sulan, jonathan stone, tim burton, izzzo, guitarm, paka, nils maier, jens oknelid, yoji, "
-"krzysztof tyszecki, poison, pothead, pur, bigmuscle, martin, jove, bart vullings, "
+"krzysztof tyszecki, poison, mikejj, pur, bigmuscle, martin, jove, bart vullings, "
"steven sheehy, tobias nygren, poy, dorian, stephan hohe, mafa_45, mikael eman, james ross,"
"stanislav maslovski. "
"Keep it coming!";
Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-01-15 13:54:45 UTC (rev 965)
+++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-01-17 21:48:59 UTC (rev 966)
@@ -258,7 +258,7 @@
void DirectoryListingFrame::handleMatchQueue() {
int matched = QueueManager::getInstance()->matchListing(*dl);
- setStatus(STATUS_STATUS, Text::tformat(TSTRING(MATCHED_FILES), matched));
+ setStatus(STATUS_STATUS, str(TFN_("Matched %1% file", "Matched %1% files", matched) % matched));
}
void DirectoryListingFrame::handleListDiff() {
Modified: dcplusplus/trunk/win32/DownloadsFrame.h
===================================================================
--- dcplusplus/trunk/win32/DownloadsFrame.h 2008-01-15 13:54:45 UTC (rev 965)
+++ dcplusplus/trunk/win32/DownloadsFrame.h 2008-01-17 21:48:59 UTC (rev 966)
@@ -22,7 +22,6 @@
#include <dcpp/DownloadManagerListener.h>
#include <dcpp/QueueManagerListener.h>
#include <dcpp/forward.h>
-#include <dcpp/ResourceManager.h>
#include "TypedListView.h"
#include "StaticFrame.h"
Modified: dcplusplus/trunk/win32/FavHubProperties.cpp
===================================================================
--- dcplusplus/trunk/win32/FavHubProperties.cpp 2008-01-15 13:54:45 UTC (rev 965)
+++ dcplusplus/trunk/win32/FavHubProperties.cpp 2008-01-17 21:48:59 UTC (rev 966)
@@ -117,7 +117,7 @@
void FavHubProperties::handleOKClicked() {
tstring addressText = address->getText();
if(addressText.empty()) {
- createMessageBox().show(T_("Hub address cannot be empty."), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONEXCLAMATION);
+ createMessageBox().show(T_("Hub address cannot be empty"), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONEXCLAMATION);
return;
}
entry->setServer(Text::fromT(addressText));
Modified: dcplusplus/trunk/win32/HubFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/HubFrame.cpp 2008-01-15 13:54:45 UTC (rev 965)
+++ dcplusplus/trunk/win32/HubFrame.cpp 2008-01-17 21:48:59 UTC (rev 966)
@@ -34,8 +34,16 @@
int HubFrame::columnSizes[] = { 100, 75, 75, 100, 75, 100, 100, 125 };
int HubFrame::columnIndexes[] = { COLUMN_NICK, COLUMN_SHARED, COLUMN_DESCRIPTION, COLUMN_TAG, COLUMN_CONNECTION, COLUMN_IP, COLUMN_EMAIL, COLUMN_CID };
-static ResourceManager::Strings columnNames[] = { ResourceManager::NICK, ResourceManager::SHARED,
-ResourceManager::DESCRIPTION, ResourceManager::TAG, ResourceManager::CONNECTION, ResourceManager::IP_BARE, ResourceManager::EMAIL, ResourceManager::CID };
+static const char* columnNames[] = {
+ N_("Nick"),
+ N_("Shared"),
+ N_("Description"),
+ N_("Tag"),
+ N_("Connection"),
+ N_("IP"),
+ N_("E-Mail"),
+ N_("CID")
+};
HubFrame::FrameList HubFrame::frames;
@@ -117,9 +125,9 @@
addWidget(filterType);
for(int j=0; j<COLUMN_LAST; j++) {
- filterType->addValue(TSTRING_I(columnNames[j]));
+ filterType->addValue(T_(columnNames[j]));
}
- filterType->addValue(TSTRING(ANY));
+ filterType->addValue(T_("Any"));
filterType->setSelectedIndex(COLUMN_LAST);
filterType->onSelectionChanged(std::tr1::bind(&HubFrame::updateUserList, this, (UserInfo*)0));
}
@@ -130,7 +138,7 @@
paned->setSecond(users);
users->setSmallImageList(WinUtil::userImages);
- users->createColumns(ResourceManager::getInstance()->getStrings(columnNames));
+ users->createColumns(WinUtil::getStrings(columnNames));
users->setColumnOrder(WinUtil::splitTokens(SETTING(HUBFRAME_ORDER), columnIndexes));
users->setColumnWidths(WinUtil::splitTokens(SETTING(HUBFRAME_WIDTHS), columnSizes));
users->setColor(WinUtil::textColor, WinUtil::bgColor);
@@ -286,16 +294,16 @@
handleFollow();
}
} else {
- addStatus(TSTRING(SPECIFY_SERVER));
+ addStatus(T_("Specify a server to connect to"));
}
} else if(Util::stricmp(cmd.c_str(), _T("clear")) == 0) {
chat->setText(_T(""));
} else if(Util::stricmp(cmd.c_str(), _T("ts")) == 0) {
timeStamps = !timeStamps;
if(timeStamps) {
- addStatus(TSTRING(TIMESTAMPS_ENABLED));
+ addStatus(T_("Timestamps enabled"));
} else {
- addStatus(TSTRING(TIMESTAMPS_DISABLED));
+ addStatus(T_("Timestamps disabled"));
}
} else if( (Util::stricmp(cmd.c_str(), _T("password")) == 0) && waitingForPW ) {
client->setPassword(Text::fromT(param));
@@ -304,16 +312,16 @@
} else if( Util::stricmp(cmd.c_str(), _T("showjoins")) == 0 ) {
showJoins = !showJoins;
if(showJoins) {
- addStatus(TSTRING(JOIN_SHOWING_ON));
+ addStatus(T_("Join/part showing on"));
} else {
- addStatus(TSTRING(JOIN_SHOWING_OFF));
+ addStatus(T_("Join/part showing off"));
}
} else if( Util::stricmp(cmd.c_str(), _T("favshowjoins")) == 0 ) {
favShowJoins = !favShowJoins;
if(favShowJoins) {
- addStatus(TSTRING(FAV_JOIN_SHOWING_ON));
+ addStatus(T_("Join/part of favorite users showing on"));
} else {
- addStatus(TSTRING(FAV_JOIN_SHOWING_OFF));
+ addStatus(T_("Join/part of favorite users showing off"));
}
} else if(Util::stricmp(cmd.c_str(), _T("close")) == 0) {
this->close(true);
@@ -491,7 +499,7 @@
addStatus(Text::toT("*** " + STRING(PARTS) + u.identity.getNick()));
}
} else if(i->first == CONNECTED) {
- addStatus(TSTRING(CONNECTED));
+ addStatus(T_("Connected"));
#ifdef PORT_ME
setTabColor(GREEN);
#endif
@@ -511,7 +519,7 @@
} else if(i->first == GET_PASSWORD) {
if(client->getPassword().size() > 0) {
client->password(client->getPassword());
- addStatus(TSTRING(STORED_PASSWORD_SENT));
+ addStatus(T_("Stored password sent..."));
} else {
if(!BOOLSETTING(PROMPT_PASSWORD)) {
message->setText(_T("/password "));
@@ -519,7 +527,7 @@
message->setSelection(10, 10);
waitingForPW = true;
} else {
- LineDlg linePwd(this, TSTRING(ENTER_PASSWORD), TSTRING(ENTER_PASSWORD), Util::emptyStringT, true);
+ LineDlg linePwd(this, T_("Please enter a password"), T_("Please enter a password"), Util::emptyStringT, true);
if(linePwd.run() == IDOK) {
client->setPassword(Text::fromT(linePwd.getLine()));
client->password(Text::fromT(linePwd.getLine()));
@@ -955,9 +963,9 @@
aEntry.setConnect(false);
aEntry.setNick(client->getMyNick());
FavoriteManager::getInstance()->addFavorite(aEntry);
- addStatus(TSTRING(FAVORITE_HUB_ADDED));
+ addStatus(T_("Favorite hub added"));
} else {
- addStatus(TSTRING(FAVORITE_HUB_ALREADY_EXISTS));
+ addStatus(T_("Hub already exists as a favorite"));
}
}
@@ -965,9 +973,9 @@
FavoriteHubEntry* removeHub = FavoriteManager::getInstance()->getFavoriteHubEntry(client->getHubUrl());
if(removeHub) {
FavoriteManager::getInstance()->removeFavorite(removeHub);
- addStatus(TSTRING(FAVORITE_HUB_REMOVED));
+ addStatus(T_("Favorite hub removed"));
} else {
- addStatus(TSTRING(FAVORITE_HUB_DOES_NOT_EXIST));
+ addStatus(T_("This hub is not a favorite hub"));
}
}
@@ -1151,7 +1159,7 @@
WidgetMenuPtr menu = createMenu(true);
appendUserItems(getParent(), menu);
- menu->appendItem(IDC_COPY_NICK, TSTRING(COPY_NICK), std::tr1::bind(&HubFrame::handleCopyNick, this));
+ menu->appendItem(IDC_COPY_NICK, T_("Copy nick to clipboard"), std::tr1::bind(&HubFrame::handleCopyNick, this));
menu->setDefaultItem(IDC_GETLIST);
prepareMenu(menu, UserCommand::CONTEXT_CHAT, client->getHubUrl());
@@ -1167,15 +1175,15 @@
WidgetMenuPtr menu = createMenu(true);
if(!FavoriteManager::getInstance()->isFavoriteHub(url)) {
- menu->appendItem(IDC_ADD_TO_FAVORITES, TSTRING(ADD_TO_FAVORITES), std::tr1::bind(&HubFrame::addAsFavorite, this));
+ menu->appendItem(IDC_ADD_TO_FAVORITES, T_("Add To Favorites"), std::tr1::bind(&HubFrame::addAsFavorite, this));
}
menu->appendItem(IDC_RECONNECT, TSTRING(MENU_RECONNECT), std::tr1::bind(&HubFrame::handleReconnect, this));
- menu->appendItem(IDC_COPY_HUB, TSTRING(COPY_HUB), std::tr1::bind(&HubFrame::handleCopyHub, this));
+ menu->appendItem(IDC_COPY_HUB, T_("Copy address to clipboard"), std::tr1::bind(&HubFrame::handleCopyHub, this));
prepareMenu(menu, UserCommand::CONTEXT_HUB, url);
menu->appendSeparatorItem();
- menu->appendItem(IDC_CLOSE_WINDOW, TSTRING(CLOSE), std::tr1::bind(&HubFrame::close, this, true));
+ menu->appendItem(IDC_CLOSE_WINDOW, T_("Close"), std::tr1::bind(&HubFrame::close, this, true));
inTabMenu = true;
@@ -1362,7 +1370,7 @@
void HubFrame::handleFollow() {
if(!redirect.empty()) {
if(ClientManager::getInstance()->isConnected(redirect)) {
- addStatus(TSTRING(REDIRECT_ALREADY_CONNECTED));
+ addStatus(T_("Redirect request received to a hub that's already connected"));
return;
}
Modified: dcplusplus/trunk/win32/HubListsDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/HubListsDlg.cpp 2008-01-15 13:54:45 UTC (rev 965)
+++ dcplusplus/trunk/win32/HubListsDlg.cpp 2008-01-17 21:48:59 UTC (rev 966)
@@ -22,7 +22,6 @@
#include "HubListsDlg.h"
-#include <dcpp/ResourceManager.h>
#include <dcpp/FavoriteManager.h>
#include <dcpp/StringTokenizer.h>
#include "HoldRedraw.h"
Modified: dcplusplus/trunk/win32/MagnetDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/MagnetDlg.cpp 2008-01-15 13:54:45 UTC (rev 965)
+++ dcplusplus/trunk/win32/MagnetDlg.cpp 2008-01-17 21:48:59 UTC (rev 966)
@@ -42,7 +42,7 @@
}
bool MagnetDlg::handleInitDialog() {
- setText(TSTRING(MAGNET_DLG_TITLE));
+ setText(T_("MAGNET Link detected"));
::SetDlgItemText(handle(), IDC_MAGNET_TEXT, CTSTRING(MAGNET_DLG_TEXT_GOOD));
::SetDlgItemText(handle(), IDC_MAGNET_HASH, CTSTRING(MAGNET_DLG_HASH));
::SetDlgItemText(handle(), IDC_MAGNET_DISP_HASH, mHash.c_str());
@@ -50,21 +50,21 @@
::SetDlgItemText(handle(), IDC_MAGNET_DISP_NAME, mFileName.c_str());
//queue = attachRadioButton(IDC_MAGNET_1_QUEUE);
- //queue->setText(TSTRING(MAGNET_DLG_QUEUE));
+ //queue->setText(T_("Add this file to your download queue"));
//queue->onClicked(std::tr1::bind(&MagnetDlg::handleRadioButtonClicked, this, queue));
::ShowWindow(::GetDlgItem(handle(), IDC_MAGNET_1_QUEUE), false);
search = attachRadioButton(IDC_MAGNET_2_SEARCH);
- search->setText(TSTRING(MAGNET_DLG_SEARCH));
+ search->setText(T_("Start a search for this file"));
search->setFocus();
//search->onClicked(std::tr1::bind(&MagnetDlg::handleRadioButtonClicked, this, search));
doNothing = attachRadioButton(IDC_MAGNET_3_NOTHING);
- doNothing->setText(TSTRING(MAGNET_DLG_NOTHING));
+ doNothing->setText(T_("Do nothing"));
//doNothing->onClicked(std::tr1::bind(&MagnetDlg::handleRadioButtonClicked, this, doNothing));
//remember = attachCheckBox(IDC_MAGNET_REMEMBER);
- //remember->setText(TSTRING(MAGNET_DLG_REMEMBER));
+ //remember->setText(T_("Do the same action next time without asking"));
::ShowWindow(::GetDlgItem(handle(), IDC_MAGNET_REMEMBER), false);
::CheckRadioButton(handle(), IDC_MAGNET_1_QUEUE, IDC_MAGNET_3_NOTHING, IDC_MAGNET_2_SEARCH);
Modified: dcplusplus/trunk/win32/MainWindow.cpp
===================================================================
--- dcplusplus/trunk/win32/MainWindow.cpp 2008-01-15 13:54:45 UTC (rev 965)
+++ dcplusplus/trunk/win32/MainWindow.cpp 2008-01-17 21:48:59 UTC (rev 966)
@@ -141,7 +141,7 @@
::ShowWindow(handle(), ((cmdShow == SW_SHOWDEFAULT) || (cmdShow == SW_SHOWNORMAL)) ? SETTING(MAIN_WINDOW_STATE) : cmdShow);
if(SmartWin::LibraryLoader::getCommonControlsVersion() < PACK_COMCTL_VERSION(5,80))
- createMessageBox().show(TSTRING(COMCTL_TOO_OLD), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONEXCLAMATION);
+ createMessageBox().show(T_("Your version of windows common controls is too old for DC++ to run correctly, and you will most probably experience problems with the user interface. You should download version 5.80 or higher from the DC++ homepage or from Microsoft directly."), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONEXCLAMATION);
}
void MainWindow::initWindow() {
@@ -181,68 +181,68 @@
WidgetMenuPtr file = mainMenu->appendPopup(CTSTRING(MENU_FILE));
- file->appendItem(IDC_QUICK_CONNECT, TSTRING(MENU_QUICK_CONNECT), std::tr1::bind(&MainWindow::handleQuickConnect, this));
- file->appendItem(IDC_FOLLOW, TSTRING(MENU_FOLLOW_REDIRECT));
- file->appendItem(IDC_RECONNECT, TSTRING(MENU_RECONNECT));
+ file->appendItem(IDC_QUICK_CONNECT, T_("&Quick Connect ...\tCtrl+Q"), std::tr1::bind(&MainWindow::handleQuickConnect, this));
+ file->appendItem(IDC_FOLLOW, T_("Follow last redirec&t\tCtrl+T"));
+ file->appendItem(IDC_RECONNECT, T_("&Reconnect\tCtrl+R"));
file->appendSeparatorItem();
- file->appendItem(IDC_OPEN_FILE_LIST, TSTRING(MENU_OPEN_FILE_LIST), std::tr1::bind(&MainWindow::handleOpenFileList, this));
- file->appendItem(IDC_OPEN_OWN_LIST, TSTRING(MENU_OPEN_OWN_LIST), std::tr1::bind(&MainWindow::handleOpenOwnList, this));
- file->appendItem(IDC_MATCH_ALL, TSTRING(MENU_OPEN_MATCH_ALL), std::tr1::bind(&MainWindow::handleMatchAll, this));
- file->appendItem(IDC_REFRESH_FILE_LIST, TSTRING(MENU_REFRESH_FILE_LIST), std::tr1::bind(&MainWindow::handleRefreshFileList, this));
- file->appendItem(IDC_OPEN_DOWNLOADS, TSTRING(MENU_OPEN_DOWNLOADS_DIR), std::tr1::bind(&MainWindow::handleOpenDownloadsDir, this));
+ file->appendItem(IDC_OPEN_FILE_LIST, T_("Open file list...\tCtrl+L"), std::tr1::bind(&MainWindow::handleOpenFileList, this));
+ file->appendItem(IDC_OPEN_OWN_LIST, T_("Open own list"), std::tr1::bind(&MainWindow::handleOpenOwnList, this));
+ file->appendItem(IDC_MATCH_ALL, T_("Match downloaded lists"), std::tr1::bind(&MainWindow::handleMatchAll, this));
+ file->appendItem(IDC_REFRESH_FILE_LIST, T_("Refresh file list\tCtrl+E"), std::tr1::bind(&MainWindow::handleRefreshFileList, this));
+ file->appendItem(IDC_OPEN_DOWNLOADS, T_("Open downloads directory"), std::tr1::bind(&MainWindow::handleOpenDownloadsDir, this));
file->appendSeparatorItem();
- file->appendItem(IDC_SETTINGS, TSTRING(MENU_SETTINGS), std::tr1::bind(&MainWindow::handleSettings, this));
+ file->appendItem(IDC_SETTINGS, T_("Settings..."), std::tr1::bind(&MainWindow::handleSettings, this));
file->appendSeparatorItem();
- file->appendItem(IDC_EXIT, TSTRING(MENU_EXIT), std::tr1::bind(&MainWindow::handleExit, this));
+ file->appendItem(IDC_EXIT, T_("E&xit"), std::tr1::bind(&MainWindow::handleExit, this));
WidgetMenuPtr view = mainMenu->appendPopup(CTSTRING(MENU_VIEW));
- view->appendItem(IDC_PUBLIC_HUBS, TSTRING(MENU_PUBLIC_HUBS), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
- view->appendItem(IDC_FAVORITE_HUBS, TSTRING(MENU_FAVORITE_HUBS), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
- view->appendItem(IDC_FAVUSERS, TSTRING(MENU_FAVORITE_USERS), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_PUBLIC_HUBS, T_("&Public Hubs\tCtrl+P"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_FAVORITE_HUBS, T_("&Favorite Hubs\tCtrl+F"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_FAVUSERS, T_("Favorite &Users\tCtrl+U"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
view->appendSeparatorItem();
- view->appendItem(IDC_QUEUE, TSTRING(MENU_DOWNLOAD_QUEUE), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
- view->appendItem(IDC_FINISHED_DL, TSTRING(FINISHED_DOWNLOADS), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
- view->appendItem(IDC_WAITING_USERS, TSTRING(WAITING_USERS), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
- view->appendItem(IDC_FINISHED_UL, TSTRING(FINISHED_UPLOADS), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_QUEUE, T_("&Download Queue\tCtrl+D"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_FINISHED_DL, T_("Finished Downloads"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_WAITING_USERS, T_("Waiting Users"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_FINISHED_UL, T_("Finished Uploads"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
view->appendSeparatorItem();
- view->appendItem(IDC_SEARCH, TSTRING(MENU_SEARCH), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
- view->appendItem(IDC_ADL_SEARCH, TSTRING(MENU_ADL_SEARCH), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
- view->appendItem(IDC_SEARCH_SPY, TSTRING(MENU_SEARCH_SPY), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_SEARCH, T_("&Search\tCtrl+S"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_ADL_SEARCH, T_("ADL Search"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_SEARCH_SPY, T_("Search Spy"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
view->appendSeparatorItem();
- view->appendItem(IDC_NOTEPAD, TSTRING(MENU_NOTEPAD), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
- view->appendItem(IDC_SYSTEM_LOG, TSTRING(MENU_SYSTEM_LOG), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
- view->appendItem(IDC_NET_STATS, TSTRING(MENU_NETWORK_STATISTICS), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_NOTEPAD, T_("&Notepad\tCtrl+N"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_SYSTEM_LOG, T_("System Log"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
+ view->appendItem(IDC_NET_STATS, T_("Network Statistics"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
view->appendItem(IDC_DOWNLOADS, T_("Downloads"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
- view->appendItem(IDC_HASH_PROGRESS, TSTRING(MENU_HASH_PROGRESS), std::tr1::bind(&MainWindow::handleHashProgress, this));
+ view->appendItem(IDC_HASH_PROGRESS, T_("Indexing progress"), std::tr1::bind(&MainWindow::handleHashProgress, this));
WidgetMenuPtr window = mainMenu->appendPopup(CTSTRING(MENU_WINDOW));
- window->appendItem(IDC_CLOSE_ALL_DISCONNECTED, TSTRING(MENU_CLOSE_DISCONNECTED), std::tr1::bind(&MainWindow::handleCloseWindows, this, _1));
- window->appendItem(IDC_CLOSE_ALL_PM, TSTRING(MENU_CLOSE_ALL_PM), std::tr1::bind(&MainWindow::handleCloseWindows, this, _1));
- window->appendItem(IDC_CLOSE_ALL_OFFLINE_PM, TSTRING(MENU_CLOSE_ALL_OFFLINE_PM), std::tr1::bind(&MainWindow::handleCloseWindows, this, _1));
- window->appendItem(IDC_CLOSE_ALL_DIR_LIST, TSTRING(MENU_CLOSE_ALL_DIR_LIST), std::tr1::bind(&MainWindow::handleCloseWindows, this, _1));
- window->appendItem(IDC_CLOSE_ALL_SEARCH_FRAME, TSTRING(MENU_CLOSE_...
[truncated message content] |
|
From: <arn...@us...> - 2008-01-19 10:18:36
|
Revision: 967
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=967&view=rev
Author: arnetheduck
Date: 2008-01-19 02:18:34 -0800 (Sat, 19 Jan 2008)
Log Message:
-----------
Translations + redone transferview (unfinished)
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/ADLSearch.h
dcplusplus/trunk/dcpp/QueueManager.cpp
dcplusplus/trunk/dcpp/QueueManager.h
dcplusplus/trunk/win32/ADLSProperties.cpp
dcplusplus/trunk/win32/ADLSearchFrame.cpp
dcplusplus/trunk/win32/AboutDlg.cpp
dcplusplus/trunk/win32/CommandDlg.cpp
dcplusplus/trunk/win32/DirectoryListingFrame.cpp
dcplusplus/trunk/win32/FavHubProperties.cpp
dcplusplus/trunk/win32/FinishedFrameBase.h
dcplusplus/trunk/win32/HashProgressDlg.cpp
dcplusplus/trunk/win32/HubFrame.cpp
dcplusplus/trunk/win32/MagnetDlg.cpp
dcplusplus/trunk/win32/MainWindow.cpp
dcplusplus/trunk/win32/PublicHubsFrame.cpp
dcplusplus/trunk/win32/QueueFrame.cpp
dcplusplus/trunk/win32/SearchFrame.cpp
dcplusplus/trunk/win32/SpyFrame.cpp
dcplusplus/trunk/win32/TransferView.cpp
dcplusplus/trunk/win32/TransferView.h
dcplusplus/trunk/win32/WinUtil.cpp
dcplusplus/trunk/win32/stdafx.h
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/changelog.txt 2008-01-19 10:18:34 UTC (rev 967)
@@ -6,12 +6,14 @@
* [ADC] Searches filtered by token if available so that each search window only gets its own results
* [ADC] Implemented test version of bloom filters which will dramatically reduce hub bandwidth usage for TTH searches
* Fixed a crash with partial list browsing
-* Replaced homegrown i18n solution with gettext
+* Replaced homegrown i18n solution with gettext (thanks david grundberg, mikejj)
* Fixed an issue with nick encodings and nmdc connections (thanks stanislav maslovski)
* Added download view which shows per-file download information
* Chat timestamps on by default
* Added tab drag/drop (thanks poy)
+* Changed Pothead to mikejj
+
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
* Use system header arrows on common controls 6+ (thanks poy)
Modified: dcplusplus/trunk/dcpp/ADLSearch.h
===================================================================
--- dcplusplus/trunk/dcpp/ADLSearch.h 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/dcpp/ADLSearch.h 2008-01-19 10:18:34 UTC (rev 967)
@@ -110,26 +110,20 @@
}
}
- tstring SourceTypeToDisplayString(SourceType t) {
- switch(t) {
- default:
- case OnlyFile: return TSTRING(FILENAME);
- case OnlyDirectory: return TSTRING(DIRECTORY);
- case FullPath: return TSTRING(ADLS_FULL_PATH);
- }
- }
-
// Maximum & minimum file sizes (in bytes).
// Negative values means do not check.
int64_t minFileSize;
int64_t maxFileSize;
+
enum SizeType {
SizeBytes = TypeFirst,
SizeKibiBytes,
SizeMebiBytes,
SizeGibiBytes
};
+
SizeType typeFileSize;
+
SizeType StringToSizeType(const string& s) {
if(Util::stricmp(s.c_str(), "B") == 0) {
return SizeBytes;
@@ -143,6 +137,7 @@
return SizeBytes;
}
}
+
string SizeTypeToString(SizeType t) {
switch(t) {
default:
@@ -152,15 +147,7 @@
case SizeGibiBytes: return "GiB";
}
}
- tstring SizeTypeToDisplayString(SizeType t) {
- switch(t) {
- default:
- case SizeBytes: return CTSTRING(B);
- case SizeKibiBytes: return CTSTRING(KiB);
- case SizeMebiBytes: return CTSTRING(MiB);
- case SizeGibiBytes: return CTSTRING(GiB);
- }
- }
+
int64_t GetSizeBase() {
switch(typeFileSize) {
default:
Modified: dcplusplus/trunk/dcpp/QueueManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/QueueManager.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/dcpp/QueueManager.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -253,6 +253,25 @@
add(qi);
}
+int64_t QueueManager::UserQueue::getQueued(const UserPtr& aUser) const {
+ int64_t total = 0;
+ for(size_t i = 0; i < QueueItem::LAST; ++i) {
+ const QueueItem::UserListMap& ulm = userQueue[i];
+ QueueItem::UserListMap::const_iterator iulm = ulm.find(aUser);
+ if(iulm == ulm.end()) {
+ continue;
+ }
+
+ for(QueueItem::List::const_iterator j = iulm->second.begin(); j != iulm->second.end(); ++j) {
+ const QueueItem::Ptr qi = *j;
+ if(qi->getSize() != -1) {
+ total += qi->getSize() - qi->getDownloadedBytes();
+ }
+ }
+ }
+ return total;
+}
+
QueueItem* QueueManager::UserQueue::getRunning(const UserPtr& aUser) {
QueueItem::UserIter i = running.find(aUser);
return (i == running.end()) ? 0 : i->second;
@@ -1061,6 +1080,11 @@
}
}
+int64_t QueueManager::getQueued(const UserPtr& aUser) const {
+ Lock l(cs);
+ return userQueue.getQueued(aUser);
+}
+
void QueueManager::removeSource(const UserPtr& aUser, int reason) throw() {
bool isRunning = false;
string removeRunning;
Modified: dcplusplus/trunk/dcpp/QueueManager.h
===================================================================
--- dcplusplus/trunk/dcpp/QueueManager.h 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/dcpp/QueueManager.h 2008-01-19 10:18:34 UTC (rev 967)
@@ -108,6 +108,8 @@
void putDownload(Download* aDownload, bool finished) throw();
void setFile(Download* download);
+ int64_t getQueued(const UserPtr& aUser) const;
+
/** @return The highest priority download the user has, PAUSED may also mean no downloads */
QueueItem::Priority hasDownload(const UserPtr& aUser) throw();
@@ -187,6 +189,7 @@
bool isRunning(const UserPtr& aUser) const {
return (running.find(aUser) != running.end());
}
+ int64_t getQueued(const UserPtr& aUser) const;
private:
/** QueueItems by priority and user (this is where the download order is determined) */
QueueItem::UserListMap userQueue[QueueItem::LAST];
Modified: dcplusplus/trunk/win32/ADLSProperties.cpp
===================================================================
--- dcplusplus/trunk/win32/ADLSProperties.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/ADLSProperties.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -47,12 +47,12 @@
bool ADLSProperties::handleInitDialog() {
// Translate dialog
setText(T_("ADLSearch Properties"));
- ::SetDlgItemText(handle(), IDC_ADLSP_SEARCH, CTSTRING(ADLS_SEARCH_STRING));
- ::SetDlgItemText(handle(), IDC_ADLSP_TYPE, CTSTRING(ADLS_TYPE));
- ::SetDlgItemText(handle(), IDC_ADLSP_SIZE_MIN, CTSTRING(ADLS_SIZE_MIN));
- ::SetDlgItemText(handle(), IDC_ADLSP_SIZE_MAX, CTSTRING(ADLS_SIZE_MAX));
- ::SetDlgItemText(handle(), IDC_ADLSP_UNITS, CTSTRING(ADLS_UNITS));
- ::SetDlgItemText(handle(), IDC_ADLSP_DESTINATION, CTSTRING(ADLS_DESTINATION));
+ ::SetDlgItemText(handle(), IDC_ADLSP_SEARCH, CT_("Search String"));
+ ::SetDlgItemText(handle(), IDC_ADLSP_TYPE, CT_("Search Type"));
+ ::SetDlgItemText(handle(), IDC_ADLSP_SIZE_MIN, CT_("Min FileSize"));
+ ::SetDlgItemText(handle(), IDC_ADLSP_SIZE_MAX, CT_("Max FileSize"));
+ ::SetDlgItemText(handle(), IDC_ADLSP_UNITS, CT_("Size Type"));
+ ::SetDlgItemText(handle(), IDC_ADLSP_DESTINATION, CT_("Destination Directory"));
searchString = attachTextBox(IDC_SEARCH_STRING);
searchString->setText(Text::toT(search->searchString));
@@ -109,11 +109,11 @@
search->sourceType = (ADLSearch::SourceType)searchType->getSelectedIndex();
tstring minFileSize = minSize->getText();
-
search->minFileSize = minFileSize.empty() ? -1 : Util::toInt64(Text::fromT(minFileSize));
+
tstring maxFileSize = maxSize->getText();
-
search->maxFileSize = maxFileSize.empty() ? -1 : Util::toInt64(Text::fromT(maxFileSize));
+
search->typeFileSize = (ADLSearch::SizeType)sizeType->getSelectedIndex();
search->destDir = Text::fromT(destDir->getText());
Modified: dcplusplus/trunk/win32/ADLSearchFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -305,10 +305,10 @@
void ADLSearchFrame::addEntry(ADLSearch& search, int index) {
TStringList l;
l.push_back(Text::toT(search.searchString));
- l.push_back(search.SourceTypeToDisplayString(search.sourceType));
+ l.push_back(Text::toT(search.SourceTypeToString(search.sourceType)));
l.push_back(Text::toT(search.destDir));
- l.push_back((search.minFileSize >= 0) ? Text::toT(Util::toString(search.minFileSize)) + _T(" ") + search.SizeTypeToDisplayString(search.typeFileSize) : Util::emptyStringT);
- l.push_back((search.maxFileSize >= 0) ? Text::toT(Util::toString(search.maxFileSize)) + _T(" ") + search.SizeTypeToDisplayString(search.typeFileSize) : Util::emptyStringT);
+ l.push_back((search.minFileSize >= 0) ? Text::toT(Util::toString(search.minFileSize)) + _T(" ") + Text::toT(search.SizeTypeToString(search.typeFileSize)) : Util::emptyStringT);
+ l.push_back((search.maxFileSize >= 0) ? Text::toT(Util::toString(search.maxFileSize)) + _T(" ") + Text::toT(search.SizeTypeToString(search.typeFileSize)) : Util::emptyStringT);
int itemCount = items->insert(l, 0, index);
if(index == -1)
index = itemCount;
Modified: dcplusplus/trunk/win32/AboutDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/AboutDlg.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/AboutDlg.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -42,7 +42,7 @@
"bsod, sulan, jonathan stone, tim burton, izzzo, guitarm, paka, nils maier, jens oknelid, yoji, "
"krzysztof tyszecki, poison, mikejj, pur, bigmuscle, martin, jove, bart vullings, "
"steven sheehy, tobias nygren, poy, dorian, stephan hohe, mafa_45, mikael eman, james ross,"
-"stanislav maslovski. "
+"stanislav maslovski, david grundberg. "
"Keep it coming!";
AboutDlg::AboutDlg(SmartWin::Widget* parent) : SmartWin::WidgetFactory<SmartWin::WidgetModalDialog>(parent) {
@@ -63,7 +63,7 @@
sprintf(buf, "Ratio (up/down): %.2f", ((double)SETTING(TOTAL_UPLOAD)) / ((double)SETTING(TOTAL_DOWNLOAD)));
setItemText(IDC_RATIO, Text::toT(buf));
}
- setItemText(IDC_LATEST, CTSTRING(DOWNLOADING));
+ setItemText(IDC_LATEST, T_("Downloading..."));
attachButton(IDOK)->onClicked(std::tr1::bind(&AboutDlg::endDialog, this, IDOK));
Modified: dcplusplus/trunk/win32/CommandDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/CommandDlg.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/CommandDlg.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -62,14 +62,14 @@
bool CommandDlg::handleInitDialog() {
// Translate
setText(T_("Create / Modify Command"));
- ::SetDlgItemText(handle(), IDC_SETTINGS_TYPE, CTSTRING(USER_CMD_TYPE));
- ::SetDlgItemText(handle(), IDC_SETTINGS_CONTEXT, CTSTRING(USER_CMD_CONTEXT));
- ::SetDlgItemText(handle(), IDC_SETTINGS_PARAMETERS, CTSTRING(USER_CMD_PARAMETERS));
- ::SetDlgItemText(handle(), IDC_SETTINGS_NAME, CTSTRING(HUB_NAME));
- ::SetDlgItemText(handle(), IDC_SETTINGS_COMMAND, CTSTRING(USER_CMD_COMMAND));
- ::SetDlgItemText(handle(), IDC_SETTINGS_HUB, CTSTRING(USER_CMD_HUB));
- ::SetDlgItemText(handle(), IDC_SETTINGS_TO, CTSTRING(USER_CMD_TO));
- ::SetDlgItemText(handle(), IDC_USER_CMD_PREVIEW, CTSTRING(USER_CMD_PREVIEW));
+ ::SetDlgItemText(handle(), IDC_SETTINGS_TYPE, CT_("Command Type"));
+ ::SetDlgItemText(handle(), IDC_SETTINGS_CONTEXT, CT_("Context"));
+ ::SetDlgItemText(handle(), IDC_SETTINGS_PARAMETERS, CT_("Parameters"));
+ ::SetDlgItemText(handle(), IDC_SETTINGS_NAME, CT_("Name"));
+ ::SetDlgItemText(handle(), IDC_SETTINGS_COMMAND, CT_("Command"));
+ ::SetDlgItemText(handle(), IDC_SETTINGS_HUB, CT_("Hub IP / DNS (empty = all, 'op' = where operator)"));
+ ::SetDlgItemText(handle(), IDC_SETTINGS_TO, CT_("To"));
+ ::SetDlgItemText(handle(), IDC_USER_CMD_PREVIEW, CT_("Text sent to hub"));
separator = attachRadioButton(IDC_SETTINGS_SEPARATOR);
separator->setText(T_("Separator"));
Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -655,9 +655,9 @@
}
void DirectoryListingFrame::initStatusText() {
- setStatus(STATUS_TOTAL_FILES, Text::toT(STRING(FILES) + ": " + Util::toString(dl->getTotalFileCount(true))));
- setStatus(STATUS_TOTAL_SIZE, Text::toT(STRING(SIZE) + ": " + Util::formatBytes(dl->getTotalSize(true))));
- setStatus(STATUS_SPEED, Text::toT(STRING(SPEED) + ": " + Util::formatBytes(speed) + "/s"));
+ setStatus(STATUS_TOTAL_FILES, str(TF_("Files: %1%") % dl->getTotalFileCount(true)));
+ setStatus(STATUS_TOTAL_SIZE, str(TF_("Size: %1%") % Text::toT(Util::formatBytes(dl->getTotalSize(true)))));
+ setStatus(STATUS_SPEED, str(TF_("Speed: %1%/s") % Text::toT(Util::formatBytes(speed))));
}
void DirectoryListingFrame::updateStatus() {
@@ -671,9 +671,9 @@
total = files->forEachSelectedT(ItemInfo::TotalSize()).total;
}
- setStatus(STATUS_SELECTED_FILES, Text::toT(STRING(ITEMS) + ": " + Util::toString(cnt)));
+ setStatus(STATUS_SELECTED_FILES, str(TF_("Files: %1%") % cnt));
- setStatus(STATUS_SELECTED_SIZE, Text::toT(STRING(SIZE) + ": " + Util::formatBytes(total)));
+ setStatus(STATUS_SELECTED_SIZE, str(TF_("Size: %1%") % Text::toT(Util::formatBytes(total))));
}
}
Modified: dcplusplus/trunk/win32/FavHubProperties.cpp
===================================================================
--- dcplusplus/trunk/win32/FavHubProperties.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/FavHubProperties.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -46,14 +46,14 @@
bool FavHubProperties::handleInitDialog() {
// Translate dialog
setText(T_("Favorite Hub Properties"));
- ::SetDlgItemText(handle(), IDC_FH_HUB, CTSTRING(HUB));
- ::SetDlgItemText(handle(), IDC_FH_IDENT, CTSTRING(FAVORITE_HUB_IDENTITY));
- ::SetDlgItemText(handle(), IDC_FH_NAME, CTSTRING(HUB_NAME));
- ::SetDlgItemText(handle(), IDC_FH_ADDRESS, CTSTRING(HUB_ADDRESS));
- ::SetDlgItemText(handle(), IDC_FH_HUB_DESC, CTSTRING(DESCRIPTION));
- ::SetDlgItemText(handle(), IDC_FH_NICK, CTSTRING(NICK));
- ::SetDlgItemText(handle(), IDC_FH_PASSWORD, CTSTRING(PASSWORD));
- ::SetDlgItemText(handle(), IDC_FH_USER_DESC, CTSTRING(DESCRIPTION));
+ ::SetDlgItemText(handle(), IDC_FH_HUB, CT_("Hub"));
+ ::SetDlgItemText(handle(), IDC_FH_IDENT, CT_("Identification (leave blank for defaults)"));
+ ::SetDlgItemText(handle(), IDC_FH_NAME, CT_("Name"));
+ ::SetDlgItemText(handle(), IDC_FH_ADDRESS, CT_("Address"));
+ ::SetDlgItemText(handle(), IDC_FH_HUB_DESC, CT_("Description"));
+ ::SetDlgItemText(handle(), IDC_FH_NICK, CT_("Nick"));
+ ::SetDlgItemText(handle(), IDC_FH_PASSWORD, CT_("Password"));
+ ::SetDlgItemText(handle(), IDC_FH_USER_DESC, CT_("Description"));
name = attachTextBox(IDC_HUBNAME);
name->setText(Text::toT(entry->getName()));
Modified: dcplusplus/trunk/win32/FinishedFrameBase.h
===================================================================
--- dcplusplus/trunk/win32/FinishedFrameBase.h 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/FinishedFrameBase.h 2008-01-19 10:18:34 UTC (rev 967)
@@ -276,9 +276,9 @@
}
void updateStatus() {
- setStatus(STATUS_COUNT, Text::toT(Util::toString(items->size()) + ' ' + STRING(ITEMS)));
+ setStatus(STATUS_COUNT, str(TFN_("%1% item", "%1% items", items->size()) % items->size()));
setStatus(STATUS_BYTES, Text::toT(Util::formatBytes(totalBytes)));
- setStatus(STATUS_SPEED, Text::toT(Util::formatBytes((totalTime > 0) ? totalBytes * ((int64_t)1000) / totalTime : 0) + "/s"));
+ setStatus(STATUS_SPEED, str(TF_("%1%/s") % Text::toT(Util::formatBytes((totalTime > 0) ? totalBytes * ((int64_t)1000) / totalTime : 0))));
}
void updateList(const FinishedItemList& fl) {
Modified: dcplusplus/trunk/win32/HashProgressDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/HashProgressDlg.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/HashProgressDlg.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -39,8 +39,8 @@
bool HashProgressDlg::handleInitDialog() {
setText(T_("Creating file index..."));
- ::SetDlgItemText(handle(), IDC_HASH_INDEXING, CTSTRING(HASH_PROGRESS_TEXT));
- ::SetDlgItemText(handle(), IDC_STATISTICS, CTSTRING(HASH_PROGRESS_STATS));
+ ::SetDlgItemText(handle(), IDC_HASH_INDEXING, CT_("Please wait while DC++ indexes your files (they won't be shared until they've been indexed)..."));
+ ::SetDlgItemText(handle(), IDC_STATISTICS, CT_("Statistics"));
progress = attachProgressBar(IDC_HASH_PROGRESS);
progress->setRange(0, 10000);
@@ -103,7 +103,7 @@
}
if(files == 0) {
- ::SetDlgItemText(handle(), IDC_CURRENT_FILE, CTSTRING(DONE));
+ ::SetDlgItemText(handle(), IDC_CURRENT_FILE, CT_("Done"));
} else {
::SetDlgItemText(handle(), IDC_CURRENT_FILE, Text::toT(file).c_str());
}
Modified: dcplusplus/trunk/win32/HubFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/HubFrame.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/HubFrame.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -328,12 +328,11 @@
} else if(Util::stricmp(cmd.c_str(), _T("userlist")) == 0) {
showUsers->setChecked(!showUsers->getChecked());
} else if(Util::stricmp(cmd.c_str(), _T("connection")) == 0) {
- addStatus(Text::toT((STRING(IP) + client->getLocalIp() + ", " +
- STRING(PORT) +
- Util::toString(ConnectionManager::getInstance()->getPort()) + "/" +
- Util::toString(SearchManager::getInstance()->getPort()) + "/" +
- Util::toString(ConnectionManager::getInstance()->getSecurePort())
- )));
+ addStatus(str(TF_("IP: %1%, Port: %2%/%3%/%4%") % Text::toT(client->getLocalIp())
+ % ConnectionManager::getInstance()->getPort()
+ % SearchManager::getInstance()->getPort()
+ % ConnectionManager::getInstance()->getSecurePort()
+ ));
} else if((Util::stricmp(cmd.c_str(), _T("favorite")) == 0) || (Util::stricmp(cmd.c_str(), _T("fav")) == 0)) {
addAsFavorite();
} else if((Util::stricmp(cmd.c_str(), _T("removefavorite")) == 0) || (Util::stricmp(cmd.c_str(), _T("removefav")) == 0)) {
@@ -379,12 +378,12 @@
if (BOOLSETTING(SEND_UNKNOWN_COMMANDS)) {
client->hubMessage(Text::fromT(s));
} else {
- addStatus(TSTRING(UNKNOWN_COMMAND) + cmd);
+ addStatus(str(TF_("Unknown command: %1%") % cmd));
}
}
message->setText(_T(""));
} else if(waitingForPW) {
- addStatus(TSTRING(DONT_REMOVE_SLASH_PASSWORD));
+ addStatus(T_("Don't remove /password before your password"));
message->setText(_T("/password "));
message->setFocus();
message->setSelection(10, 10);
@@ -489,14 +488,14 @@
UserTask& u = *static_cast<UserTask*>(i->second);
if(updateUser(u)) {
if (showJoins || (favShowJoins && FavoriteManager::getInstance()->isFavoriteUser(u.user))) {
- addStatus(_T("*** ") + TSTRING(JOINS) + Text::toT(u.identity.getNick()));
+ addStatus(str(TF_("*** Joins: %1%") % Text::toT(u.identity.getNick())));
}
}
} else if(i->first == REMOVE_USER) {
UserTask& u = *static_cast<UserTask*>(i->second);
removeUser(u.user);
if (showJoins || (favShowJoins && FavoriteManager::getInstance()->isFavoriteUser(u.user))) {
- addStatus(Text::toT("*** " + STRING(PARTS) + u.identity.getNick()));
+ addStatus(str(TF_("*** Parts: %1%") % Text::toT(u.identity.getNick())));
}
} else if(i->first == CONNECTED) {
addStatus(T_("Connected"));
@@ -541,25 +540,25 @@
PMTask& pm = *static_cast<PMTask*>(i->second);
if(pm.hub) {
if(BOOLSETTING(IGNORE_HUB_PMS)) {
- addStatus(TSTRING(IGNORED_MESSAGE) + Text::toT(pm.str), false);
+ addStatus(str(TF_("Ignored message: %1%") % Text::toT(pm.str)), false);
} else if(BOOLSETTING(POPUP_HUB_PMS) || PrivateFrame::isOpen(pm.replyTo)) {
PrivateFrame::gotMessage(getParent(), pm.from, pm.to, pm.replyTo, Text::toT(pm.str));
} else {
- addChat(TSTRING(PRIVATE_MESSAGE_FROM) + getNick(pm.from) + _T(": ") + Text::toT(pm.str));
+ addChat(str(TF_("Private message from %1%: %2%") % getNick(pm.from) % Text::toT(pm.str)));
}
} else if(pm.bot) {
if(BOOLSETTING(IGNORE_BOT_PMS)) {
- addStatus(TSTRING(IGNORED_MESSAGE) + Text::toT(pm.str), false);
+ addStatus(str(TF_("Ignored message: %1%") % Text::toT(pm.str)), false);
} else if(BOOLSETTING(POPUP_BOT_PMS) || PrivateFrame::isOpen(pm.replyTo)) {
PrivateFrame::gotMessage(getParent(), pm.from, pm.to, pm.replyTo, Text::toT(pm.str));
} else {
- addChat(TSTRING(PRIVATE_MESSAGE_FROM) + getNick(pm.from) + _T(": ") + Text::toT(pm.str));
+ addChat(str(TF_("Private message from %1%: %2%") % getNick(pm.from) % Text::toT(pm.str)));
}
} else {
if(BOOLSETTING(POPUP_PMS) || PrivateFrame::isOpen(pm.replyTo) || pm.from == client->getMyIdentity().getUser()) {
PrivateFrame::gotMessage(getParent(), pm.from, pm.to, pm.replyTo, Text::toT(pm.str));
} else {
- addChat(TSTRING(PRIVATE_MESSAGE_FROM) + getNick(pm.from) + _T(": ") + Text::toT(pm.str));
+ addChat(str(TF_("Private message from %1%: %2%") % getNick(pm.from) % Text::toT(pm.str)));
}
}
} else if(i->first == FOLLOW) {
@@ -905,7 +904,7 @@
}
void HubFrame::on(NickTaken, Client*) throw() {
- speak(ADD_STATUS_LINE, STRING(NICK_TAKEN));
+ speak(ADD_STATUS_LINE, _("Your nick was already taken, please change to something else!"));
}
void HubFrame::on(SearchFlood, Client*, const string& line) throw() {
@@ -935,7 +934,7 @@
textForUsers += Text::toT(Util::toString(users->getSelectedCount()) + "/");
if (showUsers->getChecked() && users->size() < userCount)
textForUsers += Text::toT(Util::toString(users->size()) + "/");
- return textForUsers + Text::toT(Util::toString(userCount) + " " + STRING(HUB_USERS));
+ return textForUsers + str(TFN_("%1% user", "%1% users", userCount) % userCount);
}
Modified: dcplusplus/trunk/win32/MagnetDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/MagnetDlg.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/MagnetDlg.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -43,10 +43,10 @@
bool MagnetDlg::handleInitDialog() {
setText(T_("MAGNET Link detected"));
- ::SetDlgItemText(handle(), IDC_MAGNET_TEXT, CTSTRING(MAGNET_DLG_TEXT_GOOD));
- ::SetDlgItemText(handle(), IDC_MAGNET_HASH, CTSTRING(MAGNET_DLG_HASH));
+ ::SetDlgItemText(handle(), IDC_MAGNET_TEXT, CT_("DC++ has detected a MAGNET link with a file hash that can be searched for on the Direct Connect network. What would you like to do?"));
+ ::SetDlgItemText(handle(), IDC_MAGNET_HASH, CT_("File Hash:"));
::SetDlgItemText(handle(), IDC_MAGNET_DISP_HASH, mHash.c_str());
- ::SetDlgItemText(handle(), IDC_MAGNET_NAME, CTSTRING(MAGNET_DLG_FILE));
+ ::SetDlgItemText(handle(), IDC_MAGNET_NAME, CT_("Filename:"));
::SetDlgItemText(handle(), IDC_MAGNET_DISP_NAME, mFileName.c_str());
//queue = attachRadioButton(IDC_MAGNET_1_QUEUE);
Modified: dcplusplus/trunk/win32/MainWindow.cpp
===================================================================
--- dcplusplus/trunk/win32/MainWindow.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/MainWindow.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -179,7 +179,7 @@
dcdebug("initMenu\n");
mainMenu = createMenu(false);
- WidgetMenuPtr file = mainMenu->appendPopup(CTSTRING(MENU_FILE));
+ WidgetMenuPtr file = mainMenu->appendPopup(T_("&File"));
file->appendItem(IDC_QUICK_CONNECT, T_("&Quick Connect ...\tCtrl+Q"), std::tr1::bind(&MainWindow::handleQuickConnect, this));
file->appendItem(IDC_FOLLOW, T_("Follow last redirec&t\tCtrl+T"));
@@ -197,7 +197,7 @@
file->appendSeparatorItem();
file->appendItem(IDC_EXIT, T_("E&xit"), std::tr1::bind(&MainWindow::handleExit, this));
- WidgetMenuPtr view = mainMenu->appendPopup(CTSTRING(MENU_VIEW));
+ WidgetMenuPtr view = mainMenu->appendPopup(T_("&View"));
view->appendItem(IDC_PUBLIC_HUBS, T_("&Public Hubs\tCtrl+P"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
view->appendItem(IDC_FAVORITE_HUBS, T_("&Favorite Hubs\tCtrl+F"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
@@ -218,7 +218,7 @@
view->appendItem(IDC_DOWNLOADS, T_("Downloads"), std::tr1::bind(&MainWindow::handleOpenWindow, this, _1));
view->appendItem(IDC_HASH_PROGRESS, T_("Indexing progress"), std::tr1::bind(&MainWindow::handleHashProgress, this));
- WidgetMenuPtr window = mainMenu->appendPopup(CTSTRING(MENU_WINDOW));
+ WidgetMenuPtr window = mainMenu->appendPopup(T_("&Window"));
window->appendItem(IDC_CLOSE_ALL_DISCONNECTED, T_("Close disconnected"), std::tr1::bind(&MainWindow::handleCloseWindows, this, _1));
window->appendItem(IDC_CLOSE_ALL_PM, T_("Close all PM windows"), std::tr1::bind(&MainWindow::handleCloseWindows, this, _1));
@@ -226,7 +226,7 @@
window->appendItem(IDC_CLOSE_ALL_DIR_LIST, T_("Close all file list windows"), std::tr1::bind(&MainWindow::handleCloseWindows, this, _1));
window->appendItem(IDC_CLOSE_ALL_SEARCH_FRAME, T_("Close all search windows"), std::tr1::bind(&MainWindow::handleCloseWindows, this, _1));
- WidgetMenuPtr help = mainMenu->appendPopup(TSTRING(MENU_HELP));
+ WidgetMenuPtr help = mainMenu->appendPopup(T_("&Help"));
help->appendItem(IDC_HELP_CONTENTS, T_("Help &Contents\tF1"), std::tr1::bind(&MainWindow::handleMenuHelp, this, _1));
help->appendSeparatorItem();
@@ -615,7 +615,7 @@
try {
SearchManager::getInstance()->listen();
} catch(const Exception&) {
- WidgetMessageBox().show(CTSTRING(TCP_PORT_BUSY), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONSTOP);
+ WidgetMessageBox().show(T_("Unable to open UDP port. Searching will not work correctly until you change settings or turn off any application that might be using the UDP port"), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONSTOP);
}
}
@@ -631,7 +631,7 @@
if ( FAILED(UPnP_UDPConnection->OpenPorts()) || FAILED(UPnP_TCPConnection->OpenPorts()) )
{
- LogManager::getInstance()->message(STRING(UPNP_FAILED_TO_CREATE_MAPPINGS));
+ LogManager::getInstance()->message(_("Failed to create port mappings. Please set up your NAT yourself."));
createMessageBox().show(T_("Failed to create port mappings. Please set up your NAT yourself."), _T(APPNAME) _T(" ") _T(VERSIONSTRING));
// We failed! thus reset the objects
@@ -650,7 +650,7 @@
} else {
//:-( Looks like we have to rely on the user setting the external IP manually
// no need to do cleanup here because the mappings work
- LogManager::getInstance()->message(STRING(UPNP_FAILED_TO_GET_EXTERNAL_IP));
+ LogManager::getInstance()->message(_("Failed to get external IP via UPnP. Please set it yourself."));
createMessageBox().show(T_("Failed to get external IP via UPnP. Please set it yourself."), _T(APPNAME) _T(" ") _T(VERSIONSTRING));
}
}
@@ -664,7 +664,7 @@
{
if (FAILED(UPnP_TCPConnection->ClosePorts()) )
{
- LogManager::getInstance()->message(STRING(UPNP_FAILED_TO_REMOVE_MAPPINGS));
+ LogManager::getInstance()->message(_("Failed to remove port mappings"));
}
delete UPnP_TCPConnection;
}
@@ -672,7 +672,7 @@
{
if (FAILED(UPnP_UDPConnection->ClosePorts()) )
{
- LogManager::getInstance()->message(STRING(UPNP_FAILED_TO_REMOVE_MAPPINGS));
+ LogManager::getInstance()->message(_("Failed to remove port mappings"));
}
delete UPnP_UDPConnection;
}
Modified: dcplusplus/trunk/win32/PublicHubsFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -269,8 +269,8 @@
}
void PublicHubsFrame::updateStatus() {
- setStatus(STATUS_HUBS, Text::toT(STRING(HUBS) + ": " + Util::toString(visibleHubs)));
- setStatus(STATUS_USERS, Text::toT(STRING(USERS) + ": " + Util::toString(users)));
+ setStatus(STATUS_HUBS, str(TF_("Hubs: %1%") % visibleHubs));
+ setStatus(STATUS_USERS, str(TF_("Users: %1%") % users));
}
void PublicHubsFrame::updateDropDown() {
@@ -314,13 +314,13 @@
std::auto_ptr<tstring> x(reinterpret_cast<tstring*>(lParam));
entries = FavoriteManager::getInstance()->getPublicHubs();
updateList();
- setStatus(STATUS_STATUS, ((wParam == LOADED_FROM_CACHE) ? TSTRING(HUB_LIST_LOADED_FROM_CACHE) : TSTRING(HUB_LIST_DOWNLOADED)) + _T(" (") + (*x) + _T(")"));
+ setStatus(STATUS_STATUS, ((wParam == LOADED_FROM_CACHE) ? T_("Hub list loaded from cache...") : str(TF_("Hub list downloaded... (%1%)") % (*x))));
} else if(wParam == STARTING) {
std::auto_ptr<tstring> x(reinterpret_cast<tstring*>(lParam));
- setStatus(STATUS_STATUS, TSTRING(DOWNLOADING_HUB_LIST) + _T(" (") + (*x) + _T(")"));
+ setStatus(STATUS_STATUS, str(TF_("Downloading public hub list... (%1%)") % (*x)));
} else if(wParam == FAILED) {
std::auto_ptr<tstring> x(reinterpret_cast<tstring*>(lParam));
- setStatus(STATUS_STATUS, TSTRING(DOWNLOAD_FAILED) + (*x));
+ setStatus(STATUS_STATUS, str(TF_("Download failed: %1%") % (*x)));
}
return 0;
}
@@ -456,7 +456,7 @@
}
void PublicHubsFrame::handleRefresh() {
- setStatus(STATUS_STATUS, CTSTRING(DOWNLOADING_HUB_LIST));
+ setStatus(STATUS_STATUS, CT_("Downloading public hub list..."));
FavoriteManager::getInstance()->refresh(true);
updateDropDown();
}
Modified: dcplusplus/trunk/win32/QueueFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/QueueFrame.cpp 2008-01-17 21:48:59 UTC (rev 966)
+++ dcplusplus/trunk/win32/QueueFrame.cpp 2008-01-19 10:18:34 UTC (rev 967)
@@ -278,15 +278,14 @@
QueueItemInfo* ii = files->getData(i);
total += (ii->getSize() > 0) ? ii->getSize() : 0;
}
-
}
- setStatus(STATUS_PARTIAL_COUNT, Text::toT(STRING(ITEMS) + ": " + Util::toString(cnt)));
- setStatus(STATUS_PARTIAL_BYTES, Text::toT(STRING(SIZE) + ": " + Util::format...
[truncated message content] |
|
From: <arn...@us...> - 2008-01-19 15:35:33
|
Revision: 968
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=968&view=rev
Author: arnetheduck
Date: 2008-01-19 07:35:31 -0800 (Sat, 19 Jan 2008)
Log Message:
-----------
Prepare proppages for translation
Modified Paths:
--------------
dcplusplus/trunk/SConstruct
dcplusplus/trunk/win32/Advanced3Page.cpp
dcplusplus/trunk/win32/AdvancedPage.cpp
dcplusplus/trunk/win32/Appearance2Page.cpp
dcplusplus/trunk/win32/AppearancePage.cpp
dcplusplus/trunk/win32/CertificatesPage.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/PropPage.cpp
dcplusplus/trunk/win32/PropPage.h
dcplusplus/trunk/win32/QueuePage.cpp
dcplusplus/trunk/win32/TabsPage.cpp
dcplusplus/trunk/win32/TransferView.cpp
dcplusplus/trunk/win32/UCPage.cpp
dcplusplus/trunk/win32/UploadPage.cpp
dcplusplus/trunk/win32/WindowsPage.cpp
Modified: dcplusplus/trunk/SConstruct
===================================================================
--- dcplusplus/trunk/SConstruct 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/SConstruct 2008-01-19 15:35:31 UTC (rev 968)
@@ -159,7 +159,7 @@
pot_args = ['xgettext', '--from-code=UTF-8', '--foreign-user',# '--package-name=$PACKAGE',
'--copyright-holder=Jacek Sieka', '--msg...@li...',
'--no-wrap', '--keyword=_', '--keyword=T_', '--keyword=TF_', '--keyword=TFN_:1,2',
- '--keyword=F_', '--keyword=gettext_noop', '--keyword=N_', '--boost',
+ '--keyword=F_', '--keyword=gettext_noop', '--keyword=N_', '--boost', '-s',
'--output=$TARGET', '$SOURCES']
pot_bld = Builder (action = Action([pot_args], 'Extracting messages to $TARGET from $SOURCES'))
Modified: dcplusplus/trunk/win32/Advanced3Page.cpp
===================================================================
--- dcplusplus/trunk/win32/Advanced3Page.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/Advanced3Page.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -25,6 +25,7 @@
#include <dcpp/SettingsManager.h>
PropPage::TextItem Advanced3Page::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_B, ResourceManager::B },
{ IDC_SETTINGS_WRITE_BUFFER, ResourceManager::SETTINGS_WRITE_BUFFER },
{ IDC_SETTINGS_KB, ResourceManager::KiB },
@@ -40,7 +41,8 @@
{ IDC_SETTINGS_AUTO_REFRESH_TIME, ResourceManager::SETTINGS_AUTO_REFRESH_TIME },
{ IDC_SETTINGS_AUTO_SEARCH_LIMIT, ResourceManager::SETTINGS_AUTO_SEARCH_LIMIT },
{ IDC_SETTINGS_MIN_SEGMENT_SIZE, ResourceManager::SETTINGS_MIN_SEGMENT_SIZE },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item Advanced3Page::items[] = {
Modified: dcplusplus/trunk/win32/AdvancedPage.cpp
===================================================================
--- dcplusplus/trunk/win32/AdvancedPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/AdvancedPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -27,6 +27,7 @@
PropPage::Item AdvancedPage::items[] = { { 0, 0, PropPage::T_END } };
AdvancedPage::ListItem AdvancedPage::listItems[] = {
+#ifdef PORT_ME
{ SettingsManager::AUTO_AWAY, ResourceManager::SETTINGS_AUTO_AWAY },
{ SettingsManager::AUTO_FOLLOW, ResourceManager::SETTINGS_AUTO_FOLLOW },
{ SettingsManager::CLEAR_SEARCH, ResourceManager::SETTINGS_CLEAR_SEARCH },
@@ -46,7 +47,8 @@
{ SettingsManager::USE_CTRL_FOR_LINE_HISTORY, ResourceManager::SETTINGS_USE_CTRL_FOR_LINE_HISTORY },
{ SettingsManager::AUTO_KICK_NO_FAVS, ResourceManager::SETTINGS_AUTO_KICK_NO_FAVS },
{ SettingsManager::SHOW_SHELL_MENU, ResourceManager::SETTINGS_SHOW_SHELL_MENU },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
AdvancedPage::AdvancedPage(SmartWin::Widget* parent) : PropPage(parent) {
Modified: dcplusplus/trunk/win32/Appearance2Page.cpp
===================================================================
--- dcplusplus/trunk/win32/Appearance2Page.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/Appearance2Page.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -26,6 +26,7 @@
#include "WinUtil.h"
PropPage::TextItem Appearance2Page::texts[] = {
+#ifdef PORT_ME
{ IDC_BEEP_NOTIFICATION, ResourceManager::SETTINGS_NOTIFICATION_SOUND },
{ IDC_BROWSE, ResourceManager::BROWSE_ACCEL },
{ IDC_SETTINGS_COLORS, ResourceManager::SETTINGS_COLORS },
@@ -38,7 +39,8 @@
{ IDC_PRIVATE_MESSAGE_BEEP, ResourceManager::SETTINGS_PM_BEEP },
{ IDC_PRIVATE_MESSAGE_BEEP_OPEN, ResourceManager::SETTINGS_PM_BEEP_OPEN },
{ IDC_SETTINGS_DOWNLOAD_BAR_COLOR, ResourceManager::DOWNLOADS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item Appearance2Page::items[] = {
Modified: dcplusplus/trunk/win32/AppearancePage.cpp
===================================================================
--- dcplusplus/trunk/win32/AppearancePage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/AppearancePage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -28,12 +28,14 @@
#include "WinUtil.h"
PropPage::TextItem AppearancePage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_APPEARANCE_OPTIONS, ResourceManager::SETTINGS_OPTIONS },
{ IDC_SETTINGS_DEFAULT_AWAY_MSG, ResourceManager::SETTINGS_DEFAULT_AWAY_MSG },
{ IDC_SETTINGS_TIME_STAMPS_FORMAT, ResourceManager::SETTINGS_TIME_STAMPS_FORMAT },
{ IDC_SETTINGS_LANGUAGE_FILE, ResourceManager::SETTINGS_LANGUAGE_FILE },
{ IDC_SETTINGS_REQUIRES_RESTART, ResourceManager::SETTINGS_REQUIRES_RESTART },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item AppearancePage::items[] = {
@@ -43,6 +45,7 @@
};
PropPage::ListItem AppearancePage::listItems[] = {
+#ifdef PORT_ME
{ SettingsManager::ALT_SORT_ORDER, ResourceManager::SETTINGS_ALT_SORT_ORDER },
{ SettingsManager::FILTER_MESSAGES, ResourceManager::SETTINGS_FILTER_MESSAGES },
{ SettingsManager::MINIMIZE_TRAY, ResourceManager::SETTINGS_MINIMIZE_TRAY },
@@ -54,7 +57,8 @@
{ SettingsManager::USE_SYSTEM_ICONS, ResourceManager::SETTINGS_USE_SYSTEM_ICONS },
{ SettingsManager::USE_OEM_MONOFONT, ResourceManager::SETTINGS_USE_OEM_MONOFONT },
{ SettingsManager::GET_USER_COUNTRY, ResourceManager::SETTINGS_GET_USER_COUNTRY },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
AppearancePage::AppearancePage(SmartWin::Widget* parent) : PropPage(parent), languages(0) {
Modified: dcplusplus/trunk/win32/CertificatesPage.cpp
===================================================================
--- dcplusplus/trunk/win32/CertificatesPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/CertificatesPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -27,7 +27,7 @@
#include "WinUtil.h"
PropPage::TextItem CertificatesPage::texts[] = {
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+ { 0, 0 }
};
PropPage::Item CertificatesPage::items[] = {
@@ -38,10 +38,12 @@
};
PropPage::ListItem CertificatesPage::listItems[] = {
+#ifdef PORT_ME
{ SettingsManager::USE_TLS, ResourceManager::SETTINGS_USE_TLS },
{ SettingsManager::ALLOW_UNTRUSTED_HUBS, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_HUBS },
{ SettingsManager::ALLOW_UNTRUSTED_CLIENTS, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_CLIENTS, },
- { 0, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_CLIENTS, },
+#endif
+ { 0, 0 }
};
CertificatesPage::CertificatesPage(SmartWin::Widget* parent) : PropPage(parent) {
Modified: dcplusplus/trunk/win32/DownloadPage.cpp
===================================================================
--- dcplusplus/trunk/win32/DownloadPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/DownloadPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -27,6 +27,7 @@
#include "HubListsDlg.h"
PropPage::TextItem DownloadPage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_DIRECTORIES, ResourceManager::SETTINGS_DIRECTORIES },
{ IDC_SETTINGS_DOWNLOAD_DIRECTORY, ResourceManager::SETTINGS_DOWNLOAD_DIRECTORY },
{ IDC_BROWSEDIR, ResourceManager::BROWSE_ACCEL },
@@ -40,7 +41,8 @@
{ IDC_SETTINGS_PUBLIC_HUB_LIST_URL, ResourceManager::SETTINGS_PUBLIC_HUB_LIST_URL },
{ IDC_SETTINGS_LIST_CONFIG, ResourceManager::SETTINGS_CONFIGURE_HUB_LISTS },
{ IDC_SETTINGS_PUBLIC_HUB_LIST_HTTP_PROXY, ResourceManager::SETTINGS_PUBLIC_HUB_LIST_HTTP_PROXY },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item DownloadPage::items[] = {
Modified: dcplusplus/trunk/win32/FavoriteDirsPage.cpp
===================================================================
--- dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -29,11 +29,13 @@
#include "LineDlg.h"
PropPage::TextItem FavoriteDirsPage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_FAVORITE_DIRECTORIES, ResourceManager::SETTINGS_FAVORITE_DIRS },
{ IDC_REMOVE, ResourceManager::REMOVE },
{ IDC_ADD, ResourceManager::SETTINGS_ADD_FOLDER },
{ IDC_RENAME, ResourceManager::SETTINGS_RENAME_FOLDER },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
FavoriteDirsPage::FavoriteDirsPage(SmartWin::Widget* parent) : PropPage(parent) {
Modified: dcplusplus/trunk/win32/GeneralPage.cpp
===================================================================
--- dcplusplus/trunk/win32/GeneralPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/GeneralPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -25,13 +25,15 @@
#include <dcpp/SettingsManager.h>
PropPage::TextItem GeneralPage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_PERSONAL_INFORMATION, ResourceManager::SETTINGS_PERSONAL_INFORMATION },
{ IDC_SETTINGS_NICK, ResourceManager::NICK },
{ IDC_SETTINGS_EMAIL, ResourceManager::EMAIL },
{ IDC_SETTINGS_DESCRIPTION, ResourceManager::DESCRIPTION },
{ IDC_SETTINGS_UPLOAD_LINE_SPEED, ResourceManager::SETTINGS_UPLOAD_LINE_SPEED },
{ IDC_SETTINGS_MEBIBITS, ResourceManager::MiBITSPS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item GeneralPage::items[] = {
Modified: dcplusplus/trunk/win32/LogPage.cpp
===================================================================
--- dcplusplus/trunk/win32/LogPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/LogPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -28,12 +28,14 @@
#include "WinUtil.h"
PropPage::TextItem LogPage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_LOGGING, ResourceManager::SETTINGS_LOGGING },
{ IDC_SETTINGS_LOG_DIR, ResourceManager::DIRECTORY },
{ IDC_BROWSE_LOG, ResourceManager::BROWSE_ACCEL },
{ IDC_SETTINGS_FORMAT, ResourceManager::SETTINGS_FORMAT },
{ IDC_SETTINGS_FILE_NAME, ResourceManager::SETTINGS_FILE_NAME },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item LogPage::items[] = {
@@ -42,6 +44,7 @@
};
PropPage::ListItem LogPage::listItems[] = {
+#ifdef PORT_ME
{ SettingsManager::LOG_MAIN_CHAT, ResourceManager::SETTINGS_LOG_MAIN_CHAT },
{ SettingsManager::LOG_PRIVATE_CHAT, ResourceManager::SETTINGS_LOG_PRIVATE_CHAT },
{ SettingsManager::LOG_DOWNLOADS, ResourceManager::SETTINGS_LOG_DOWNLOADS },
@@ -49,7 +52,8 @@
{ SettingsManager::LOG_SYSTEM, ResourceManager::SETTINGS_LOG_SYSTEM_MESSAGES },
{ SettingsManager::LOG_STATUS_MESSAGES, ResourceManager::SETTINGS_LOG_STATUS_MESSAGES },
{ SettingsManager::LOG_FILELIST_TRANSFERS, ResourceManager::SETTINGS_LOG_FILELIST_TRANSFERS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
LogPage::LogPage(SmartWin::Widget* parent) : PropPage(parent) {
Modified: dcplusplus/trunk/win32/NetworkPage.cpp
===================================================================
--- dcplusplus/trunk/win32/NetworkPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/NetworkPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -27,6 +27,7 @@
#include "WinUtil.h"
PropPage::TextItem NetworkPage::texts[] = {
+#ifdef PORT_ME
{ IDC_DIRECT, ResourceManager::SETTINGS_DIRECT },
{ IDC_DIRECT_OUT, ResourceManager::SETTINGS_DIRECT },
{ IDC_FIREWALL_UPNP, ResourceManager::SETTINGS_FIREWALL_UPNP },
@@ -46,7 +47,8 @@
{ IDC_SOCKS_RESOLVE, ResourceManager::SETTINGS_SOCKS5_RESOLVE },
{ IDC_SETTINGS_INCOMING, ResourceManager::SETTINGS_INCOMING },
{ IDC_SETTINGS_OUTGOING, ResourceManager::SETTINGS_OUTGOING },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item NetworkPage::items[] = {
Modified: dcplusplus/trunk/win32/PropPage.cpp
===================================================================
--- dcplusplus/trunk/win32/PropPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/PropPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -67,8 +67,9 @@
LVITEM lvi = { LVIF_TEXT };
for(int i = 0; listItems[i].setting != 0; i++) {
+ tstring str = T_(listItems[i].desc);
lvi.iItem = i;
- lvi.pszText = const_cast<TCHAR*>(CTSTRING_I(listItems[i].desc));
+ lvi.pszText = const_cast<TCHAR*>(str.c_str());
ListView_InsertItem(list, &lvi);
ListView_SetCheckState(list, i, settings->getBool(SettingsManager::IntSetting(listItems[i].setting), true));
}
@@ -124,7 +125,7 @@
if (textItems != NULL) {
for(int i = 0; textItems[i].itemID != 0; i++) {
::SetDlgItemText(page, textItems[i].itemID,
- CTSTRING_I(textItems[i].translatedString));
+ CT_(textItems[i].translatedString));
}
}
}
Modified: dcplusplus/trunk/win32/PropPage.h
===================================================================
--- dcplusplus/trunk/win32/PropPage.h 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/PropPage.h 2008-01-19 15:35:31 UTC (rev 968)
@@ -21,7 +21,6 @@
#define SETTINGS_BUF_LEN 1024
-#include <dcpp/ResourceManager.h>
#include "WidgetFactory.h"
#include "resource.h"
@@ -47,11 +46,11 @@
};
struct ListItem {
int setting;
- ResourceManager::Strings desc;
+ const char* desc;
};
struct TextItem {
WORD itemID;
- ResourceManager::Strings translatedString;
+ const char* translatedString;
};
protected:
Modified: dcplusplus/trunk/win32/QueuePage.cpp
===================================================================
--- dcplusplus/trunk/win32/QueuePage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/QueuePage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -25,6 +25,7 @@
#include <dcpp/SettingsManager.h>
PropPage::TextItem QueuePage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_AUTOPRIO, ResourceManager::SETTINGS_PRIO_AUTOPRIO },
{ IDC_SETTINGS_PRIO_HIGHEST, ResourceManager::SETTINGS_PRIO_HIGHEST },
{ IDC_SETTINGS_KB3, ResourceManager::KiB },
@@ -47,7 +48,8 @@
{ IDC_SETTINGS_AUTODROP_FILESIZE, ResourceManager::SETTINGS_AUTODROP_FILESIZE },
{ IDC_SETTINGS_KB7, ResourceManager::KiB },
{ IDC_SETTINGS_OTHER_QUEUE_OPTIONS, ResourceManager::SETTINGS_OTHER_QUEUE_OPTIONS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item QueuePage::items[] = {
@@ -65,6 +67,7 @@
};
PropPage::ListItem QueuePage::optionItems[] = {
+#ifdef PORT_ME
{ SettingsManager::PRIO_LOWEST, ResourceManager::SETTINGS_PRIO_LOWEST },
{ SettingsManager::AUTODROP_ALL, ResourceManager::SETTINGS_AUTODROP_ALL },
{ SettingsManager::AUTODROP_FILELISTS, ResourceManager::SETTINGS_AUTODROP_FILELISTS },
@@ -75,7 +78,8 @@
{ SettingsManager::DONT_DL_ALREADY_SHARED, ResourceManager::SETTINGS_DONT_DL_ALREADY_SHARED },
{ SettingsManager::DONT_DL_ALREADY_QUEUED, ResourceManager::SETTINGS_DONT_DL_ALREADY_QUEUED },
{ SettingsManager::ANTI_FRAG, ResourceManager::SETTINGS_ANTI_FRAG },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
QueuePage::QueuePage(SmartWin::Widget* parent) : PropPage(parent) {
Modified: dcplusplus/trunk/win32/TabsPage.cpp
===================================================================
--- dcplusplus/trunk/win32/TabsPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/TabsPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -29,11 +29,14 @@
};
PropPage::TextItem TabsPage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_BOLD_CONTENTS, ResourceManager::SETTINGS_BOLD_OPTIONS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::ListItem TabsPage::listItems[] = {
+#ifdef PORT_ME
{ SettingsManager::BOLD_HUB, ResourceManager::HUB },
{ SettingsManager::BOLD_PM, ResourceManager::PRIVATE_MESSAGE },
{ SettingsManager::BOLD_SEARCH, ResourceManager::SEARCH },
@@ -42,7 +45,8 @@
{ SettingsManager::BOLD_FINISHED_DOWNLOADS, ResourceManager::FINISHED_DOWNLOADS },
{ SettingsManager::BOLD_WAITING_USERS, ResourceManager::WAITING_USERS },
{ SettingsManager::BOLD_FINISHED_UPLOADS, ResourceManager::FINISHED_UPLOADS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
TabsPage::TabsPage(SmartWin::Widget* parent) : PropPage(parent) {
Modified: dcplusplus/trunk/win32/TransferView.cpp
===================================================================
--- dcplusplus/trunk/win32/TransferView.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/TransferView.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -40,7 +40,7 @@
N_("User"),
N_("Status"),
N_("Speed"),
- N_("Transfered"),
+ N_("Transfered (Ratio)"),
N_("Queued"),
N_("Cipher"),
N_("IP")
@@ -127,7 +127,6 @@
}
/// @todo Fix multiple selection menu...
- int i = -1;
ItemInfo* ii = transfers->getSelectedData();
WidgetMenuPtr contextMenu = makeContextMenu(ii);
contextMenu->trackPopupMenu(this, pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON);
@@ -404,9 +403,8 @@
columns[COLUMN_TRANSFERED] = Text::toT(Util::toString(0));
if(aDownload) {
queued = QueueManager::getInstance()->getQueued(u);
- columns[COLUMN_QUEUED] = Text::toT(Util::toString(queued));
+ columns[COLUMN_QUEUED] = Text::toT(Util::formatBytes(queued));
}
-
}
void TransferView::ItemInfo::update(const UpdateInfo& ui) {
@@ -415,28 +413,29 @@
if(download) {
// Also update queued when status changes...
queued = QueueManager::getInstance()->getQueued(user);
- columns[COLUMN_QUEUED] = Text::toT(Util::toString(queued));
+ columns[COLUMN_QUEUED] = Text::toT(Util::formatBytes(queued));
}
-
}
+
if(ui.updateMask & UpdateInfo::MASK_STATUS_STRING) {
// No slots etc from transfermanager better than disconnected from connectionmanager
if(!transferFailed)
columns[COLUMN_STATUS] = ui.statusString;
transferFailed = ui.transferFailed;
}
+
if(ui.updateMask & UpdateInfo::MASK_TRANSFERED) {
actual = ui.actual;
transfered = ui.transfered;
if(actual == transfered) {
columns[COLUMN_TRANSFERED] = Text::toT(Util::formatBytes(transfered));
} else {
- columns[COLUMN_TRANSFERED] = str(TF_("%1% (%2%, %3%%%)")
+ columns[COLUMN_TRANSFERED] = str(TF_("%1% (%|.2|)")
% Text::toT(Util::formatBytes(transfered))
- % Text::toT(Util::formatBytes(actual))
- % (actual * 100.0 / transfered));
+ % (static_cast<double>(actual) / transfered));
}
}
+
if(ui.updateMask & UpdateInfo::MASK_SPEED) {
speed = ui.speed;
if (status == STATUS_RUNNING) {
@@ -445,9 +444,11 @@
columns[COLUMN_SPEED] = Util::emptyStringT;
}
}
+
if(ui.updateMask & UpdateInfo::MASK_IP) {
columns[COLUMN_IP] = ui.ip;
}
+
if(ui.updateMask & UpdateInfo::MASK_CIPHER) {
columns[COLUMN_CIPHER] = ui.cipher;
}
Modified: dcplusplus/trunk/win32/UCPage.cpp
===================================================================
--- dcplusplus/trunk/win32/UCPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/UCPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -28,12 +28,14 @@
#include "HoldRedraw.h"
PropPage::TextItem UCPage::texts[] = {
- { IDC_MOVE_UP, ResourceManager::MOVE_UP },
+ { IDC_MOVE_UP, N_("Move &Up") },
+#ifdef PORT_ME
{ IDC_MOVE_DOWN, ResourceManager::MOVE_DOWN },
{ IDC_ADD_MENU, ResourceManager::ADD },
{ IDC_CHANGE_MENU, ResourceManager::SETTINGS_CHANGE },
{ IDC_REMOVE_MENU, ResourceManager::REMOVE },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item UCPage::items[] = {
Modified: dcplusplus/trunk/win32/UploadPage.cpp
===================================================================
--- dcplusplus/trunk/win32/UploadPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/UploadPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -30,6 +30,7 @@
#include "HashProgressDlg.h"
PropPage::TextItem UploadPage::texts[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_SHARED_DIRECTORIES, ResourceManager::SETTINGS_SHARED_DIRECTORIES },
{ IDC_SETTINGS_SHARE_SIZE, ResourceManager::SETTINGS_SHARE_SIZE },
{ IDC_SHAREHIDDEN, ResourceManager::SETTINGS_SHARE_HIDDEN },
@@ -40,7 +41,8 @@
{ IDC_SETTINGS_KBPS, ResourceManager::KiBPS },
{ IDC_SETTINGS_UPLOADS_SLOTS, ResourceManager::SETTINGS_UPLOADS_SLOTS },
{ IDC_SETTINGS_ONLY_HASHED, ResourceManager::SETTINGS_ONLY_HASHED },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
PropPage::Item UploadPage::items[] = {
Modified: dcplusplus/trunk/win32/WindowsPage.cpp
===================================================================
--- dcplusplus/trunk/win32/WindowsPage.cpp 2008-01-19 10:18:34 UTC (rev 967)
+++ dcplusplus/trunk/win32/WindowsPage.cpp 2008-01-19 15:35:31 UTC (rev 968)
@@ -27,13 +27,16 @@
PropPage::Item WindowsPage::items[] = { { 0, 0, PropPage::T_END } };
PropPage::TextItem WindowsPage::textItem[] = {
+#ifdef PORT_ME
{ IDC_SETTINGS_AUTO_OPEN, ResourceManager::SETTINGS_AUTO_OPEN },
{ IDC_SETTINGS_WINDOWS_OPTIONS, ResourceManager::SETTINGS_WINDOWS_OPTIONS },
{ IDC_SETTINGS_CONFIRM_OPTIONS, ResourceManager::SETTINGS_CONFIRM_DIALOG_OPTIONS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
WindowsPage::ListItem WindowsPage::listItems[] = {
+#ifdef PORT_ME
{ SettingsManager::OPEN_SYSTEM_LOG, ResourceManager::SYSTEM_LOG },
{ SettingsManager::OPEN_FAVORITE_USERS, ResourceManager::FAVORITE_USERS },
{ SettingsManager::OPEN_QUEUE, ResourceManager::DOWNLOAD_QUEUE },
@@ -46,10 +49,12 @@
{ SettingsManager::OPEN_PUBLIC, ResourceManager::PUBLIC_HUBS },
{ SettingsManager::OPEN_FAVORITE_HUBS, ResourceManager::FAVORITE_HUBS },
{ SettingsManager::OPEN_DOWNLOADS, ResourceManager::DOWNLOADS },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
WindowsPage::ListItem WindowsPage::optionItems[] = {
+#ifdef PORT_ME
{ SettingsManager::POPUP_PMS, ResourceManager::SETTINGS_POPUP_PMS },
{ SettingsManager::POPUP_HUB_PMS, ResourceManager::SETTINGS_POPUP_HUB_PMS },
{ SettingsManager::POPUP_BOT_PMS, ResourceManager::SETTINGS_POPUP_BOT_PMS },
@@ -60,14 +65,17 @@
{ SettingsManager::IGNORE_BOT_PMS, ResourceManager::SETTINGS_IGNORE_BOT_PMS },
{ SettingsManager::TOGGLE_ACTIVE_WINDOW, ResourceManager::SETTINGS_TOGGLE_ACTIVE_WINDOW },
{ SettingsManager::PROMPT_PASSWORD, ResourceManager::SETTINGS_PROMPT_PASSWORD },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
WindowsPage::ListItem WindowsPage::confirmItems[] = {
+#ifdef PORT_ME
{ SettingsManager::CONFIRM_EXIT, ResourceManager::SETTINGS_CONFIRM_EXIT },
{ SettingsManager::CONFIRM_HUB_REMOVAL, ResourceManager::SETTINGS_CONFIRM_HUB_REMOVAL },
{ SettingsManager::CONFIRM_ITEM_REMOVAL, ResourceManager::SETTINGS_CONFIRM_ITEM_REMOVAL },
- { 0, ResourceManager::SETTINGS_AUTO_AWAY }
+#endif
+ { 0, 0 }
};
WindowsPage::WindowsPage(SmartWin::Widget* parent) : PropPage(parent) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arn...@us...> - 2008-01-19 23:29:09
|
Revision: 970
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=970&view=rev
Author: arnetheduck
Date: 2008-01-19 15:29:06 -0800 (Sat, 19 Jan 2008)
Log Message:
-----------
Add right-click menu to downloads frame
Modified Paths:
--------------
dcplusplus/trunk/intl/SConscript
dcplusplus/trunk/win32/DirectoryListingFrame.cpp
dcplusplus/trunk/win32/DirectoryListingFrame.h
dcplusplus/trunk/win32/DownloadsFrame.cpp
dcplusplus/trunk/win32/DownloadsFrame.h
dcplusplus/trunk/win32/QueueFrame.cpp
dcplusplus/trunk/win32/QueueFrame.h
dcplusplus/trunk/win32/SearchFrame.cpp
dcplusplus/trunk/win32/SearchFrame.h
dcplusplus/trunk/win32/WinUtil.cpp
dcplusplus/trunk/win32/WinUtil.h
Modified: dcplusplus/trunk/intl/SConscript
===================================================================
--- dcplusplus/trunk/intl/SConscript 2008-01-19 22:19:19 UTC (rev 969)
+++ dcplusplus/trunk/intl/SConscript 2008-01-19 23:29:06 UTC (rev 970)
@@ -3,7 +3,7 @@
ret = None
if dev.is_win32():
- env, target, sources = dev.prepare_build(source_path, 'aintl', '*.c')
+ env, target, sources = dev.prepare_build(source_path, 'aintl', '*.c', in_bin=False)
env.Append(CPPDEFINES=['LOCALEDIR=\\"\\"', 'LOCALE_ALIAS_PATH=\\"\\"', 'INSTALLDIR=\\"\\"', 'LIBDIR=\\"\\"', 'BUILDING_LIBINTL',
'IN_LIBINTL', 'ENABLE_RELOCATABLE=1', 'NO_XMALLOC', 'HAVE_CONFIG_H',
Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-01-19 22:19:19 UTC (rev 969)
+++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-01-19 23:29:06 UTC (rev 970)
@@ -317,9 +317,7 @@
menu->appendSeparatorItem();
- menu->appendItem(IDC_SEARCH_ALTERNATES, T_("Search for alternates"), std::tr1::bind(&DirectoryListingFrame::handleSearchAlternates, this));
- menu->appendItem(IDC_BITZI_LOOKUP, T_("Lookup TTH at Bitzi.com"), std::tr1::bind(&DirectoryListingFrame::handleLookupBitzi, this));
- menu->appendItem(IDC_COPY_MAGNET, T_("Copy magnet link to clipboard"), std::tr1::bind(&DirectoryListingFrame::handleCopyMagnet, this));
+ WinUtil::addHashItems(menu, ii->file->getTTH(), Text::toT(ii->file->getName()));
}
if((ii->type == ItemInfo::FILE && ii->file->getAdls()) ||
@@ -469,27 +467,6 @@
}
}
-void DirectoryListingFrame::handleSearchAlternates() {
- ItemInfo* ii = files->getSelectedData();
- if(ii != NULL && ii->type == ItemInfo::FILE) {
- WinUtil::searchHash(ii->file->getTTH());
- }
-}
-
-void DirectoryListingFrame::handleLookupBitzi() {
- ItemInfo* ii = files->getSelectedData();
- if(ii != NULL && ii->type == ItemInfo::FILE) {
- WinUtil::bitziLink(ii->file->getTTH());
- }
-}
-
-void DirectoryListingFrame::handleCopyMagnet() {
- ItemInfo* ii = files->getSelectedData();
- if(ii != NULL && ii->type == ItemInfo::FILE) {
- WinUtil::copyMagnet(ii->file->getTTH(), ii->getText(COLUMN_FILENAME));
- }
-}
-
void DirectoryListingFrame::handleDownload() {
if(usingDirMenu) {
ItemInfo* ii = dirs->getSelectedData();
Modified: dcplusplus/trunk/win32/DirectoryListingFrame.h
===================================================================
--- dcplusplus/trunk/win32/DirectoryListingFrame.h 2008-01-19 22:19:19 UTC (rev 969)
+++ dcplusplus/trunk/win32/DirectoryListingFrame.h 2008-01-19 23:29:06 UTC (rev 970)
@@ -190,9 +190,6 @@
void handleDownload();
void handleViewAsText();
- void handleSearchAlternates();
- void handleLookupBitzi();
- void handleCopyMagnet();
void handleGoToDirectory();
void handleDownloadLastDir(unsigned id);
void handleDownloadTarget(unsigned id);
Modified: dcplusplus/trunk/win32/DownloadsFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/DownloadsFrame.cpp 2008-01-19 22:19:19 UTC (rev 969)
+++ dcplusplus/trunk/win32/DownloadsFrame.cpp 2008-01-19 23:29:06 UTC (rev 970)
@@ -94,7 +94,13 @@
SettingsManager::getInstance()->set(SettingsManager::DOWNLOADSFRAME_WIDTHS, WinUtil::toString(downloads->getColumnWidths()));
}
-DownloadsFrame::DownloadInfo::DownloadInfo(const string& target, int64_t size_) : path(target), done(QueueManager::getInstance()->getPos(target)), size(size_), users(0) {
+DownloadsFrame::DownloadInfo::DownloadInfo(const string& target, int64_t size_, const TTHValue& tth_) :
+ path(target),
+ done(QueueManager::getInstance()->getPos(target)),
+ size(size_),
+ users(0),
+ tth(tth_)
+{
columns[COLUMN_FILE] = Text::toT(Util::getFileName(target));
columns[COLUMN_PATH] = Text::toT(Util::getFilePath(target));
columns[COLUMN_SIZE] = Text::toT(Util::formatBytes(size));
@@ -127,13 +133,14 @@
}
bool DownloadsFrame::handleContextMenu(SmartWin::ScreenCoordinate pt) {
- if (downloads->hasSelection()) {
+ if (downloads->getSelectedCount() == 1) {
if(pt.x() == -1 && pt.y() == -1) {
pt = downloads->getContextMenuPos();
}
WidgetMenuPtr menu = createMenu(true);
-
+ DownloadInfo* di = downloads->getSelectedData();
+ WinUtil::addHashItems(menu, di->tth, di->columns[COLUMN_FILE]);
menu->trackPopupMenu(this, pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON);
return true;
@@ -160,7 +167,12 @@
if(size == -1) {
return 0;
}
- i = downloads->insert(new DownloadInfo(ti->path, size));
+ TTHValue tth;
+ if(QueueManager::getInstance()->getTTH(ti->path, tth)) {
+ i = downloads->insert(new DownloadInfo(ti->path, size, tth));
+ } else {
+ return 0;
+ }
}
DownloadInfo* di = downloads->getData(i);
di->update(*ti);
Modified: dcplusplus/trunk/win32/DownloadsFrame.h
===================================================================
--- dcplusplus/trunk/win32/DownloadsFrame.h 2008-01-19 22:19:19 UTC (rev 969)
+++ dcplusplus/trunk/win32/DownloadsFrame.h 2008-01-19 23:29:06 UTC (rev 970)
@@ -82,7 +82,7 @@
class DownloadInfo {
public:
- DownloadInfo(const string& filename, int64_t size);
+ DownloadInfo(const string& filename, int64_t size, const TTHValue& tth);
const tstring& getText(int col) const {
return columns[col];
@@ -110,6 +110,7 @@
int64_t size;
double bps;
int users;
+ TTHValue tth;
tstring columns[COLUMN_LAST];
};
Modified: dcplusplus/trunk/win32/QueueFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/QueueFrame.cpp 2008-01-19 22:19:19 UTC (rev 969)
+++ dcplusplus/trunk/win32/QueueFrame.cpp 2008-01-19 23:29:06 UTC (rev 970)
@@ -767,25 +767,6 @@
}
}
-void QueueFrame::handleSearchAlternates() {
- if(files->getSelectedCount() == 1) {
- WinUtil::searchHash(files->getSelectedData()->getTTH());
- }
-}
-
-void QueueFrame::handleBitziLookup() {
- if(files->getSelectedCount() == 1) {
- WinUtil::bitziLink(files->getSelectedData()->getTTH());
- }
-}
-
-void QueueFrame::handleCopyMagnet() {
- if(files->getSelectedCount() == 1) {
- QueueItemInfo* ii = files->getSelectedData();
- WinUtil::copyMagnet(ii->getTTH(), Text::toT(Util::getFileName(ii->getTarget())));
- }
-}
-
void QueueFrame::handleBrowseList(const UserPtr& user) {
if(files->getSelectedCount() == 1) {
@@ -975,9 +956,7 @@
QueueFrame::WidgetMenuPtr QueueFrame::makeSingleMenu(QueueItemInfo* qii) {
WidgetMenuPtr menu = createMenu(true);
- menu->appendItem(IDC_SEARCH_ALTERNATES, T_("Search for alternates"), std::tr1::bind(&QueueFrame::handleSearchAlternates, this));
- menu->appendItem(IDC_BITZI_LOOKUP, T_("Lookup TTH at Bitzi.com"), std::tr1::bind(&QueueFrame::handleBitziLookup, this));
- menu->appendItem(IDC_COPY_MAGNET, T_("Copy magnet link to clipboard"), std::tr1::bind(&QueueFrame::handleCopyMagnet, this));
+ WinUtil::addHashItems(menu, qii->getTTH(), Text::toT(Util::getFileName(qii->getTarget())));
menu->appendItem(IDC_MOVE, T_("Move/Rename"), std::tr1::bind(&QueueFrame::handleMove, this));
addPriorityMenu(menu);
addBrowseMenu(menu, qii);
Modified: dcplusplus/trunk/win32/QueueFrame.h
===================================================================
--- dcplusplus/trunk/win32/QueueFrame.h 2008-01-19 22:19:19 UTC (rev 969)
+++ dcplusplus/trunk/win32/QueueFrame.h 2008-01-19 23:29:06 UTC (rev 970)
@@ -286,9 +286,6 @@
void handleShowTreeClicked();
- void handleSearchAlternates();
- void handleBitziLookup();
- void handleCopyMagnet();
void handleMove();
void handleRemove();
void handlePriority(unsigned id);
Modified: dcplusplus/trunk/win32/SearchFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/SearchFrame.cpp 2008-01-19 22:19:19 UTC (rev 969)
+++ dcplusplus/trunk/win32/SearchFrame.cpp 2008-01-19 23:29:06 UTC (rev 970)
@@ -727,36 +727,6 @@
results->forEachSelected(&SearchInfo::view);
}
-void SearchFrame::handleSearchAlternates() {
- if(results->getSelectedCount() == 1) {
- int i = results->getNext(-1, LVNI_SELECTED);
- SearchResult* sr = results->getData(i)->sr;
- if(sr->getType() == SearchResult::TYPE_FILE) {
- WinUtil::searchHash(sr->getTTH());
- }
- }
-}
-
-void SearchFrame::handleBitziLookup() {
- if(results->getSelectedCount() == 1) {
- int i = results->getNext(-1, LVNI_SELECTED);
- SearchResult* sr = results->getData(i)->sr;
- if(sr->getType() == SearchResult::TYPE_FILE) {
- WinUtil::bitziLink(sr->getTTH());
- }
- }
-}
-
-void SearchFrame::handleCopyMagnet() {
- if(results->getSelectedCount() == 1) {
- int i = results->getNext(-1, LVNI_SELECTED);
- SearchResult* sr = results->getData(i)->sr;
- if(sr->getType() == SearchResult::TYPE_FILE) {
- WinUtil::copyMagnet(sr->getTTH(), Text::toT(sr->getFileName()));
- }
- }
-}
-
void SearchFrame::handleRemove() {
int i = -1;
while((i = results->getNext(-1, LVNI_SELECTED)) != -1) {
@@ -776,9 +746,10 @@
addTargetDirMenu(menu, favoriteDirs);
menu->appendItem(IDC_VIEW_AS_TEXT, T_("View as text"), std::tr1::bind(&SearchFrame::handleViewAsText, this));
menu->appendSeparatorItem();
- menu->appendItem(IDC_SEARCH_ALTERNATES, T_("Search for alternates"), std::tr1::bind(&SearchFrame::handleSearchAlternates, this));
- menu->appendItem(IDC_BITZI_LOOKUP, T_("Lookup TTH at Bitzi.com"), std::tr1::bind(&SearchFrame::handleBitziLookup, this));
- menu->appendItem(IDC_COPY_MAGNET, T_("Copy magnet link to clipboard"), std::tr1::bind(&SearchFrame::handleCopyMagnet, this));
+ if(checkTTH.hasTTH) {
+ SearchInfo* si = results->getSelectedData();
+ WinUtil::addHashItems(menu, TTHValue(Text::fromT(checkTTH.tth)), si->getText(COLUMN_FILENAME));
+ }
menu->appendSeparatorItem();
appendUserItems(getParent(), menu);
menu->appendSeparatorItem();
Modified: dcplusplus/trunk/win32/SearchFrame.h
===================================================================
--- dcplusplus/trunk/win32/SearchFrame.h 2008-01-19 22:19:19 UTC (rev 969)
+++ dcplusplus/trunk/win32/SearchFrame.h 2008-01-19 23:29:06 UTC (rev 970)
@@ -222,9 +222,6 @@
void handleDownloadWholeTarget(unsigned id);
void handleDownloadDirTo();
void handleViewAsText();
- void handleSearchAlternates();
- void handleBitziLookup();
- void handleCopyMagnet();
void handleRemove();
LRESULT handleSpeaker(WPARAM wParam, LPARAM lParam);
bool handleSearchKeyDown(int c);
Modified: dcplusplus/trunk/win32/WinUtil.cpp
===================================================================
--- dcplusplus/trunk/win32/WinUtil.cpp 2008-01-19 22:19:19 UTC (rev 969)
+++ dcplusplus/trunk/win32/WinUtil.cpp 2008-01-19 23:29:06 UTC (rev 970)
@@ -358,6 +358,11 @@
return 2;
}
}
+void WinUtil::addHashItems(const SmartWin::WidgetMenu::ObjectType& menu, const TTHValue& tth, const tstring& filename) {
+ menu->appendItem(IDC_SEARCH_ALTERNATES, T_("Search for alternates"), std::tr1::bind(&WinUtil::searchHash, tth));
+ menu->appendItem(IDC_BITZI_LOOKUP, T_("Lookup TTH at Bitzi.com"), std::tr1::bind(WinUtil::bitziLink, tth));
+ menu->appendItem(IDC_COPY_MAGNET, T_("Copy magnet link to clipboard"), std::tr1::bind(&WinUtil::copyMagnet, tth, filename));
+}
void WinUtil::bitziLink(const TTHValue& aHash) {
// to use this free service by bitzi, we must not hammer or request information from bitzi
Modified: dcplusplus/trunk/win32/WinUtil.h
===================================================================
--- dcplusplus/trunk/win32/WinUtil.h 2008-01-19 22:19:19 UTC (rev 969)
+++ dcplusplus/trunk/win32/WinUtil.h 2008-01-19 23:29:06 UTC (rev 970)
@@ -133,6 +133,7 @@
static pair<tstring, bool> getHubNames(const UserPtr& u);
// Hash related
+ static void addHashItems(const SmartWin::WidgetMenu::ObjectType& menu, const TTHValue& tth, const tstring& filename);
static void bitziLink(const TTHValue& /*aHash*/);
static void copyMagnet(const TTHValue& /*aHash*/, const tstring& /*aFile*/);
static void searchHash(const TTHValue& /*aHash*/);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arn...@us...> - 2008-01-21 19:13:14
|
Revision: 971
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=971&view=rev
Author: arnetheduck
Date: 2008-01-21 11:13:08 -0800 (Mon, 21 Jan 2008)
Log Message:
-----------
Translations, require gettext 0.17 again...
Modified Paths:
--------------
dcplusplus/trunk/Compile.txt
dcplusplus/trunk/SConstruct
dcplusplus/trunk/win32/AboutDlg.cpp
dcplusplus/trunk/win32/Advanced3Page.cpp
dcplusplus/trunk/win32/AdvancedPage.cpp
dcplusplus/trunk/win32/Appearance2Page.cpp
dcplusplus/trunk/win32/AppearancePage.cpp
dcplusplus/trunk/win32/CertificatesPage.cpp
dcplusplus/trunk/win32/CommandDlg.cpp
dcplusplus/trunk/win32/DirectoryListingFrame.cpp
dcplusplus/trunk/win32/DownloadPage.cpp
dcplusplus/trunk/win32/FavHubProperties.cpp
dcplusplus/trunk/win32/FavoriteDirsPage.cpp
dcplusplus/trunk/win32/GeneralPage.cpp
dcplusplus/trunk/win32/HashProgressDlg.cpp
dcplusplus/trunk/win32/LogPage.cpp
dcplusplus/trunk/win32/MagnetDlg.cpp
dcplusplus/trunk/win32/NetworkPage.cpp
dcplusplus/trunk/win32/PublicHubsFrame.cpp
dcplusplus/trunk/win32/QueuePage.cpp
dcplusplus/trunk/win32/SystemFrame.h
dcplusplus/trunk/win32/TabsPage.cpp
dcplusplus/trunk/win32/TransferView.cpp
dcplusplus/trunk/win32/UCPage.cpp
dcplusplus/trunk/win32/UploadPage.cpp
dcplusplus/trunk/win32/WindowsPage.cpp
Modified: dcplusplus/trunk/Compile.txt
===================================================================
--- dcplusplus/trunk/Compile.txt 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/Compile.txt 2008-01-21 19:13:08 UTC (rev 971)
@@ -9,9 +9,6 @@
but if you want to experiment you can try the potentially slower sjlj. After installing gcc, you will
need to go to the bin folder of your mingw installation and copy g++-dw2/sjlj.exe and gcc-dw2/sjlj.exe to g++.exe
and gcc.exe respectively.
- You will also need the gettext tools: gettext-0.16.1-1-bin.tar.bz2, gettext-0.16.1-1-dll.tar.bz2 and
- libiconv-1.11-1-dll.tar.bz2. Extract and make sure they're in your PATH.
-
Note; Make sure gcc/g++ is in your path and before any cygwin installation.
1b) or install Microsoft Visual C++ 8.0 (I don't use it so there might be some compile problems)
@@ -29,7 +26,15 @@
include and library files to the respective directories in the htmlhelp folder. Make sure hhc.exe is
in your PATH.
-4) Open a command prompt and type "scons" followed by some options:
+4) Install gettext (http://www.gnu.org/software/gettext/). The easiest way to do this is to get the
+ precompiled binaries from http://www.gimp.org/~tml/gimp/win32/downloads.html, you'll need
+ gettext-runtime and gettext-tools, at least version 0.17. These links should work:
+ http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-0.17.zip
+ http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-tools-0.17.zip
+
+ Make sure gettext is in your PATH.
+
+5) Open a command prompt and type "scons" followed by some options:
"tools=mingw" - Use mingw for building (default)
"tools=default" - Use msvc for building (yes, the option value is strange)
"mode=debug" - Compile a debug build (default)
Modified: dcplusplus/trunk/SConstruct
===================================================================
--- dcplusplus/trunk/SConstruct 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/SConstruct 2008-01-21 19:13:08 UTC (rev 971)
@@ -156,7 +156,7 @@
mo_bld = Builder (action = Action([mo_args], 'Compiling message catalog $TARGET from $SOURCES'))
env.Append(BUILDERS = {'MoBuild' : mo_bld})
-pot_args = ['xgettext', '--from-code=UTF-8', '--foreign-user',# '--package-name=$PACKAGE',
+pot_args = ['xgettext', '--from-code=UTF-8', '--foreign-user', '--package-name=$PACKAGE',
'--copyright-holder=Jacek Sieka', '--msg...@li...',
'--no-wrap', '--keyword=_', '--keyword=T_', '--keyword=TF_', '--keyword=TFN_:1,2',
'--keyword=F_', '--keyword=gettext_noop', '--keyword=N_', '--boost', '-s',
Modified: dcplusplus/trunk/win32/AboutDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/AboutDlg.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/AboutDlg.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -21,7 +21,6 @@
#include "AboutDlg.h"
#include <dcpp/SimpleXML.h>
-#include <dcpp/ResourceManager.h>
#include <dcpp/version.h>
#include "WinUtil.h"
@@ -57,11 +56,9 @@
setItemText(IDC_VERSION, Text::toT("DC++ " VERSIONSTRING "\n(c) Copyright 2001-2007 Jacek Sieka\nEx-codeveloper: Per Lind\303\251n\nGraphics: Martin Skogevall et al.\nDC++ is licenced under GPL\nhttp://dcplusplus.sourceforge.net/"));
setItemText(IDC_TTH, WinUtil::tth);
setItemText(IDC_THANKS, Text::toT(thanks));
- setItemText(IDC_TOTALS, Text::toT("Upload: " + Util::formatBytes(SETTING(TOTAL_UPLOAD)) + ", Download: " + Util::formatBytes(SETTING(TOTAL_DOWNLOAD))));
+ setItemText(IDC_TOTALS, str(TF_("Upload: %1%, Download: %2%") % Text::toT(Util::formatBytes(SETTING(TOTAL_UPLOAD))) % Text::toT(Util::formatBytes(SETTING(TOTAL_DOWNLOAD)))));
if(SETTING(TOTAL_DOWNLOAD) > 0) {
- char buf[64];
- sprintf(buf, "Ratio (up/down): %.2f", ((double)SETTING(TOTAL_UPLOAD)) / ((double)SETTING(TOTAL_DOWNLOAD)));
- setItemText(IDC_RATIO, Text::toT(buf));
+ setItemText(IDC_RATIO, str(TF_("Ratio (up/down): %1$0.2f") % (((double)SETTING(TOTAL_UPLOAD)) / ((double)SETTING(TOTAL_DOWNLOAD)))));
}
setItemText(IDC_LATEST, T_("Downloading..."));
Modified: dcplusplus/trunk/win32/Advanced3Page.cpp
===================================================================
--- dcplusplus/trunk/win32/Advanced3Page.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/Advanced3Page.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -25,23 +25,21 @@
#include <dcpp/SettingsManager.h>
PropPage::TextItem Advanced3Page::texts[] = {
-#ifdef PORT_ME
- { IDC_SETTINGS_B, ResourceManager::B },
- { IDC_SETTINGS_WRITE_BUFFER, ResourceManager::SETTINGS_WRITE_BUFFER },
- { IDC_SETTINGS_KB, ResourceManager::KiB },
- { IDC_SETTINGS_MAX_HASH_SPEED, ResourceManager::SETTINGS_MAX_HASH_SPEED },
- { IDC_SETTINGS_MBS, ResourceManager::MiBPS },
- { IDC_SETTINGS_PM_HISTORY, ResourceManager::SETTINGS_PM_HISTORY },
- { IDC_SETTINGS_SEARCH_HISTORY, ResourceManager::SETTINGS_SEARCH_HISTORY },
- { IDC_SETTINGS_TEXT_MINISLOT, ResourceManager::SETTINGS_TEXT_MINISLOT },
- { IDC_SETTINGS_KB2, ResourceManager::KiB },
- { IDC_SETTINGS_BIND_ADDRESS, ResourceManager::SETTINGS_BIND_ADDRESS },
- { IDC_SETTINGS_MAX_FILELIST_SIZE, ResourceManager::SETTINGS_MAX_FILELIST_SIZE },
- { IDC_SETTINGS_MB, ResourceManager::MiB },
- { IDC_SETTINGS_AUTO_REFRESH_TIME, ResourceManager::SETTINGS_AUTO_REFRESH_TIME },
- { IDC_SETTINGS_AUTO_SEARCH_LIMIT, ResourceManager::SETTINGS_AUTO_SEARCH_LIMIT },
- { IDC_SETTINGS_MIN_SEGMENT_SIZE, ResourceManager::SETTINGS_MIN_SEGMENT_SIZE },
-#endif
+ { IDC_SETTINGS_B, N_("B") },
+ { IDC_SETTINGS_WRITE_BUFFER, N_("Write buffer size") },
+ { IDC_SETTINGS_KB, N_("KiB") },
+ { IDC_SETTINGS_MAX_HASH_SPEED, N_("Max hash speed") },
+ { IDC_SETTINGS_MBS, N_("MiB/s") },
+ { IDC_SETTINGS_PM_HISTORY, N_("PM history") },
+ { IDC_SETTINGS_SEARCH_HISTORY, N_("Search history") },
+ { IDC_SETTINGS_TEXT_MINISLOT, N_("Mini slot size") },
+ { IDC_SETTINGS_KB2, N_("KiB") },
+ { IDC_SETTINGS_BIND_ADDRESS, N_("Bind address") },
+ { IDC_SETTINGS_MAX_FILELIST_SIZE, N_("Max filelist size") },
+ { IDC_SETTINGS_MB, N_("MiB") },
+ { IDC_SETTINGS_AUTO_REFRESH_TIME, N_("Auto refresh time") },
+ { IDC_SETTINGS_AUTO_SEARCH_LIMIT, N_("Auto-search limit") },
+ { IDC_SETTINGS_MIN_SEGMENT_SIZE, N_("Min segment size") },
{ 0, 0 }
};
Modified: dcplusplus/trunk/win32/AdvancedPage.cpp
===================================================================
--- dcplusplus/trunk/win32/AdvancedPage.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/AdvancedPage.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -27,27 +27,25 @@
PropPage::Item AdvancedPage::items[] = { { 0, 0, PropPage::T_END } };
AdvancedPage::ListItem AdvancedPage::listItems[] = {
-#ifdef PORT_ME
- { SettingsManager::AUTO_AWAY, ResourceManager::SETTINGS_AUTO_AWAY },
- { SettingsManager::AUTO_FOLLOW, ResourceManager::SETTINGS_AUTO_FOLLOW },
- { SettingsManager::CLEAR_SEARCH, ResourceManager::SETTINGS_CLEAR_SEARCH },
- { SettingsManager::LIST_DUPES, ResourceManager::SETTINGS_LIST_DUPES },
- { SettingsManager::URL_HANDLER, ResourceManager::SETTINGS_URL_HANDLER },
- { SettingsManager::MAGNET_REGISTER, ResourceManager::SETTINGS_URL_MAGNET },
- { SettingsManager::KEEP_LISTS, ResourceManager::SETTINGS_KEEP_LISTS },
- { SettingsManager::AUTO_KICK, ResourceManager::SETTINGS_AUTO_KICK },
- { SettingsManager::SHOW_PROGRESS_BARS, ResourceManager::SETTINGS_SHOW_PROGRESS_BARS },
- { SettingsManager::SFV_CHECK, ResourceManager::SETTINGS_SFV_CHECK },
- { SettingsManager::NO_AWAYMSG_TO_BOTS, ResourceManager::SETTINGS_NO_AWAYMSG_TO_BOTS },
- { SettingsManager::ADLS_BREAK_ON_FIRST, ResourceManager::SETTINGS_ADLS_BREAK_ON_FIRST },
- { SettingsManager::COMPRESS_TRANSFERS, ResourceManager::SETTINGS_COMPRESS_TRANSFERS },
- { SettingsManager::HUB_USER_COMMANDS, ResourceManager::SETTINGS_HUB_USER_COMMANDS },
- { SettingsManager::SEND_UNKNOWN_COMMANDS, ResourceManager::SETTINGS_SEND_UNKNOWN_COMMANDS },
- { SettingsManager::ADD_FINISHED_INSTANTLY, ResourceManager::SETTINGS_ADD_FINISHED_INSTANTLY },
- { SettingsManager::USE_CTRL_FOR_LINE_HISTORY, ResourceManager::SETTINGS_USE_CTRL_FOR_LINE_HISTORY },
- { SettingsManager::AUTO_KICK_NO_FAVS, ResourceManager::SETTINGS_AUTO_KICK_NO_FAVS },
- { SettingsManager::SHOW_SHELL_MENU, ResourceManager::SETTINGS_SHOW_SHELL_MENU },
-#endif
+ { SettingsManager::AUTO_AWAY, N_("Auto-away on minimize (and back on restore)") },
+ { SettingsManager::AUTO_FOLLOW, N_("Automatically follow redirects") },
+ { SettingsManager::CLEAR_SEARCH, N_("Clear search box after each search") },
+ { SettingsManager::LIST_DUPES, N_("Keep duplicate files in your file list") },
+ { SettingsManager::URL_HANDLER, N_("Register with Windows to handle dchub:// and adc:// URL links") },
+ { SettingsManager::MAGNET_REGISTER, N_("Register with Windows to handle magnet: URI links") },
+ { SettingsManager::KEEP_LISTS, N_("Don't delete file lists when exiting") },
+ { SettingsManager::AUTO_KICK, N_("Automatically disconnect users who leave the hub") },
+ { SettingsManager::SHOW_PROGRESS_BARS, N_("Show progress bars for transfers") },
+ { SettingsManager::SFV_CHECK, N_("Enable automatic SFV checking") },
+ { SettingsManager::NO_AWAYMSG_TO_BOTS, N_("Don't send the away message to bots") },
+ { SettingsManager::ADLS_BREAK_ON_FIRST, N_("Break on first ADLSearch match") },
+ { SettingsManager::COMPRESS_TRANSFERS, N_("Enable safe and compressed transfers") },
+ { SettingsManager::HUB_USER_COMMANDS, N_("Accept custom user commands from hub") },
+ { SettingsManager::SEND_UNKNOWN_COMMANDS, N_("Send unknown /commands to the hub") },
+ { SettingsManager::ADD_FINISHED_INSTANTLY, N_("Add finished files to share instantly (if shared)") },
+ { SettingsManager::USE_CTRL_FOR_LINE_HISTORY, N_("Use CTRL for line history") },
+ { SettingsManager::AUTO_KICK_NO_FAVS, N_("Don't automatically disconnect favorite users who leave the hub") },
+ { SettingsManager::SHOW_SHELL_MENU, N_("Show shell menu where possible") },
{ 0, 0 }
};
Modified: dcplusplus/trunk/win32/Appearance2Page.cpp
===================================================================
--- dcplusplus/trunk/win32/Appearance2Page.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/Appearance2Page.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -26,20 +26,18 @@
#include "WinUtil.h"
PropPage::TextItem Appearance2Page::texts[] = {
-#ifdef PORT_ME
- { IDC_BEEP_NOTIFICATION, ResourceManager::SETTINGS_NOTIFICATION_SOUND },
- { IDC_BROWSE, ResourceManager::BROWSE_ACCEL },
- { IDC_SETTINGS_COLORS, ResourceManager::SETTINGS_COLORS },
- { IDC_SELWINCOLOR, ResourceManager::SETTINGS_SELECT_WINDOW_COLOR },
- { IDC_SELTEXT, ResourceManager::SETTINGS_SELECT_TEXT_FACE },
- { IDC_COLOREXAMPLE, ResourceManager::SETTINGS_EXAMPLE_TEXT },
- { IDC_SETTINGS_REQUIRES_RESTART, ResourceManager::SETTINGS_REQUIRES_RESTART },
- { IDC_SETTINGS_UPLOAD_BAR_COLOR, ResourceManager::UPLOADS },
- { IDC_SETTINGS_SOUNDS, ResourceManager::SETTINGS_SOUNDS },
- { IDC_PRIVATE_MESSAGE_BEEP, ResourceManager::SETTINGS_PM_BEEP },
- { IDC_PRIVATE_MESSAGE_BEEP_OPEN, ResourceManager::SETTINGS_PM_BEEP_OPEN },
- { IDC_SETTINGS_DOWNLOAD_BAR_COLOR, ResourceManager::DOWNLOADS },
-#endif
+ { IDC_BEEP_NOTIFICATION, N_("Notification sound") },
+ { IDC_BROWSE, N_("&Browse...") },
+ { IDC_SETTINGS_COLORS, N_("Colors") },
+ { IDC_SELWINCOLOR, N_("Select &window color") },
+ { IDC_SELTEXT, N_("Select &text style") },
+ { IDC_COLOREXAMPLE, N_("Donate \342\202\254\342\202\254\342\202\254:s! (ok, dirty dollars are fine as well =) (see help menu)") },
+ { IDC_SETTINGS_REQUIRES_RESTART, N_("Note; most of these options require that you restart DC++") },
+ { IDC_SETTINGS_UPLOAD_BAR_COLOR, N_("Uploads") },
+ { IDC_SETTINGS_SOUNDS, N_("Sounds") },
+ { IDC_PRIVATE_MESSAGE_BEEP, N_("Make an annoying sound every time a private message is received") },
+ { IDC_PRIVATE_MESSAGE_BEEP_OPEN, N_("Make an annoying sound when a private message window is opened") },
+ { IDC_SETTINGS_DOWNLOAD_BAR_COLOR, N_("Downloads") },
{ 0, 0 }
};
Modified: dcplusplus/trunk/win32/AppearancePage.cpp
===================================================================
--- dcplusplus/trunk/win32/AppearancePage.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/AppearancePage.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -28,13 +28,11 @@
#include "WinUtil.h"
PropPage::TextItem AppearancePage::texts[] = {
-#ifdef PORT_ME
- { IDC_SETTINGS_APPEARANCE_OPTIONS, ResourceManager::SETTINGS_OPTIONS },
- { IDC_SETTINGS_DEFAULT_AWAY_MSG, ResourceManager::SETTINGS_DEFAULT_AWAY_MSG },
- { IDC_SETTINGS_TIME_STAMPS_FORMAT, ResourceManager::SETTINGS_TIME_STAMPS_FORMAT },
- { IDC_SETTINGS_LANGUAGE_FILE, ResourceManager::SETTINGS_LANGUAGE_FILE },
- { IDC_SETTINGS_REQUIRES_RESTART, ResourceManager::SETTINGS_REQUIRES_RESTART },
-#endif
+ { IDC_SETTINGS_APPEARANCE_OPTIONS, N_("Options") },
+ { IDC_SETTINGS_DEFAULT_AWAY_MSG, N_("Default away message") },
+ { IDC_SETTINGS_TIME_STAMPS_FORMAT, N_("Set timestamps") },
+ { IDC_SETTINGS_LANGUAGE_FILE, N_("Language file") },
+ { IDC_SETTINGS_REQUIRES_RESTART, N_("Note; most of these options require that you restart DC++") },
{ 0, 0 }
};
@@ -45,19 +43,17 @@
};
PropPage::ListItem AppearancePage::listItems[] = {
-#ifdef PORT_ME
- { SettingsManager::ALT_SORT_ORDER, ResourceManager::SETTINGS_ALT_SORT_ORDER },
- { SettingsManager::FILTER_MESSAGES, ResourceManager::SETTINGS_FILTER_MESSAGES },
- { SettingsManager::MINIMIZE_TRAY, ResourceManager::SETTINGS_MINIMIZE_TRAY },
- { SettingsManager::TIME_STAMPS, ResourceManager::SETTINGS_TIME_STAMPS },
- { SettingsManager::STATUS_IN_CHAT, ResourceManager::SETTINGS_STATUS_IN_CHAT },
- { SettingsManager::SHOW_JOINS, ResourceManager::SETTINGS_SHOW_JOINS },
- { SettingsManager::FAV_SHOW_JOINS, ResourceManager::SETTINGS_FAV_SHOW_JOINS },
- { SettingsManager::SORT_FAVUSERS_FIRST, ResourceManager::SETTINGS_SORT_FAVUSERS_FIRST },
- { SettingsManager::USE_SYSTEM_ICONS, ResourceManager::SETTINGS_USE_SYSTEM_ICONS },
- { SettingsManager::USE_OEM_MONOFONT, ResourceManager::SETTINGS_USE_OEM_MONOFONT },
- { SettingsManager::GET_USER_COUNTRY, ResourceManager::SETTINGS_GET_USER_COUNTRY },
-#endif
+ { SettingsManager::ALT_SORT_ORDER, N_("Sort all downloads first") },
+ { SettingsManager::FILTER_MESSAGES, N_("Filter kick and NMDC debug messages") },
+ { SettingsManager::MINIMIZE_TRAY, N_("Minimize to tray") },
+ { SettingsManager::TIME_STAMPS, N_("Show timestamps in chat by default") },
+ { SettingsManager::STATUS_IN_CHAT, N_("View status messages in main chat") },
+ { SettingsManager::SHOW_JOINS, N_("Show joins / parts in chat by default") },
+ { SettingsManager::FAV_SHOW_JOINS, N_("Only show joins / parts for favorite users") },
+ { SettingsManager::SORT_FAVUSERS_FIRST, N_("Sort favorite users first") },
+ { SettingsManager::USE_SYSTEM_ICONS, N_("Use system icons when browsing files (slows browsing down a bit)") },
+ { SettingsManager::USE_OEM_MONOFONT, N_("Use OEM monospaced font for viewing text files") },
+ { SettingsManager::GET_USER_COUNTRY, N_("Guess user country from IP") },
{ 0, 0 }
};
Modified: dcplusplus/trunk/win32/CertificatesPage.cpp
===================================================================
--- dcplusplus/trunk/win32/CertificatesPage.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/CertificatesPage.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -38,11 +38,9 @@
};
PropPage::ListItem CertificatesPage::listItems[] = {
-#ifdef PORT_ME
- { SettingsManager::USE_TLS, ResourceManager::SETTINGS_USE_TLS },
- { SettingsManager::ALLOW_UNTRUSTED_HUBS, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_HUBS },
- { SettingsManager::ALLOW_UNTRUSTED_CLIENTS, ResourceManager::SETTINGS_ALLOW_UNTRUSTED_CLIENTS, },
-#endif
+ { SettingsManager::USE_TLS, N_("Use TLS when remote client supports it") },
+ { SettingsManager::ALLOW_UNTRUSTED_HUBS, N_("Allow TLS connections to hubs without trusted certificate") },
+ { SettingsManager::ALLOW_UNTRUSTED_CLIENTS, N_("Allow TLS connections to clients without trusted certificate") },
{ 0, 0 }
};
Modified: dcplusplus/trunk/win32/CommandDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/CommandDlg.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/CommandDlg.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -22,7 +22,6 @@
#include "CommandDlg.h"
-#include <dcpp/ResourceManager.h>
#include <dcpp/UserCommand.h>
#include <dcpp/NmdcHub.h>
#include <dcpp/version.h>
Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -25,7 +25,6 @@
#include "resource.h"
-#include <dcpp/ResourceManager.h>
#include <dcpp/ADLSearch.h>
#include <dcpp/FavoriteManager.h>
#include <dcpp/File.h>
Modified: dcplusplus/trunk/win32/DownloadPage.cpp
===================================================================
--- dcplusplus/trunk/win32/DownloadPage.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/DownloadPage.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -27,21 +27,19 @@
#include "HubListsDlg.h"
PropPage::TextItem DownloadPage::texts[] = {
-#ifdef PORT_ME
- { IDC_SETTINGS_DIRECTORIES, ResourceManager::SETTINGS_DIRECTORIES },
- { IDC_SETTINGS_DOWNLOAD_DIRECTORY, ResourceManager::SETTINGS_DOWNLOAD_DIRECTORY },
- { IDC_BROWSEDIR, ResourceManager::BROWSE_ACCEL },
- { IDC_SETTINGS_UNFINISHED_DOWNLOAD_DIRECTORY, ResourceManager::SETTINGS_UNFINISHED_DOWNLOAD_DIRECTORY },
- { IDC_BROWSETEMPDIR, ResourceManager::BROWSE },
- { IDC_SETTINGS_DOWNLOAD_LIMITS, ResourceManager::SETTINGS_DOWNLOAD_LIMITS },
- { IDC_SETTINGS_DOWNLOADS_MAX, ResourceManager::SETTINGS_DOWNLOADS_MAX },
- { IDC_SETTINGS_DOWNLOADS_SPEED_PAUSE, ResourceManager::SETTINGS_DOWNLOADS_SPEED_PAUSE },
- { IDC_SETTINGS_SPEEDS_NOT_ACCURATE, ResourceManager::SETTINGS_SPEEDS_NOT_ACCURATE },
- { IDC_SETTINGS_PUBLIC_HUB_LIST, ResourceManager::SETTINGS_PUBLIC_HUB_LIST },
- { IDC_SETTINGS_PUBLIC_HUB_LIST_URL, ResourceManager::SETTINGS_PUBLIC_HUB_LIST_URL },
- { IDC_SETTINGS_LIST_CONFIG, ResourceManager::SETTINGS_CONFIGURE_HUB_LISTS },
- { IDC_SETTINGS_PUBLIC_HUB_LIST_HTTP_PROXY, ResourceManager::SETTINGS_PUBLIC_HUB_LIST_HTTP_PROXY },
-#endif
+ { IDC_SETTINGS_DIRECTORIES, N_("Directories") },
+ { IDC_SETTINGS_DOWNLOAD_DIRECTORY, N_("Default download directory") },
+ { IDC_BROWSEDIR, N_("&Browse...") },
+ { IDC_SETTINGS_UNFINISHED_DOWNLOAD_DIRECTORY, N_("Unfinished downloads directory") },
+ { IDC_BROWSETEMPDIR, N_("Browse...") },
+ { IDC_SETTINGS_DOWNLOAD_LIMITS, N_("Limits") },
+ { IDC_SETTINGS_DOWNLOADS_MAX, N_("Maximum simultaneous downloads (0 = infinite)") },
+ { IDC_SETTINGS_DOWNLOADS_SPEED_PAUSE, N_("No new downloads if speed exceeds (KiB/s, 0 = disable)") },
+ { IDC_SETTINGS_SPEEDS_NOT_ACCURATE, N_("Note; because of changing download speeds, this is not 100% accurate...") },
+ { IDC_SETTINGS_PUBLIC_HUB_LIST, N_("Public Hubs list") },
+ { IDC_SETTINGS_PUBLIC_HUB_LIST_URL, N_("Public Hubs list URL") },
+ { IDC_SETTINGS_LIST_CONFIG, N_("Configure Public Hub Lists") },
+ { IDC_SETTINGS_PUBLIC_HUB_LIST_HTTP_PROXY, N_("HTTP Proxy (for hublist only)") },
{ 0, 0 }
};
Modified: dcplusplus/trunk/win32/FavHubProperties.cpp
===================================================================
--- dcplusplus/trunk/win32/FavHubProperties.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/FavHubProperties.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -23,7 +23,6 @@
#include "FavHubProperties.h"
#include <dcpp/FavoriteManager.h>
-#include <dcpp/ResourceManager.h>
#include <dcpp/version.h>
FavHubProperties::FavHubProperties(SmartWin::Widget* parent, FavoriteHubEntry *_entry) :
Modified: dcplusplus/trunk/win32/FavoriteDirsPage.cpp
===================================================================
--- dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/FavoriteDirsPage.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -29,12 +29,10 @@
#include "LineDlg.h"
PropPage::TextItem FavoriteDirsPage::texts[] = {
-#ifdef PORT_ME
- { IDC_SETTINGS_FAVORITE_DIRECTORIES, ResourceManager::SETTINGS_FAVORITE_DIRS },
- { IDC_REMOVE, ResourceManager::REMOVE },
- { IDC_ADD, ResourceManager::SETTINGS_ADD_FOLDER },
- { IDC_RENAME, ResourceManager::SETTINGS_RENAME_FOLDER },
-#endif
+ { IDC_SETTINGS_FAVORITE_DIRECTORIES, N_("Favorite download directories") },
+ { IDC_REMOVE, N_("&Remove") },
+ { IDC_ADD, N_("&Add folder") },
+ { IDC_RENAME, N_("Rename") },
{ 0, 0 }
};
Modified: dcplusplus/trunk/win32/GeneralPage.cpp
===================================================================
--- dcplusplus/trunk/win32/GeneralPage.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/GeneralPage.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -25,14 +25,12 @@
#include <dcpp/SettingsManager.h>
PropPage::TextItem GeneralPage::texts[] = {
-#ifdef PORT_ME
- { IDC_SETTINGS_PERSONAL_INFORMATION, ResourceManager::SETTINGS_PERSONAL_INFORMATION },
- { IDC_SETTINGS_NICK, ResourceManager::NICK },
- { IDC_SETTINGS_EMAIL, ResourceManager::EMAIL },
- { IDC_SETTINGS_DESCRIPTION, ResourceManager::DESCRIPTION },
- { IDC_SETTINGS_UPLOAD_LINE_SPEED, ResourceManager::SETTINGS_UPLOAD_LINE_SPEED },
- { IDC_SETTINGS_MEBIBITS, ResourceManager::MiBITSPS },
-#endif
+ { IDC_SETTINGS_PERSONAL_INFORMATION, N_("Personal Information") },
+ { IDC_SETTINGS_NICK, N_("Nick") },
+ { IDC_SETTINGS_EMAIL, N_("E-Mail") },
+ { IDC_SETTINGS_DESCRIPTION, N_("Description") },
+ { IDC_SETTINGS_UPLOAD_LINE_SPEED, N_("Line speed (upload)") },
+ { IDC_SETTINGS_MEBIBITS, N_("MiBits/s") },
{ 0, 0 }
};
Modified: dcplusplus/trunk/win32/HashProgressDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/HashProgressDlg.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/HashProgressDlg.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -23,7 +23,6 @@
#include "HashProgressDlg.h"
#include <dcpp/HashManager.h>
-#include <dcpp/ResourceManager.h>
HashProgressDlg::HashProgressDlg(SmartWin::Widget* parent, bool aAutoClose) :
SmartWin::WidgetFactory<SmartWin::WidgetModalDialog>(parent),
@@ -81,24 +80,24 @@
}
double diff = tick - startTime;
if(diff < 1000 || files == 0 || bytes == 0) {
- ::SetDlgItemText(handle(), IDC_FILES_PER_HOUR, Text::toT("-.-- " + STRING(FILES_PER_HOUR) + ", " + Util::toString((uint32_t)files) + " " + STRING(FILES_LEFT)).c_str());
- ::SetDlgItemText(handle(), IDC_HASH_SPEED, Text::toT("-.-- B/s, " + Util::formatBytes(bytes) + " " + STRING(LEFT)).c_str());
- ::SetDlgItemText(handle(), IDC_TIME_LEFT, Text::toT("-:--:-- " + STRING(LEFT)).c_str());
+ ::SetDlgItemText(handle(), IDC_FILES_PER_HOUR, str(TF_("-.-- files/h, %1% files left") % (uint32_t)files).c_str());
+ ::SetDlgItemText(handle(), IDC_HASH_SPEED, str(TF_("-.-- B/s, %1% left") % Text::toT(Util::formatBytes(bytes))).c_str());
+ ::SetDlgItemText(handle(), IDC_TIME_LEFT, CT_("-:--:-- left"));
progress->setPosition(0);
} else {
double filestat = (((double)(startFiles - files)) * 60 * 60 * 1000) / diff;
double speedStat = (((double)(startBytes - bytes)) * 1000) / diff;
- ::SetDlgItemText(handle(), IDC_FILES_PER_HOUR, Text::toT(Util::toString(filestat) + " " + STRING(FILES_PER_HOUR) + ", " + Util::toString((uint32_t)files) + " " + STRING(FILES_LEFT)).c_str());
- ::SetDlgItemText(handle(), IDC_HASH_SPEED, Text::toT(Util::formatBytes((int64_t)speedStat) + "/s, " + Util::formatBytes(bytes) + " " + STRING(LEFT)).c_str());
+ ::SetDlgItemText(handle(), IDC_FILES_PER_HOUR, str(TF_("%1% files/h, %2% files left") % filestat % (uint32_t)files).c_str());
+ ::SetDlgItemText(handle(), IDC_HASH_SPEED, str(TF_("%1%/s, %2% left") % Text::toT(Util::formatBytes((int64_t)speedStat)) % Text::toT(Util::formatBytes(bytes))).c_str());
if(filestat == 0 || speedStat == 0) {
- ::SetDlgItemText(handle(), IDC_TIME_LEFT, Text::toT("-:--:-- " + STRING(LEFT)).c_str());
+ ::SetDlgItemText(handle(), IDC_TIME_LEFT, CT_("-:--:-- left"));
} else {
double fs = files * 60 * 60 / filestat;
double ss = bytes / speedStat;
- ::SetDlgItemText(handle(), IDC_TIME_LEFT, Text::toT(Util::formatSeconds((int64_t)(fs + ss) / 2) + " " + STRING(LEFT)).c_str());
+ ::SetDlgItemText(handle(), IDC_TIME_LEFT, str(TF_("%1% left") % Text::toT(Util::formatSeconds((int64_t)(fs + ss) / 2))).c_str());
}
}
Modified: dcplusplus/trunk/win32/LogPage.cpp
===================================================================
--- dcplusplus/trunk/win32/LogPage.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/LogPage.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -28,13 +28,11 @@
#include "WinUtil.h"
PropPage::TextItem LogPage::texts[] = {
-#ifdef PORT_ME
- { IDC_SETTINGS_LOGGING, ResourceManager::SETTINGS_LOGGING },
- { IDC_SETTINGS_LOG_DIR, ResourceManager::DIRECTORY },
- { IDC_BROWSE_LOG, ResourceManager::BROWSE_ACCEL },
- { IDC_SETTINGS_FORMAT, ResourceManager::SETTINGS_FORMAT },
- { IDC_SETTINGS_FILE_NAME, ResourceManager::SETTINGS_FILE_NAME },
-#endif
+ { IDC_SETTINGS_LOGGING, N_("Logging") },
+ { IDC_SETTINGS_LOG_DIR, N_("Directory") },
+ { IDC_BROWSE_LOG, N_("&Browse...") },
+ { IDC_SETTINGS_FORMAT, N_("Format") },
+ { IDC_SETTINGS_FILE_NAME, N_("Filename") },
{ 0, 0 }
};
@@ -44,15 +42,13 @@
};
PropPage::ListItem LogPage::listItems[] = {
-#ifdef PORT_ME
- { SettingsManager::LOG_MAIN_CHAT, ResourceManager::SETTINGS_LOG_MAIN_CHAT },
- { SettingsManager::LOG_PRIVATE_CHAT, ResourceManager::SETTINGS_LOG_PRIVATE_CHAT },
- { SettingsManager::LOG_DOWNLOADS, ResourceManager::SETTINGS_LOG_DOWNLOADS },
- { SettingsManager::LOG_UPLOADS, ResourceManager::SETTINGS_LOG_UPLOADS },
- { SettingsManager::LOG_SYSTEM, ResourceManager::SETTINGS_LOG_SYSTEM_MESSAGES },
- { SettingsManager::LOG_STATUS_MESSAGES, ResourceManager::SETTINGS_LOG_STATUS_MESSAGES },
- { SettingsManager::LOG_FILELIST_TRANSFERS, ResourceManager::SETTINGS_LOG_FILELIST_TRANSFERS },
-#endif
+ { SettingsManager::LOG_MAIN_CHAT, N_("Log main chat") },
+ { SettingsManager::LOG_PRIVATE_CHAT, N_("Log private chat") },
+ { SettingsManager::LOG_DOWNLOADS, N_("Log downloads") },
+ { SettingsManager::LOG_UPLOADS, N_("Log uploads") },
+ { SettingsManager::LOG_SYSTEM, N_("Log system messages") },
+ { SettingsManager::LOG_STATUS_MESSAGES, N_("Log status messages") },
+ { SettingsManager::LOG_FILELIST_TRANSFERS, N_("Log filelist transfers") },
{ 0, 0 }
};
Modified: dcplusplus/trunk/win32/MagnetDlg.cpp
===================================================================
--- dcplusplus/trunk/win32/MagnetDlg.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/MagnetDlg.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -22,7 +22,6 @@
#include "MagnetDlg.h"
-#include <dcpp/ResourceManager.h>
#include "WinUtil.h"
MagnetDlg::MagnetDlg(SmartWin::Widget* parent, const tstring& aHash, const tstring& aFileName) :
Modified: dcplusplus/trunk/win32/NetworkPage.cpp
===================================================================
--- dcplusplus/trunk/win32/NetworkPage.cpp 2008-01-19 23:29:06 UTC (rev 970)
+++ dcplusplus/trunk/win32/NetworkPage.cpp 2008-01-21 19:13:08 UTC (rev 971)
@@ -27,27 +27,25 @@
#include "WinUtil.h"
PropPage::TextItem NetworkPage::texts[] = {
-#ifdef PORT_ME
- { IDC_DIRECT, ResourceManager::SETTINGS_DIRECT },
- { IDC_DIRECT_OUT, ResourceManager::SETTINGS_DIRECT },
- { IDC_FIREWALL_UPNP, ResourceManager::SETTINGS_FIREWALL_UPNP },
- { IDC_FIREWALL_NAT, ResourceManager::SETTINGS_FIREWALL_NAT },
- { IDC_FIREWALL_PASSIVE, ResourceManager::SETTINGS_FIREWALL_PASSIVE },
- { IDC_OVERRIDE, ResourceManager::SETTINGS_OVERRIDE },
- { IDC_SOCKS5, ResourceManager::SETTINGS_SOCKS5 },
- { IDC_SETTINGS_PORTS, ResourceManager::SETTINGS_PORTS },
- { IDC_SETTINGS_IP, ResourceManager::SETTINGS_EXTERNAL_IP },
- { IDC_SETTINGS_PORT_TCP, ResourceManager::SETTINGS_TCP_PORT },
- { IDC_SETTINGS_PORT_UDP, ResourceManager::SETTINGS_UDP_PORT },
- { IDC_SETTINGS_PORT_TLS, ResourceManager::SETTINGS_TLS_PORT },
- { IDC_SETTINGS_SOCKS5_IP, ResourceManager::SETTINGS_SOCKS5_IP },
- { IDC_SETTINGS_SOCKS5_PORT, ResourceManager::SETTINGS_SOCKS5_PORT },
- { IDC_SETTINGS_SOCKS5_USERNAME, ResourceManager::SETTINGS_SOCKS5_USERNAME },
- { IDC_SETTINGS_SOCKS5_PASSWORD, ResourceManager::PASSWORD },
- { IDC_SOCKS_RESOLVE, ResourceManager::SETTINGS_SOCKS5_RESOLVE },
- { IDC_SETTINGS_INCOMING, ResourceManager::SETTINGS_INCOMING },
- { IDC_SETTINGS_OUTGOING, ResourceManager::SETTINGS_OUTGOING },
-#endif
+ { IDC_DIRECT, N_("Direct connection") },
+ { IDC_DIRECT_OUT, N_("Direct connection") },
+ { IDC_FIREWALL_UPNP, N_("Firewall with UPnP") },
+ { IDC_FIREWALL_NAT, N_("Firewall with manua...
[truncated message content] |
|
From: <arn...@us...> - 2008-01-22 22:48:03
|
Revision: 973
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=973&view=rev
Author: arnetheduck
Date: 2008-01-22 14:47:59 -0800 (Tue, 22 Jan 2008)
Log Message:
-----------
win32 translations done, use boost intrusive_ptr
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/Pointer.h
dcplusplus/trunk/dcpp/User.h
dcplusplus/trunk/dcpp/forward.h
dcplusplus/trunk/win32/DirectoryListingFrame.cpp
dcplusplus/trunk/win32/FinishedFrameBase.h
dcplusplus/trunk/win32/HubFrame.cpp
dcplusplus/trunk/win32/MDIChildFrame.h
dcplusplus/trunk/win32/MainWindow.cpp
dcplusplus/trunk/win32/MainWindow.h
dcplusplus/trunk/win32/PrivateFrame.cpp
dcplusplus/trunk/win32/PublicHubsFrame.cpp
dcplusplus/trunk/win32/QueueFrame.cpp
dcplusplus/trunk/win32/SearchFrame.cpp
dcplusplus/trunk/win32/SpyFrame.cpp
dcplusplus/trunk/win32/SpyFrame.h
dcplusplus/trunk/win32/StaticFrame.h
dcplusplus/trunk/win32/TransferView.cpp
dcplusplus/trunk/win32/UserInfoBase.h
dcplusplus/trunk/win32/WaitingUsersFrame.cpp
dcplusplus/trunk/win32/WinUtil.cpp
dcplusplus/trunk/win32/stdafx.h
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/changelog.txt 2008-01-22 22:47:59 UTC (rev 973)
@@ -12,8 +12,8 @@
* Chat timestamps on by default
* Added tab drag/drop (thanks poy)
* Changed Pothead to mikejj
+* Fixed search spy crash
-
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
* Use system header arrows on common controls 6+ (thanks poy)
Modified: dcplusplus/trunk/dcpp/Pointer.h
===================================================================
--- dcplusplus/trunk/dcpp/Pointer.h 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/dcpp/Pointer.h 2008-01-22 22:47:59 UTC (rev 973)
@@ -16,14 +16,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#if !defined(DCPLUSPLUS_DCPP_POINTER_H)
+#ifndef DCPLUSPLUS_DCPP_POINTER_H
#define DCPLUSPLUS_DCPP_POINTER_H
+#include <boost/intrusive_ptr.hpp>
#include "Thread.h"
namespace dcpp {
-class PointerBase
+class intrusive_ptr_base
{
public:
void inc() throw() {
@@ -44,9 +45,9 @@
}
protected:
- PointerBase() throw() : ref(0) { }
+ intrusive_ptr_base() throw() : ref(0) { }
- virtual ~PointerBase() throw() {
+ virtual ~intrusive_ptr_base() throw() {
dcassert(!ref);
}
@@ -54,107 +55,9 @@
volatile long ref;
};
-/**
- * Note; don't forget to make the destructor virtual if deriving from this class
- */
-template <class T>
-class Pointer
-{
-public:
- Pointer ( PointerBase *aBase = 0) throw() : base(aBase) {
- if ( base ) {
- base->inc();
- }
- }
+inline void intrusive_ptr_add_ref(intrusive_ptr_base* p) { p->inc(); }
+inline void intrusive_ptr_release(intrusive_ptr_base* p) { p->dec(); }
- Pointer( const Pointer &rhs ) throw() : base(rhs.base) {
- if ( base ) {
- base->inc();
- }
- }
-
- Pointer &operator =( const Pointer &rhs ) throw() {
- if ( rhs.base ) {
- rhs.base->inc();
- }
-
- if ( base ) {
- base->dec();
- }
-
- base = rhs.base;
- return *this;
- }
-
- Pointer &operator =( T* rhs ) throw() {
- if (rhs) {
- rhs->inc();
- if ( base ) {
- base->dec();
- }
- base = rhs;
- }
-
-
- return *this;
- }
-
- ~Pointer() throw() {
- if ( base ) {
- base->dec();
- }
- }
-
- T* operator->() { return asT(); }
- T& operator* () { return *asT(); }
- const T* operator->() const { return asT(); }
- const T& operator* () const { return *asT(); }
-
- operator bool() const { return base != NULL; }
-
- bool operator==(T* rhs) const { return (T*)base == rhs; }
- bool operator==(const Pointer& rhs) const { return base == rhs.base; }
- bool operator!=(T* rhs) const { return (T*)base != rhs; }
- bool operator!=(const Pointer& rhs) const { return base != rhs.base; }
- bool operator<(T* rhs) const { return (T*)base < rhs; }
- bool operator<(const Pointer& rhs) const { return base < rhs.base; }
- bool operator>(T* rhs) const { return (T*)base > rhs; }
- bool operator>(const Pointer& rhs) const { return base > rhs.base; }
-
-
- static void swap ( Pointer &lhs, Pointer &rhs ) {
- PointerBase *temp = lhs.base;
- lhs.base = rhs.base;
- rhs.base = temp;
- }
-
- void release() {
- if ( base ) {
- base->dec();
- base = 0;
- }
- }
-private:
- PointerBase* base;
-
- T* asT () {
- dcassert(base);
- return (T*)base;
- }
-
- const T* asT() const {
- dcassert(base);
- return (T*)base;
- }
-};
-
-template <class T>
-bool operator==(T* lhs, const Pointer<T>& rhs) { return rhs == lhs; }
-template <class T>
-bool operator<(T* lhs, const Pointer<T>& rhs) { return rhs > lhs; }
-template <class T>
-bool operator>(T* lhs, const Pointer<T>& rhs) { return rhs < lhs; }
-
struct DeleteFunction {
template<typename T>
void operator()(const T& p) const { delete p; }
Modified: dcplusplus/trunk/dcpp/User.h
===================================================================
--- dcplusplus/trunk/dcpp/User.h 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/dcpp/User.h 2008-01-22 22:47:59 UTC (rev 973)
@@ -30,7 +30,7 @@
namespace dcpp {
/** A user connected to one or more hubs. */
-class User : public FastAlloc<User>, public PointerBase, public Flags
+class User : public FastAlloc<User>, public intrusive_ptr_base, public Flags
{
public:
enum Bits {
Modified: dcplusplus/trunk/dcpp/forward.h
===================================================================
--- dcplusplus/trunk/dcpp/forward.h 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/dcpp/forward.h 2008-01-22 22:47:59 UTC (rev 973)
@@ -86,7 +86,7 @@
typedef std::vector<UploadPtr> UploadList;
class User;
-typedef Pointer<User> UserPtr;
+typedef boost::intrusive_ptr<User> UserPtr;
typedef std::vector<UserPtr> UserList;
class UserCommand;
Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-01-22 22:47:59 UTC (rev 973)
@@ -308,11 +308,11 @@
DirectoryListingFrame::WidgetMenuPtr DirectoryListingFrame::makeSingleMenu(ItemInfo* ii) {
WidgetMenuPtr menu = createMenu(true);
- menu->appendItem(IDC_DOWNLOAD, T_("Download"), std::tr1::bind(&DirectoryListingFrame::handleDownload, this));
+ menu->appendItem(IDC_DOWNLOAD, T_("&Download"), std::tr1::bind(&DirectoryListingFrame::handleDownload, this));
addTargets(menu, ii);
if(ii->type == ItemInfo::FILE) {
- menu->appendItem(IDC_VIEW_AS_TEXT, T_("View as text"), std::tr1::bind(&DirectoryListingFrame::handleViewAsText, this));
+ menu->appendItem(IDC_VIEW_AS_TEXT, T_("&View as text"), std::tr1::bind(&DirectoryListingFrame::handleViewAsText, this));
menu->appendSeparatorItem();
@@ -322,7 +322,7 @@
if((ii->type == ItemInfo::FILE && ii->file->getAdls()) ||
(ii->type == ItemInfo::DIRECTORY && ii->dir->getAdls() && ii->dir->getParent() != dl->getRoot()) ) {
menu->appendSeparatorItem();
- menu->appendItem(IDC_GO_TO_DIRECTORY, T_("Go to directory"), std::tr1::bind(&DirectoryListingFrame::handleGoToDirectory, this));
+ menu->appendItem(IDC_GO_TO_DIRECTORY, T_("&Go to directory"), std::tr1::bind(&DirectoryListingFrame::handleGoToDirectory, this));
}
addUserCommands(menu);
@@ -333,7 +333,7 @@
DirectoryListingFrame::WidgetMenuPtr DirectoryListingFrame::makeMultiMenu() {
WidgetMenuPtr menu = createMenu(true);
- menu->appendItem(IDC_DOWNLOAD, T_("Download"), std::tr1::bind(&DirectoryListingFrame::handleDownload, this));
+ menu->appendItem(IDC_DOWNLOAD, T_("&Download"), std::tr1::bind(&DirectoryListingFrame::handleDownload, this));
addTargets(menu);
addUserCommands(menu);
@@ -345,7 +345,7 @@
DirectoryListingFrame::WidgetMenuPtr DirectoryListingFrame::makeDirMenu() {
WidgetMenuPtr menu = createMenu(true);
- menu->appendItem(IDC_DOWNLOAD, T_("Download"), std::tr1::bind(&DirectoryListingFrame::handleDownload, this));
+ menu->appendItem(IDC_DOWNLOAD, T_("&Download"), std::tr1::bind(&DirectoryListingFrame::handleDownload, this));
addTargets(menu);
return menu;
}
@@ -355,7 +355,7 @@
}
void DirectoryListingFrame::addTargets(const WidgetMenuPtr& parent, ItemInfo* ii) {
- WidgetMenuPtr menu = parent->appendPopup(T_("Download to..."));
+ WidgetMenuPtr menu = parent->appendPopup(T_("Download &to..."));
StringPairList spl = FavoriteManager::getInstance()->getFavoriteDirs();
size_t i = 0;
for(; i < spl.size(); ++i) {
@@ -366,7 +366,7 @@
menu->appendSeparatorItem();
}
- menu->appendItem(IDC_DOWNLOAD_BROWSE, T_("Browse..."), std::tr1::bind(&DirectoryListingFrame::handleDownloadBrowse, this));
+ menu->appendItem(IDC_DOWNLOAD_BROWSE, T_("&Browse..."), std::tr1::bind(&DirectoryListingFrame::handleDownloadBrowse, this));
targets.clear();
Modified: dcplusplus/trunk/win32/FinishedFrameBase.h
===================================================================
--- dcplusplus/trunk/win32/FinishedFrameBase.h 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/win32/FinishedFrameBase.h 2008-01-22 22:47:59 UTC (rev 973)
@@ -61,7 +61,7 @@
items->setListViewStyle(LVS_EX_LABELTIP | LVS_EX_HEADERDRAGDROP | LVS_EX_FULLROWSELECT);
addWidget(items);
- items->createColumns(ResourceManager::getInstance()->getStrings(columnNames));
+ items->createColumns(WinUtil::getStrings(columnNames));
items->setColumnOrder(WinUtil::splitTokens(SettingsManager::getInstance()->get(in_UL ? SettingsManager::FINISHED_UL_ORDER : SettingsManager::FINISHED_ORDER), columnIndexes));
items->setColumnWidths(WinUtil::splitTokens(SettingsManager::getInstance()->get(in_UL ? SettingsManager::FINISHED_UL_WIDTHS : SettingsManager::FINISHED_WIDTHS), columnSizes));
items->setSort(COLUMN_DONE);
@@ -128,7 +128,7 @@
static int columnSizes[COLUMN_LAST];
static int columnIndexes[COLUMN_LAST];
- static ResourceManager::Strings columnNames[COLUMN_LAST];
+ static const char* columnNames[COLUMN_LAST];
class ItemInfo : public FastAlloc<ItemInfo> {
public:
@@ -220,12 +220,12 @@
shellMenu.SetPath(Text::utf8ToWide(path));
typename T::WidgetMenuPtr pShellMenu = this->createMenu(true);
- pShellMenu->appendItem(IDC_VIEW_AS_TEXT, T_("View as text"), std::tr1::bind(&ThisType::handleViewAsText, this));
- pShellMenu->appendItem(IDC_OPEN_FILE, T_("Open"), std::tr1::bind(&ThisType::handleOpenFile, this));
- pShellMenu->appendItem(IDC_OPEN_FOLDER, T_("Open folder"), std::tr1::bind(&ThisType::handleOpenFolder, this));
+ pShellMenu->appendItem(IDC_VIEW_AS_TEXT, T_("&View as text"), std::tr1::bind(&ThisType::handleViewAsText, this));
+ pShellMenu->appendItem(IDC_OPEN_FILE, T_("&Open"), std::tr1::bind(&ThisType::handleOpenFile, this));
+ pShellMenu->appendItem(IDC_OPEN_FOLDER, T_("Open &folder"), std::tr1::bind(&ThisType::handleOpenFolder, this));
pShellMenu->appendSeparatorItem();
- pShellMenu->appendItem(IDC_REMOVE, TSTRING(REMOVE), std::tr1::bind(&ThisType::handleRemove, this));
- pShellMenu->appendItem(IDC_REMOVE_ALL, T_("Remove all"), std::tr1::bind(&ThisType::handleRemoveAll, this));
+ pShellMenu->appendItem(IDC_REMOVE, T_("&Remove"), std::tr1::bind(&ThisType::handleRemove, this));
+ pShellMenu->appendItem(IDC_REMOVE_ALL, T_("Remove &all"), std::tr1::bind(&ThisType::handleRemoveAll, this));
pShellMenu->appendSeparatorItem();
UINT idCommand = shellMenu.ShowContextMenu(pShellMenu, static_cast<T*>(this), pt);
@@ -236,12 +236,12 @@
}
typename T::WidgetMenuPtr contextMenu = this->createMenu(true);
- contextMenu->appendItem(IDC_VIEW_AS_TEXT, T_("View as text"), std::tr1::bind(&ThisType::handleViewAsText, this));
- contextMenu->appendItem(IDC_OPEN_FILE, T_("Open"), std::tr1::bind(&ThisType::handleOpenFile, this));
- contextMenu->appendItem(IDC_OPEN_FOLDER, T_("Open folder"), std::tr1::bind(&ThisType::handleOpenFolder, this));
+ contextMenu->appendItem(IDC_VIEW_AS_TEXT, T_("&View as text"), std::tr1::bind(&ThisType::handleViewAsText, this));
+ contextMenu->appendItem(IDC_OPEN_FILE, T_("&Open"), std::tr1::bind(&ThisType::handleOpenFile, this));
+ contextMenu->appendItem(IDC_OPEN_FOLDER, T_("Open &folder"), std::tr1::bind(&ThisType::handleOpenFolder, this));
contextMenu->appendSeparatorItem();
- contextMenu->appendItem(IDC_REMOVE, TSTRING(REMOVE), std::tr1::bind(&ThisType::handleRemove, this));
- contextMenu->appendItem(IDC_REMOVE_ALL, T_("Remove all"), std::tr1::bind(&ThisType::handleRemoveAll, this));
+ contextMenu->appendItem(IDC_REMOVE, T_("&Remove"), std::tr1::bind(&ThisType::handleRemove, this));
+ contextMenu->appendItem(IDC_REMOVE_ALL, T_("Remove &all"), std::tr1::bind(&ThisType::handleRemoveAll, this));
contextMenu->setDefaultItem(IDC_OPEN_FILE);
contextMenu->trackPopupMenu(static_cast<T*>(this), pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON);
return true;
@@ -330,8 +330,15 @@
int FinishedFrameBase<T, in_UL>::columnSizes[] = { 100, 110, 290, 125, 80, 80, 80, 90 };
template <class T, bool in_UL>
-ResourceManager::Strings FinishedFrameBase<T, in_UL>::columnNames[] = { ResourceManager::FILENAME, ResourceManager::TIME, ResourceManager::PATH,
-ResourceManager::NICK, ResourceManager::HUB, ResourceManager::SIZE, ResourceManager::SPEED, ResourceManager::CRC_CHECKED
+const char* FinishedFrameBase<T, in_UL>::columnNames[] = {
+ N_("Filename"),
+ N_("Time"),
+ N_("Path"),
+ N_("Nick"),
+ N_("Hub"),
+ N_("Size"),
+ N_("Speed"),
+ N_("CRC Checked")
};
#endif // !defined(DCPLUSPLUS_WIN32_FINISHED_FRAME_BASE_H)
Modified: dcplusplus/trunk/win32/HubFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/HubFrame.cpp 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/win32/HubFrame.cpp 2008-01-22 22:47:59 UTC (rev 973)
@@ -27,7 +27,6 @@
#include <dcpp/Client.h>
#include <dcpp/LogManager.h>
#include <dcpp/User.h>
-#include <dcpp/ResourceManager.h>
#include <dcpp/FavoriteManager.h>
#include <dcpp/ConnectionManager.h>
#include <dcpp/SearchManager.h>
@@ -824,7 +823,7 @@
}
void HubFrame::on(Connecting, Client*) throw() {
- speak(ADD_STATUS_LINE, STRING(CONNECTING_TO) + client->getHubUrl() + "...");
+ speak(ADD_STATUS_LINE, str(F_("Connecting to %1%...") % client->getHubUrl()));
speak(SET_WINDOW_TITLE, client->getHubUrl());
}
void HubFrame::on(Connected, Client*) throw() {
@@ -846,14 +845,14 @@
void HubFrame::on(Redirect, Client*, const string& line) throw() {
if(ClientManager::getInstance()->isConnected(line)) {
- speak(ADD_STATUS_LINE, STRING(REDIRECT_ALREADY_CONNECTED));
+ speak(ADD_STATUS_LINE, _("Redirect request received to a hub that's already connected"));
return;
}
redirect = line;
if(BOOLSETTING(AUTO_FOLLOW)) {
speak(FOLLOW);
} else {
- speak(ADD_STATUS_LINE, STRING(PRESS_FOLLOW) + line);
+ speak(ADD_STATUS_LINE, str(F_("Press the follow redirect button to connect to %1%") % line));
}
}
@@ -908,7 +907,7 @@
}
void HubFrame::on(SearchFlood, Client*, const string& line) throw() {
- speak(ADD_STATUS_LINE, STRING(SEARCH_SPAM_FROM) + line);
+ speak(ADD_STATUS_LINE, str(F_("Search spam detected from %1%") % line));
}
tstring HubFrame::getStatusShared() const {
@@ -1158,7 +1157,7 @@
WidgetMenuPtr menu = createMenu(true);
appendUserItems(getParent(), menu);
- menu->appendItem(IDC_COPY_NICK, T_("Copy nick to clipboard"), std::tr1::bind(&HubFrame::handleCopyNick, this));
+ menu->appendItem(IDC_COPY_NICK, T_("Copy &nick to clipboard"), std::tr1::bind(&HubFrame::handleCopyNick, this));
menu->setDefaultItem(IDC_GETLIST);
prepareMenu(menu, UserCommand::CONTEXT_CHAT, client->getHubUrl());
@@ -1174,15 +1173,15 @@
WidgetMenuPtr menu = createMenu(true);
if(!FavoriteManager::getInstance()->isFavoriteHub(url)) {
- menu->appendItem(IDC_ADD_TO_FAVORITES, T_("Add To Favorites"), std::tr1::bind(&HubFrame::addAsFavorite, this));
+ menu->appendItem(IDC_ADD_TO_FAVORITES, T_("Add To &Favorites"), std::tr1::bind(&HubFrame::addAsFavorite, this));
}
- menu->appendItem(IDC_RECONNECT, TSTRING(MENU_RECONNECT), std::tr1::bind(&HubFrame::handleReconnect, this));
- menu->appendItem(IDC_COPY_HUB, T_("Copy address to clipboard"), std::tr1::bind(&HubFrame::handleCopyHub, this));
+ menu->appendItem(IDC_RECONNECT, T_("&Reconnect\tCtrl+R"), std::tr1::bind(&HubFrame::handleReconnect, this));
+ menu->appendItem(IDC_COPY_HUB, T_("Copy &address to clipboard"), std::tr1::bind(&HubFrame::handleCopyHub, this));
prepareMenu(menu, UserCommand::CONTEXT_HUB, url);
menu->appendSeparatorItem();
- menu->appendItem(IDC_CLOSE_WINDOW, T_("Close"), std::tr1::bind(&HubFrame::close, this, true));
+ menu->appendItem(IDC_CLOSE_WINDOW, T_("&Close"), std::tr1::bind(&HubFrame::close, this, true));
inTabMenu = true;
Modified: dcplusplus/trunk/win32/MDIChildFrame.h
===================================================================
--- dcplusplus/trunk/win32/MDIChildFrame.h 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/win32/MDIChildFrame.h 2008-01-22 22:47:59 UTC (rev 973)
@@ -187,7 +187,7 @@
bool handleContextMenu(const SmartWin::ScreenCoordinate& pt) {
SmartWin::WidgetMenu::ObjectType menu = SmartWin::WidgetCreator<SmartWin::WidgetMenu>::create(SmartWin::WidgetMenu::Seed(true));
- menu->appendItem(IDC_CLOSE_WINDOW, T_("Close"), std::tr1::bind(&ThisType::close, this, true));
+ menu->appendItem(IDC_CLOSE_WINDOW, T_("&Close"), std::tr1::bind(&ThisType::close, this, true));
menu->trackPopupMenu(this, pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON);
Modified: dcplusplus/trunk/win32/MainWindow.cpp
===================================================================
--- dcplusplus/trunk/win32/MainWindow.cpp 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/win32/MainWindow.cpp 2008-01-22 22:47:59 UTC (rev 973)
@@ -267,31 +267,31 @@
}
int image = 0;
- toolbar->appendItem(IDC_PUBLIC_HUBS, image++, TSTRING(PUBLIC_HUBS));
- toolbar->appendItem(IDC_RECONNECT, image++, TSTRING(MENU_RECONNECT));
- toolbar->appendItem(IDC_FOLLOW, image++, TSTRING(MENU_FOLLOW_REDIRECT));
+ toolbar->appendItem(IDC_PUBLIC_HUBS, image++, T_("Public Hubs"));
+ toolbar->appendItem(IDC_RECONNECT, image++, T_("Reconnect"));
+ toolbar->appendItem(IDC_FOLLOW, image++, T_("Follow last redirect"));
toolbar->appendSeparator();
- toolbar->appendItem(IDC_FAVORITE_HUBS, image++, TSTRING(FAVORITE_HUBS));
- toolbar->appendItem(IDC_FAVUSERS, image++, TSTRING(FAVORITE_USERS));
+ toolbar->appendItem(IDC_FAVORITE_HUBS, image++, T_("Favorite Hubs"));
+ toolbar->appendItem(IDC_FAVUSERS, image++, T_("Favorite Users"));
toolbar->appendSeparator();
- toolbar->appendItem(IDC_QUEUE, image++, TSTRING(DOWNLOAD_QUEUE));
- toolbar->appendItem(IDC_FINISHED_DL, image++, TSTRING(FINISHED_DOWNLOADS));
- toolbar->appendItem(IDC_WAITING_USERS, image++, TSTRING(WAITING_USERS));
- toolbar->appendItem(IDC_FINISHED_UL, image++, TSTRING(FINISHED_UPLOADS));
+ toolbar->appendItem(IDC_QUEUE, image++, T_("Download Queue"));
+ toolbar->appendItem(IDC_FINISHED_DL, image++, T_("Finished Downloads"));
+ toolbar->appendItem(IDC_WAITING_USERS, image++, T_("Waiting Users"));
+ toolbar->appendItem(IDC_FINISHED_UL, image++, T_("Finished Uploads"));
toolbar->appendSeparator();
- toolbar->appendItem(IDC_SEARCH, image++, TSTRING(SEARCH));
- toolbar->appendItem(IDC_ADL_SEARCH, image++, TSTRING(ADL_SEARCH));
- toolbar->appendItem(IDC_SEARCH_SPY, image++, TSTRING(SEARCH_SPY));
+ toolbar->appendItem(IDC_SEARCH, image++, T_("Search"));
+ toolbar->appendItem(IDC_ADL_SEARCH, image++, T_("ADL Search"));
+ toolbar->appendItem(IDC_SEARCH_SPY, image++, T_("Search Spy"));
toolbar->appendSeparator();
- toolbar->appendItem(IDC_OPEN_FILE_LIST, image++, TSTRING(MENU_OPEN_FILE_LIST));
- toolbar->appendItem(IDC_SETTINGS, image++, TSTRING(SETTINGS));
- toolbar->appendItem(IDC_NOTEPAD, image++, TSTRING(NOTEPAD));
+ toolbar->appendItem(IDC_OPEN_FILE_LIST, image++, T_("Open file list..."));
+ toolbar->appendItem(IDC_SETTINGS, image++, T_("Settings"));
+ toolbar->appendItem(IDC_NOTEPAD, image++, T_("Notepad"));
}
void MainWindow::initStatusBar() {
dcdebug("initStatusBar\n");
initStatus(true);
- statusSizes[STATUS_AWAY] = status->getTextSize(TSTRING(AWAY)).x + 12;
+ statusSizes[STATUS_AWAY] = status->getTextSize(T_("AWAY")).x + 12;
///@todo set to checkbox width + resizedrag width really
statusSizes[STATUS_DUMMY] = 32;
}
@@ -547,15 +547,13 @@
SettingsManager::getInstance()->set(SettingsManager::TOTAL_UPLOAD, SETTING(TOTAL_UPLOAD) + static_cast<int64_t>(updiff));
SettingsManager::getInstance()->set(SettingsManager::TOTAL_DOWNLOAD, SETTING(TOTAL_DOWNLOAD) + static_cast<int64_t>(downdiff));
- setStatus(STATUS_AWAY, Util::getAway() ? TSTRING(AWAY) : _T(""));
+ setStatus(STATUS_AWAY, Util::getAway() ? T_("AWAY") : _T(""));
setStatus(STATUS_COUNTS, Text::toT(Client::getCounts()));
- setStatus(STATUS_SLOTS, Text::toT(STRING(SLOTS) + ": " + Util::toString(UploadManager::getInstance()->getFreeSlots()) + '/' + Util::toString(SETTING(SLOTS))));
- setStatus(STATUS_DOWN_TOTAL, Text::toT("D: " + Util::formatBytes(down)));
- setStatus(STATUS_UP_TOTAL, Text::toT("U: " + Util::formatBytes(up)));
- setStatus(STATUS_DOWN_DIFF, Text::toT("D: " + Util::formatBytes((downdiff*1000)/tdiff) + "/s ("
- + Util::toString(DownloadManager::getInstance()->getDownloadCount()) + ")"));
- setStatus(STATUS_UP_DIFF, Text::toT("U: " + Util::formatBytes((updiff*1000)/tdiff) + "/s ("
- + Util::toString(UploadManager::getInstance()->getUploadCount()) + ")"));
+ setStatus(STATUS_SLOTS, str(TF_("Slots: %1%/%2%") % UploadManager::getInstance()->getFreeSlots() % (SETTING(SLOTS))));
+ setStatus(STATUS_DOWN_TOTAL, str(TF_("D: %1%") % Text::toT(Util::formatBytes(down))));
+ setStatus(STATUS_UP_TOTAL, str(TF_("U: %1%") % Text::toT(Util::formatBytes(up))));
+ setStatus(STATUS_DOWN_DIFF, str(TF_("D: %1%/s (%2%)") % Text::toT(Util::formatBytes((downdiff*1000)/tdiff)) % DownloadManager::getInstance()->getDownloadCount()));
+ setStatus(STATUS_UP_DIFF, str(TF_("U: %1%/s (%2%)") % Text::toT(Util::formatBytes((updiff*1000)/tdiff)) % UploadManager::getInstance()->getUploadCount()));
}
MainWindow::~MainWindow() {
@@ -758,10 +756,9 @@
DirectoryListing dl(u);
try {
dl.loadFile(*i);
- const size_t BUF_SIZE = STRING(MATCHED_FILES).size() + 16;
- AutoArray<char> tmp(BUF_SIZE);
- snprintf(tmp, BUF_SIZE, CSTRING(MATCHED_FILES), QueueManager::getInstance()->matchListing(dl));
- LogManager::getInstance()->message(Util::toString(ClientManager::getInstance()->getNicks(u->getCID())) + ": " + string(tmp));
+ LogManager::getInstance()->message(str(FN_("%1%: matched %2% file", "%1%: matched %2% files", QueueManager::getInstance()->matchListing(dl))
+ % Util::toString(ClientManager::getInstance()->getNicks(u->getCID()))
+ % QueueManager::getInstance()->matchListing(dl)));
} catch(const Exception&) {
}
@@ -849,8 +846,7 @@
const string& msg = xml.getChildData();
createMessageBox().show(Text::toT(msg), Text::toT(title));
} else {
- string msg = xml.getChildData() + "\r\n" + STRING(OPEN_DOWNLOAD_PAGE);
- if(createMessageBox().show(Text::toT(msg), Text::toT(title), WidgetMessageBox::BOX_YESNO, WidgetMessageBox::BOX_ICONQUESTION) == IDYES) {
+ if(createMessageBox().show(str(TF_("%1%\nOpen download page?") % Text::toT(xml.getChildData())), Text::toT(title), WidgetMessageBox::BOX_YESNO, WidgetMessageBox::BOX_ICONQUESTION) == IDYES) {
WinUtil::openLink(Text::toT(url));
}
}
@@ -1000,7 +996,7 @@
SmartWin::ScreenCoordinate pt;
WidgetMenuPtr trayMenu = createMenu(true);
trayMenu->appendItem(IDC_TRAY_SHOW, T_("Show"), std::tr1::bind(&MainWindow::handleRestore, this));
- trayMenu->appendItem(IDC_TRAY_QUIT, TSTRING(MENU_EXIT), std::tr1::bind(&MainWindow::close, this, true));
+ trayMenu->appendItem(IDC_TRAY_QUIT, T_("Exit"), std::tr1::bind(&MainWindow::close, this, true));
trayMenu->appendItem(IDC_OPEN_DOWNLOADS, T_("Open downloads directory"));
trayMenu->appendItem(IDC_SETTINGS, T_("Settings..."));
trayMenu->setDefaultItem(0,TRUE);
Modified: dcplusplus/trunk/win32/MainWindow.h
===================================================================
--- dcplusplus/trunk/win32/MainWindow.h 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/win32/MainWindow.h 2008-01-22 22:47:59 UTC (rev 973)
@@ -24,6 +24,7 @@
#include <dcpp/QueueManagerListener.h>
#include <dcpp/LogManager.h>
#include <dcpp/HttpConnection.h>
+#include <dcpp/User.h>
#include "WidgetFactory.h"
#include "AspectStatus.h"
Modified: dcplusplus/trunk/win32/PrivateFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/PrivateFrame.cpp 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/win32/PrivateFrame.cpp 2008-01-22 22:47:59 UTC (rev 973)
@@ -362,15 +362,15 @@
bool PrivateFrame::handleTabContextMenu(const SmartWin::ScreenCoordinate& pt) {
WidgetMenuPtr menu = createMenu(true);
- menu->appendItem(IDC_GETLIST, T_("Get file list"), std::tr1::bind(&PrivateFrame::handleGetList, this));
- menu->appendItem(IDC_MATCH_QUEUE, T_("Match queue"), std::tr1::bind(&PrivateFrame::handleMatchQueue, this));
- menu->appendItem(IDC_GRANTSLOT, T_("Grant extra slot"), std::tr1::bind(&UploadManager::reserveSlot, UploadManager::getInstance(), replyTo));
+ menu->appendItem(IDC_GETLIST, T_("&Get file list"), std::tr1::bind(&PrivateFrame::handleGetList, this));
+ menu->appendItem(IDC_MATCH_QUEUE, T_("&Match queue"), std::tr1::bind(&PrivateFrame::handleMatchQueue, this));
+ menu->appendItem(IDC_GRANTSLOT, T_("Grant &extra slot"), std::tr1::bind(&UploadManager::reserveSlot, UploadManager::getInstance(), replyTo));
if(!FavoriteManager::getInstance()->isFavoriteUser(replyTo))
- menu->appendItem(IDC_ADD_TO_FAVORITES, T_("Add To Favorites"), std::tr1::bind(&FavoriteManager::addFavoriteUser, FavoriteManager::getInstance(), replyTo));
+ menu->appendItem(IDC_ADD_TO_FAVORITES, T_("Add To &Favorites"), std::tr1::bind(&FavoriteManager::addFavoriteUser, FavoriteManager::getInstance(), replyTo));
prepareMenu(menu, UserCommand::CONTEXT_CHAT, ClientManager::getInstance()->getHubs(replyTo->getCID()));
menu->appendSeparatorItem();
- menu->appendItem(IDC_CLOSE_WINDOW, T_("Close"), std::tr1::bind(&PrivateFrame::close, this, true));
+ menu->appendItem(IDC_CLOSE_WINDOW, T_("&Close"), std::tr1::bind(&PrivateFrame::close, this, true));
menu->trackPopupMenu(this, pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON);
return TRUE;
Modified: dcplusplus/trunk/win32/PublicHubsFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-01-22 22:47:59 UTC (rev 973)
@@ -444,9 +444,9 @@
}
WidgetMenuPtr menu = createMenu(true);
- menu->appendItem(IDC_CONNECT, TSTRING(CONNECT), std::tr1::bind(&PublicHubsFrame::handleConnect, this));
- menu->appendItem(IDC_ADD, T_("Add To Favorites"), std::tr1::bind(&PublicHubsFrame::handleAdd, this));
- menu->appendItem(IDC_COPY_HUB, T_("Copy address to clipboard"), std::tr1::bind(&PublicHubsFrame::handleCopyHub, this));
+ menu->appendItem(IDC_CONNECT, T_("&Connect"), std::tr1::bind(&PublicHubsFrame::handleConnect, this));
+ menu->appendItem(IDC_ADD, T_("Add To &Favorites"), std::tr1::bind(&PublicHubsFrame::handleAdd, this));
+ menu->appendItem(IDC_COPY_HUB, T_("Copy &address to clipboard"), std::tr1::bind(&PublicHubsFrame::handleCopyHub, this));
menu->setDefaultItem(IDC_CONNECT);
menu->trackPopupMenu(this, pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON);
return true;
Modified: dcplusplus/trunk/win32/QueueFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/QueueFrame.cpp 2008-01-21 21:00:31 UTC (rev 972)
+++ dcplusplus/trunk/win32/QueueFrame.cpp 2008-01-22 22:47:59 UTC (rev 973)
@@ -957,7 +957,7 @@
WidgetMenuPtr menu = createMenu(true);
WinUtil::addHashItems(menu, qii->getTTH(), Text::toT(Util::getFileName(qii->getTarget())));
- menu->appendItem(IDC_MOVE, T_("Move/Rename"), std::tr1::bind(&QueueFrame::handleMove, this));
+ menu->appendItem(IDC_MOVE, T_("&Move/Rename"), std::tr1::bind(&QueueFrame::handleMove, this));
addPriorityMenu(menu);
addBrowseMenu(menu, qii);
addPMMenu(menu, qii);
@@ -965,7 +965,7 @@
addReaddMenu(menu, qii);
addRemoveMenu(menu, qii);
addRemoveAllMenu(menu, qii);
- menu->appendItem(IDC_REMOVE, TSTRING(REMOVE), std::tr1::bind(&QueueFrame::handleRemove, this));
+ menu->appendItem(IDC_REMOVE, T_("&Remove"), std::tr1::bind(&QueueFrame::handleRemove, this));
return menu;
}
@@ -975,9 +975,9 @@
addPriorityMenu(menu);
- menu->appendItem(IDC_MOVE, T_("Move/Rename"), std::tr1::bind(&QueueFrame::handleMove, this));
+ menu->appendItem(IDC_MOVE, T_("&Move/Rename"), std::tr1::bind(&QueueFrame::handleMove, this));
menu->appendSeparatorItem();
- menu->appendItem(IDC_REMOVE, TSTRING(REMOVE), std::tr1::bind(&QueueFrame::handleRemove, this));
+ menu->appendItem(IDC_REMOVE, T_("&Remove"), std::tr1::bind(&QueueFrame::handleRemove, this));
return menu;
}
@@ -985,9 +985,9 @@
WidgetMenuPtr menu = createMenu(true);
addPriorityMenu(menu);
- menu->appendItem(IDC_MOVE, T_("Move/Rename"), std::tr1::bind(&QueueFrame::handleMove, this));
+ menu->appendItem(IDC_MOVE, T_("&Move/Rename"), std::tr1::bind(&QueueFrame::handleMove, this));
menu->appendSeparatorItem();
- menu->appendItem(IDC_REMOVE, TSTRING(REMOVE), std::tr1::bind(&QueueFrame::handleRemove, this));
+ menu->appendItem(IDC_REMOVE, T_("&Remove"), std::tr1::bind(&QueueFrame::handleRemove, this));
return menu;
}
@@ -1003,7 +1003,7 @@
void QueueFrame::addBrowseMenu(const WidgetMenuPtr& parent, QueueItemInfo* qii) {
unsigned int pos = parent->getCount();
- WidgetMenuPtr menu = parent->appendPopup(T_("Get file list"));
+ WidgetMenuPtr menu = parent->appendPopup(T_("&Get file list"));
if(addUsers(menu, IDC_BROWSELIST, &QueueFrame::...
[truncated message content] |
|
From: <arn...@us...> - 2008-01-23 21:54:46
|
Revision: 976
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=976&view=rev
Author: arnetheduck
Date: 2008-01-23 13:54:41 -0800 (Wed, 23 Jan 2008)
Log Message:
-----------
Finished dcpp translations
Modified Paths:
--------------
dcplusplus/trunk/SConstruct
dcplusplus/trunk/dcpp/ADLSearch.h
dcplusplus/trunk/dcpp/DCPlusPlus.cpp
dcplusplus/trunk/dcpp/QueueManager.cpp
dcplusplus/trunk/dcpp/ResourceManager.cpp
dcplusplus/trunk/dcpp/ResourceManager.h
dcplusplus/trunk/dcpp/SettingsManager.cpp
dcplusplus/trunk/dcpp/Util.cpp
Removed Paths:
-------------
dcplusplus/trunk/dcpp/StringDefs.h
dcplusplus/trunk/makedefs.py
Modified: dcplusplus/trunk/SConstruct
===================================================================
--- dcplusplus/trunk/SConstruct 2008-01-23 19:54:44 UTC (rev 975)
+++ dcplusplus/trunk/SConstruct 2008-01-23 21:54:41 UTC (rev 976)
@@ -165,16 +165,10 @@
pot_bld = Builder (action = Action([pot_args], 'Extracting messages to $TARGET from $SOURCES'))
env.Append(BUILDERS = {'PotBuild' : pot_bld})
-from makedefs import convert
-env.Command('dcpp/StringDefs.cpp', 'dcpp/StringDefs.h', lambda target, source, env: convert())
-env.Depends('dcpp/StringDefs.cpp', 'dcpp/StringDefs.h')
-env.SideEffect('Example.xml', 'dcpp/StringDefs.cpp')
-
dev.zlib = dev.build('zlib/')
dev.bzip2 = dev.build('bzip2/')
dev.intl = dev.build('intl/')
dev.boost = dev.build('boost/')
dev.client = dev.build('dcpp/')
-env.Depends(dev.client, 'dcpp/StringDefs.cpp')
dev.smartwin = dev.build('smartwin/')
dev.win32 = dev.build('win32/')
Modified: dcplusplus/trunk/dcpp/ADLSearch.h
===================================================================
--- dcplusplus/trunk/dcpp/ADLSearch.h 2008-01-23 19:54:44 UTC (rev 975)
+++ dcplusplus/trunk/dcpp/ADLSearch.h 2008-01-23 21:54:41 UTC (rev 976)
@@ -31,7 +31,6 @@
#include "Util.h"
#include "SettingsManager.h"
-#include "ResourceManager.h"
#include "StringSearch.h"
#include "StringTokenizer.h"
@@ -279,7 +278,7 @@
void PrepareDestinationDirectories(DestDirList& destDirVector, DirectoryListing::Directory* root, StringMap& params);
// Finalize destination directories
void FinalizeDestinationDirectories(DestDirList& destDirVector, DirectoryListing::Directory* root) {
- string szDiscard = "<<<" + STRING(ADLS_DISCARD) + ">>>";
+ string szDiscard(_("<<<Discard>>>"));
// Add non-empty destination directories to the top level
for(vector<DestDir>::iterator id = destDirVector.begin(); id != destDirVector.end(); ++id) {
Modified: dcplusplus/trunk/dcpp/DCPlusPlus.cpp
===================================================================
--- dcplusplus/trunk/dcpp/DCPlusPlus.cpp 2008-01-23 19:54:44 UTC (rev 975)
+++ dcplusplus/trunk/dcpp/DCPlusPlus.cpp 2008-01-23 21:54:41 UTC (rev 976)
@@ -32,6 +32,7 @@
#include "FavoriteManager.h"
#include "SettingsManager.h"
#include "FinishedManager.h"
+#include "ResourceManager.h"
#include "ADLSearch.h"
#include "StringTokenizer.h"
@@ -89,10 +90,6 @@
_nl_msg_cat_cntr++;
}
- //if(!SETTING(LANGUAGE_FILE).empty()) {
- //ResourceManager::getInstance()->loadLanguage(SETTING(LANGUAGE_FILE));
- //}
-
FavoriteManager::getInstance()->load();
CryptoManager::getInstance()->loadCertificates();
Modified: dcplusplus/trunk/dcpp/QueueManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/QueueManager.cpp 2008-01-23 19:54:44 UTC (rev 975)
+++ dcplusplus/trunk/dcpp/QueueManager.cpp 2008-01-23 21:54:41 UTC (rev 976)
@@ -28,7 +28,6 @@
#include "DownloadManager.h"
#include "HashManager.h"
#include "LogManager.h"
-#include "ResourceManager.h"
#include "SearchManager.h"
#include "ShareManager.h"
#include "SimpleXML.h"
@@ -977,10 +976,9 @@
}
}
if(flags & QueueItem::FLAG_MATCH_QUEUE) {
- const size_t BUF_SIZE = STRING(MATCHED_FILES).size() + 16;
- AutoArray<char> tmp(BUF_SIZE);
- snprintf(tmp, BUF_SIZE, CSTRING(MATCHED_FILES), matchListing(dirList));
- LogManager::getInstance()->message(Util::toString(ClientManager::getInstance()->getNicks(user->getCID())) + ": " + string(tmp));
+ size_t files = matchListing(dirList);
+ LogManager::getInstance()->message(str(FN_("%1%: Matched %2% file", "%1%: Matched %2% files", files) %
+ Util::toString(ClientManager::getInstance()->getNicks(user->getCID())) % files));
}
}
Modified: dcplusplus/trunk/dcpp/ResourceManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/ResourceManager.cpp 2008-01-23 19:54:44 UTC (rev 975)
+++ dcplusplus/trunk/dcpp/ResourceManager.cpp 2008-01-23 21:54:41 UTC (rev 976)
@@ -21,53 +21,6 @@
#include "ResourceManager.h"
-#include "SimpleXML.h"
-#include "File.h"
-#include "Text.h"
-
namespace dcpp {
-wstring ResourceManager::wstrings[ResourceManager::LAST];
-
-void ResourceManager::loadLanguage(const string& aFile) {
- try {
- File f(aFile, File::READ, File::OPEN);
- SimpleXML xml;
- xml.fromXML(f.read());
-
- unordered_map<string, int> h;
-
- for(int i = 0; i < LAST; ++i) {
- h[names[i]] = i;
- }
-
- if(xml.findChild("Language")) {
- rtl = xml.getBoolChildAttrib("RightToLeft");
-
- xml.stepIn();
- if(xml.findChild("Strings")) {
- xml.stepIn();
-
- while(xml.findChild("String")) {
- unordered_map<string, int>::iterator j = h.find(xml.getChildAttrib("Name"));
-
- if(j != h.end()) {
- strings[j->second] = xml.getChildData();
- }
- }
- createWide();
- }
- }
- } catch(const Exception&) {
- // ...
- }
-}
-
-void ResourceManager::createWide() {
- for(int i = 0; i < LAST; ++i) {
- wstrings[i].clear();
- Text::utf8ToWide(strings[i], wstrings[i]);
- }
-}
-
} // namespace dcpp
Modified: dcplusplus/trunk/dcpp/ResourceManager.h
===================================================================
--- dcplusplus/trunk/dcpp/ResourceManager.h 2008-01-23 19:54:44 UTC (rev 975)
+++ dcplusplus/trunk/dcpp/ResourceManager.h 2008-01-23 21:54:41 UTC (rev 976)
@@ -23,70 +23,20 @@
namespace dcpp {
-#define STRING(x) ResourceManager::getInstance()->getString(ResourceManager::x)
-#define CSTRING(x) ResourceManager::getInstance()->getString(ResourceManager::x).c_str()
-#define WSTRING(x) ResourceManager::getInstance()->getStringW(ResourceManager::x)
-#define CWSTRING(x) ResourceManager::getInstance()->getStringW(ResourceManager::x).c_str()
-
-#define STRING_I(x) ResourceManager::getInstance()->getString(x)
-#define CSTRING_I(x) ResourceManager::getInstance()->getString(x).c_str()
-#define WSTRING_I(x) ResourceManager::getInstance()->getStringW(x)
-#define CWSTRING_I(x) ResourceManager::getInstance()->getStringW(x).c_str()
-
-#ifdef UNICODE
-#define TSTRING WSTRING
-#define TSTRING_I WSTRING_I
-#define CTSTRING CWSTRING
-#define CTSTRING_I CWSTRING_I
-#else
-#define TSTRING STRING
-#define TSTRING_I STRING_I
-#define CTSTRING CSTRING
-#define CTSTRING_I CSTRING_I
-#endif
-
class ResourceManager : public Singleton<ResourceManager> {
public:
-#include "StringDefs.h"
-
- void loadLanguage(const string& aFile);
- const string& getString(Strings x) const { dcassert(x >= 0 && x < LAST); return strings[x]; }
- const wstring& getStringW(Strings x) const { dcassert(x >= 0 && x < LAST); return wstrings[x]; }
bool isRTL() { return rtl; }
- template<typename T>
- TStringList getStrings(const T& t) const {
- const size_t n = sizeof(t) / sizeof(t[0]);
- TStringList ret(n);
- for(size_t i = 0; i < n; ++i) {
-#ifdef UNICODE
- ret[i] = wstrings[t[i]];
-#else
- ret[i] = strings[t[i]];
-#endif
- }
- return ret;
- }
private:
friend class Singleton<ResourceManager>;
- typedef unordered_map<string, Strings> NameMap;
- typedef NameMap::iterator NameIter;
-
ResourceManager() : rtl(false) {
- createWide();
}
virtual ~ResourceManager() { }
- static string strings[LAST];
- static wstring wstrings[LAST];
- static string names[LAST];
-
bool rtl;
-
- void createWide();
};
} // namespace dcpp
Modified: dcplusplus/trunk/dcpp/SettingsManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/SettingsManager.cpp 2008-01-23 19:54:44 UTC (rev 975)
+++ dcplusplus/trunk/dcpp/SettingsManager.cpp 2008-01-23 21:54:41 UTC (rev 976)
@@ -20,7 +20,6 @@
#include "DCPlusPlus.h"
#include "SettingsManager.h"
-#include "ResourceManager.h"
#include "SimpleXML.h"
#include "Util.h"
@@ -154,8 +153,8 @@
setDefault(USE_OEM_MONOFONT, false);
setDefault(POPUP_PMS, true);
setDefault(MIN_UPLOAD_SPEED, 0);
- setDefault(LOG_FORMAT_POST_DOWNLOAD, "%Y-%m-%d %H:%M: %[target]" + STRING(DOWNLOADED_FROM) + "%[userNI] (%[userCID]), %[fileSI] (%[fileSIchunk]), %[speed], %[time], %[fileTR]");
- setDefault(LOG_FORMAT_POST_UPLOAD, "%Y-%m-%d %H:%M: %[source]" + STRING(UPLOADED_TO) + "%[userNI] (%[userCID]), %[fileSI] (%[fileSIchunk]), %[speed], %[time], %[fileTR]");
+ setDefault(LOG_FORMAT_POST_DOWNLOAD, "%Y-%m-%d %H:%M: %[target] " + string(_("downloaded from")) + " %[userNI] (%[userCID]), %[fileSI] (%[fileSIchunk]), %[speed], %[time], %[fileTR]");
+ setDefault(LOG_FORMAT_POST_UPLOAD, "%Y-%m-%d %H:%M: %[source] " + string(_("uploaded to")) + " %[userNI] (%[userCID]), %[fileSI] (%[fileSIchunk]), %[speed], %[time], %[fileTR]");
setDefault(LOG_FORMAT_MAIN_CHAT, "[%Y-%m-%d %H:%M] %[message]");
setDefault(LOG_FORMAT_PRIVATE_CHAT, "[%Y-%m-%d %H:%M] %[message]");
setDefault(LOG_FORMAT_STATUS, "[%Y-%m-%d %H:%M] %[message]");
Deleted: dcplusplus/trunk/dcpp/StringDefs.h
===================================================================
--- dcplusplus/trunk/dcpp/StringDefs.h 2008-01-23 19:54:44 UTC (rev 975)
+++ dcplusplus/trunk/dcpp/StringDefs.h 2008-01-23 21:54:41 UTC (rev 976)
@@ -1,643 +0,0 @@
-// @Prolog: #include "stdinc.h"
-// @Prolog: #include "DCPlusPlus.h"
-// @Prolog: #include "ResourceManager.h"
-// @Prolog: namespace dcpp {
-// @Strings: string ResourceManager::strings[]
-// @Names: string ResourceManager::names[]
-// @Epilog: } // namespace dcpp
-
-enum Strings { // @DontAdd
- ACTIVE, // "Active"
- ACTIVE_SEARCH_STRING, // "Enabled / Search String"
- ADD, // "&Add"
- ADD_TO_FAVORITES, // "Add To Favorites"
- ADDED, // "Added"
- ADL_SEARCH, // "Automatic Directory Listing Search"
- ADLS_DESTINATION, // "Destination Directory"
- ADLS_DISCARD, // "Discard"
- ADLS_DOWNLOAD, // "Download Matches"
- ADLS_ENABLED, // "Enabled"
- ADLS_FULL_PATH, // "Full Path"
- ADLS_PROPERTIES, // "ADLSearch Properties"
- ADLS_SEARCH_STRING, // "Search String"
- ADLS_SIZE_MAX, // "Max FileSize"
- ADLS_SIZE_MIN, // "Min FileSize"
- ADLS_TYPE, // "Search Type"
- ADLS_UNITS, // "Size Type"
- ALL_DOWNLOAD_SLOTS_TAKEN, // "All download slots taken"
- ALL_USERS_OFFLINE, // "All %d users offline"
- ALL_3_USERS_OFFLINE, // "All 3 users offline"
- ALL_4_USERS_OFFLINE, // "All 4 users offline"
- ALL, // "All"
- ANY, // "Any"
- AT_LEAST, // "At least"
- AT_MOST, // "At most"
- AUDIO, // "Audio"
- AUTO_CONNECT, // "Auto connect / Name"
- AUTO_GRANT, // "Auto grant slot / Nick"
- AVERAGE, // "Average/s: "
- AWAY, // "AWAY"
- AWAY_MODE_OFF, // "Away mode off"
- AWAY_MODE_ON, // "Away mode on: "
- B, // "B"
- BAN_USER, // "Ban user(s)"
- BOTH_USERS_OFFLINE, // "Both users offline"
- BPS, // "B/s"
- BROWSE, // "Browse..."
- BROWSE_ACCEL, // "&Browse..."
- BROWSE_FILE_LIST, // "Browse file list"
- CERTIFICATE_GENERATED, // "Generated new TLS certificate"
- CERTIFICATE_NOT_TRUSTED, // "Certificate not trusted, unable to connect"
- CERTIFICATE_GENERATION_FAILED, // "TLS disabled, failed to generate certificate: "
- CHOOSE_FOLDER, // "Choose folder"
- CID, // "CID"
- CIPHER, // "Cipher"
- CLOSE, // "Close"
- CLOSE_CONNECTION, // "Close connection"
- CLOSING_CONNECTION, // "Closing connection..."
- COMCTL_TOO_OLD, // "Your version of windows common controls is too old for DC++ to run correctly, and you will most probably experience problems with the user interface. You should download version 5.80 or higher from the DC++ homepage or from Microsoft directly."
- COMPRESSED, // "Compressed"
- COMPRESSION_ERROR, // "Error during compression"
- COMMAND_TOO_LONG, // "Maximum command length exceeded"
- CONFIGURE, // "&Configure"
- CONNECT, // "&Connect"
- CONNECT_FAVUSER_HUB, // "Connect to hub"
- CONNECTED, // "Connected"
- CONNECTING, // "Connecting..."
- CONNECTING_FORCED, // "Connecting (forced)..."
- CONNECTING_TO, // "Connecting to "
- CONNECTION, // "Connection"
- CONNECTION_CLOSED, // "Connection closed"
- CONNECTION_TIMEOUT, // "Connection timeout"
- CONFIGURED_HUB_LISTS, // "Configured Public Hub Lists"
- COPY_FILENAME, // "Copy Filename"
- COPY_HUB, // "Copy address to clipboard"
- COPY_MAGNET, // "Copy magnet link to clipboard"
- COPY_NICK, // "Copy nick to clipboard"
- COULD_NOT_OPEN_TARGET_FILE, // "Could not open target file: "
- COUNT, // "Count"
- COUNTRY, // "Country"
- CRC_CHECKED, // "CRC Checked"
- DECOMPRESSION_ERROR, // "Error during decompression"
- DESCRIPTION, // "Description"
- DESTINATION, // "Destination"
- DIRECTORY, // "Directory"
- DIRECTORY_ALREADY_SHARED, // "Directory already shared"
- DIRECTORY_ADD_ERROR, // "Directory or directory name already exists"
- DISC_FULL, // "Disk full(?)"
- DISCONNECT_USER, // "Disconnect user(s)"
- DISCONNECTED, // "Disconnected"
- DISCONNECTED_USER, // "Disconnected user leaving the hub: "
- DOCUMENT, // "Document"
- DONE, // "Done"
- DONT_REMOVE_SLASH_PASSWORD, // "Don't remove /password before your password"
- DONT_SHARE_TEMP_DIRECTORY, // "The temporary download directory cannot be shared"
- DOWNLOAD, // "Download"
- DOWNLOAD_FAILED, // "Download failed: "
- DOWNLOAD_FINISHED_IDLE, // "Download finished, idle..."
- DOWNLOAD_QUEUE, // "Download Queue"
- DOWNLOAD_STARTING, // "Download starting..."
- DOWNLOAD_TO, // "Download to..."
- DOWNLOAD_WHOLE_DIR, // "Download whole directory"
- DOWNLOAD_WHOLE_DIR_TO, // "Download whole directory to..."
- DOWNLOADED, // "Downloaded"
- DOWNLOADED_BYTES, // "Downloaded %s (%.01f%%) in %s"
- DOWNLOADED_FROM, // " downloaded from "
- DOWNLOADING, // "Downloading..."
- DOWNLOADING_HUB_LIST, // "Downloading public hub list..."
- DOWNLOADING_LIST, // "Downloading list..."
- DOWNLOADS, // "Downloads"
- DUPLICATE_FILE_NOT_SHARED, // "Duplicate file will not be shared: "
- DUPLICATE_MATCH, // "Dupe matched against: "
- DUPLICATE_SOURCE, // "Duplicate source"
- EDIT, // "Edit"
- EDIT_ACCEL, // "&Edit"
- EMAIL, // "E-Mail"
- ENTER_NICK, // "Please enter a nickname in the settings dialog!"
- ENTER_PASSWORD, // "Please enter a password"
- ENTER_REASON, // "Please enter a reason"
- ENTER_SEARCH_STRING, // "Enter search string"
- ENTER_SERVER, // "Please enter a destination server"
- ERRORS, // "Errors"
- ERROR_CREATING_HASH_DATA_FILE, // "Error creating hash data file: "
- ERROR_CREATING_REGISTRY_KEY_ADC, // "Error creating adc registry key"
- ERROR_CREATING_REGISTRY_KEY_DCHUB, // "Error creating dchub registry key"
- ERROR_CREATING_REGISTRY_KEY_MAGNET, // "Error creating magnet registry key"
- ERROR_HASHING, // "Error hashing "
- ERROR_SAVING_HASH, // "Error saving hash data: "
- EXACT_SIZE, // "Exact size"
- EXECUTABLE, // "Executable"
- FAILED_TO_LOAD_CERTIFICATE, // "Failed to load certificate file"
- FAILED_TO_LOAD_PRIVATE_KEY, // "Failed to load private key"
- FAV_JOIN_SHOWING_OFF, // "Join/part of favorite users showing off"
- FAV_JOIN_SHOWING_ON, // "Join/part of favorite users showing on"
- FAVORITE_DIR_NAME, // "Favorite name"
- FAVORITE_DIR_NAME_LONG, // "Under what name you see the directory"
- FAVORITE_HUB_ADDED, // "Favorite hub added"
- FAVORITE_HUB_ALREADY_EXISTS, // "Hub already exists as a favorite"
- FAVORITE_HUB_DOES_NOT_EXIST, // "This hub is not a favorite hub"
- FAVORITE_HUB_IDENTITY, // "Identification (leave blank for defaults)"
- FAVORITE_HUB_PROPERTIES, // "Favorite Hub Properties"
- FAVORITE_HUB_REMOVED, // "Favorite hub removed"
- FAVORITE_HUBS, // "Favorite Hubs"
- FAVORITE_USER_ADDED, // "Favorite user added"
- FAVORITE_USERS, // "Favorite Users"
- FILE, // "File"
- FILES, // "Files"
- FILE_HAS_NO_TTH, // "This file has no TTH"
- FILE_IS_ALREADY_QUEUED, // "This file is already queued"
- FILE_LIST_DIFF, // "Subtract list"
- FILE_LIST_REFRESH_FAILED, // "File list refresh failed: "
- FILE_LIST_REFRESH_FINISHED, // "File list refresh finished"
- FILE_LIST_REFRESH_INITIATED, // "File list refresh initiated"
- FILE_LIST_REFRRESH_IN_PROGRESS, // "File list refresh in progress, please wait for it to finish before trying to refresh again"
- FILE_NOT_AVAILABLE, // "File not available"
- FILE_TYPE, // "File type"
- FILE_WITH_DIFFERENT_SIZE, // "A file with a different size already exists in the queue"
- FILE_WITH_DIFFERENT_TTH, // "A file with different tth root already exists in the queue"
- FILENAME, // "Filename"
- FILES_LEFT, // "files left"
- FILES_PER_HOUR, // "files/h"
- FILTER, // "F&ilter"
- FILTERED, // "Filtered"
- FIND, // "Find"
- FINISHED_DOWNLOADS, // "Finished Downloads"
- FINISHED_UPLOADS, // "Finished Uploads"
- FORCE_ATTEMPT, // "Force attempt"
- GiB, // "GiB"
- GET_FILE_LIST, // "Get file list"
- GO_TO_DIRECTORY, // "Go to directory"
- GRANT_EXTRA_SLOT, // "Grant extra slot"
- HASH_DATABASE, // "Hash database"
- HASH_PROGRESS, // "Creating file index..."
- HASH_PROGRESS_BACKGROUND, // "Run in background"
- HASH_PROGRESS_STATS, // "Statistics"
- HASH_PROGRESS_TEXT, // "Please wait while DC++ indexes your files (they won't be shared until they've been indexed)..."
- HASH_READ_FAILED, // "Unable to read hash data file"
- HASH_REBUILT, // "Hash database rebuilt"
- HASHING_FAILED, // "Hashing failed: "
- HASHING_FINISHED, // "Finished hashing: "
- HIGH, // "High"
- HIGHEST, // "Highest"
- HIT_RATIO, // "Hit Ratio: "
- HITS, // "Hits: "
- HUB, // "Hub"
- HUBS, // "Hubs"
- HUB_ADDRESS, // "Address"
- HUB_LIST_DOWNLOADED, // "Hub list downloaded..."
- HUB_LIST_EDIT, // "Edit the hublist"
- HUB_LIST_LOADED_FROM_CACHE, // "Hub list loaded from cache..."
- HUB_NAME, // "Name"
- HUB_LIST, // "Hublist"
- HUB_PASSWORD, // "Hub password"
- HUB_USERS, // "Users"
- IGNORE_TTH_SEARCHES, // "Ignore TTH searches"
- IGNORED_MESSAGE, // "Ignored message: "
- INCOMPLETE_FAV_HUB, // "Hub address cannot be empty."
- INVALID_LISTNAME, // "Invalid file list name"
- INVALID_NUMBER_OF_SLOTS, // "Invalid number of slots"
- INVALID_SIZE, // "Invalid size"
- INVALID_TARGET_FILE, // "Invalid target file (missing directory, check default download directory setting)"
- INVALID_TREE, // "Full tree does not match TTH root"
- IP, // "IP: "
- IP_BARE, // "IP"
- ITEMS, // "Items"
- JOIN_SHOWING_OFF, // "Join/part showing off"
- JOIN_SHOWING_ON, // "Join/part showing on"
- JOINS, // "Joins: "
- KiB, // "KiB"
- KiBPS, // "KiB/s"
- KICK_USER, // "Kick user(s)"
- LARGER_TARGET_FILE_EXISTS, // "A file of equal or larger size already exists at the target location"
- LAST_CHANGE, // "Last change: "
- LAST_HUB, // "Hub (last seen on if offline)"
- LAST_SEEN, // "Time last seen"
- LEFT, // "left"
- LISTENER_FAILED, // "Listening socket failed (you need to restart DC++): "
- LOADING, // "Loading DC++, please wait..."
- LOOKUP_AT_BITZI, // "Lookup TTH at Bitzi.com"
- LOW, // "Low"
- LOWEST, // "Lowest"
- MAGNET_DLG_FILE, // "Filename:"
- MAGNET_DLG_HASH, // "File Hash:"
- MAGNET_DLG_NOTHING, // "Do nothing"
- MAGNET_DLG_QUEUE, // "Add this file to your download queue"
- MAGNET_DLG_REMEMBER, // "Do the same action next time without asking"
- MAGNET_DLG_SEARCH, // "Start a search for this file"
- MAGNET_DLG_TEXT_BAD, // "A MAGNET link was given to DC++, but it didn't contain a valid file hash for use on the Direct Connect network. No action will be taken."
- MAGNET_DLG_TEXT_GOOD, // "DC++ has detected a MAGNET link with a file hash that can be searched for on the Direct Connect network. What would you like to do?"
- MAGNET_DLG_TITLE, // "MAGNET Link detected"
- MAGNET_HANDLER_DESC, // "Download files from the Direct Connect network"
- MAGNET_HANDLER_ROOT, // "DC++"
- MAGNET_SHELL_DESC, // "URL:MAGNET URI"
- MATCH_QUEUE, // "Match queue"
- MATCHED_FILES, // "Matched %d file(s)"
- MAX_HUBS, // "Max Hubs"
- MAX_SIZE, // "Max Size"
- MAX_USERS, // "Max Users"
- MIN_SIZE, // "Min Size"
- MiB, // "MiB"
- MiBPS, // "MiB/s"
- MiBITSPS, // "MiBits/s"
- MENU_ABOUT, // "About DC++..."
- MENU_ADL_SEARCH, // "ADL Search"
- MENU_ARRANGE, // "Arrange icons"
- MENU_CASCADE, // "Cascade"
- MENU_CHANGELOG, // "Change Log"
- MENU_CLOSE_ALL_DIR_LIST, // "Close all file list windows"
- MENU_CLOSE_ALL_OFFLINE_PM, // "Close all offline PM windows"
- MENU_CLOSE_ALL_PM, // "Close all PM windows"
- MENU_CLOSE_ALL_SEARCHFRAME, // "Close all search windows"
- MENU_CLOSE_DISCONNECTED, // "Close disconnected"
- MENU_CONTENTS, // "Help &Contents\tF1"
- MENU_DISCUSS, // "DC++ discussion forum"
- MENU_DONATE, // "Donate (paypal)"
- MENU_DOWNLOAD_QUEUE, // "&Download Queue\tCtrl+D"
- MENU_EXIT, // "E&xit"
- MENU_FAQ, // "Frequently asked questions"
- MENU_FAVORITE_HUBS, // "&Favorite Hubs\tCtrl+F"
- MENU_FAVORITE_USERS, // "Favorite &Users\tCtrl+U"
- MENU_FILE, // "&File"
- MENU_FOLLOW_REDIRECT, // "Follow last redirec&t\tCtrl+T"
- MENU_HASH_PROGRESS, // "Indexing progress"
- MENU_HELP, // "&Help"
- MENU_HELP_DOWNLOADS, // "Downloads"
- MENU_HELP_GEOIPFILE, // "GeoIP database update"
- MENU_HELP_FORUM, // "Help forum"
- MENU_HELP_TRANSLATIONS, // "Translations"
- MENU_HOMEPAGE, // "DC++ Homepage"
- MENU_HORIZONTAL_TILE, // "Horizontal Tile"
- MENU_MINIMIZE_ALL, // "Minimize &All"
- MENU_RESTORE_ALL, // "Restore All"
- MENU_NETWORK_STATISTICS, // "Network Statistics"
- MENU_NOTEPAD, // "&Notepad\tCtrl+N"
- MENU_OPEN_DOWNLOADS_DIR, // "Open downloads directory"
- MENU_OPEN_FILE_LIST, // "Open file list...\tCtrl+L"
- MENU_OPEN_MATCH_ALL, // "Match downloaded lists"
- MENU_OPEN_OWN_LIST, // "Open own list"
- MENU_PUBLIC_HUBS, // "&Public Hubs\tCtrl+P"
- MENU_QUICK_CONNECT, // "&Quick Connect ...\tCtrl+Q"
- MENU_RECONNECT, // "&Reconnect\tCtrl+R"
- MENU_REFRESH_FILE_LIST, // "Refresh file list\tCtrl+E"
- MENU_REPORT_BUG, // "Report a bug"
- MENU_REQUEST_FEATURE, // "Request a feature"
- MENU_SEARCH, // "&Search\tCtrl+S"
- MENU_SEARCH_SPY, // "Search Spy"
- MENU_SETTINGS, // "Settings..."
- MENU_SHOW, // "Show"
- MENU_STATUS_BAR, // "&Status bar\tCtrl+2"
- MENU_SYSTEM_LOG, // "System Log"
- MENU_TOOLBAR, // "&Toolbar\tCtrl+1"
- MENU_TRANSFER_VIEW, // "T&ransfers\tCtrl+3"
- MENU_VERTICAL_TILE, // "Vertical Tile"
- MENU_VIEW, // "&View"
- MENU_WINDOW, // "&Window"
- MIN_SHARE, // "Min Share"
- MIN_SLOTS, // "Min Slots"
- MOVE, // "Move/Rename"
- MOVE_DOWN, // "Move &Down"
- MOVE_UP, // "Move &Up"
- NETWORK_STATISTICS, // "Network Statistics"
- NEW, // "&New..."
- NEXT, // "Next"
- NICK, // "Nick"
- NICK_TAKEN, // "Your nick was already taken, please change to something else!"
- NICK_UNKNOWN, // " (Nick unknown)"
- NO_CERTIFICATE_FILE_SET, // "TLS disabled, no certificate file set"
- NO_CRC32_MATCH, // " not shared; calculated CRC32 does not match the one found in SFV file."
- NO_DIRECTORY_SPECIFIED, // "No directory specified"
- NO_DOWNLOADS_FROM_SELF, // "You're trying to download from yourself!"
- NO_ERRORS, // "No errors"
- NO_MATCHES, // "No matches"
- NO_SLOTS_AVAILABLE, // "No slots available"
- NO_STR, // "No"
- NO_USERS, // "No users"
- NO_USERS_TO_DOWNLOAD_FROM, // "No users to download from"
- NORMAL, // "Normal"
- NOT_LISTENING, // "Not listening for connections - please restart DC++"
- NOTEPAD, // "Notepad"
- OFFLINE, // "Offline"
- ONLINE, // "Online"
- ONLY_FREE_SLOTS, // "Only users with free slots"
- ONLY_TLS_ALLOWED, // "Only TLS connections allowed"
- ONLY_TTH, // "Only results with TTH root"
- ONLY_WHERE_OP, // "Only where I'm op"
- OPEN, // "Open"
- OPEN_DOWNLOAD_PAGE, // "Open download page?"
- OPEN_FOLDER, // "Open folder"
- OPERATING_SYSTEM_NOT_COMPATIBLE, // "Operating system does not match minimum requirements for feature"
- OUT_OF_BUFFER_SPACE, // "Out of buffer space"
- PARTS, // "Parts: "
- PASSIVE_USER, // "Passive user"
- PASSWORD, // "Password"
- PATH, // "Path"
- PAUSED, // "Paused"
- PIB, // "PiB"
- PICTURE, // "Picture"
- PORT, // "Port: "
- PREPARING_FILE_LIST, // "Preparing file list..."
- PRESS_FOLLOW, // "Press the follow redirect button to connect to "
- PRIORITY, // "Priority"
- PRIVATE_MESSAGE, // "Private message"
- PRIVATE_MESSAGE_FROM, // "Private message from "
- PROPERTIES, // "&Properties"
- PUBLIC_HUBS, // "Public Hubs"
- PURGE, // "Purge"
- QUICK_CONNECT, // "Quick Connect"
- RATING, // "Rating"
- RATIO, // "Ratio"
- READD_SOURCE, // "Re-add source"
- REALLY_EXIT, // "Really exit?"
- REALLY_REMOVE, // "Really remove?"
- REDIRECT, // "Redirect"
- REDIRECT_ALREADY_CONNECTED, // "Redirect request received to a hub that's already connected"
- REDIRECT_USER, // "Redirect user(s)"
- REFRESH, // "&Refresh"
- REFRESH_USER_LIST, // "Refresh user list"
- RELIABILITY, // "Reliability"
- REMOVE, // "&Remove"
- REMOVE_ALL, // "Remove all"
- REMOVE_ALL_SUBDIRECTORIES, // "Remove all subdirectories before adding this one"
- REMOVE_FROM_ALL, // "Remove user from queue"
- REMOVE_SOURCE, // "Remove source"
- RENAMED_TO, // " renamed to "
- RUNNING, // "Running..."
- S, // "s"
- SEARCH, // "Search"
- SEARCH_FOR, // "Search for"
- SEARCH_FOR_ALTERNATES, // "Search for alternates"
- SEARCH_FOR_FILE, // "Search for file"
- SEARCH_OPTIONS, // "Search options"
- SEARCH_SPAM_FROM, // "Search spam detected from "
- SEARCH_SPY, // "Search Spy"
- SEARCH_STRING, // "Search String"
- SEARCHING_FOR, // "Searching for "
- SEARCHING_READY, // "Ready to search..."
- SEARCHING_WAIT, // "Searching too soon, next search in %i seconds"
- SEEK_BEYOND_END, // "Request to seek beyond the end of data"
- SEND_PRIVATE_MESSAGE, // "Send private message"
- SEPARATOR, // "Separator"
- SERVER, // "Server"
- SET_PRIORITY, // "Set priority"
- SETTINGS, // "Settings"
- SETTINGS_ADD_FINISHED_INSTANTLY, // "Add finished files to share instantly (if shared)"
- SETTINGS_ADD_FOLDER, // "&Add folder"
- SETTINGS_ADLS_BREAK_ON_FIRST, // "Break on first ADLSearch match"
- SETTINGS_ADVANCED, // "Advanced"
- SETTINGS_ADVANCED3, // "Advanced\\Experts only"
- SETTINGS_ADVANCED_SETTINGS, // "Advanced settings"
- SETTINGS_ALLOW_UNTRUSTED_CLIENTS, // "Allow TLS connections to clients without trusted certificate"
- SETTINGS_ALLOW_UNTRUSTED_HUBS, // "Allow TLS connections to hubs without trusted certificate"
- SETTINGS_ANTI_FRAG, // "Use antifragmentation method for downloads"
- SETTINGS_APPEARANCE, // "Appearance"
- SETTINGS_APPEARANCE2, // "Appearance\\Colors and sounds"
- SETTINGS_AUTODROP_AUTODROPSETTINGS, // "Autodrop settings"
- SETTINGS_AUTODROP_SPEED, // "Drop sources below"
- SETTINGS_AUTODROP_INTERVAL, // "Check every"
- SETTINGS_AUTODROP_ELAPSED, // "Min elapsed"
- SETTINGS_AUTODROP_INACTIVITY, // "Max inactivity"
- SETTINGS_AUTODROP_MINSOURCES, // "Min sources online"
- SETTINGS_AUTODROP_FILESIZE, // "Min filesize"
- SETTINGS_AUTODROP_ALL, // "Autodrop slow sources for all queue items (except filelists)"
- SETTINGS_AUTODROP_FILELISTS, // "Remove slow filelists"
- SETTINGS_AUTODROP_DISCONNECT, // "Don't remove the source when autodropping, only disconnect"
- SETTINGS_AUTO_AWAY, // "Auto-away on minimize (and back on restore)"
- SETTINGS_AUTO_FOLLOW, // "Automatically follow redirects"
- SETTINGS_AUTO_KICK, // "Automatically disconnect users who leave the hub"
- SETTINGS_AUTO_KICK_NO_FAVS, // "Don't automatically disconnect favorite users who leave the hub"
- SETTINGS_AUTO_SEARCH, // "Automatically search for alternative download locations"
- SETTINGS_AUTO_SEARCH_AUTO_MATCH, // "Automatically match queue for auto search hits"
- SETTINGS_AUTO_SEARCH_LIMIT, // "Auto-search limit"
- SETTINGS_AUTO_OPEN, // "Auto-open at startup"
- SETTINGS_AUTO_REFRESH_TIME, // "Auto refresh time"
- SETTINGS_BIND_ADDRESS, // "Bind address"
- SETTINGS_BOLD_OPTIONS, // "Tab highlight on content change"
- SETTINGS_CERTIFICATES, // "Advanced\\Security Certificates"
- SETTINGS_CHANGE, // "&Change"
- SETTINGS_CLEAR_SEARCH, // "Clear search box after each search"
- SETTINGS_COLORS, // "Colors"
- SETTINGS_COMMAND, // "Command"
- SETTINGS_COMPRESS_TRANSFERS, // "Enable safe and compressed transfers"
- SETTINGS_CONFIGURE_HUB_LISTS, // "Configure Public Hub Lists"
- SETTINGS_CONFIRM_DIALOG_OPTIONS, // "Confirm dialog options"
- SETTINGS_CONFIRM_EXIT, // "Confirm application exit"
- SETTINGS_CONFIRM_HUB_REMOVAL, // "Confirm favorite hub removal"
- SETTINGS_CONFIRM_ITEM_REMOVAL, // "Confirm item removal in download queue"
- SETTINGS_CONNECTION_TYPE, // "Connection Type"
- SETTINGS_DEFAULT_AWAY_MSG, // "Default away message"
- SETTINGS_DIRECT, // "Direct connection"
- SETTINGS_DIRECTORIES, // "Directories"
- SETTINGS_DONT_DL_ALREADY_QUEUED, // "Don't download files already in the queue"
- SETTINGS_DONT_DL_ALREADY_SHARED, // "Don't download files already in share"
- SETTINGS_DOWNLOAD_DIRECTORY, // "Default download directory"
- SETTINGS_DOWNLOAD_LIMITS, // "Limits"
- SETTINGS_DOWNLOADS, // "Downloads"
- SETTINGS_DOWNLOADS_MAX, // "Maximum simultaneous downloads (0 = infinite)"
- SETTINGS_DOWNLOADS_SPEED_PAUSE, // "No new downloads if speed exceeds (KiB/s, 0 = disable)"
- SETTINGS_EXAMPLE_TEXT, // "Donate \342\202\254\342\202\254\342\202\254:s! (ok, dirty dollars are fine as well =) (see help menu)"
- SETTINGS_EXTERNAL_IP, // "External / WAN IP"
- SETTINGS_FAV_SHOW_JOINS, // "Only show joins / parts for favorite users"
- SETTINGS_FAVORITE_DIRS_PAGE, // "Downloads\\Favorites"
- SETTINGS_FAVORITE_DIRS, // "Favorite download directories"
- SETTINGS_FILE_NAME, // "Filename"
- SETTINGS_FILTER_MESSAGES, // "Filter kick and NMDC debug messages"
- SETTINGS_FIREWALL_NAT, // "Firewall with manual port forwarding"
- SETTINGS_FIREWALL_PASSIVE, // "Firewall (passive, last resort)"
- SETTINGS_FIREWALL_UPNP, // "Firewall with UPnP"
- SETTINGS_FORMAT, // "Format"
- SETTINGS_GENERAL, // "Personal information"
- SETTINGS_GET_USER_COUNTRY, // "Guess user country from IP"
- SETTINGS_HUB_USER_COMMANDS, // "Accept custom user commands from hub"
- SETTINGS_IGNORE_HUB_PMS, // "Ignore private messages from the hub"
- SETTINGS_IGNORE_BOT_PMS, // "Ignore private messages from bots"
- SETTINGS_INCOMING, // "Incoming connection settings (see Help/FAQ if unsure)"
- SETTINGS_KEEP_LISTS, // "Don't delete file lists when exiting"
- SETTINGS_LANGUAGE_FILE, // "Language fi...
[truncated message content] |
|
From: <arn...@us...> - 2008-01-24 21:35:24
|
Revision: 977
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=977&view=rev
Author: arnetheduck
Date: 2008-01-24 13:34:31 -0800 (Thu, 24 Jan 2008)
Log Message:
-----------
Language files
Modified Paths:
--------------
dcplusplus/trunk/build_util.py
Added Paths:
-----------
dcplusplus/trunk/dcpp/po/de.po
dcplusplus/trunk/dcpp/po/ko.po
dcplusplus/trunk/win32/po/ko.po
Modified: dcplusplus/trunk/build_util.py
===================================================================
--- dcplusplus/trunk/build_util.py 2008-01-23 21:54:41 UTC (rev 976)
+++ dcplusplus/trunk/build_util.py 2008-01-24 21:34:31 UTC (rev 977)
@@ -83,7 +83,7 @@
for po_file in p_oze:
buildenv.Precious(buildenv.PoBuild(po_file, [potfile]))
- lang = os.path.basename(po)[:-3]
+ lang = os.path.basename(po_file)[:-3]
mo_file = self.get_target(source_path, "locale/" + lang + "/LC_MESSAGES/" + name + ".mo", True)
buildenv.MoBuild (mo_file, po_file)
Added: dcplusplus/trunk/dcpp/po/de.po
===================================================================
--- dcplusplus/trunk/dcpp/po/de.po (rev 0)
+++ dcplusplus/trunk/dcpp/po/de.po 2008-01-24 21:34:31 UTC (rev 977)
@@ -0,0 +1,404 @@
+# German translation for dcplusplus
+# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008
+# This file is distributed under the same license as the dcplusplus package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: dcplusplus\n"
+"Report-Msgid-Bugs-To: dcp...@li...\n"
+"POT-Creation-Date: 2008-01-23 22:20+0100\n"
+"PO-Revision-Date: 2008-01-24 07:24+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: German <de...@li...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Launchpad-Export-Date: 2008-01-24 09:08+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#: dcpp/Util.cpp:381
+#, c-format, boost-format
+msgid "%'lld B"
+msgstr "%'lld B"
+
+#: dcpp/Util.cpp:343
+#, c-format, boost-format
+msgid "%.02f GiB"
+msgstr "%.02f GiB"
+
+#: dcpp/Util.cpp:339
+#, c-format, boost-format
+msgid "%.02f KiB"
+msgstr "%.02f KiB"
+
+#: dcpp/Util.cpp:341
+#, c-format, boost-format
+msgid "%.02f MiB"
+msgstr "%.02f MiB"
+
+#: dcpp/Util.cpp:347
+#, c-format, boost-format
+msgid "%.02f PiB"
+msgstr "%.02f PiB"
+
+#: dcpp/Util.cpp:345
+#, c-format, boost-format
+msgid "%.02f TiB"
+msgstr "%.02f TiB"
+
+#: dcpp/NmdcHub.cpp:273
+#, boost-format
+msgid "%1% (Nick unknown)"
+msgstr "%1% (Nick unbekannt)"
+
+#: dcpp/HashManager.cpp:767
+#, boost-format
+msgid ""
+"%1% not shared; calculated CRC32 does not match the one found in SFV file."
+msgstr ""
+"%1% nicht freigegeben, errechneter CRC32 Wert passt nicht zu dem in der SFV "
+"Datei"
+
+#: dcpp/DownloadManager.cpp:143
+#, boost-format
+msgid "%1% renamed to %2%"
+msgstr "%1% umbenannt in %2%"
+
+#: dcpp/DownloadManager.cpp:547
+#, boost-format
+msgid "%1%: File not available"
+msgstr "%1%: Datei nicht verfügbar"
+
+#: dcpp/Util.cpp:337
+#, c-format, boost-format
+msgid "%d B"
+msgstr "%d B"
+
+#: dcpp/Util.cpp:377
+#, c-format, boost-format
+msgid "%s B"
+msgstr "%s B"
+
+#: dcpp/QueueManager.cpp:503
+msgid "A file of equal or larger size already exists at the target location"
+msgstr "Eine Datei gleicher oder größerer Größe existiert bereits am Zielort"
+
+#: dcpp/QueueManager.cpp:446
+msgid "A file with a different size already exists in the queue"
+msgstr ""
+"Eine Datei mit anderer Größe ist bereits in der Warteschlange vorhanden"
+
+#: dcpp/QueueManager.cpp:449
+msgid "A file with different tth root already exists in the queue"
+msgstr ""
+"Eine Datei mit anderem TTH Root ist bereits in der Warteschlange vorhanden"
+
+#: dcpp/QueueManager.cpp:413
+msgid "A file with the same hash already exists in your share"
+msgstr "Eine Datei mit dem selben Hash-Wert wurde bereits freigegeben"
+
+#: dcpp/ConnectionManager.cpp:181
+msgid "All download slots taken"
+msgstr "Alle Downloadslots besetzt"
+
+#: dcpp/DownloadManager.cpp:421
+msgid "CRC32 inconsistency (SFV-Check)"
+msgstr "CRC32 Inkonsistenz (SFV-Check)"
+
+#: dcpp/DownloadManager.cpp:419
+#, boost-format
+msgid "CRC32 inconsistency (SFV-Check) (File: %1%)"
+msgstr "CRC32 Inkonsistenz (SFV-Check) (Datei: %1%)"
+
+#: dcpp/ConnectionManager.cpp:385
+msgid "Certificate not trusted, unable to connect"
+msgstr "Zertifikat nicht vertrauenswürdig, Verbindung nicht möglich"
+
+#: dcpp/Socket.cpp:155 dcpp/ConnectionManager.cpp:187
+#: dcpp/BufferedSocket.cpp:154
+msgid "Connection timeout"
+msgstr "Zeitüberschreitung der Verbindung"
+
+#: dcpp/DownloadManager.cpp:284
+#, boost-format
+msgid "Could not open target file: %1%"
+msgstr "Konnte die Zieldatei nicht öffnen: %1%"
+
+#: dcpp/ShareManager.cpp:418
+msgid "Directory already shared"
+msgstr "Verzeichnis ist bereits freigegeben"
+
+#: dcpp/BufferedSocket.cpp:409 dcpp/BufferedSocket.cpp:427
+msgid "Disconnected"
+msgstr "Getrennt"
+
+#: dcpp/UploadManager.cpp:450
+#, boost-format
+msgid "Disconnected user leaving the hub: %1%"
+msgstr "Getrennter User verlässt Hub: %1%"
+
+#: dcpp/DCPlusPlus.cpp:103
+msgid "Download Queue"
+msgstr "Download Warteschlange"
+
+#: dcpp/ShareManager.cpp:745
+#, boost-format
+msgid ""
+"Duplicate file will not be shared: %1%%2% (Size: %3% B) Dupe matched "
+"against: %4%%5%"
+msgstr ""
+"Dateiduplikat wird nicht freigegeben: %1%%2% (Größe: %3% B) Duplikat passend "
+"zu: %4%%5%"
+
+#: dcpp/QueueManager.cpp:516 dcpp/QueueManager.cpp:520
+#, boost-format
+msgid "Duplicate source: %1%"
+msgstr "Doppelte Quelle: %1%"
+
+#: dcpp/HashManager.cpp:456
+#, boost-format
+msgid "Error creating hash data file: %1%"
+msgstr "Fehler bei Erstellung von Hashdatendatei: %1%"
+
+#: dcpp/ZUtils.cpp:33 dcpp/ZUtils.cpp:54 dcpp/ZUtils.cpp:76 dcpp/ZUtils.cpp:86
+#: dcpp/BZUtils.cpp:31 dcpp/BZUtils.cpp:52 dcpp/BZUtils.cpp:60
+msgid "Error during compression"
+msgstr "Fehler bei Komprimierung"
+
+#: dcpp/ZUtils.cpp:100 dcpp/ZUtils.cpp:123 dcpp/BZUtils.cpp:72
+#: dcpp/BZUtils.cpp:94 dcpp/BZUtils.cpp:97 dcpp/CryptoManager.cpp:344
+#: dcpp/CryptoManager.cpp:363 dcpp/CryptoManager.cpp:377
+msgid "Error during decompression"
+msgstr "Fehler bei Dekomprimierung"
+
+#: dcpp/HashManager.cpp:772
+#, boost-format
+msgid "Error hashing %1%: %2%"
+msgstr "Fehler beim Hashen von %1%: %2%"
+
+#: dcpp/HashManager.cpp:118 dcpp/HashManager.cpp:333
+#, boost-format
+msgid "Error saving hash data: %1%"
+msgstr "Fehler beim Speichern der Hash-Daten: %1%"
+
+#: dcpp/CryptoManager.cpp:228 dcpp/CryptoManager.cpp:232
+#: dcpp/CryptoManager.cpp:237 dcpp/CryptoManager.cpp:241
+msgid "Failed to load certificate file"
+msgstr "Laden des Zertifikats fehlgeschlagen"
+
+#: dcpp/CryptoManager.cpp:246 dcpp/CryptoManager.cpp:250
+#: dcpp/CryptoManager.cpp:255 dcpp/CryptoManager.cpp:259
+msgid "Failed to load private key"
+msgstr "Laden des privaten Schlüssels fehlgeschlagen"
+
+#: dcpp/Socket.cpp:409
+msgid ""
+"Failed to set up the socks server for UDP relay (check socks address and "
+"port)"
+msgstr ""
+"Konnte den Socks Server nicht für UDP Relay einrichten (überprüfen Sie "
+"Adresse und Port des Servers)"
+
+#: dcpp/ShareManager.cpp:780
+#, boost-format
+msgid "File list refresh failed: %1%"
+msgstr "Aktualisieren der Dateiliste fehlgeschlagen: %1%"
+
+#: dcpp/ShareManager.cpp:824
+msgid "File list refresh finished"
+msgstr "Aktualisieren der Dateiliste beendet"
+
+#: dcpp/ShareManager.cpp:760
+msgid ""
+"File list refresh in progress, please wait for it to finish before trying to "
+"refresh again"
+msgstr ""
+"Aktualisieren der Dateiliste im Gange, bitte vor erneuter Aktualisierung auf "
+"Ende warten"
+
+#: dcpp/ShareManager.cpp:802
+msgid "File list refresh initiated"
+msgstr "Aktualisieren der Dateiliste gestartet"
+
+#: dcpp/DirectoryListing.cpp:102
+msgid "File not available"
+msgstr "Die Datei ist nicht verfügbar"
+
+#: dcpp/HashManager.cpp:89
+#, boost-format
+msgid "Finished hashing: %1%"
+msgstr "Hash berechnen beendet: %1%"
+
+#: dcpp/HashManager.cpp:87
+#, boost-format
+msgid "Finished hashing: %1% (%2%/s)"
+msgstr "Hash berechnen beendet: %1% (%2%/s)"
+
+#: dcpp/DownloadManager.cpp:353
+msgid "Full tree does not match TTH root"
+msgstr "Kompletter Baum stimmt nicht mit TTH Root überein"
+
+#: dcpp/CryptoManager.cpp:221
+msgid "Generated new TLS certificate"
+msgstr "Neues TLS Zertifikat erstellt"
+
+#: dcpp/DCPlusPlus.cpp:97
+msgid "Hash database"
+msgstr "Hash-Datenbank"
+
+#: dcpp/HashManager.cpp:677
+msgid "Hash database rebuilt"
+msgstr "Hash-Datenbank rekonstruiert"
+
+#: dcpp/HashManager.cpp:73 dcpp/HashManager.cpp:277
+#, boost-format
+msgid "Hashing failed: %1%"
+msgstr "Hash berechnen fehlgeschlagen: %1%"
+
+#: dcpp/DownloadManager.cpp:264 dcpp/DownloadManager.cpp:269
+msgid "Invalid size"
+msgstr "Ungültige Größe"
+
+#: dcpp/QueueManager.cpp:486 dcpp/QueueManager.cpp:494
+msgid ""
+"Invalid target file (missing directory, check default download directory "
+"setting)"
+msgstr ""
+"Ungültige Zieldatei (Verzeichnis fehlt, überprüfen Sie in den Einstellungen "
+"das Standard Downloadverzeichnis)"
+
+#: dcpp/FavoriteManager.cpp:438
+msgid "Kick user(s)"
+msgstr "Kicke User"
+
+#: dcpp/ConnectionManager.cpp:239
+#, boost-format
+msgid "Listening socket failed (you need to restart DC++): %1%"
+msgstr "Lesen vom Socket fehlgeschlagen (DC++ muss neugestartet werden): %1%"
+
+#: dcpp/BufferedSocket.cpp:263
+msgid "Maximum command length exceeded"
+msgstr "Maximale Befehlslänge überschritten"
+
+#: dcpp/DownloadManager.cpp:323
+msgid "More data was sent than was expected"
+msgstr "Es wurden mehr Daten gesendet als erwartet"
+
+#: dcpp/ShareManager.cpp:403
+msgid "No directory specified"
+msgstr "Kein Verzeichnis ausgewählt"
+
+#: dcpp/DownloadManager.cpp:462
+msgid "No slots available"
+msgstr "Keine Slots verfügbar"
+
+#: dcpp/AdcHub.cpp:554
+msgid "Not listening for connections - please restart DC++"
+msgstr "Es wird nicht auf Verbindungen gewartet - bitte DC++ neustarten"
+
+#: dcpp/Transfer.cpp:63 dcpp/Transfer.cpp:67 dcpp/ClientManager.cpp:115
+#: dcpp/SearchManager.cpp:267 dcpp/SearchManager.cpp:329
+#: dcpp/SearchManager.cpp:331
+msgid "Offline"
+msgstr "Offline"
+
+#: dcpp/FavoriteManager.cpp:442
+msgid "Redirect user(s)"
+msgstr "User umleiten"
+
+#: dcpp/ShareManager.cpp:421
+msgid "Remove all subdirectories before adding this one"
+msgstr "Alle Unterverzeichnisse entfernen bevor dieses hinzugefügt wird"
+
+#: dcpp/DCPlusPlus.cpp:100
+msgid "Shared Files"
+msgstr "Freigegebene Dateien"
+
+#: dcpp/Socket.cpp:270 dcpp/Socket.cpp:274
+msgid "Socks server authentication failed (bad login / password?)"
+msgstr ""
+"Socks Server Authentifizierung fehlgeschlagen (Login / Passwort falsch?)"
+
+#: dcpp/CryptoManager.cpp:223
+#, boost-format
+msgid "TLS disabled, failed to generate certificate: %1%"
+msgstr "TLS deaktiviert, Generierung des Zertifikats fehlgeschlagen: %1%"
+
+#: dcpp/CryptoManager.cpp:213
+msgid "TLS disabled, no certificate file set"
+msgstr "TLS deaktiviert, kein Zertifikat eingestellt"
+
+#: dcpp/QueueManager.cpp:481 dcpp/QueueManager.cpp:490
+msgid "Target filename too long"
+msgstr "Zieldateiname zu lang"
+
+#: dcpp/QueueManager.cpp:769
+msgid "Target removed"
+msgstr "Ziel entfernt"
+
+#: dcpp/Socket.cpp:256
+msgid "The socks server doesn't support login / password authentication"
+msgstr "Socks Server unterstützt keine Authentifizierung mit Login / Passwort"
+
+#: dcpp/Socket.cpp:163 dcpp/Socket.cpp:174 dcpp/Socket.cpp:207
+#: dcpp/Socket.cpp:211 dcpp/Socket.cpp:238 dcpp/Socket.cpp:253
+msgid "The socks server failed establish a connection"
+msgstr "Socks Server konnte keine Verbindung aufbauen"
+
+#: dcpp/Socket.cpp:242
+msgid "The socks server requires authentication"
+msgstr "Socks Server benötigt Authentifizierung"
+
+#: dcpp/ShareManager.cpp:407
+msgid "The temporary download directory cannot be shared"
+msgstr "Das temporäre Downloadverzeichnis kann nicht freigegeben werden"
+
+#: dcpp/QueueManager.cpp:436
+msgid "This file is already queued"
+msgstr "Diese Datei befindet sich bereits in der Warteschlange"
+
+#: dcpp/Thread.cpp:34 dcpp/Thread.cpp:42
+msgid "Unable to create thread"
+msgstr "Thread kann nicht erschaffen werden"
+
+#: dcpp/QueueManager.cpp:957
+#, boost-format
+msgid "Unable to open filelist: %1%"
+msgstr "Dateiliste kann nicht geöffnet werden: %1%"
+
+#: dcpp/HashManager.cpp:131
+msgid "Unable to read hash data file"
+msgstr "Hash-Datendatei kann nicht gelesen werden"
+
+#: dcpp/DownloadManager.cpp:145
+#, boost-format
+msgid "Unable to rename %1%: %2%"
+msgstr "%1% kann nicht umbenannt werden: %2%"
+
+#: dcpp/UploadManager.cpp:149
+#, boost-format
+msgid "Unable to send file %1%: %2%"
+msgstr "Datei %1% kann nicht gesendet werden: %2%"
+
+#: dcpp/Socket.cpp:55
+#, boost-format
+msgid "Unknown error: 0x%1%"
+msgstr "Unbekannter Fehler: 0x%1%"
+
+#: dcpp/ShareManager.cpp:426 dcpp/ShareManager.cpp:468
+msgid "Virtual directory name already exists"
+msgstr "Virtueller Verzeichnisname existiert bereits"
+
+#: dcpp/QueueManager.cpp:383 dcpp/QueueManager.cpp:407
+msgid "You're trying to download from yourself!"
+msgstr "Kein Download von sich selbst möglich!"
+
+#: dcpp/SettingsManager.cpp:156
+msgid "downloaded from"
+msgstr "heruntergeladen von"
+
+#: dcpp/SettingsManager.cpp:157
+msgid "uploaded to"
+msgstr "hochgeladen an"
Added: dcplusplus/trunk/dcpp/po/ko.po
===================================================================
--- dcplusplus/trunk/dcpp/po/ko.po (rev 0)
+++ dcplusplus/trunk/dcpp/po/ko.po 2008-01-24 21:34:31 UTC (rev 977)
@@ -0,0 +1,391 @@
+# Korean translations for the DC++ package.
+# Copyright (C) 2008 The translators
+# This file is distributed under the same license as the DC++ package.
+# <gut...@us...>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: dcpp\n"
+"Report-Msgid-Bugs-To: dcp...@li...\n"
+"POT-Creation-Date: 2008-01-23 22:20+0100\n"
+"Last-Translator: <gut...@us...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: dcpp/Util.cpp:381
+#, c-format, boost-format
+msgid "%'lld B"
+msgstr ""
+
+#: dcpp/Util.cpp:343
+#, c-format, boost-format
+msgid "%.02f GiB"
+msgstr ""
+
+#: dcpp/Util.cpp:339
+#, c-format, boost-format
+msgid "%.02f KiB"
+msgstr ""
+
+#: dcpp/Util.cpp:341
+#, c-format, boost-format
+msgid "%.02f MiB"
+msgstr ""
+
+#: dcpp/Util.cpp:347
+#, c-format, boost-format
+msgid "%.02f PiB"
+msgstr ""
+
+#: dcpp/Util.cpp:345
+#, c-format, boost-format
+msgid "%.02f TiB"
+msgstr ""
+
+#: dcpp/NmdcHub.cpp:273
+#, boost-format
+msgid "%1% (Nick unknown)"
+msgstr ""
+
+#: dcpp/HashManager.cpp:767
+#, boost-format
+msgid ""
+"%1% not shared; calculated CRC32 does not match the one found in SFV file."
+msgstr ""
+
+#: dcpp/DownloadManager.cpp:143
+#, boost-format
+msgid "%1% renamed to %2%"
+msgstr ""
+
+#: dcpp/DownloadManager.cpp:547
+#, fuzzy, boost-format
+msgid "%1%: File not available"
+msgstr "파일이 유효하지 않음"
+
+#: dcpp/Util.cpp:337
+#, c-format, boost-format
+msgid "%d B"
+msgstr ""
+
+#: dcpp/Util.cpp:377
+#, c-format, boost-format
+msgid "%s B"
+msgstr ""
+
+#: dcpp/QueueManager.cpp:503
+msgid "A file of equal or larger size already exists at the target location"
+msgstr "크기가 같거나 큰 파일이 이미 대상 위치에 있음"
+
+#: dcpp/QueueManager.cpp:446
+msgid "A file with a different size already exists in the queue"
+msgstr "다른 크기의 파일이 이미 '다운로드 대기열'에 있음"
+
+#: dcpp/QueueManager.cpp:449
+msgid "A file with different tth root already exists in the queue"
+msgstr ""
+"다른 TTH(Tigertree Hash) Root 값을 갖는 파일이 이미 '다운로드 대기열'에 있음"
+
+#: dcpp/QueueManager.cpp:413
+msgid "A file with the same hash already exists in your share"
+msgstr "동일한 Hash를 갖는 파일이 이미 공유 디렉토리에 존재함"
+
+#: dcpp/ConnectionManager.cpp:181
+msgid "All download slots taken"
+msgstr "모든 다운로드 슬롯이 꽉 참"
+
+#: dcpp/DownloadManager.cpp:421
+msgid "CRC32 inconsistency (SFV-Check)"
+msgstr "32-bit CRC 코드 불일치 (SFV-검사)"
+
+#: dcpp/DownloadManager.cpp:419
+#, fuzzy, boost-format
+msgid "CRC32 inconsistency (SFV-Check) (File: %1%)"
+msgstr "32-bit CRC 코드 불일치 (SFV-검사)"
+
+#: dcpp/ConnectionManager.cpp:385
+msgid "Certificate not trusted, unable to connect"
+msgstr "인증이 신뢰되지 않으므로 연결(접속)할 수 없음"
+
+#: dcpp/Socket.cpp:155 dcpp/ConnectionManager.cpp:187
+#: dcpp/BufferedSocket.cpp:154
+msgid "Connection timeout"
+msgstr "연결 시간 초과"
+
+#: dcpp/DownloadManager.cpp:284
+#, boost-format
+msgid "Could not open target file: %1%"
+msgstr ""
+
+#: dcpp/ShareManager.cpp:418
+msgid "Directory already shared"
+msgstr "디렉토리가 이미 공유됨"
+
+#: dcpp/BufferedSocket.cpp:409 dcpp/BufferedSocket.cpp:427
+msgid "Disconnected"
+msgstr "끊어짐"
+
+#: dcpp/UploadManager.cpp:450
+#, boost-format
+msgid "Disconnected user leaving the hub: %1%"
+msgstr ""
+
+#: dcpp/DCPlusPlus.cpp:103
+msgid "Download Queue"
+msgstr "다운로드 대기열"
+
+#: dcpp/ShareManager.cpp:745
+#, boost-format
+msgid ""
+"Duplicate file will not be shared: %1%%2% (Size: %3% B) Dupe matched "
+"against: %4%%5%"
+msgstr ""
+
+#: dcpp/QueueManager.cpp:516 dcpp/QueueManager.cpp:520
+#, boost-format
+msgid "Duplicate source: %1%"
+msgstr ""
+
+#: dcpp/HashManager.cpp:456
+#, fuzzy, boost-format
+msgid "Error creating hash data file: %1%"
+msgstr "Hash 데이터 파일을 읽을 수 없음"
+
+#: dcpp/ZUtils.cpp:33 dcpp/ZUtils.cpp:54 dcpp/ZUtils.cpp:76 dcpp/ZUtils.cpp:86
+#: dcpp/BZUtils.cpp:31 dcpp/BZUtils.cpp:52 dcpp/BZUtils.cpp:60
+msgid "Error during compression"
+msgstr "압축 도중 오류"
+
+#: dcpp/ZUtils.cpp:100 dcpp/ZUtils.cpp:123 dcpp/BZUtils.cpp:72
+#: dcpp/BZUtils.cpp:94 dcpp/BZUtils.cpp:97 dcpp/CryptoManager.cpp:344
+#: dcpp/CryptoManager.cpp:363 dcpp/CryptoManager.cpp:377
+msgid "Error during decompression"
+msgstr "압축 해제 도중 오류"
+
+#: dcpp/HashManager.cpp:772
+#, boost-format
+msgid "Error hashing %1%: %2%"
+msgstr ""
+
+#: dcpp/HashManager.cpp:118 dcpp/HashManager.cpp:333
+#, boost-format
+msgid "Error saving hash data: %1%"
+msgstr ""
+
+#: dcpp/CryptoManager.cpp:228 dcpp/CryptoManager.cpp:232
+#: dcpp/CryptoManager.cpp:237 dcpp/CryptoManager.cpp:241
+msgid "Failed to load certificate file"
+msgstr "인증 파일을 불러오는데 실패함"
+
+#: dcpp/CryptoManager.cpp:246 dcpp/CryptoManager.cpp:250
+#: dcpp/CryptoManager.cpp:255 dcpp/CryptoManager.cpp:259
+msgid "Failed to load private key"
+msgstr "비밀(Private) 키를 불러오는데 실패함"
+
+#: dcpp/Socket.cpp:409
+msgid ""
+"Failed to set up the socks server for UDP relay (check socks address and "
+"port)"
+msgstr ""
+"UDP 중계를 위한 소켓 서버 설정에 실패함 (소켓 주소 및 포트를 확인하세요)"
+
+#: dcpp/ShareManager.cpp:780
+#, fuzzy, boost-format
+msgid "File list refresh failed: %1%"
+msgstr "파일-목록 갱신이 완료됨"
+
+#: dcpp/ShareManager.cpp:824
+msgid "File list refresh finished"
+msgstr "파일-목록 갱신이 완료됨"
+
+#: dcpp/ShareManager.cpp:760
+msgid ""
+"File list refresh in progress, please wait for it to finish before trying to "
+"refresh again"
+msgstr ""
+"파일-목록 갱신이 진행 중이므로 갱신을 재시도하기 전에 완료될 때까지 기다리세"
+"요"
+
+#: dcpp/ShareManager.cpp:802
+msgid "File list refresh initiated"
+msgstr "파일-목록 갱신 시작..."
+
+#: dcpp/DirectoryListing.cpp:102
+msgid "File not available"
+msgstr "파일이 유효하지 않음"
+
+#: dcpp/HashManager.cpp:89
+#, boost-format
+msgid "Finished hashing: %1%"
+msgstr ""
+
+#: dcpp/HashManager.cpp:87
+#, boost-format
+msgid "Finished hashing: %1% (%2%/s)"
+msgstr ""
+
+#: dcpp/DownloadManager.cpp:353
+msgid "Full tree does not match TTH root"
+msgstr "받은 파일-목록의 TTH(Tigertree Hash) Root 값이 일치하지 않음"
+
+#: dcpp/CryptoManager.cpp:221
+msgid "Generated new TLS certificate"
+msgstr ""
+
+#: dcpp/DCPlusPlus.cpp:97
+msgid "Hash database"
+msgstr "Hash 데이터베이스"
+
+#: dcpp/HashManager.cpp:677
+msgid "Hash database rebuilt"
+msgstr "Hash 데이터베이스가 모두 완성되었음"
+
+#: dcpp/HashManager.cpp:73 dcpp/HashManager.cpp:277
+#, boost-format
+msgid "Hashing failed: %1%"
+msgstr ""
+
+#: dcpp/DownloadManager.cpp:264 dcpp/DownloadManager.cpp:269
+msgid "Invalid size"
+msgstr ""
+
+#: dcpp/QueueManager.cpp:486 dcpp/QueueManager.cpp:494
+msgid ""
+"Invalid target file (missing directory, check default download directory "
+"setting)"
+msgstr "대상 파일이 잘못됨 ('다운로드 디렉토리' 설정을 확인하세요)"
+
+#: dcpp/FavoriteManager.cpp:438
+msgid "Kick user(s)"
+msgstr "추방하기"
+
+#: dcpp/ConnectionManager.cpp:239
+#, boost-format
+msgid "Listening socket failed (you need to restart DC++): %1%"
+msgstr ""
+
+#: dcpp/BufferedSocket.cpp:263
+msgid "Maximum command length exceeded"
+msgstr "최대 명령어 길이를 초과함"
+
+#: dcpp/DownloadManager.cpp:323
+msgid "More data was sent than was expected"
+msgstr "예상되었던 것보다 많은 양의 데이터가 보내졌음"
+
+#: dcpp/ShareManager.cpp:403
+msgid "No directory specified"
+msgstr "디렉토리가 지정되지 않았음"
+
+#: dcpp/DownloadManager.cpp:462
+msgid "No slots available"
+msgstr "남은 슬롯이 없음"
+
+#: dcpp/AdcHub.cpp:554
+msgid "Not listening for connections - please restart DC++"
+msgstr "연결을 위한 소켓 청취를 하지 않음 - DC++를 재시작하세요"
+
+#: dcpp/Transfer.cpp:63 dcpp/Transfer.cpp:67 dcpp/ClientManager.cpp:115
+#: dcpp/SearchManager.cpp:267 dcpp/SearchManager.cpp:329
+#: dcpp/SearchManager.cpp:331
+msgid "Offline"
+msgstr "오프라인"
+
+#: dcpp/FavoriteManager.cpp:442
+msgid "Redirect user(s)"
+msgstr "접속-전환(Redirect)할 허브 제안하기..."
+
+#: dcpp/ShareManager.cpp:421
+msgid "Remove all subdirectories before adding this one"
+msgstr "추가하기 전에 이미 공유된 모든 서브-디렉토리를 공유에서 삭제하세요"
+
+#: dcpp/DCPlusPlus.cpp:100
+msgid "Shared Files"
+msgstr "파일 공유!"
+
+#: dcpp/Socket.cpp:270 dcpp/Socket.cpp:274
+msgid "Socks server authentication failed (bad login / password?)"
+msgstr "소켓 서버 인증이 실패함 (잘못된 로그인이름/비밀번호?)"
+
+#: dcpp/CryptoManager.cpp:223
+#, fuzzy, boost-format
+msgid "TLS disabled, failed to generate certificate: %1%"
+msgstr "TLS를 사용할 수 없음, 인증 파일 셋이 없음"
+
+#: dcpp/CryptoManager.cpp:213
+msgid "TLS disabled, no certificate file set"
+msgstr "TLS를 사용할 수 없음, 인증 파일 셋이 없음"
+
+#: dcpp/QueueManager.cpp:481 dcpp/QueueManager.cpp:490
+msgid "Target filename too long"
+msgstr "대상 파일 이름이 너무 김"
+
+#: dcpp/QueueManager.cpp:769
+msgid "Target removed"
+msgstr ""
+
+#: dcpp/Socket.cpp:256
+msgid "The socks server doesn't support login / password authentication"
+msgstr "소켓 서버가 '로그인이름/비밀번호' 인증을 지원하지 않음"
+
+#: dcpp/Socket.cpp:163 dcpp/Socket.cpp:174 dcpp/Socket.cpp:207
+#: dcpp/Socket.cpp:211 dcpp/Socket.cpp:238 dcpp/Socket.cpp:253
+msgid "The socks server failed establish a connection"
+msgstr "소켓 서버가 연결 구성에 실패함"
+
+#: dcpp/Socket.cpp:242
+msgid "The socks server requires authentication"
+msgstr "소켓 서버가 인증을 필요로 함"
+
+#: dcpp/ShareManager.cpp:407
+msgid "The temporary download directory cannot be shared"
+msgstr "'미완료 다운로드 디렉토리'는 공유할 수 없음"
+
+#: dcpp/QueueManager.cpp:436
+msgid "This file is already queued"
+msgstr "이 파일은 이미 '다운로드 대기열'에 추가되었음"
+
+#: dcpp/Thread.cpp:34 dcpp/Thread.cpp:42
+msgid "Unable to create thread"
+msgstr "Thread를 생성할 수 없음"
+
+#: dcpp/QueueManager.cpp:957
+#, boost-format
+msgid "Unable to open filelist: %1%"
+msgstr ""
+
+#: dcpp/HashManager.cpp:131
+msgid "Unable to read hash data file"
+msgstr "Hash 데이터 파일을 읽을 수 없음"
+
+#: dcpp/DownloadManager.cpp:145
+#, fuzzy, boost-format
+msgid "Unable to rename %1%: %2%"
+msgstr "Thread를 생성할 수 없음"
+
+#: dcpp/UploadManager.cpp:149
+#, boost-format
+msgid "Unable to send file %1%: %2%"
+msgstr ""
+
+#: dcpp/Socket.cpp:55
+#, boost-format
+msgid "Unknown error: 0x%1%"
+msgstr ""
+
+#: dcpp/ShareManager.cpp:426 dcpp/ShareManager.cpp:468
+msgid "Virtual directory name already exists"
+msgstr "지정한 공유 이름이 이미 존재함"
+
+#: dcpp/QueueManager.cpp:383 dcpp/QueueManager.cpp:407
+msgid "You're trying to download from yourself!"
+msgstr "자신의 파일을 다운로드할 수 없음"
+
+#: dcpp/SettingsManager.cpp:156
+msgid "downloaded from"
+msgstr ""
+
+#: dcpp/SettingsManager.cpp:157
+msgid "uploaded to"
+msgstr ""
Added: dcplusplus/trunk/win32/po/ko.po
===================================================================
--- dcplusplus/trunk/win32/po/ko.po (rev 0)
+++ dcplusplus/trunk/win32/po/ko.po 2008-01-24 21:34:31 UTC (rev 977)
@@ -0,0 +1,2313 @@
+# Korean translations for the DC++ package.
+# Copyright (C) 2008 The translators
+# This file is distributed under the same license as the DC++ package.
+# <gut...@us...>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: win32\n"
+"Report-Msgid-Bugs-To: dcp...@li...\n"
+"POT-Creation-Date: 2008-01-23 21:22+0100\n"
+"Last-Translator: <gut...@us...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: win32/MainWindow.cpp:849
+#, fuzzy, boost-format
+msgid ""
+"%1%\n"
+"Open download page?"
+msgstr "'기본 다운로드 디렉토리' 열기"
+
+#: win32/TransferView.cpp:420
+#, boost-format
+msgid "%1% (%2$0.2f)"
+msgstr ""
+
+#: win32/HashProgressDlg.cpp:91
+#, boost-format
+msgid "%1% files/h, %2% files left"
+msgstr ""
+
+#: win32/SearchFrame.cpp:576
+#, boost-format
+msgid "%1% filtered"
+msgstr ""
+
+#: win32/SearchFrame.cpp:571
+#, boost-format
+msgid "%1% item"
+msgid_plural "%1% items"
+msgstr[0] ""
+
+#: win32/HashProgressDlg.cpp:100
+#, boost-format
+msgid "%1% left"
+msgstr ""
+
+#: win32/HubFrame.cpp:936
+#, fuzzy, boost-format
+msgid "%1% user"
+msgid_plural "%1% users"
+msgstr[0] "사용자 없음"
+
+#: win32/TransferView.cpp:434 win32/DownloadsFrame.cpp:130
+#, boost-format
+msgid "%1%/s"
+msgstr ""
+
+#: win32/HashProgressDlg.cpp:92
+#, boost-format
+msgid "%1%/s, %2% left"
+msgstr ""
+
+#: win32/HubListsDlg.cpp:63 win32/UCPage.cpp:33
+#, fuzzy
+msgid "&Add"
+msgstr "등록 시간"
+
+#: win32/UploadPage.cpp:37 win32/FavoriteDirsPage.cpp:34
+msgid "&Add folder"
+msgstr ""
+
+#: win32/DirectoryListingFrame.cpp:369 win32/SearchFrame.cpp:774
+#: win32/SearchFrame.cpp:804 win32/DownloadPage.cpp:32 win32/LogPage.cpp:33
+#: win32/Appearance2Page.cpp:30
+#, fuzzy
+msgid "&Browse..."
+msgstr "찾기..."
+
+#: win32/UCPage.cpp:34
+#, fuzzy
+msgid "&Change"
+msgstr "프로그램 업데이트 히스토리"
+
+#: win32/PrivateFrame.cpp:373 win32/HubFrame.cpp:1184
+#, fuzzy
+msgid "&Close"
+msgstr "색상/글꼴"
+
+#: win32/PublicHubsFrame.cpp:150
+msgid "&Configure"
+msgstr ""
+
+#: win32/FavHubsFrame.cpp:71 win32/FavHubsFrame.cpp:113
+#: win32/PublicHubsFrame.cpp:447
+#, fuzzy
+msgid "&Connect"
+msgstr "접속되었음"
+
+#: win32/TransferView.cpp:115
+#, fuzzy
+msgid "&Disconnect"
+msgstr "허브에 직접 접속하기"
+
+#: win32/DirectoryListingFrame.cpp:311 win32/DirectoryListingFrame.cpp:336
+#: win32/DirectoryListingFrame.cpp:348 win32/SearchFrame.cpp:742
+#, fuzzy
+msgid "&Download"
+msgstr "다운로드"
+
+#: win32/MainWindow.cpp:206
+#, fuzzy
+msgid "&Download Queue\tCtrl+D"
+msgstr "다운로드 대기열"
+
+#: win32/HubListsDlg.cpp:75
+msgid "&Edit"
+msgstr ""
+
+#: win32/MainWindow.cpp:203
+#, fuzzy
+msgid "&Favorite Hubs\tCtrl+F"
+msgstr "즐겨찾는 허브"
+
+#: win32/MainWindow.cpp:182
+#, fuzzy
+msgid "&File"
+msgstr "파일"
+
+#: win32/TransferView.cpp:112
+msgid "&Force attempt"
+msgstr ""
+
+#: win32/QueueFrame.cpp:1006 win32/WaitingUsersFrame.cpp:83
+#: win32/PrivateFrame.cpp:365
+msgid "&Get file list"
+msgstr ""
+
+#: win32/DirectoryListingFrame.cpp:325
+#, fuzzy
+msgid "&Go to directory"
+msgstr "다운로드하기 (디렉토리 통째)"
+
+#: win32/MainWindow.cpp:229 win32/ADLSearchFrame.cpp:93
+msgid "&Help"
+msgstr ""
+
+#: win32/PrivateFrame.cpp:366
+#, fuzzy
+msgid "&Match queue"
+msgstr "파일-목록에서 내 '다운로드 대기열'의 파일을 찾아 소스에 추가하기"
+
+#: win32/QueueFrame.cpp:960 win32/QueueFrame.cpp:978 win32/QueueFrame.cpp:988
+#, fuzzy
+msgid "&Move/Rename"
+msgstr "이름 바꾸기"
+
+#: win32/FavHubsFrame.cpp:76 win32/FavHubsFrame.cpp:115
+#: win32/ADLSearchFrame.cpp:68 win32/ADLSearchFrame.cpp:293
+msgid "&New..."
+msgstr ""
+
+#: win32/MainWindow.cpp:215
+#, fuzzy
+msgid "&Notepad\tCtrl+N"
+msgstr "메모장"
+
+#: win32/FavHubsFrame.cpp:81 win32/FavHubsFrame.cpp:116
+#: win32/ADLSearchFrame.cpp:73 win32/ADLSearchFrame.cpp:294
+#: win32/UsersFrame.cpp:186
+#, fuzzy
+msgid "&Properties"
+msgstr "ADL 검색 등록정보"
+
+#: win32/MainWindow.cpp:202
+#, fuzzy
+msgid "&Public Hubs\tCtrl+P"
+msgstr "공개 허브"
+
+#: win32/MainWindow.cpp:184
+#, fuzzy
+msgid "&Quick Connect ...\tCtrl+Q"
+msgstr "허브에 직접 접속하기"
+
+#: win32/MainWindow.cpp:186 win32/HubFrame.cpp:1179
+msgid "&Reconnect\tCtrl+R"
+msgstr ""
+
+#: win32/PublicHubsFrame.cpp:156
+msgid "&Refresh"
+msgstr ""
+
+#: win32/UploadPage.cpp:36 win32/QueueFrame.cpp:968 win32/QueueFrame.cpp:980
+#: win32/QueueFrame.cpp:990 win32/HubListsDlg.cpp:79
+#: win32/WaitingUsersFrame.cpp:85 win32/FavoriteDirsPage.cpp:33
+#: win32/SearchFrame.cpp:755 win32/FavHubsFrame.cpp:96
+#: win32/FavHubsFrame.cpp:120 win32/ADLSearchFrame.cpp:88
+#: win32/ADLSearchFrame.cpp:295 win32/UCPage.cpp:35 win32/UsersFrame.cpp:187
+#, fuzzy
+msgid "&Remove"
+msgstr "이름 바꾸기"
+
+#: win32/SpyFrame.cpp:191
+#, fuzzy
+msgid "&Search"
+msgstr "검색"
+
+#: win32/MainWindow.cpp:211
+#, fuzzy
+msgid "&Search\tCtrl+S"
+msgstr "검색"
+
+#: win32/QueueFrame.cpp:1014 win32/WaitingUsersFrame.cpp:88
+#, fuzzy
+msgid "&Send private message"
+msgstr "1:1 메시지"
+
+#: win32/MainWindow.cpp:200
+#, fuzzy
+msgid "&View"
+msgstr "비디오 파일"
+
+#: win32/DirectoryListingFrame.cpp:315 win32/SearchFrame.cpp:746
+msgid "&View as text"
+msgstr ""
+
+#: win32/MainWindow.cpp:221
+msgid "&Window"
+msgstr ""
+
+#: win32/HubFrame.cpp:490
+#, boost-format
+msgid "*** Joins: %1%"
+msgstr ""
+
+#: win32/HubFrame.cpp:497
+#, boost-format
+msgid "*** Parts: %1%"
+msgstr ""
+
+#: win32/HashProgressDlg.cpp:84
+#, boost-format
+msgid "-.-- B/s, %1% left"
+msgstr ""
+
+#: win32/HashProgressDlg.cpp:83
+#, boost-format
+msgid "-.-- files/h, %1% files left"
+msgstr ""
+
+#: win32/WinUtil.cpp:1034
+msgid ""
+"A MAGNET link was given to DC++, but it didn't contain a valid file hash for "
+"use on the Direct Connect network. No action will be taken."
+msgstr ""
+"MAGNET 링크를 DC++가 처리했지만, Direct Connect 네트워크상에서 사용하기 위한 "
+"유효한 파일 Hash를 포함하고있지 않음 (아무 작업도 수행하지 않음)"
+
+#: win32/MainWindow.cpp:212 win32/MainWindow.cpp:283
+msgid "ADL Search"
+msgstr "ADL 검색"
+
+#: win32/ADLSProperties.cpp:49
+msgid "ADLSearch Properties"
+msgstr "ADL 검색 등록정보"
+
+#: win32/MainWindow.cpp:294 win32/MainWindow.cpp:550
+msgid "AWAY"
+msgstr "자리비움"
+
+#: win32/MainWindow.cpp:234
+msgid "About DC++..."
+msgstr "DC++ 정보"
+
+#: win32/AdvancedPage.cpp:43
+msgid "Accept custom user commands from hub"
+msgstr ""
+"허브로부터 사용자 정의 명령어를 받아들임 (이러한 사용자 정의 명령어는 허브...
[truncated message content] |
|
From: <arn...@us...> - 2008-01-25 21:08:30
|
Revision: 978
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=978&view=rev
Author: arnetheduck
Date: 2008-01-25 13:08:22 -0800 (Fri, 25 Jan 2008)
Log Message:
-----------
patches
Modified Paths:
--------------
dcplusplus/trunk/bzip2/LICENSE
dcplusplus/trunk/bzip2/blocksort.c
dcplusplus/trunk/bzip2/bzip2.c
dcplusplus/trunk/bzip2/bzlib.c
dcplusplus/trunk/bzip2/bzlib.h
dcplusplus/trunk/bzip2/bzlib_private.h
dcplusplus/trunk/bzip2/compress.c
dcplusplus/trunk/bzip2/crctable.c
dcplusplus/trunk/bzip2/decompress.c
dcplusplus/trunk/bzip2/huffman.c
dcplusplus/trunk/bzip2/randtable.c
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/ADLSearch.h
dcplusplus/trunk/dcpp/Socket.cpp
dcplusplus/trunk/smartwin/include/SmartUtil.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabView.h
dcplusplus/trunk/smartwin/source/widgets/WidgetTabView.cpp
dcplusplus/trunk/win32/QueueFrame.cpp
dcplusplus/trunk/win32/WinUtil.cpp
dcplusplus/trunk/win32/WinUtil.h
dcplusplus/trunk/win32/po/ko.po
Added Paths:
-----------
dcplusplus/trunk/dcpp/po/sv.po
dcplusplus/trunk/smartwin/SmartUtil/StringUtils.cpp
dcplusplus/trunk/smartwin/SmartUtil/StringUtils.h
Modified: dcplusplus/trunk/bzip2/LICENSE
===================================================================
--- dcplusplus/trunk/bzip2/LICENSE 2008-01-24 21:34:31 UTC (rev 977)
+++ dcplusplus/trunk/bzip2/LICENSE 2008-01-25 21:08:22 UTC (rev 978)
@@ -1,6 +1,8 @@
+--------------------------------------------------------------------------
+
This program, "bzip2", the associated library "libbzip2", and all
-documentation, are copyright (C) 1996-2005 Julian R Seward. All
+documentation, are copyright (C) 1996-2006 Julian R Seward. All
rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -35,6 +37,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Julian Seward, Cambridge, UK.
-js...@ac...
-bzip2/libbzip2 version 1.0.3 of 15 February 2005
+js...@bz...
+bzip2/libbzip2 version 1.0.4 of 20 December 2006
+--------------------------------------------------------------------------
Modified: dcplusplus/trunk/bzip2/blocksort.c
===================================================================
--- dcplusplus/trunk/bzip2/blocksort.c 2008-01-24 21:34:31 UTC (rev 977)
+++ dcplusplus/trunk/bzip2/blocksort.c 2008-01-25 21:08:22 UTC (rev 978)
@@ -4,68 +4,21 @@
/*--- blocksort.c ---*/
/*-------------------------------------------------------------*/
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
+/* ------------------------------------------------------------------
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
- Copyright (C) 1996-2005 Julian R Seward. All rights reserved.
+ bzip2/libbzip2 version 1.0.4 of 20 December 2006
+ Copyright (C) 1996-2006 Julian Seward <js...@bz...>
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+ This program is released under the terms of the license contained
+ in the file LICENSE.
+ ------------------------------------------------------------------ */
- 2. The origin of this software must not be misrepresented; you must
- not claim that you wrote the original software. If you use this
- software in a product, an acknowledgment in the product
- documentation would be appreciated but is not required.
- 3. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Julian Seward, Cambridge, UK.
- js...@bz...
- bzip2/libbzip2 version 1.0 of 21 March 2000
-
- This program is based on (at least) the work of:
- Mike Burrows
- David Wheeler
- Peter Fenwick
- Alistair Moffat
- Radford Neal
- Ian H. Witten
- Robert Sedgewick
- Jon L. Bentley
-
- For more information on these sources, see the manual.
-
- To get some idea how the block sorting algorithms in this file
- work, read my paper
- On the Performance of BWT Sorting Algorithms
- in Proceedings of the IEEE Data Compression Conference 2000,
- Snowbird, Utah, USA, 27-30 March 2000. The main sort in this
- file implements the algorithm called cache in the paper.
---*/
-
-
#include "bzlib_private.h"
/*---------------------------------------------*/
@@ -155,7 +108,7 @@
while (sp > 0) {
- AssertH ( sp < FALLBACK_QSORT_STACK_SIZE, 1004 );
+ AssertH ( sp < FALLBACK_QSORT_STACK_SIZE - 1, 1004 );
fpop ( lo, hi );
if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) {
@@ -690,7 +643,7 @@
while (sp > 0) {
- AssertH ( sp < MAIN_QSORT_STACK_SIZE, 1001 );
+ AssertH ( sp < MAIN_QSORT_STACK_SIZE - 2, 1001 );
mpop ( lo, hi, d );
if (hi - lo < MAIN_QSORT_SMALL_THRESH ||
Modified: dcplusplus/trunk/bzip2/bzip2.c
===================================================================
--- dcplusplus/trunk/bzip2/bzip2.c 2008-01-24 21:34:31 UTC (rev 977)
+++ dcplusplus/trunk/bzip2/bzip2.c 2008-01-25 21:08:22 UTC (rev 978)
@@ -3,118 +3,26 @@
/*--- A block-sorting, lossless compressor bzip2.c ---*/
/*-----------------------------------------------------------*/
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
+/* ------------------------------------------------------------------
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
- Copyright (C) 1996-2005 Julian R Seward. All rights reserved.
+ bzip2/libbzip2 version 1.0.4 of 20 December 2006
+ Copyright (C) 1996-2006 Julian Seward <js...@bz...>
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+ This program is released under the terms of the license contained
+ in the file LICENSE.
+ ------------------------------------------------------------------ */
- 2. The origin of this software must not be misrepresented; you must
- not claim that you wrote the original software. If you use this
- software in a product, an acknowledgment in the product
- documentation would be appreciated but is not required.
- 3. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Julian Seward, Cambridge, UK.
- js...@bz...
- bzip2/libbzip2 version 1.0 of 21 March 2000
-
- This program is based on (at least) the work of:
- Mike Burrows
- David Wheeler
- Peter Fenwick
- Alistair Moffat
- Radford Neal
- Ian H. Witten
- Robert Sedgewick
- Jon L. Bentley
-
- For more information on these sources, see the manual.
---*/
-
-
-/*----------------------------------------------------*/
-/*--- IMPORTANT ---*/
-/*----------------------------------------------------*/
-
-/*--
- WARNING:
- This program and library (attempts to) compress data by
- performing several non-trivial transformations on it.
- Unless you are 100% familiar with *all* the algorithms
- contained herein, and with the consequences of modifying them,
- you should NOT meddle with the compression or decompression
- machinery. Incorrect changes can and very likely *will*
- lead to disasterous loss of data.
-
- DISCLAIMER:
- I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA ARISING FROM THE
- USE OF THIS PROGRAM, HOWSOEVER CAUSED.
-
- Every compression of a file implies an assumption that the
- compressed file can be decompressed to reproduce the original.
- Great efforts in design, coding and testing have been made to
- ensure that this program works correctly. However, the
- complexity of the algorithms, and, in particular, the presence
- of various special cases in the code which occur with very low
- but non-zero probability make it impossible to rule out the
- possibility of bugs remaining in the program. DO NOT COMPRESS
- ANY DATA WITH THIS PROGRAM AND/OR LIBRARY UNLESS YOU ARE PREPARED
- TO ACCEPT THE POSSIBILITY, HOWEVER SMALL, THAT THE DATA WILL
- NOT BE RECOVERABLE.
-
- That is not to say this program is inherently unreliable.
- Indeed, I very much hope the opposite is true. bzip2/libbzip2
- has been carefully constructed and extensively tested.
-
- PATENTS:
- To the best of my knowledge, bzip2/libbzip2 does not use any
- patented algorithms. However, I do not have the resources
- available to carry out a full patent search. Therefore I cannot
- give any guarantee of the above statement.
---*/
-
-
-
-/*----------------------------------------------------*/
-/*--- and now for something much more pleasant :-) ---*/
-/*----------------------------------------------------*/
-
-/*---------------------------------------------*/
-/*--
- Place a 1 beside your platform, and 0 elsewhere.
---*/
-
-/*--
- Generic 32-bit Unix.
- Also works on 64-bit Unix boxes.
- This is the default.
---*/
+/* Place a 1 beside your platform, and 0 elsewhere.
+ Generic 32-bit Unix.
+ Also works on 64-bit Unix boxes.
+ This is the default.
+*/
#define BZ_UNIX 1
/*--
@@ -220,7 +128,7 @@
#if BZ_LCCWIN32
# include <io.h>
# include <fcntl.h>
-# include <sys/stat.h>
+# include <sys\stat.h>
# define NORETURN /**/
# define PATH_SEP '\\'
@@ -302,16 +210,17 @@
FILE *outputHandleJustInCase;
Int32 workFactor;
-static void panic ( Char* ) NORETURN;
-static void ioError ( void ) NORETURN;
-static void outOfMemory ( void ) NORETURN;
-static void configError ( void ) NORETURN;
-static void crcError ( void ) NORETURN;
-static void cleanUpAndFail ( Int32 ) NORETURN;
-static void compressedStreamEOF ( void ) NORETURN;
+static void panic ( const Char* ) NORETURN;
+static void ioError ( void ) NORETURN;
+static void outOfMemory ( void ) NORETURN;
+static void configError ( void ) NORETURN;
+static void crcError ( void ) NORETURN;
+static void cleanUpAndFail ( Int32 ) NORETURN;
+static void compressedStreamEOF ( void ) NORETURN;
static void copyFileName ( Char*, Char* );
static void* myMalloc ( Int32 );
+static void applySavedFileAttrToOutputFile ( IntNative fd );
@@ -457,6 +366,9 @@
ret = fflush ( zStream );
if (ret == EOF) goto errhandler_io;
if (zStream != stdout) {
+ Int32 fd = fileno ( zStream );
+ if (fd < 0) goto errhandler_io;
+ applySavedFileAttrToOutputFile ( fd );
ret = fclose ( zStream );
outputHandleJustInCase = NULL;
if (ret == EOF) goto errhandler_io;
@@ -569,6 +481,11 @@
closeok:
if (ferror(zStream)) goto errhandler_io;
+ if (stream != stdout) {
+ Int32 fd = fileno ( stream );
+ if (fd < 0) goto errhandler_io;
+ applySavedFileAttrToOutputFile ( fd );
+ }
ret = fclose ( zStream );
if (ret == EOF) goto errhandler_io;
@@ -826,7 +743,7 @@
/*---------------------------------------------*/
static
-void panic ( Char* s )
+void panic ( const Char* s )
{
fprintf ( stderr,
"\n%s: PANIC -- internal consistency error:\n"
@@ -1039,6 +956,7 @@
For non-Unix platforms, if we are not worrying about
security issues, simple this simply behaves like fopen.
*/
+static
FILE* fopen_output_safely ( Char* name, const char* mode )
{
# if BZ_UNIX
@@ -1129,7 +1047,7 @@
static
-void applySavedMetaInfoToOutputFile ( Char *dstName )
+void applySavedTimeInfoToOutputFile ( Char *dstName )
{
# if BZ_UNIX
IntNative retVal;
@@ -1138,13 +1056,21 @@
uTimBuf.actime = fileMetaInfo.st_atime;
uTimBuf.modtime = fileMetaInfo.st_mtime;
- retVal = chmod ( dstName, fileMetaInfo.st_mode );
+ retVal = utime ( dstName, &uTimBuf );
ERROR_IF_NOT_ZERO ( retVal );
+# endif
+}
- retVal = utime ( dstName, &uTimBuf );
+static
+void applySavedFileAttrToOutputFile ( IntNative fd )
+{
+# if BZ_UNIX
+ IntNative retVal;
+
+ retVal = fchmod ( fd, fileMetaInfo.st_mode );
ERROR_IF_NOT_ZERO ( retVal );
- retVal = chown ( dstName, fileMetaInfo.st_uid, fileMetaInfo.st_gid );
+ (void) fchown ( fd, fileMetaInfo.st_uid, fileMetaInfo.st_gid );
/* chown() will in many cases return with EPERM, which can
be safely ignored.
*/
@@ -1175,13 +1101,13 @@
/*---------------------------------------------*/
#define BZ_N_SUFFIX_PAIRS 4
-Char* zSuffix[BZ_N_SUFFIX_PAIRS]
+const Char* zSuffix[BZ_N_SUFFIX_PAIRS]
= { ".bz2", ".bz", ".tbz2", ".tbz" };
-Char* unzSuffix[BZ_N_SUFFIX_PAIRS]
+const Char* unzSuffix[BZ_N_SUFFIX_PAIRS]
= { "", "", ".tar", ".tar" };
static
-Bool hasSuffix ( Char* s, Char* suffix )
+Bool hasSuffix ( Char* s, const Char* suffix )
{
Int32 ns = strlen(s);
Int32 nx = strlen(suffix);
@@ -1192,7 +1118,8 @@
static
Bool mapSuffix ( Char* name,
- Char* oldSuffix, Char* newSuffix )
+ const Char* oldSuffix,
+ const Char* newSuffix )
{
if (!hasSuffix(name,oldSuffix)) return False;
name[strlen(name)-strlen(oldSuffix)] = 0;
@@ -1217,8 +1144,8 @@
switch (srcMode) {
case SM_I2O:
- copyFileName ( inName, "(stdin)" );
- copyFileName ( outName, "(stdout)" );
+ copyFileName ( inName, (Char*)"(stdin)" );
+ copyFileName ( outName, (Char*)"(stdout)" );
break;
case SM_F2F:
copyFileName ( inName, name );
@@ -1227,7 +1154,7 @@
break;
case SM_F2O:
copyFileName ( inName, name );
- copyFileName ( outName, "(stdout)" );
+ copyFileName ( outName, (Char*)"(stdout)" );
break;
}
@@ -1370,7 +1297,7 @@
/*--- If there was an I/O error, we won't get here. ---*/
if ( srcMode == SM_F2F ) {
- applySavedMetaInfoToOutputFile ( outName );
+ applySavedTimeInfoToOutputFile ( outName );
deleteOutputOnInterrupt = False;
if ( !keepInputFiles ) {
IntNative retVal = remove ( inName );
@@ -1401,8 +1328,8 @@
cantGuess = False;
switch (srcMode) {
case SM_I2O:
- copyFileName ( inName, "(stdin)" );
- copyFileName ( outName, "(stdout)" );
+ copyFileName ( inName, (Char*)"(stdin)" );
+ copyFileName ( outName, (Char*)"(stdout)" );
break;
case SM_F2F:
copyFileName ( inName, name );
@@ -1415,7 +1342,7 @@
break;
case SM_F2O:
copyFileName ( inName, name );
- copyFileName ( outName, "(stdout)" );
+ copyFileName ( outName, (Char*)"(stdout)" );
break;
}
@@ -1548,7 +1475,7 @@
/*--- If there was an I/O error, we won't get here. ---*/
if ( magicNumberOK ) {
if ( srcMode == SM_F2F ) {
- applySavedMetaInfoToOutputFile ( outName );
+ applySavedTimeInfoToOutputFile ( outName );
deleteOutputOnInterrupt = False;
if ( !keepInputFiles ) {
IntNative retVal = remove ( inName );
@@ -1593,9 +1520,9 @@
if (name == NULL && srcMode != SM_I2O)
panic ( "testf: bad modes\n" );
- copyFileName ( outName, "(none)" );
+ copyFileName ( outName, (Char*)"(none)" );
switch (srcMode) {
- case SM_I2O: copyFileName ( inName, "(stdin)" ); break;
+ case SM_I2O: copyFileName ( inName, (Char*)"(stdin)" ); break;
case SM_F2F: copyFileName ( inName, name ); break;
case SM_F2O: copyFileName ( inName, name ); break;
}
@@ -1678,11 +1605,11 @@
"bzip2, a block-sorting file compressor. "
"Version %s.\n"
" \n"
- " Copyright (C) 1996-2005 by Julian Seward.\n"
+ " Copyright (C) 1996-2006 by Julian Seward.\n"
" \n"
" This program is free software; you can redistribute it and/or modify\n"
" it under the terms set out in the LICENSE file, which is included\n"
- " in the bzip2-1.0 source distribution.\n"
+ " in the bzip2-1.0.4 source distribution.\n"
" \n"
" This program is distributed in the hope that it will be useful,\n"
" but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
@@ -1885,8 +1812,8 @@
# endif
# endif
- copyFileName ( inName, "(none)" );
- copyFileName ( outName, "(none)" );
+ copyFileName ( inName, (Char*)"(none)" );
+ copyFileName ( outName, (Char*)"(none)" );
copyFileName ( progNameReally, argv[0] );
progName = &progNameReally[0];
@@ -1898,8 +1825,8 @@
expand filename wildcards in arg list.
--*/
argList = NULL;
- addFlagsFromEnvVar ( &argList, "BZIP2" );
- addFlagsFromEnvVar ( &argList, "BZIP" );
+ addFlagsFromEnvVar ( &argList, (Char*)"BZIP2" );
+ addFlagsFromEnvVar ( &argList, (Char*)"BZIP" );
for (i = 1; i <= argc-1; i++)
APPEND_FILESPEC(argList, argv[i]);
Modified: dcplusplus/trunk/bzip2/bzlib.c
===================================================================
--- dcplusplus/trunk/bzip2/bzlib.c 2008-01-24 21:34:31 UTC (rev 977)
+++ dcplusplus/trunk/bzip2/bzlib.c 2008-01-25 21:08:22 UTC (rev 978)
@@ -4,75 +4,30 @@
/*--- bzlib.c ---*/
/*-------------------------------------------------------------*/
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
+/* ------------------------------------------------------------------
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
- Copyright (C) 1996-2005 Julian R Seward. All rights reserved.
+ bzip2/libbzip2 version 1.0.4 of 20 December 2006
+ Copyright (C) 1996-2006 Julian Seward <js...@bz...>
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+ This program is released under the terms of the license contained
+ in the file LICENSE.
+ ------------------------------------------------------------------ */
- 2. The origin of this software must not be misrepresented; you must
- not claim that you wrote the original software. If you use this
- software in a product, an acknowledgment in the product
- documentation would be appreciated but is not required.
-
- 3. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Julian Seward, Cambridge, UK.
- js...@bz...
- bzip2/libbzip2 version 1.0 of 21 March 2000
-
- This program is based on (at least) the work of:
- Mike Burrows
- David Wheeler
- Peter Fenwick
- Alistair Moffat
- Radford Neal
- Ian H. Witten
- Robert Sedgewick
- Jon L. Bentley
-
- For more information on these sources, see the manual.
---*/
-
-/*--
- CHANGES
- ~~~~~~~
- 0.9.0 -- original version.
-
+/* CHANGES
+ 0.9.0 -- original version.
0.9.0a/b -- no changes in this file.
+ 0.9.0c -- made zero-length BZ_FLUSH work correctly in bzCompress().
+ fixed bzWrite/bzRead to ignore zero-length requests.
+ fixed bzread to correctly handle read requests after EOF.
+ wrong parameter order in call to bzDecompressInit in
+ bzBuffToBuffDecompress. Fixed.
+*/
- 0.9.0c
- * made zero-length BZ_FLUSH work correctly in bzCompress().
- * fixed bzWrite/bzRead to ignore zero-length requests.
- * fixed bzread to correctly handle read requests after EOF.
- * wrong parameter order in call to bzDecompressInit in
- bzBuffToBuffDecompress. Fixed.
---*/
-
#include "bzlib_private.h"
@@ -597,7 +552,7 @@
s->strm->total_out_lo32++;
if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
}
-
+
/* can a new run be started? */
if (s->nblock_used == s->save_nblock+1) return False;
@@ -769,7 +724,7 @@
/* can a new run be started? */
if (s->nblock_used == s->save_nblock+1) return False;
-
+
/* Only caused by corrupt data stream? */
if (s->nblock_used > s->save_nblock+1)
return True;
@@ -1394,8 +1349,7 @@
/*---------------------------------------------------*/
/*--
- Code contributed by Yoshioka Tsuneo
- (QWF...@ni.../tsu...@is...),
+ Code contributed by Yoshioka Tsuneo (ts...@rr...)
to support better zlib compatibility.
This code is not _officially_ part of libbzip2 (yet);
I haven't tested it, documented it, or considered the
@@ -1406,7 +1360,7 @@
/*---------------------------------------------------*/
/*--
- return version like "0.9.0c".
+ return version like "0.9.5d, 4-Sept-1999".
--*/
const char * BZ_API(BZ2_bzlibVersion)(void)
{
@@ -1559,9 +1513,10 @@
void BZ_API(BZ2_bzclose) (BZFILE* b)
{
int bzerr;
- FILE *fp = ((bzFile *)b)->handle;
+ FILE *fp;
if (b==NULL) {return;}
+ fp = ((bzFile *)b)->handle;
if(((bzFile*)b)->writing){
BZ2_bzWriteClose(&bzerr,b,0,NULL,NULL);
if(bzerr != BZ_OK){
@@ -1580,7 +1535,7 @@
/*--
return last error code
--*/
-static char *bzerrorstrings[] = {
+static const char *bzerrorstrings[] = {
"OK"
,"SEQUENCE_ERROR"
,"PARAM_ERROR"
Modified: dcplusplus/trunk/bzip2/bzlib.h
===================================================================
--- dcplusplus/trunk/bzip2/bzlib.h 2008-01-24 21:34:31 UTC (rev 977)
+++ dcplusplus/trunk/bzip2/bzlib.h 2008-01-25 21:08:22 UTC (rev 978)
@@ -4,61 +4,21 @@
/*--- bzlib.h ---*/
/*-------------------------------------------------------------*/
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
+/* ------------------------------------------------------------------
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
- Copyright (C) 1996-2005 Julian R Seward. All rights reserved.
+ bzip2/libbzip2 version 1.0.4 of 20 December 2006
+ Copyright (C) 1996-2006 Julian Seward <js...@bz...>
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+ This program is released under the terms of the license contained
+ in the file LICENSE.
+ ------------------------------------------------------------------ */
- 2. The origin of this software must not be misrepresented; you must
- not claim that you wrote the original software. If you use this
- software in a product, an acknowledgment in the product
- documentation would be appreciated but is not required.
- 3. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 4. The name of the author may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Julian Seward, Cambridge, UK.
- js...@bz...
- bzip2/libbzip2 version 1.0 of 21 March 2000
-
- This program is based on (at least) the work of:
- Mike Burrows
- David Wheeler
- Peter Fenwick
- Alistair Moffat
- Radford Neal
- Ian H. Witten
- Robert Sedgewick
- Jon L. Bentley
-
- For more information on these sources, see the manual.
---*/
-
-
#ifndef _BZLIB_H
#define _BZLIB_H
@@ -262,8 +222,7 @@
/*--
- Code contributed by Yoshioka Tsuneo
- (QWF...@ni.../tsu...@is...),
+ Code contributed by Yoshioka Tsuneo (ts...@rr...)
to support better zlib compatibility.
This code is not _officially_ part of libbzip2 (yet);
I haven't tested it, documented it, or considered the
Modified: dcplusplus/trunk/bzip2/bzlib_private.h
===================================================================
--- dcplusplus/trunk/bzip2/bzlib_private.h 2008-01-24 21:34:31 UTC (rev 977)
+++ dcplusplus/trunk/bzip2/bzlib_private.h 2008-01-25 21:08:22 UTC (rev 978)
@@ -4,61 +4,21 @@
/*--- bzlib_private.h ---*/
/*-------------------------------------------------------------*/
-/*--
- This file is a part of bzip2 and/or libbzip2, a program and
- library for lossless, block-sorting data compression.
+/* ------------------------------------------------------------------
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
- Copyright (C) 1996-2005 Julian R Seward. All rights reserved.
+ bzip2/libbzip2 version 1.0.4 of 20 December 2006
+ Copyright (C) 1996-2006 Julian Seward <js...@bz...>
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+ This program is released under the terms of the license conta...
[truncated message content] |
|
From: <zou...@us...> - 2008-01-29 01:47:46
|
Revision: 979
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=979&view=rev
Author: zouzou123gen
Date: 2008-01-28 17:47:38 -0800 (Mon, 28 Jan 2008)
Log Message:
-----------
Allow spaces in the description field
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/win32/GeneralPage.cpp
dcplusplus/trunk/win32/GeneralPage.h
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-01-25 21:08:22 UTC (rev 978)
+++ dcplusplus/trunk/changelog.txt 2008-01-29 01:47:38 UTC (rev 979)
@@ -15,6 +15,7 @@
* Fixed search spy crash
* Upgraded to bzip 1.0.4 (thanks pothead)
* Tab tooltips (thanks poy)
+* Allow spaces in the description field (poy)
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
Modified: dcplusplus/trunk/win32/GeneralPage.cpp
===================================================================
--- dcplusplus/trunk/win32/GeneralPage.cpp 2008-01-25 21:08:22 UTC (rev 978)
+++ dcplusplus/trunk/win32/GeneralPage.cpp 2008-01-29 01:47:38 UTC (rev 979)
@@ -42,7 +42,7 @@
{ 0, 0, PropPage::T_END }
};
-GeneralPage::GeneralPage(SmartWin::Widget* parent) : PropPage(parent) {
+GeneralPage::GeneralPage(SmartWin::Widget* parent) : PropPage(parent), nick(0) {
createDialog(IDD_GENERALPAGE);
PropPage::translate(handle(), texts);
@@ -60,14 +60,11 @@
connections->setSelectedIndex(selected);
- WidgetTextBoxPtr textBox;
-#define TEXTBOX_ATTACH(id) \
- textBox = attachTextBox(id); \
- textBox->setTextLimit(35); \
- textBox->onTextChanged(std::tr1::bind(&GeneralPage::handleTextChanged, this, textBox))
- TEXTBOX_ATTACH(IDC_NICK);
- TEXTBOX_ATTACH(IDC_DESCRIPTION);
-#undef TEXTBOX_ATTACH
+ nick = attachTextBox(IDC_NICK);
+ nick->setTextLimit(35);
+ nick->onTextChanged(std::tr1::bind(&GeneralPage::handleNickTextChanged, this));
+
+ attachTextBox(IDC_DESCRIPTION)->setTextLimit(35);
}
GeneralPage::~GeneralPage() {
@@ -77,8 +74,8 @@
PropPage::write(handle(), items);
}
-void GeneralPage::handleTextChanged(WidgetTextBoxPtr textBox) {
- tstring text = textBox->getText();
+void GeneralPage::handleNickTextChanged() {
+ tstring text = nick->getText();
bool update = false;
// Strip ' '
@@ -90,8 +87,8 @@
if(update) {
// Something changed; update window text without changing cursor pos
- long caretPos = textBox->getCaretPos() - 1;
- textBox->setText(text);
- textBox->setSelection(caretPos, caretPos);
+ long caretPos = nick->getCaretPos() - 1;
+ nick->setText(text);
+ nick->setSelection(caretPos, caretPos);
}
}
Modified: dcplusplus/trunk/win32/GeneralPage.h
===================================================================
--- dcplusplus/trunk/win32/GeneralPage.h 2008-01-25 21:08:22 UTC (rev 978)
+++ dcplusplus/trunk/win32/GeneralPage.h 2008-01-29 01:47:38 UTC (rev 979)
@@ -34,7 +34,9 @@
static Item items[];
static TextItem texts[];
- void handleTextChanged(WidgetTextBoxPtr textBox);
+ WidgetTextBoxPtr nick;
+
+ void handleNickTextChanged();
};
#endif // !defined(DCPLUSPLUS_WIN32_GENERAL_PAGE_H)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zou...@us...> - 2008-01-29 10:21:03
|
Revision: 980
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=980&view=rev
Author: zouzou123gen
Date: 2008-01-29 02:20:57 -0800 (Tue, 29 Jan 2008)
Log Message:
-----------
don't disable TextLimit in chats (was always -1 in WinXP)
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/win32/HubFrame.cpp
dcplusplus/trunk/win32/PrivateFrame.cpp
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-01-29 01:47:38 UTC (rev 979)
+++ dcplusplus/trunk/changelog.txt 2008-01-29 10:20:57 UTC (rev 980)
@@ -16,6 +16,7 @@
* Upgraded to bzip 1.0.4 (thanks pothead)
* Tab tooltips (thanks poy)
* Allow spaces in the description field (poy)
+* Fixed max characters limit in chats (poy)
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
Modified: dcplusplus/trunk/win32/HubFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/HubFrame.cpp 2008-01-29 01:47:38 UTC (rev 979)
+++ dcplusplus/trunk/win32/HubFrame.cpp 2008-01-29 10:20:57 UTC (rev 980)
@@ -105,7 +105,6 @@
WidgetTextBox::Seed cs = WinUtil::Seeds::textBox;
cs.style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_READONLY;
chat = createTextBox(cs);
- chat->setTextLimit(0);
addWidget(chat);
paned->setFirst(chat);
chat->onContextMenu(std::tr1::bind(&HubFrame::handleChatContextMenu, this, _1));
Modified: dcplusplus/trunk/win32/PrivateFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/PrivateFrame.cpp 2008-01-29 01:47:38 UTC (rev 979)
+++ dcplusplus/trunk/win32/PrivateFrame.cpp 2008-01-29 10:20:57 UTC (rev 980)
@@ -110,7 +110,6 @@
WidgetTextBox::Seed cs = WinUtil::Seeds::textBox;
cs.style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_READONLY;
chat = createTextBox(cs);
- chat->setTextLimit(0);
addWidget(chat);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zou...@us...> - 2008-01-30 12:35:34
|
Revision: 981
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=981&view=rev
Author: zouzou123gen
Date: 2008-01-30 04:35:30 -0800 (Wed, 30 Jan 2008)
Log Message:
-----------
reverted the previous TextLimit fix
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/win32/HubFrame.cpp
dcplusplus/trunk/win32/PrivateFrame.cpp
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-01-29 10:20:57 UTC (rev 980)
+++ dcplusplus/trunk/changelog.txt 2008-01-30 12:35:30 UTC (rev 981)
@@ -16,7 +16,6 @@
* Upgraded to bzip 1.0.4 (thanks pothead)
* Tab tooltips (thanks poy)
* Allow spaces in the description field (poy)
-* Fixed max characters limit in chats (poy)
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
Modified: dcplusplus/trunk/win32/HubFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/HubFrame.cpp 2008-01-29 10:20:57 UTC (rev 980)
+++ dcplusplus/trunk/win32/HubFrame.cpp 2008-01-30 12:35:30 UTC (rev 981)
@@ -105,6 +105,7 @@
WidgetTextBox::Seed cs = WinUtil::Seeds::textBox;
cs.style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_READONLY;
chat = createTextBox(cs);
+ chat->setTextLimit(0);
addWidget(chat);
paned->setFirst(chat);
chat->onContextMenu(std::tr1::bind(&HubFrame::handleChatContextMenu, this, _1));
Modified: dcplusplus/trunk/win32/PrivateFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/PrivateFrame.cpp 2008-01-29 10:20:57 UTC (rev 980)
+++ dcplusplus/trunk/win32/PrivateFrame.cpp 2008-01-30 12:35:30 UTC (rev 981)
@@ -110,6 +110,7 @@
WidgetTextBox::Seed cs = WinUtil::Seeds::textBox;
cs.style = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_MULTILINE | ES_NOHIDESEL | ES_READONLY;
chat = createTextBox(cs);
+ chat->setTextLimit(0);
addWidget(chat);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ul...@us...> - 2008-01-30 21:19:33
|
Revision: 982
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=982&view=rev
Author: ullner
Date: 2008-01-30 13:19:30 -0800 (Wed, 30 Jan 2008)
Log Message:
-----------
po-files...
Added Paths:
-----------
dcplusplus/trunk/dcpp/po/da.po
dcplusplus/trunk/dcpp/po/fr.po
dcplusplus/trunk/dcpp/po/id.po
dcplusplus/trunk/dcpp/po/it.po
dcplusplus/trunk/dcpp/po/km.po
dcplusplus/trunk/dcpp/po/pl.po
dcplusplus/trunk/dcpp/po/pt.po
dcplusplus/trunk/dcpp/po/ro.po
dcplusplus/trunk/dcpp/po/sl.po
dcplusplus/trunk/dcpp/po/sq.po
dcplusplus/trunk/win32/po/da.po
dcplusplus/trunk/win32/po/fr.po
dcplusplus/trunk/win32/po/id.po
dcplusplus/trunk/win32/po/it.po
dcplusplus/trunk/win32/po/km.po
dcplusplus/trunk/win32/po/pl.po
dcplusplus/trunk/win32/po/pt.po
dcplusplus/trunk/win32/po/ro.po
dcplusplus/trunk/win32/po/sl.po
dcplusplus/trunk/win32/po/sq.po
Added: dcplusplus/trunk/dcpp/po/da.po
===================================================================
--- dcplusplus/trunk/dcpp/po/da.po (rev 0)
+++ dcplusplus/trunk/dcpp/po/da.po 2008-01-30 21:19:30 UTC (rev 982)
@@ -0,0 +1,142 @@
+
+# Danish translations for the DC++ package.
+# Copyright (C) 2008 The translators
+# This file is distributed under the same license as the DC++ package.
+# <g2...@us...>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: dcpp\n"
+"Report-Msgid-Bugs-To: dcp...@li...\n"
+"Last-Translator: <g2...@us...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgid "Socks server authentication failed (bad login / password?)"
+msgstr "Socks-server brugerverificering sl� fejl (forkert brugernavn/kodeord)"
+
+msgid "The socks server doesn't support login / password authentication"
+msgstr "Socks-serveren underst� ikke bruger/kodeord-verificering"
+
+msgid "Invalid size"
+msgstr "Ugyldig st�se..."
+
+msgid "The temporary download directory cannot be shared"
+msgstr "Den midlertidlige download mappe kan ikke blive delt..!"
+
+msgid "Maximum command length exceeded"
+msgstr "Maxsimal l�de for kommando overskredet"
+
+msgid "More data was sent than was expected"
+msgstr "For meget data..."
+
+msgid "You're trying to download from yourself!"
+msgstr "Du pr�at downloade fra dig selv!!!"
+
+msgid "Offline"
+msgstr "Offline"
+
+msgid "Failed to load private key"
+msgstr "Fejlede ved indl�ing af privat n�"
+
+msgid "Not listening for connections - please restart DC++"
+msgstr "Starter ikke - Genstart venligst DC++"
+
+msgid "Hash database"
+msgstr "Hash databasen"
+
+msgid "All download slots taken"
+msgstr "Alle downloadslots er i brug"
+
+msgid "Redirect user(s)"
+msgstr "Viderestil bruger(e)"
+
+msgid "Target filename too long"
+msgstr "Filnavnet er for langt...!"
+
+msgid "Connection timeout"
+msgstr "Forbindelsen fik 'Timeout' (den anden computer svarer ikke)"
+
+msgid "The socks server requires authentication"
+msgstr "Socks-serveren kr�r brugernavn/kodeord"
+
+msgid "A file with a different size already exists in the queue"
+msgstr "Filer med forskellige st�ser"
+
+msgid "Error during decompression"
+msgstr "Fejl under dekomprimeringen"
+
+msgid "CRC32 inconsistency (SFV-Check)"
+msgstr "CRC32-Inkonsistens (SFV-kontrol)"
+
+msgid "A file with different tth root already exists in the queue"
+msgstr "Filer med forskellige st�ser (TTH)"
+
+msgid "TLS disabled, no certificate file set"
+msgstr "TLS deaktivert, ingen certifikatfil angivet"
+
+msgid "No slots available"
+msgstr "Ingen ledige slots"
+
+msgid "Error during compression"
+msgstr "Fejl under komprimering"
+
+msgid "Disconnected"
+msgstr "Forbindelsen er afbrudt!!!"
+
+msgid "Hash database rebuilt"
+msgstr "Hash databasen er genopbygget"
+
+msgid "The socks server failed establish a connection"
+msgstr "Socks-serveren kunne ikke oprette en forbindelse"
+
+msgid "File list refresh initiated"
+msgstr "Fillisten opdatering er sat i gang..."
+
+msgid "Virtual directory name already exists"
+msgstr "Virtuel mappe navn eksister allerede..."
+
+msgid "Full tree does not match TTH root"
+msgstr "Downloaded TTH tr�atcher ikke TTH roden"
+
+msgid "Shared Files"
+msgstr "Delte filer"
+
+msgid "No directory specified"
+msgstr "Ingen mappe defineret..!"
+
+msgid "Unable to read hash data file"
+msgstr "Kan ikke l� denne TTH-fil"
+
+msgid "A file of equal or larger size already exists at the target location"
+msgstr "En fil af samme st�se eller st�findes allerede p�en angivne placering"
+
+msgid "This file is already queued"
+msgstr "Filen finnes allerede i downloadk�!"
+
+msgid "Kick user(s)"
+msgstr "Spark bruger(e)"
+
+msgid "File not available"
+msgstr "Fil er ikke tilg�elig..!"
+
+msgid "Directory already shared"
+msgstr "Mappen er allerede delt!"
+
+msgid "Certificate not trusted, unable to connect"
+msgstr "Certifikatet er ikke gyldigt, kunne ikke Oprette forbindelse"
+
+msgid "A file with the same hash already exists in your share"
+msgstr "En fil med den samme hash eksisterer i din deling!"
+
+msgid "Generated new TLS certificate"
+msgstr "Skab TLS certifikat"
+
+msgid "Failed to load certificate file"
+msgstr "Fejlede ved indl�ing af Certifikat!"
+
+msgid "File list refresh finished"
+msgstr "Fillisten er opdater�.."
+
Added: dcplusplus/trunk/dcpp/po/fr.po
===================================================================
--- dcplusplus/trunk/dcpp/po/fr.po (rev 0)
+++ dcplusplus/trunk/dcpp/po/fr.po 2008-01-30 21:19:30 UTC (rev 982)
@@ -0,0 +1,145 @@
+
+# French translations for the DC++ package.
+# Copyright (C) 2008 The translators
+# This file is distributed under the same license as the DC++ package.
+# <sp...@us...>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: dcpp\n"
+"Report-Msgid-Bugs-To: dcp...@li...\n"
+"Last-Translator: <sp...@us...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+msgid "Socks server authentication failed (bad login / password?)"
+msgstr "Echec de l'authentification serveur Socks (mauvais login / mot-de-passe?)"
+
+msgid "The socks server doesn't support login / password authentication"
+msgstr "Le serveur Socks server ne supporte pas l'autentifiaction login / mot-de-passe"
+
+msgid "The temporary download directory cannot be shared"
+msgstr "Le répertoire des temporaires ne peut être partagé"
+
+msgid "Maximum command length exceeded"
+msgstr "Dépassement de la longueur maximale de la commande"
+
+msgid "More data was sent than was expected"
+msgstr "Plus de données ont été envoyées que ce qu'il était attendu"
+
+msgid "You're trying to download from yourself!"
+msgstr "Vous essayez de télécharger sur vous-même!"
+
+msgid "Offline"
+msgstr "Non connecté"
+
+msgid "Failed to load private key"
+msgstr "Echec de chargement de la clef privée"
+
+msgid "Not listening for connections - please restart DC++"
+msgstr "Pas en écoute pour les connexions - veuillez relancer DC++0.699"
+
+msgid "Hash database"
+msgstr "Hachage de la base de données"
+
+msgid "All download slots taken"
+msgstr "Tous les slots sont pris"
+
+msgid "Redirect user(s)"
+msgstr "Rediriger utilisateur(s)"
+
+msgid "Target filename too long"
+msgstr "Nom du fichier cible trop long"
+
+msgid "Connection timeout"
+msgstr "Temps d'attente dépassé"
+
+msgid "The socks server requires authentication"
+msgstr "Le serveur Socks requiert une authentication"
+
+msgid "A file with a different size already exists in the queue"
+msgstr "Un fichier d'une taille différente existe déjà dans la file d'attente"
+
+msgid "Error during decompression"
+msgstr "Erreur pendant la décompression"
+
+msgid "CRC32 inconsistency (SFV-Check)"
+msgstr "Incompatibilité CRC32 (Contrôle SFV)"
+
+msgid "A file with different tth root already exists in the queue"
+msgstr "Un fichier avec une racine tth différente existe déjà dans la file d'attente"
+
+msgid "TLS disabled, no certificate file set"
+msgstr "TLS désactivé, pas de fichier certificat"
+
+msgid "No slots available"
+msgstr "Pas de slot disponible"
+
+msgid "Error during compression"
+msgstr "Erreur pendant la compression"
+
+msgid "Disconnected"
+msgstr "Déconnecté"
+
+msgid "Hash database rebuilt"
+msgstr "Hache de la base de données reconstruite"
+
+msgid "Remove all subdirectories before adding this one"
+msgstr "Retirer tous les sous-répertoires avant d'ajouter celui-çi"
+
+msgid "File list refresh initiated"
+msgstr "Rafraîchissement de la liste initialisé"
+
+msgid "Virtual directory name already exists"
+msgstr "Nom de répertoire virtuel déjà existant"
+
+msgid "Full tree does not match TTH root"
+msgstr "Toute l'arborescence ne trouve pas de racine TTH"
+
+msgid "Shared Files"
+msgstr "Fichier Partagés"
+
+msgid "No directory specified"
+msgstr "Pas de répertoire spécifié"
+
+msgid "Unable to read hash data file"
+msgstr "Ne parvient pas à lire la Hache de la base de données"
+
+msgid "A file of equal or larger size already exists at the target location"
+msgstr "Un fichier d'une taille égale ou supérieure existe déjà à l'emplacement du fichier cible"
+
+msgid "This file is already queued"
+msgstr "Ce fichier est déjà mis en file d'attente de téléchargement"
+
+msgid "Unable to create thread"
+msgstr "Ne parvient pas à créer le thread"
+
+msgid "Kick user(s)"
+msgstr "Kicker utilisateur(s)"
+
+msgid "File not available"
+msgstr "Fichier indisponible"
+
+msgid "The socks server failed establish a connection"
+msgstr "Le serveur Socks a échoué à établir une connexion"
+
+msgid "Directory already shared"
+msgstr "Répertoire déjà partagé"
+
+msgid "Download Queue"
+msgstr "File d'attente Téléchargements"
+
+msgid "Certificate not trusted, unable to connect"
+msgstr "Le certificat n'est pas De Confiance, ne parvient pas à se connecter"
+
+msgid "A file with the same hash already exists in your share"
+msgstr "Un fichier ayant la même Hache existe déjà dans votre share"
+
+msgid "Failed to load certificate file"
+msgstr "Echec de chargement du fichier certificat"
+
+msgid "File list refresh finished"
+msgstr "Rafraîchissement de la liste terminé"
+
Added: dcplusplus/trunk/dcpp/po/id.po
===================================================================
--- dcplusplus/trunk/dcpp/po/id.po (rev 0)
+++ dcplusplus/trunk/dcpp/po/id.po 2008-01-30 21:19:30 UTC (rev 982)
@@ -0,0 +1,121 @@
+
+# Indonesian translations for the DC++ package.
+# Copyright (C) 2008 The translators
+# This file is distributed under the same license as the DC++ package.
+# <dod...@us...>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: dcpp\n"
+"Report-Msgid-Bugs-To: dcp...@li...\n"
+"Last-Translator: <dod...@us...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: plurals=2; plural=(n != 1);\n"
+
+msgid "Socks server authentication failed (bad login / password?)"
+msgstr "Autentikasi server sock gagal (username / password salah?)"
+
+msgid "The socks server doesn't support login / password authentication"
+msgstr "Server sock tidak mendukung autentikai user / password"
+
+msgid "The socks server requires authentication"
+msgstr "Server sock membutuhkan autentikasi"
+
+msgid "More data was sent than was expected"
+msgstr "Lebih banyak data dikirim dari yang diharapkan"
+
+msgid "You're trying to download from yourself!"
+msgstr "Anda mengunduh dari diri sendiri!"
+
+msgid "Offline"
+msgstr "Terputus"
+
+msgid "Hash database"
+msgstr "Hash-kan basis data"
+
+msgid "All download slots taken"
+msgstr "Semua slot unduh terpakai"
+
+msgid "Redirect user(s)"
+msgstr "Redirect pengguna"
+
+msgid "Target filename too long"
+msgstr "Nama arsip tujuan terlalu panjang"
+
+msgid "Connection timeout"
+msgstr "Sambungan timeout"
+
+msgid "A file with a different size already exists in the queue"
+msgstr "Sebuah arsip dengan ukuran lain telah ada di antrian"
+
+msgid "Error during decompression"
+msgstr "Kesalahan saat pemuaian"
+
+msgid "CRC32 inconsistency (SFV-Check)"
+msgstr "Inkonsistensi CRC32 (Pemeriksaan SFV)"
+
+msgid "A file with different tth root already exists in the queue"
+msgstr "Sebuah arsip dengan tth root lain telah ada di antrian"
+
+msgid "No slots available"
+msgstr "Slot tidak tersedia"
+
+msgid "Error during compression"
+msgstr "Kesalahan pada pemampatan"
+
+msgid "Disconnected"
+msgstr "Terputus"
+
+msgid "Hash database rebuilt"
+msgstr "Basis data hash telah dibuat ulang"
+
+msgid "Remove all subdirectories before adding this one"
+msgstr "Hapus semua subdirektori sebelum menambah ini"
+
+msgid "File list refresh initiated"
+msgstr "Pembaharuan daftar arsip diinisiasi"
+
+msgid "Virtual directory name already exists"
+msgstr "Nama direktori semu telah ada"
+
+msgid "Full tree does not match TTH root"
+msgstr "Pohon yang diunduh tidak cocok dengan TTH root"
+
+msgid "Shared Files"
+msgstr "Arsip Ter-Share"
+
+msgid "No directory specified"
+msgstr "Direktori tidak diberikan"
+
+msgid "A file of equal or larger size already exists at the target location"
+msgstr "Sebuah arsip berukuran sama atau lebih besar sudah ada di lokasi tujuan"
+
+msgid "Unable to create thread"
+msgstr "Gagal menciptakan thread"
+
+msgid "Kick user(s)"
+msgstr "Tendang pengguna"
+
+msgid "File not available"
+msgstr "Arsip tidak tersedia"
+
+msgid "The socks server failed establish a connection"
+msgstr "Server sock gagal menjalin koneksi"
+
+msgid "Directory already shared"
+msgstr "Direktori telah dishare"
+
+msgid "Download Queue"
+msgstr "Antrian Unduh"
+
+msgid "The temporary download directory cannot be shared"
+msgstr "Direktori unduh sementara tidak boleh di-share"
+
+msgid "A file with the same hash already exists in your share"
+msgstr "Arsip dengan hash yang sama sudah ada di share Anda"
+
+msgid "File list refresh finished"
+msgstr "Pembaharuan daftar arsip telah selesai"
+
Added: dcplusplus/trunk/dcpp/po/it.po
===================================================================
--- dcplusplus/trunk/dcpp/po/it.po (rev 0)
+++ dcplusplus/trunk/dcpp/po/it.po 2008-01-30 21:19:30 UTC (rev 982)
@@ -0,0 +1,154 @@
+
+# Italian translations for the DC++ package.
+# Copyright (C) 2008 The translators
+# This file is distributed under the same license as the DC++ package.
+# <vec...@us...>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: dcpp\n"
+"Report-Msgid-Bugs-To: dcp...@li...\n"
+"Last-Translator: <vec...@us...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgid "Socks server authentication failed (bad login / password?)"
+msgstr "Autenticazione del server Socks fallita (nome utente /password non validi?)"
+
+msgid "The socks server doesn't support login / password authentication"
+msgstr "Il server socks non riconosce l'utente / autenticazione password"
+
+msgid "Invalid size"
+msgstr "Grandezza non valida"
+
+msgid "The temporary download directory cannot be shared"
+msgstr "La cartella di download temporanea non può essere condivisa"
+
+msgid "Maximum command length exceeded"
+msgstr "Superata massima lunghezza comando"
+
+msgid "More data was sent than was expected"
+msgstr "Sono stati inviati più dati di quanto previsto"
+
+msgid "You're trying to download from yourself!"
+msgstr "Stai cercando di scaricare da te stesso!"
+
+msgid "Offline"
+msgstr "Offline"
+
+msgid "Failed to load private key"
+msgstr "Impossibile caricare il codice privato"
+
+msgid "Target removed"
+msgstr "File di destinazione rimosso"
+
+msgid "Not listening for connections - please restart DC++"
+msgstr "Nessun ascolto per la connessione - riavviare DC++"
+
+msgid "Hash database"
+msgstr "Archivio hash"
+
+msgid "All download slots taken"
+msgstr "Tutti gli slot per il download occupati"
+
+msgid "Redirect user(s)"
+msgstr "Reindirizza utente(i)"
+
+msgid "Target filename too long"
+msgstr "Nome file di destinazione troppo lungo"
+
+msgid "Connection timeout"
+msgstr "Connessione in timeout"
+
+msgid "The socks server requires authentication"
+msgstr "Il server socks richiede l'autenticazione"
+
+msgid "A file with a different size already exists in the queue"
+msgstr "Nei Download in Coda esiste già un file di dimensione differente"
+
+msgid "Error during decompression"
+msgstr "Errore durante la decompressione"
+
+msgid "CRC32 inconsistency (SFV-Check)"
+msgstr "Inconsistenza CRC32 (Controllo SFV)"
+
+msgid "A file with different tth root already exists in the queue"
+msgstr "Nei Download in Coda esiste già un file con TTH root differente"
+
+msgid "TLS disabled, no certificate file set"
+msgstr "TLS disattivato, file certificato non impostato"
+
+msgid "No slots available"
+msgstr "Nessuno slot disponibile"
+
+msgid "Error during compression"
+msgstr "Errore durante la compressione"
+
+msgid "Disconnected"
+msgstr "Disconnesso"
+
+msgid "Hash database rebuilt"
+msgstr "Ricostruzione archivio hash"
+
+msgid "Remove all subdirectories before adding this one"
+msgstr "Elimina tutte le sottocartelle prima di aggiungere questa"
+
+msgid "File list refresh initiated"
+msgstr "Aggiornamento elenco file condivisi iniziato"
+
+msgid "Virtual directory name already exists"
+msgstr "Nome cartella virtuale gi�sistente"
+
+msgid "Full tree does not match TTH root"
+msgstr "L'albero delle cartelle non è coerente con la radice TTH"
+
+msgid "Shared Files"
+msgstr "File Condivisi"
+
+msgid "No directory specified"
+msgstr "Nessuna cartella specificata"
+
+msgid "Unable to read hash data file"
+msgstr "Impossibile leggere dati hash del file"
+
+msgid "A file of equal or larger size already exists at the target location"
+msgstr "Nella cartella di destinazione esiste già un file di dimensioni uguali o maggiori"
+
+msgid "This file is already queued"
+msgstr "Questo file è già in coda"
+
+msgid "Unable to create thread"
+msgstr "Impossibile creare la discussione"
+
+msgid "Kick user(s)"
+msgstr "Blocca utente(i)"
+
+msgid "File not available"
+msgstr "File non disponibile"
+
+msgid "The socks server failed establish a connection"
+msgstr "Il server socks ha fallito nello stabilire una connessione"
+
+msgid "Directory already shared"
+msgstr "Cartella già condivisa"
+
+msgid "Download Queue"
+msgstr "Download in Coda"
+
+msgid "Certificate not trusted, unable to connect"
+msgstr "Certificato non valido, impossibile connettersi"
+
+msgid "A file with the same hash already exists in your share"
+msgstr "Esiste già un file con lo stesso TTH nei tuoi file condivisi"
+
+msgid "Generated new TLS certificate"
+msgstr "Creato nuovo certificato TLS"
+
+msgid "Failed to load certificate file"
+msgstr "Impossibile caricare il file certificato"
+
+msgid "File list refresh finished"
+msgstr "Aggiornamento elenco file condivisi completato"
+
Added: dcplusplus/trunk/dcpp/po/km.po
===================================================================
--- dcplusplus/trunk/dcpp/po/km.po (rev 0)
+++ dcplusplus/trunk/dcpp/po/km.po 2008-01-30 21:19:30 UTC (rev 982)
@@ -0,0 +1,124 @@
+
+# Khmer translations for the DC++ package.
+# Copyright (C) 2008 The translators
+# This file is distributed under the same license as the DC++ package.
+# <Vey...@us...>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: dcpp\n"
+"Report-Msgid-Bugs-To: dcp...@li...\n"
+"Last-Translator: <Vey...@us...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: plurals=2; plural=(n != 1);\n"
+
+msgid "Socks server authentication failed (bad login / password?)"
+msgstr "ការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវនៃរន្ធម៉ាស៊ីនបម្រើ បានបរាជ័យ (ឈ្មោះ / ពាក្យសម្ងាត់ មិនត្រឹមត្រូវ?)"
+
+msgid "The socks server doesn't support login / password authentication"
+msgstr "រន្ធម៉ាស៊ីនបម្រើមិនគាំទ្រការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវនៃ ឈ្មោះ / ពាក្យសម្ងាត់"
+
+msgid "Unable to read hash data file"
+msgstr "មិនអាចអានឯកសារទិន្នន័យច្របូកច្របល់"
+
+msgid "More data was sent than was expected"
+msgstr "ទិន្នន័យជាច្រើនត្រូវបានផ្ញើហួសពីការរំពឹងទុក"
+
+msgid "You're trying to download from yourself!"
+msgstr "អ្នកកំពុងតែសាកល្បងទាញយកពីខ្លួនឯង!"
+
+msgid "Offline"
+msgstr "ក្រៅបណ្តាញ"
+
+msgid "Hash database"
+msgstr "មូលដ្ឋានទិន្នន័យច្របូកច្របល់"
+
+msgid "All download slots taken"
+msgstr "ប្រលោះទាញយកទាំងអស់ គ្មានទំនេរ"
+
+msgid "Redirect user(s)"
+msgstr "ប្តូរទិសអ្នកប្រើ"
+
+msgid "Target filename too long"
+msgstr "ឈ្មោះឯកសារគោលដៅវែងណាស់"
+
+msgid "Connection timeout"
+msgstr "ការតភ្ជាប់ អស់ពេល"
+
+msgid "A file with a different size already exists in the queue"
+msgstr "ឯកសារដែលមានទំហំខុសគ្នា មានរួចហើយនៅក្នុងជួរ"
+
+msgid "Error during decompression"
+msgstr "កំហុសនៅពេលមិនបានបង្ហាប់"
+
+msgid "CRC32 inconsistency (SFV-Check)"
+msgstr "CRC32 មិនខ្ជាប់ខ្ជួន (SFV-ត្រួតពិនិត្យ)"
+
+msgid "A file with different tth root already exists in the queue"
+msgstr "ឯកសារដែលមានឫស tth ខុសគ្នា មានរួចហើយនៅក្នុងជួរ"
+
+msgid "No slots available"
+msgstr "គ្មានប្រលោះដែលអាចរកបាន"
+
+msgid "Error during compression"
+msgstr "កំហុសនៅពេលបង្ហាប់"
+
+msgid "Disconnected"
+msgstr "បានផ្តាច់"
+
+msgid "Hash database rebuilt"
+msgstr "មូលដ្ឋានទិន្នន័យច្របូកច្របល់ បានស្ថាបនាឡើងវិញ"
+
+msgid "Remove all subdirectories before adding this one"
+msgstr "យកថតក្រូណូរងចេញទាំងអស់ មុននឹងបន្ថែមមួយនេះ"
+
+msgid "File list refresh initiated"
+msgstr "បញ្ជីឯកសារដែលធ្វើអោយស្រស់ បានផ្តើមថ្មី"
+
+msgid "Virtual directory name already exists"
+msgstr "ឈ្មោះថតក្រូណូនិម្មិត មានរួចហើយ"
+
+msgid "Full tree does not match TTH root"
+msgstr "មែកធាងពេញលេញ មិនអាចផ្គុផ្គងនឹងឫស TTH"
+
+msgid "Shared Files"
+msgstr "បានចែករំលែកឯកសារ"
+
+msgid "No directory specified"
+msgstr "គ្មានថតក្រូណូបញ្ជាក់លម្អិត"
+
+msgid "The socks server requires authentication"
+msgstr "រន្ធម៉ាស៊ីនបម្រើតម្រូវអោយមានការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវ"
+
+msgid "A file of equal or larger size already exists at the target location"
+msgstr "ទំហំឯកសារដែលប៉ុនគ្នា ឬ ធំជាង គឺមានរួចហើយនៅឯទីតាំងគោលដៅ"
+
+msgid "Unable to create thread"
+msgstr "មិនអាចបង្កើតខ្សែស្រឡាយ"
+
+msgid "Kick user(s)"
+msgstr "ទាត់អ្នកប្រើចេញ"
+
+msgid "File not available"
+msgstr "ឯកសារពុំអាចរកបាន"
+
+msgid "The socks server failed establish a connection"
+msgstr "រន្ធម៉ាស៊ីនបម្រើបរាជ័យក្នុងការបង្កើតការតភ្ជាប់"
+
+msgid "Directory already shared"
+msgstr "ថតក្រូណូបានចែករំលែករួចហើយ"
+
+msgid "Download Queue"
+msgstr "ទាញយកដាក់ជាជួរ"
+
+msgid "The temporary download directory cannot be shared"
+msgstr "ថតក្រូណូដែលទាញយកជាបណ្តោះអាសន្ន មិនអាចត្រូវបានចែករំលែក"
+
+msgid "A file with the same hash already exists in your share"
+msgstr "ឯកសារដែលច្របូកច្របល់ដូចគ្នានេះ មានរួចហើយនៅក្នុងទីចែករំលែករបស់អ្នក"
+
+msgid "File list refresh finished"
+msgstr "បញ្ជីឯកសារដែលធ្វើអោយស្រស់ បានបញ្ចប់"
+
Added: dcplusplus/trunk/dcpp/po/pl.po
===================================================================
--- dcplusplus/trunk/dcpp/po/pl.po (rev 0)
+++ dcplusplus/trunk/dcpp/po/pl.po 2008-01-30 21:19:30 UTC (rev 982)
@@ -0,0 +1,148 @@
+
+# Polish translations for the DC++ package.
+# Copyright (C) 2008 The translators
+# This file is distributed under the same license as the DC++ package.
+# <k4...@us...>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: dcpp\n"
+"Report-Msgid-Bugs-To: dcp...@li...\n"
+"Last-Translator: <k4...@us...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+msgid "Socks server authentication failed (bad login / password?)"
+msgstr "Błąd autoryzacji serwera SOCKS (nieprawidłowy login/hasło)"
+
+msgid "The socks server doesn't support login / password authentication"
+msgstr "Serwer SOCKS nie obsługuje autoryzacji login/hasło"
+
+msgid "The temporary download directory cannot be shared"
+msgstr "Katalog plików tymczasowych nie może być udostępniony"
+
+msgid "Maximum command length exceeded"
+msgstr "Przekroczono maksymalną długość komendy"
+
+msgid "More data was sent than was expected"
+msgstr "Więcej danych wysłano niż oczekiwano"
+
+msgid "You're trying to download from yourself!"
+msgstr "Próbujesz pobrać sam od siebie!"
+
+msgid "Offline"
+msgstr "Niedostępny"
+
+msgid "Failed to load private key"
+msgstr "Nie udało się wczytać klucza prywatnego"
+
+msgid "Not listening for connections - please restart DC++"
+msgstr "Nie nasłuchuje połączeń - uruchom ponownie DC++"
+
+msgid "Hash database"
+msgstr "Baza danych hashów"
+
+msgid "All download slots taken"
+msgstr "Wszystkie sloty są zajęte"
+
+msgid "Redirect user(s)"
+msgstr "Przekieruj użytkownika(ów)"
+
+msgid "Target filename too long"
+msgstr "Za długa docelowa nazwa pliku"
+
+msgid "Connection timeout"
+msgstr "Wygasł czas oczekiwania na połączenie"
+
+msgid "The socks server requires authentication"
+msgstr "Serwer SOCKS wymaga autoryzacji"
+
+msgid "A file with a different size already exists in the queue"
+msgstr "Plik o innym rozmiarze znajduje się już w kolejce pobierania"
+
+msgid "Error during decompression"
+msgstr "Błąd podczas kompresowania"
+
+msgid "CRC32 inconsistency (SFV-Check)"
+msgstr "Niezgodne CRC32 (sprawdź SFV)"
+
+msgid "A file with different tth root already exists in the queue"
+msgstr "Plik o innym tth root znajduje się już w kolejce pobierania"
+
+msgid "TLS disabled, no certificate file set"
+msgstr "TLS wyłączony. Nie ustalony certyfikat pliku"
+
+msgid "No slots available"
+msgstr "Brak wolnych slotów"
+
+msgid "Error during compression"
+msgstr "Błąd podczas kompresji"
+
+msgid "Disconnected"
+msgstr "Rozłączony"
+
+msgid "Hash database rebuilt"
+msgstr "Odbudowano bazę danych hashów"
+
+msgid "Remove all subdirectories before adding this one"
+msgstr "Usuń wszystkie podkatalogi przed dodaniem tego"
+
+msgid "File list refresh initiated"
+msgstr "Odświeżanie listy plików rozpoczęte"
+
+msgid "Virtual directory name already exists"
+msgstr "Nazwa wirtualnego katalogu już istnieje"
+
+msgid "Full tree does not match TTH root"
+msgstr "Drzewo katalogu nie odpowiada TTH"
+
+msgid "Shared Files"
+msgstr "Udostępnione pliki"
+
+msgid "No directory specified"
+msgstr "Brak zdefiniowanego katalogu"
+
+msgid "Unable to read hash data file"
+msgstr "Błąd odczytu danych pliku hash"
+
+msgid "A file of equal or larger size already exists at the target location"
+msgstr "Plik o tym samym lub większym rozmiarze znajduje się już w aktualnej lokalizacji"
+
+msgid "This file is already queued"
+msgstr "Ten plik już jest na liście oczekujących"
+
+msgid "Unable to create thread"
+msgstr "Nie można utworzyć wątku"
+
+msgid "Kick user(s)"
+msgstr "Wykop użytkownika(ów)"
+
+msgid "File not available"
+msgstr "Plik niedostępny"
+
+msgid "The socks server failed establish a connection"
+msgstr "Serwer SOCKS nie ustanowił połączenia"
+
+msgid "Directory already shared"
+msgstr "Katalog jest już udostępniony"
+
+msgid "Download Queue"
+msgstr "Kolejka pobierania"
+
+msgid "Certificate not trusted, unable to connect"
+msgstr "Certyfikat niepotwierdzony, nie można połaczyć"
+
+msgid "A file with the same hash already exists in your share"
+msgstr "Plik z tym samym hashem jest już udostępniony"
+
+msgid "Generated new TLS certificate"
+msgstr "Wygenerowany nowy ceryfikat TLS"
+
+msgid "Failed to load certificate file"
+msgstr "Nie udało się wczytać pliku certyfikatu"
+
+msgid "File list refresh finished"
+msgstr "Odświeżanie listy plików zakończone"
+
Added: dcplusplus/trunk/dcpp/po/pt.po
===================================================================
--- dcplusplus/trunk/dcpp/po/pt.po (rev 0)
+++ dcplusplus/trunk/dcpp/po/pt.po 2008-01-30 21:19:30 UTC (rev 982)
@@ -0,0 +1,133 @@
+
+# Portuguese translations for the DC++ package.
+# Copyright (C) 2008 The translators
+# This file is distributed under the same license as the DC++ package.
+# <Is...@us...>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: dcpp\n"
+"Report-Msgid-Bugs-To: dcp...@li...\n"
+"Last-Translator: <Is...@us...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgid "Socks server authentication failed (bad login / password?)"
+msgstr "Autenticação no servidor socks falhou (verifique o nome de utilizador e a palavra-passe)"
+
+msgid "The socks server doesn't support login / password authentication"
+msgstr "O servidor socks não suporta autenticação"
+
+msgid "The temporary download directory cannot be shared"
+msgstr "A pasta dos Downloads temporários não pode ser partilhada"
+
+msgid "More data was sent than was expected"
+msgstr "Foram enviados mais dados que julgado inicialmente"
+
+msgid "You're trying to download from yourself!"
+msgstr "Está a tentar transferir de si próprio!"
+
+msgid "Offline"
+msgstr "Desligado"
+
+msgid "Failed to load private key"
+msgstr "Falha ao carregar a chave privada"
+
+msgid "Hash database"
+msgstr "Hash da base de dados "
+
+msgid "All download slots taken"
+msgstr "Todos as slots estão ocupadas"
+
+msgid "Redirect user(s)"
+msgstr "Redireccionar Utilizador(es)"
+
+msgid "Target filename too long"
+msgstr "Nome do ficheiro de destino demasiado longo"
+
+msgid "Connection timeout"
+msgstr "Tempo de ligação excedido"
+
+msgid "The socks server requires authentication"
+msgstr "O servidor socks requer autenticação"
+
+msgid "A file with a different size already exists in the queue"
+msgstr "Um ficheiro com tamanho diferente já existe na lista de espera"
+
+msgid "Error during decompression"
+msgstr "Erro ao descomprimir"
+
+msgid "CRC32 inconsistency (SFV-Check)"
+msgstr "Inconsistência CRC32 (Controlo SFV)"
+
+msgid "A file with different tth root already exists in the queue"
+msgstr "Um ficheiro TTH diferente já...
[truncated message content] |
|
From: <arn...@us...> - 2008-02-02 00:05:30
|
Revision: 983
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=983&view=rev
Author: arnetheduck
Date: 2008-02-01 16:05:24 -0800 (Fri, 01 Feb 2008)
Log Message:
-----------
move downloadsframe to transferview
Modified Paths:
--------------
dcplusplus/trunk/dcpp/SettingsManager.cpp
dcplusplus/trunk/dcpp/SettingsManager.h
dcplusplus/trunk/dcpp/po/da.po
dcplusplus/trunk/dcpp/po/de.po
dcplusplus/trunk/dcpp/po/fr.po
dcplusplus/trunk/dcpp/po/id.po
dcplusplus/trunk/dcpp/po/it.po
dcplusplus/trunk/dcpp/po/km.po
dcplusplus/trunk/dcpp/po/ko.po
dcplusplus/trunk/dcpp/po/pl.po
dcplusplus/trunk/dcpp/po/pt.po
dcplusplus/trunk/dcpp/po/ro.po
dcplusplus/trunk/dcpp/po/sl.po
dcplusplus/trunk/dcpp/po/sq.po
dcplusplus/trunk/dcpp/po/sv.po
dcplusplus/trunk/smartwin/include/smartwin/WidgetCreator.h
dcplusplus/trunk/smartwin/include/smartwin/WidgetFactory.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetTabSheet.h
dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetWindow.h
dcplusplus/trunk/smartwin/source/widgets/WidgetTabSheet.cpp
dcplusplus/trunk/smartwin/source/widgets/WidgetTabView.cpp
dcplusplus/trunk/win32/MainWindow.cpp
dcplusplus/trunk/win32/MainWindowFactory.cpp
dcplusplus/trunk/win32/TransferView.cpp
dcplusplus/trunk/win32/TransferView.h
dcplusplus/trunk/win32/WindowsPage.cpp
dcplusplus/trunk/win32/po/da.po
dcplusplus/trunk/win32/po/fr.po
dcplusplus/trunk/win32/po/id.po
dcplusplus/trunk/win32/po/it.po
dcplusplus/trunk/win32/po/km.po
dcplusplus/trunk/win32/po/ko.po
dcplusplus/trunk/win32/po/pl.po
dcplusplus/trunk/win32/po/pt.po
dcplusplus/trunk/win32/po/ro.po
dcplusplus/trunk/win32/po/sl.po
dcplusplus/trunk/win32/po/sq.po
Removed Paths:
-------------
dcplusplus/trunk/win32/DownloadsFrame.cpp
dcplusplus/trunk/win32/DownloadsFrame.h
Modified: dcplusplus/trunk/dcpp/SettingsManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/SettingsManager.cpp 2008-01-30 21:19:30 UTC (rev 982)
+++ dcplusplus/trunk/dcpp/SettingsManager.cpp 2008-02-02 00:05:24 UTC (rev 983)
@@ -35,7 +35,7 @@
{
// Strings
"Nick", "UploadSpeed", "Description", "DownloadDirectory", "EMail", "ExternalIp",
- "Font", "MainFrameOrder", "MainFrameWidths", "HubFrameOrder", "HubFrameWidths",
+ "Font", "ConnectionsOrder", "ConnectionsWidths", "HubFrameOrder", "HubFrameWidths",
"SearchFrameOrder", "SearchFrameWidths", "FavHubsFrameOrder", "FavHubsFrameWidths",
"HublistServers", "QueueFrameOrder", "QueueFrameWidths", "PublicHubsFrameOrder", "PublicHubsFrameWidths",
"UsersFrameOrder", "UsersFrameWidths", "HttpProxy", "LogDirectory", "LogFormatPostDownload",
@@ -46,7 +46,7 @@
"LogFilePrivateChat", "LogFileStatus", "LogFileUpload", "LogFileDownload", "LogFileSystem",
"LogFormatSystem", "LogFormatStatus", "DirectoryListingFrameOrder", "DirectoryListingFrameWidths",
"TLSPrivateKeyFile", "TLSCertificateFile", "TLSTrustedCertificatesPath", "BeepFile",
- "Language", "DownloadsFrameOrder", "DownloadsFrameWidth",
+ "Language", "DownloadsOrder", "DownloadsWidth",
"SENTRY",
// Ints
"IncomingConnections", "InPort", "Slots", "AutoFollow", "ClearSearch",
@@ -77,7 +77,7 @@
"UseTLS", "AutoSearchLimit", "AltSortOrder", "AutoKickNoFavs", "PromptPassword", "SpyFrameIgnoreTthSearches",
"DontDlAlreadyQueued", "MaxCommandLength", "AllowUntrustedHubs", "AllowUntrustedClients",
"TLSPort", "FastHash", "SortFavUsersFirst", "ShowShellMenu", "MinSegmentSize", "FollowLinks",
- "SendBloom", "OpenDownloads",
+ "SendBloom",
"SENTRY",
// Int64
"TotalUpload", "TotalDownload",
@@ -273,7 +273,6 @@
setDefault(MIN_SEGMENT_SIZE, 1024);
setDefault(FOLLOW_LINKS, false);
setDefault(SEND_BLOOM, true);
- setDefault(OPEN_DOWNLOADS, true);
#ifdef _WIN32
setDefault(MAIN_WINDOW_STATE, SW_SHOWNORMAL);
Modified: dcplusplus/trunk/dcpp/SettingsManager.h
===================================================================
--- dcplusplus/trunk/dcpp/SettingsManager.h 2008-01-30 21:19:30 UTC (rev 982)
+++ dcplusplus/trunk/dcpp/SettingsManager.h 2008-02-02 00:05:24 UTC (rev 983)
@@ -47,7 +47,7 @@
enum StrSetting { STR_FIRST,
NICK = STR_FIRST, UPLOAD_SPEED, DESCRIPTION, DOWNLOAD_DIRECTORY, EMAIL, EXTERNAL_IP,
- TEXT_FONT, MAINFRAME_ORDER, MAINFRAME_WIDTHS, HUBFRAME_ORDER, HUBFRAME_WIDTHS,
+ TEXT_FONT, CONNECTIONS_ORDER, CONNECTIONS_WIDTHS, HUBFRAME_ORDER, HUBFRAME_WIDTHS,
SEARCHFRAME_ORDER, SEARCHFRAME_WIDTHS, FAVHUBSFRAME_ORDER, FAVHUBSFRAME_WIDTHS,
HUBLIST_SERVERS, QUEUEFRAME_ORDER, QUEUEFRAME_WIDTHS, PUBLICHUBSFRAME_ORDER, PUBLICHUBSFRAME_WIDTHS,
USERSFRAME_ORDER, USERSFRAME_WIDTHS, HTTP_PROXY, LOG_DIRECTORY, LOG_FORMAT_POST_DOWNLOAD,
@@ -58,7 +58,7 @@
LOG_FILE_PRIVATE_CHAT, LOG_FILE_STATUS, LOG_FILE_UPLOAD, LOG_FILE_DOWNLOAD, LOG_FILE_SYSTEM,
LOG_FORMAT_SYSTEM, LOG_FORMAT_STATUS, DIRECTORLISTINGFRAME_ORDER, DIRECTORLISTINGFRAME_WIDTHS,
TLS_PRIVATE_KEY_FILE, TLS_CERTIFICATE_FILE, TLS_TRUSTED_CERTIFICATES_PATH, BEEPFILE,
- LANGUAGE, DOWNLOADSFRAME_ORDER, DOWNLOADSFRAME_WIDTHS,
+ LANGUAGE, DOWNLOADS_ORDER, DOWNLOADS_WIDTHS,
STR_LAST };
enum IntSetting { INT_FIRST = STR_LAST + 1,
@@ -90,7 +90,7 @@
USE_TLS, AUTO_SEARCH_LIMIT, ALT_SORT_ORDER, AUTO_KICK_NO_FAVS, PROMPT_PASSWORD, SPY_FRAME_IGNORE_TTH_SEARCHES,
DONT_DL_ALREADY_QUEUED, MAX_COMMAND_LENGTH, ALLOW_UNTRUSTED_HUBS, ALLOW_UNTRUSTED_CLIENTS,
TLS_PORT, FAST_HASH, SORT_FAVUSERS_FIRST, SHOW_SHELL_MENU, MIN_SEGMENT_SIZE, FOLLOW_LINKS,
- SEND_BLOOM, OPEN_DOWNLOADS,
+ SEND_BLOOM,
INT_LAST };
enum Int64Setting { INT64_FIRST = INT_LAST + 1,
Modified: dcplusplus/trunk/dcpp/po/da.po
===================================================================
--- dcplusplus/trunk/dcpp/po/da.po 2008-01-30 21:19:30 UTC (rev 982)
+++ dcplusplus/trunk/dcpp/po/da.po 2008-02-02 00:05:24 UTC (rev 983)
@@ -1,4 +1,3 @@
-
# Danish translations for the DC++ package.
# Copyright (C) 2008 The translators
# This file is distributed under the same license as the DC++ package.
@@ -8,135 +7,382 @@
msgstr ""
"Project-Id-Version: dcpp\n"
"Report-Msgid-Bugs-To: dcp...@li...\n"
+"POT-Creation-Date: 2008-01-31 20:32+0100\n"
"Last-Translator: <g2...@us...>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-msgid "Socks server authentication failed (bad login / password?)"
-msgstr "Socks-server brugerverificering sl� fejl (forkert brugernavn/kodeord)"
+#: dcpp/Util.cpp:381
+#, c-format, boost-format
+msgid "%'lld B"
+msgstr ""
-msgid "The socks server doesn't support login / password authentication"
-msgstr "Socks-serveren underst� ikke bruger/kodeord-verificering"
+#: dcpp/Util.cpp:343
+#, c-format, boost-format
+msgid "%.02f GiB"
+msgstr ""
-msgid "Invalid size"
-msgstr "Ugyldig st�se..."
+#: dcpp/Util.cpp:339
+#, c-format, boost-format
+msgid "%.02f KiB"
+msgstr ""
-msgid "The temporary download directory cannot be shared"
-msgstr "Den midlertidlige download mappe kan ikke blive delt..!"
+#: dcpp/Util.cpp:341
+#, c-format, boost-format
+msgid "%.02f MiB"
+msgstr ""
-msgid "Maximum command length exceeded"
-msgstr "Maxsimal l�de for kommando overskredet"
+#: dcpp/Util.cpp:347
+#, c-format, boost-format
+msgid "%.02f PiB"
+msgstr ""
-msgid "More data was sent than was expected"
-msgstr "For meget data..."
+#: dcpp/Util.cpp:345
+#, c-format, boost-format
+msgid "%.02f TiB"
+msgstr ""
-msgid "You're trying to download from yourself!"
-msgstr "Du pr�at downloade fra dig selv!!!"
+#: dcpp/NmdcHub.cpp:273
+#, boost-format
+msgid "%1% (Nick unknown)"
+msgstr ""
-msgid "Offline"
-msgstr "Offline"
+#: dcpp/HashManager.cpp:767
+#, boost-format
+msgid ""
+"%1% not shared; calculated CRC32 does not match the one found in SFV file."
+msgstr ""
-msgid "Failed to load private key"
-msgstr "Fejlede ved indl�ing af privat n�"
+#: dcpp/DownloadManager.cpp:143
+#, boost-format
+msgid "%1% renamed to %2%"
+msgstr ""
-msgid "Not listening for connections - please restart DC++"
-msgstr "Starter ikke - Genstart venligst DC++"
+#: dcpp/DownloadManager.cpp:547
+#, fuzzy, boost-format
+msgid "%1%: File not available"
+msgstr "Fil er ikke tilg�elig..!"
-msgid "Hash database"
-msgstr "Hash databasen"
+#: dcpp/Util.cpp:337
+#, c-format, boost-format
+msgid "%d B"
+msgstr ""
+#: dcpp/Util.cpp:377
+#, c-format, boost-format
+msgid "%s B"
+msgstr ""
+
+#: dcpp/QueueManager.cpp:503
+msgid "A file of equal or larger size already exists at the target location"
+msgstr "En fil af samme st�se eller st�findes allerede p�en angivne placering"
+
+#: dcpp/QueueManager.cpp:446
+msgid "A file with a different size already exists in the queue"
+msgstr "Filer med forskellige st�ser"
+
+#: dcpp/QueueManager.cpp:449
+msgid "A file with different tth root already exists in the queue"
+msgstr "Filer med forskellige st�ser (TTH)"
+
+#: dcpp/QueueManager.cpp:413
+msgid "A file with the same hash already exists in your share"
+msgstr "En fil med den samme hash eksisterer i din deling!"
+
+#: dcpp/ConnectionManager.cpp:181
msgid "All download slots taken"
msgstr "Alle downloadslots er i brug"
-msgid "Redirect user(s)"
-msgstr "Viderestil bruger(e)"
+#: dcpp/DownloadManager.cpp:421
+msgid "CRC32 inconsistency (SFV-Check)"
+msgstr "CRC32-Inkonsistens (SFV-kontrol)"
-msgid "Target filename too long"
-msgstr "Filnavnet er for langt...!"
+#: dcpp/DownloadManager.cpp:419
+#, fuzzy, boost-format
+msgid "CRC32 inconsistency (SFV-Check) (File: %1%)"
+msgstr "CRC32-Inkonsistens (SFV-kontrol)"
+#: dcpp/ConnectionManager.cpp:385
+msgid "Certificate not trusted, unable to connect"
+msgstr "Certifikatet er ikke gyldigt, kunne ikke Oprette forbindelse"
+
+#: dcpp/Socket.cpp:154 dcpp/ConnectionManager.cpp:187
+#: dcpp/BufferedSocket.cpp:154
msgid "Connection timeout"
msgstr "Forbindelsen fik 'Timeout' (den anden computer svarer ikke)"
-msgid "The socks server requires authentication"
-msgstr "Socks-serveren kr�r brugernavn/kodeord"
+#: dcpp/DownloadManager.cpp:284
+#, boost-format
+msgid "Could not open target file: %1%"
+msgstr ""
-msgid "A file with a different size already exists in the queue"
-msgstr "Filer med forskellige st�ser"
+#: dcpp/ShareManager.cpp:418
+msgid "Directory already shared"
+msgstr "Mappen er allerede delt!"
-msgid "Error during decompression"
-msgstr "Fejl under dekomprimeringen"
+#: dcpp/BufferedSocket.cpp:409 dcpp/BufferedSocket.cpp:427
+msgid "Disconnected"
+msgstr "Forbindelsen er afbrudt!!!"
-msgid "CRC32 inconsistency (SFV-Check)"
-msgstr "CRC32-Inkonsistens (SFV-kontrol)"
+#: dcpp/UploadManager.cpp:450
+#, boost-format
+msgid "Disconnected user leaving the hub: %1%"
+msgstr ""
-msgid "A file with different tth root already exists in the queue"
-msgstr "Filer med forskellige st�ser (TTH)"
+#: dcpp/DCPlusPlus.cpp:103
+msgid "Download Queue"
+msgstr ""
-msgid "TLS disabled, no certificate file set"
-msgstr "TLS deaktivert, ingen certifikatfil angivet"
+#: dcpp/ShareManager.cpp:745
+#, boost-format
+msgid ""
+"Duplicate file will not be shared: %1%%2% (Size: %3% B) Dupe matched "
+"against: %4%%5%"
+msgstr ""
-msgid "No slots available"
-msgstr "Ingen ledige slots"
+#: dcpp/QueueManager.cpp:516 dcpp/QueueManager.cpp:520
+#, boost-format
+msgid "Duplicate source: %1%"
+msgstr ""
+#: dcpp/HashManager.cpp:456
+#, fuzzy, boost-format
+msgid "Error creating hash data file: %1%"
+msgstr "Kan ikke l� denne TTH-fil"
+
+#: dcpp/ZUtils.cpp:33 dcpp/ZUtils.cpp:54 dcpp/ZUtils.cpp:76 dcpp/ZUtils.cpp:86
+#: dcpp/BZUtils.cpp:31 dcpp/BZUtils.cpp:52 dcpp/BZUtils.cpp:60
msgid "Error during compression"
msgstr "Fejl under komprimering"
-msgid "Disconnected"
-msgstr "Forbindelsen er afbrudt!!!"
+#: dcpp/ZUtils.cpp:100 dcpp/ZUtils.cpp:123 dcpp/BZUtils.cpp:72
+#: dcpp/BZUtils.cpp:94 dcpp/BZUtils.cpp:97 dcpp/CryptoManager.cpp:344
+#: dcpp/CryptoManager.cpp:363 dcpp/CryptoManager.cpp:377
+msgid "Error during decompression"
+msgstr "Fejl under dekomprimeringen"
-msgid "Hash database rebuilt"
-msgstr "Hash databasen er genopbygget"
+#: dcpp/HashManager.cpp:772
+#, boost-format
+msgid "Error hashing %1%: %2%"
+msgstr ""
-msgid "The socks server failed establish a connection"
-msgstr "Socks-serveren kunne ikke oprette en forbindelse"
+#: dcpp/HashManager.cpp:118 dcpp/HashManager.cpp:333
+#, boost-format
+msgid "Error saving hash data: %1%"
+msgstr ""
+#: dcpp/CryptoManager.cpp:228 dcpp/CryptoManager.cpp:232
+#: dcpp/CryptoManager.cpp:237 dcpp/CryptoManager.cpp:241
+msgid "Failed to load certificate file"
+msgstr "Fejlede ved indl�ing af Certifikat!"
+
+#: dcpp/CryptoManager.cpp:246 dcpp/CryptoManager.cpp:250
+#: dcpp/CryptoManager.cpp:255 dcpp/CryptoManager.cpp:259
+msgid "Failed to load private key"
+msgstr "Fejlede ved indl�ing af privat n�"
+
+#: dcpp/Socket.cpp:408
+msgid ""
+"Failed to set up the socks server for UDP relay (check socks address and "
+"port)"
+msgstr ""
+
+#: dcpp/ShareManager.cpp:780
+#, fuzzy, boost-format
+msgid "File list refresh failed: %1%"
+msgstr "Fillisten er opdater�.."
+
+#: dcpp/ShareManager.cpp:824
+msgid "File list refresh finished"
+msgstr "Fillisten er opdater�.."
+
+#: dcpp/ShareManager.cpp:760
+msgid ""
+"File list refresh in progress, please wait for it to finish before trying to "
+"refresh again"
+msgstr ""
+
+#: dcpp/ShareManager.cpp:802
msgid "File list refresh initiated"
msgstr "Fillisten opdatering er sat i gang..."
-msgid "Virtual directory name already exists"
-msgstr "Virtuel mappe navn eksister allerede..."
+#: dcpp/DirectoryListing.cpp:102
+msgid "File not available"
+msgstr "Fil er ikke tilg�elig..!"
+#: dcpp/HashManager.cpp:89
+#, boost-format
+msgid "Finished hashing: %1%"
+msgstr ""
+
+#: dcpp/HashManager.cpp:87
+#, boost-format
+msgid "Finished hashing: %1% (%2%/s)"
+msgstr ""
+
+#: dcpp/DownloadManager.cpp:353
msgid "Full tree does not match TTH root"
msgstr "Downloaded TTH tr�atcher ikke TTH roden"
-msgid "Shared Files"
-msgstr "Delte filer"
+#: dcpp/CryptoManager.cpp:221
+msgid "Generated new TLS certificate"
+msgstr "Skab TLS certifikat"
+#: dcpp/DCPlusPlus.cpp:97
+msgid "Hash database"
+msgstr "Hash databasen"
+
+#: dcpp/HashManager.cpp:677
+msgid "Hash database rebuilt"
+msgstr "Hash databasen er genopbygget"
+
+#: dcpp/HashManager.cpp:73 dcpp/HashManager.cpp:277
+#, boost-format
+msgid "Hashing failed: %1%"
+msgstr ""
+
+#: dcpp/DownloadManager.cpp:264 dcpp/DownloadManager.cpp:269
+msgid "Invalid size"
+msgstr "Ugyldig st�se..."
+
+#: dcpp/QueueManager.cpp:486 dcpp/QueueManager.cpp:494
+msgid ""
+"Invalid target file (missing directory, check default download directory "
+"setting)"
+msgstr ""
+
+#: dcpp/FavoriteManager.cpp:438
+msgid "Kick user(s)"
+msgstr "Spark bruger(e)"
+
+#: dcpp/ConnectionManager.cpp:239
+#, boost-format
+msgid "Listening socket failed (you need to restart DC++): %1%"
+msgstr ""
+
+#: dcpp/BufferedSocket.cpp:263
+msgid "Maximum command length exceeded"
+msgstr "Maxsimal l�de for kommando overskredet"
+
+#: dcpp/DownloadManager.cpp:323
+msgid "More data was sent than was expected"
+msgstr "For meget data..."
+
+#: dcpp/ShareManager.cpp:403
msgid "No directory specified"
msgstr "Ingen mappe defineret..!"
-msgid "Unable to read hash data file"
-msgstr "Kan ikke l� denne TTH-fil"
+#: dcpp/DownloadManager.cpp:462
+msgid "No slots available"
+msgstr "Ingen ledige slots"
-msgid "A file of equal or larger size already exists at the target location"
-msgstr "En fil af samme st�se eller st�findes allerede p�en angivne placering"
+#: dcpp/AdcHub.cpp:554
+msgid "Not listening for connections - please restart DC++"
+msgstr "Starter ikke - Genstart venligst DC++"
+#: dcpp/Transfer.cpp:63 dcpp/Transfer.cpp:67 dcpp/ClientManager.cpp:115
+#: dcpp/SearchManager.cpp:267 dcpp/SearchManager.cpp:329
+#: dcpp/SearchManager.cpp:331
+msgid "Offline"
+msgstr "Offline"
+
+#: dcpp/FavoriteManager.cpp:442
+msgid "Redirect user(s)"
+msgstr "Viderestil bruger(e)"
+
+#: dcpp/ShareManager.cpp:421
+msgid "Remove all subdirectories before adding this one"
+msgstr ""
+
+#: dcpp/DCPlusPlus.cpp:100
+msgid "Shared Files"
+msgstr "Delte filer"
+
+#: dcpp/Socket.cpp:269 dcpp/Socket.cpp:273
+msgid "Socks server authentication failed (bad login / password?)"
+msgstr "Socks-server brugerverificering sl� fejl (forkert brugernavn/kodeord)"
+
+#: dcpp/CryptoManager.cpp:223
+#, fuzzy, boost-format
+msgid "TLS disabled, failed to generate certificate: %1%"
+msgstr "TLS deaktivert, ingen certifikatfil angivet"
+
+#: dcpp/CryptoManager.cpp:213
+msgid "TLS disabled, no certificate file set"
+msgstr "TLS deaktivert, ingen certifikatfil angivet"
+
+#: dcpp/QueueManager.cpp:481 dcpp/QueueManager.cpp:490
+msgid "Target filename too long"
+msgstr "Filnavnet er for langt...!"
+
+#: dcpp/QueueManager.cpp:769
+msgid "Target removed"
+msgstr ""
+
+#: dcpp/Socket.cpp:255
+msgid "The socks server doesn't support login / password authentication"
+msgstr "Socks-serveren underst� ikke bruger/kodeord-verificering"
+
+#: dcpp/Socket.cpp:162 dcpp/Socket.cpp:173 dcpp/Socket.cpp:206
+#: dcpp/Socket.cpp:210 dcpp/Socket.cpp:237 dcpp/Socket.cpp:252
+msgid "The socks server failed establish a connection"
+msgstr "Socks-serveren kunne ikke oprette en forbindelse"
+
+#: dcpp/Socket.cpp:241
+msgid "The socks server requires authentication"
+msgstr "Socks-serveren kr�r brugernavn/kodeord"
+
+#: dcpp/ShareManager.cpp:407
+msgid "The temporary download directory cannot be shared"
+msgstr "Den midlertidlige download mappe kan ikke blive delt..!"
+
+#: dcpp/QueueManager.cpp:436
msgid "This file is already queued"
msgstr "Filen finnes allerede i downloadk�!"
-msgid "Kick user(s)"
-msgstr "Spark bruger(e)"
+#: dcpp/Thread.cpp:34 dcpp/Thread.cpp:42
+#, fuzzy
+msgid "Unable to create thread"
+msgstr "Kan ikke l� denne TTH-fil"
-msgid "File not available"
-msgstr "Fil er ikke tilg�elig..!"
+#: dcpp/QueueManager.cpp:957
+#, boost-format
+msgid "Unable to open filelist: %1%"
+msgstr ""
-msgid "Directory already shared"
-msgstr "Mappen er allerede delt!"
+#: dcpp/HashManager.cpp:131
+msgid "Unable to read hash data file"
+msgstr "Kan ikke l� denne TTH-fil"
-msgid "Certificate not trusted, unable to connect"
-msgstr "Certifikatet er ikke gyldigt, kunne ikke Oprette forbindelse"
+#: dcpp/DownloadManager.cpp:145
+#, boost-format
+msgid "Unable to rename %1%: %2%"
+msgstr ""
-msgid "A file with the same hash already exists in your share"
-msgstr "En fil med den samme hash eksisterer i din deling!"
+#: dcpp/UploadManager.cpp:149
+#, boost-format
+msgid "Unable to send file %1%: %2%"
+msgstr ""
-msgid "Generated new TLS certificate"
-msgstr "Skab TLS certifikat"
+#: dcpp/Socket.cpp:54
+#, c-format, boost-format
+msgid "Unknown error: 0x%1$x"
+msgstr ""
-msgid "Failed to load certificate file"
-msgstr "Fejlede ved indl�ing af Certifikat!"
+#: dcpp/ShareManager.cpp:426 dcpp/ShareManager.cpp:468
+msgid "Virtual directory name already exists"
+msgstr "Virtuel mappe navn eksister allerede..."
-msgid "File list refresh finished"
-msgstr "Fillisten er opdater�.."
+#: dcpp/QueueManager.cpp:383 dcpp/QueueManager.cpp:407
+msgid "You're trying to download from yourself!"
+msgstr "Du pr�at downloade fra dig selv!!!"
+#: dcpp/SettingsManager.cpp:156
+msgid "downloaded from"
+msgstr ""
+
+#: dcpp/SettingsManager.cpp:157
+msgid "uploaded to"
+msgstr ""
Modified: dcplusplus/trunk/dcpp/po/de.po
===================================================================
--- dcplusplus/trunk/dcpp/po/de.po 2008-01-30 21:19:30 UTC (rev 982)
+++ dcplusplus/trunk/dcpp/po/de.po 2008-02-02 00:05:24 UTC (rev 983)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: dcplusplus\n"
"Report-Msgid-Bugs-To: dcp...@li...\n"
-"POT-Creation-Date: 2008-01-23 22:20+0100\n"
+"POT-Creation-Date: 2008-01-31 20:32+0100\n"
"PO-Revision-Date: 2008-01-24 07:24+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: German <de...@li...>\n"
@@ -116,7 +116,7 @@
msgid "Certificate not trusted, unable to connect"
msgstr "Zertifikat nicht vertrauenswürdig, Verbindung nicht möglich"
-#: dcpp/Socket.cpp:155 dcpp/ConnectionManager.cpp:187
+#: dcpp/Socket.cpp:154 dcpp/ConnectionManager.cpp:187
#: dcpp/BufferedSocket.cpp:154
msgid "Connection timeout"
msgstr "Zeitüberschreitung der Verbindung"
@@ -193,7 +193,7 @@
msgid "Failed to load private key"
msgstr "Laden des privaten Schlüssels fehlgeschlagen"
-#: dcpp/Socket.cpp:409
+#: dcpp/Socket.cpp:408
msgid ""
"Failed to set up the socks server for UDP relay (check socks address and "
"port)"
@@ -316,7 +316,7 @@
msgid "Shared Files"
msgstr "Freigegebene Dateien"
-#: dcpp/Socket.cpp:270 dcpp/Socket.cpp:274
+#: dcpp/Socket.cpp:269 dcpp/Socket.cpp:273
msgid "Socks server authentication failed (bad login / password?)"
msgstr ""
"Socks Server Authentifizierung fehlgeschlagen (Login / Passwort falsch?)"
@@ -338,16 +338,16 @@
msgid "Target removed"
msgstr "Ziel entfernt"
-#: dcpp/Socket.cpp:256
+#: dcpp/Socket.cpp:255
msgid "The socks server doesn't support login / password authentication"
msgstr "Socks Server unterstützt keine Authentifizierung mit Login / Passwort"
-#: dcpp/Socket.cpp:163 dcpp/Socket.cpp:174 dcpp/Socket.cpp:207
-#: dcpp/Socket.cpp:211 dcpp/Socket.cpp:238 dcpp/Socket.cpp:253
+#: dcpp/Socket.cpp:162 dcpp/Socket.cpp:173 dcpp/Socket.cpp:206
+#: dcpp/Socket.cpp:210 dcpp/Socket.cpp:237 dcpp/Socket.cpp:252
msgid "The socks server failed establish a connection"
msgstr "Socks Server konnte keine Verbindung aufbauen"
-#: dcpp/Socket.cpp:242
+#: dcpp/Socket.cpp:241
msgid "The socks server requires authentication"
msgstr "Socks Server benötigt Authentifizierung"
@@ -382,9 +382,9 @@
msgid "Unable to send file %1%: %2%"
msgstr "Datei %1% kann nicht gesendet werden: %2%"
-#: dcpp/Socket.cpp:55
-#, boost-format
-msgid "Unknown error: 0x%1%"
+#: dcpp/Socket.cpp:54
+#, fuzzy, c-format, boost-format
+msgid "Unknown error: 0x%1$x"
msgstr "Unbekannter Fehler: 0x%1%"
#: dcpp/ShareManager.cpp:426 dcpp/ShareManager.cpp:468
Modified: dcplusplus/trunk/dcpp/po/fr.po
===================================================================
--- dcplusplus/trunk/dcpp/po/fr.po 2008-01-30 21:19:30 UTC (rev 982)
+++ dcplusplus/trunk/dcpp/po/fr.po 2008-02-02 00:05:24 UTC (rev 983)
@@ -1,4 +1,3 @@
-
# French translations for the DC++ package.
# Copyright (C) 2008 The translators
# This file is distributed under the same license as the DC++ package.
@@ -8,138 +7,387 @@
msgstr ""
"Project-Id-Version: dcpp\n"
"Report-Msgid-Bugs-To: dcp...@li...\n"
+"POT-Creation-Date: 2008-01-31 20:32+0100\n"
"Last-Translator: <sp...@us...>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-msgid "Socks server authentication failed (bad login / password?)"
-msgstr "Echec de l'authentification serveur Socks (mauvais login / mot-de-passe?)"
+#: dcpp/Util.cpp:381
+#, c-format, boost-format
+msgid "%'lld B"
+msgstr ""
-msgid "The socks server doesn't support login / password authentication"
-msgstr "Le serveur Socks server ne supporte pas l'autentifiaction login / mot-de-passe"
+#: dcpp/Util.cpp:343
+#, c-format, boost-format
+msgid "%.02f GiB"
+msgstr ""
-msgid "The temporary download directory cannot be shared"
-msgstr "Le répertoire des temporaires ne peut être partagé"
+#: dcpp/Util.cpp:339
+#, c-format, boost-format
+msgid "%.02f KiB"
+msgstr ""
-msgid "Maximum command length exceeded"
-msgstr "Dépassement de la longueur maximale de la commande"
+#: dcpp/Util.cpp:341
+#, c-format, boost-format
+msgid "%.02f MiB"
+msgstr ""
-msgid "More data was sent than was expected"
-msgstr "Plus de données ont été envoyées que ce qu'il était attendu"
+#: dcpp/Util.cpp:347
+#, c-format, boost-format
+msgid "%.02f PiB"
+msgstr ""
-msgid "You're trying to download from yourself!"
-msgstr "Vous essayez de télécharger sur vous-même!"
+#: dcpp/Util.cpp:345
+#, c-format, boost-format
+msgid "%.02f TiB"
+msgstr ""
-msgid "Offline"
-msgstr "Non connecté"
+#: dcpp/NmdcHub.cpp:273
+#, boost-format
+msgid "%1% (Nick unknown)"
+msgstr ""
-msgid "Failed to load private key"
-msgstr "Echec de chargement de la clef privée"
+#: dcpp/HashManager.cpp:767
+#, boost-format
+msgid ""
+"%1% not shared; calculated CRC32 does not match the one found in SFV file."
+msgstr ""
-msgid "Not listening for connections - please restart DC++"
-msgstr "Pas en écoute pour les connexions - veuillez relancer DC++0.699"
+#: dcpp/DownloadManager.cpp:143
+#, boost-format
+msgid "%1% renamed to %2%"
+msgstr ""
-msgid "Hash database"
-msgstr "Hachage de la base de données"
+#: dcpp/DownloadManager.cpp:547
+#, fuzzy, boost-format
+msgid "%1%: File not available"
+msgstr "Fichier indisponible"
+#: dcpp/Util.cpp:337
+#, c-format, boost-format
+msgid "%d B"
+msgstr ""
+
+#: dcpp/Util.cpp:377
+#, c-format, boost-format
+msgid "%s B"
+msgstr ""
+
+#: dcpp/QueueManager.cpp:503
+msgid "A file of equal or larger size already exists at the target location"
+msgstr ""
+"Un fichier d'une taille égale ou supérieure existe déjà à l'emplacement du "
+"fichier cible"
+
+#: dcpp/QueueManager.cpp:446
+msgid "A file with a different size already exists in the queue"
+msgstr "Un fichier d'une taille différente existe déjà dans la file d'attente"
+
+#: dcpp/QueueManager.cpp:449
+msgid "A file with different tth root already exists in the queue"
+msgstr ""
+"Un fichier avec une racine tth différente existe déjà dans la file d'attente"
+
+#: dcpp/QueueManager.cpp:413
+msgid "A file with the same hash already exists in your share"
+msgstr "Un fichier ayant la même Hache existe déjà dans votre share"
+
+#: dcpp/ConnectionManager.cpp:181
msgid "All download slots taken"
msgstr "Tous les slots sont pris"
-msgid "Redirect user(s)"
-msgstr "Rediriger utilisateur(s)"
+#: dcpp/DownloadManager.cpp:421
+msgid "CRC32 inconsistency (SFV-Check)"
+msgstr "Incompatibilité CRC32 (Contrôle SFV)"
-msgid "Target filename too long"
-msgstr "Nom du fichier cible trop long"
+#: dcpp/DownloadManager.cpp:419
+#, fuzzy, boost-format
+msgid "CRC32 inconsistency (SFV-Check) (File: %1%)"
+msgstr "Incompatibilité CRC32 (Contrôle SFV)"
+#: dcpp/ConnectionManager.cpp:385
+msgid "Certificate not trusted, unable to connect"
+msgstr "Le certificat n'est pas De Confiance, ne parvient pas à se connecter"
+
+#: dcpp/Socket.cpp:154 dcpp/ConnectionManager.cpp:187
+#: dcpp/BufferedSocket.cpp:154
msgid "Connection timeout"
msgstr "Temps d'attente dépassé"
-msgid "The socks server requires authentication"
-msgstr "Le serveur Socks requiert une authentication"
+#: dcpp/DownloadManager.cpp:284
+#, boost-format
+msgid "Could not open target file: %1%"
+msgstr ""
-msgid "A file with a different size already exists in the queue"
-msgstr "Un fichier d'une taille différente existe déjà dans la file d'attente"
+#: dcpp/ShareManager.cpp:418
+msgid "Directory already shared"
+msgstr "Répertoire déjà partagé"
-msgid "Error during decompression"
-msgstr "Erreur pendant la décompression"
+#: dcpp/BufferedSocket.cpp:409 dcpp/BufferedSocket.cpp:427
+msgid "Disconnected"
+msgstr "Déconnecté"
-msgid "CRC32 inconsistency (SFV-Check)"
-msgstr "Incompatibilité CRC32 (Contrôle SFV)"
+#: dcpp/UploadManager.cpp:450
+#, boost-format
+msgid "Disconnected user leaving the hub: %1%"
+msgstr ""
-msgid "A file with different tth root already exists in the queue"
-msgstr "Un fichier avec une racine tth différente existe déjà dans la file d'attente"
+#: dcpp/DCPlusPlus.cpp:103
+msgid "Download Queue"
+msgstr "File d'attente Téléchargements"
-msgid "TLS disabled, no certificate file set"
-msgstr "TLS désactivé, pas de fichier certificat"
+#: dcpp/ShareManager.cpp:745
+#, boost-format
+msgid ""
+"Duplicate file will not be shared: %1%%2% (Size: %3% B) Dupe matched "
+"against: %4%%5%"
+msgstr ""
-msgid "No slots available"
-msgstr "Pas de slot disponible"
+#: dcpp/QueueManager.cpp:516 dcpp/QueueManager.cpp:520
+#, boost-format
+msgid "Duplicate source: %1%"
+msgstr ""
+#: dcpp/HashManager.cpp:456
+#, fuzzy, boost-format
+msgid "Error creating hash data file: %1%"
+msgstr "Ne parvient pas à lire la Hache de la base de données"
+
+#: dcpp/ZUtils.cpp:33 dcpp/ZUtils.cpp:54 dcpp/ZUtils.cpp:76 dcpp/ZUtils.cpp:86
+#: dcpp/BZUtils.cpp:31 dcpp/BZUtils.cpp:52 dcpp/BZUtils.cpp:60
msgid "Error during compression"
msgstr "Erreur pendant la compression"
-msgid "Disconnected"
-msgstr "Déconnecté"
+#: dcpp/ZUtils.cpp:100 dcpp/ZUtils.cpp:123 dcpp/BZUtils.cpp:72
+#: dcpp/BZUtils.cpp:94 dcpp/BZUtils.cpp:97 dcpp/CryptoManager.cpp:344
+#: dcpp/CryptoManager.cpp:363 dcpp/CryptoManager.cpp:377
+msgid "Error during decompression"
+msgstr "Erreur pendant la décompression"
-msgid "Hash database rebuilt"
-msgstr "Hache de la base de données reconstruite"
+#: dcpp/HashManager.cpp:772
+#, boost-format
+msgid "Error hashing %1%: %2%"
+msgstr ""
-msgid "Remove all subdirectories before adding this one"
-msgstr "Retirer tous les sous-répertoires avant d'ajouter celui-çi"
+#: dcpp/HashManager.cpp:118 dcpp/HashManager.cpp:333
+#, boost-format
+msgid "Error saving hash data: %1%"
+msgstr ""
+#: dcpp/CryptoManager.cpp:228 dcpp/CryptoManager.cpp:232
+#: dcpp/CryptoManager.cpp:237 dcpp/CryptoManager.cpp:241
+msgid "Failed to load certificate file"
+msgstr "Echec de chargement du fichier certificat"
+
+#: dcpp/CryptoManager.cpp:246 dcpp/CryptoManager.cpp:250
+#: dcpp/CryptoManager.cpp:255 dcpp/CryptoManager.cpp:259
+msgid "Failed to load private key"
+msgstr "Echec de chargement de la clef privée"
+
+#: dcpp/Socket.cpp:408
+msgid ""
+"Failed to set up the socks server for UDP relay (check socks address and "
+"port)"
+msgstr ""
+
+#: dcpp/ShareManager.cpp:780
+#, fuzzy, boost-format
+msgid "File list refresh failed: %1%"
+msgstr "Rafraîchissement de la liste terminé"
+
+#: dcpp/ShareManager.cpp:824
+msgid "File list refresh finished"
+msgstr "Rafraîchissement de la liste terminé"
+
+#: dcpp/ShareManager.cpp:760
+msgid ""
+"File list refresh in progress, please wait for it to finish before trying to "
+"refresh again"
+msgstr...
[truncated message content] |
|
From: <arn...@us...> - 2008-02-02 22:09:26
|
Revision: 984
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=984&view=rev
Author: arnetheduck
Date: 2008-02-02 14:09:23 -0800 (Sat, 02 Feb 2008)
Log Message:
-----------
Patches, fix downloads/connections locations
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/AdcHub.cpp
dcplusplus/trunk/dcpp/ClientListener.h
dcplusplus/trunk/dcpp/Util.cpp
dcplusplus/trunk/dcpp/Util.h
dcplusplus/trunk/smartwin/source/widgets/WidgetTextBox.cpp
dcplusplus/trunk/win32/HubFrame.cpp
dcplusplus/trunk/win32/HubFrame.h
dcplusplus/trunk/win32/TransferView.cpp
dcplusplus/trunk/win32/po/da.po
dcplusplus/trunk/win32/po/fr.po
dcplusplus/trunk/win32/po/id.po
dcplusplus/trunk/win32/po/it.po
dcplusplus/trunk/win32/po/km.po
dcplusplus/trunk/win32/po/ko.po
dcplusplus/trunk/win32/po/pl.po
dcplusplus/trunk/win32/po/pt.po
dcplusplus/trunk/win32/po/ro.po
dcplusplus/trunk/win32/po/sl.po
dcplusplus/trunk/win32/po/sq.po
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/changelog.txt 2008-02-02 22:09:23 UTC (rev 984)
@@ -16,7 +16,9 @@
* Upgraded to bzip 1.0.4 (thanks pothead)
* Tab tooltips (thanks poy)
* Allow spaces in the description field (poy)
-
+* [ADC] Handle third person formatting (thanks poy)
+* Fix right-click issue when chat history is long (thanks poy)
+
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
* Use system header arrows on common controls 6+ (thanks poy)
Modified: dcplusplus/trunk/dcpp/AdcHub.cpp
===================================================================
--- dcplusplus/trunk/dcpp/AdcHub.cpp 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/dcpp/AdcHub.cpp 2008-02-02 22:09:23 UTC (rev 984)
@@ -246,9 +246,9 @@
if(!replyTo)
return;
- fire(ClientListener::PrivateMessage(), this, *from, *to, *replyTo, c.getParam(0));
+ fire(ClientListener::PrivateMessage(), this, *from, *to, *replyTo, c.getParam(0), c.hasFlag("ME", 1));
} else {
- fire(ClientListener::Message(), this, *from, c.getParam(0));
+ fire(ClientListener::Message(), this, *from, c.getParam(0), c.hasFlag("ME", 1));
}
}
Modified: dcplusplus/trunk/dcpp/ClientListener.h
===================================================================
--- dcplusplus/trunk/dcpp/ClientListener.h 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/dcpp/ClientListener.h 2008-02-02 22:09:23 UTC (rev 984)
@@ -39,9 +39,9 @@
virtual void on(Failed, Client*, const string&) throw() { }
virtual void on(GetPassword, Client*) throw() { }
virtual void on(HubUpdated, Client*) throw() { }
- virtual void on(Message, Client*, const OnlineUser&, const string&) throw() { }
+ virtual void on(Message, Client*, const OnlineUser&, const string&, bool = false) throw() { }
virtual void on(StatusMessage, Client*, const string&) throw() { }
- virtual void on(PrivateMessage, Client*, const OnlineUser&, const OnlineUser&, const OnlineUser&, const string&) throw() { }
+ virtual void on(PrivateMessage, Client*, const OnlineUser&, const OnlineUser&, const OnlineUser&, const string&, bool = false) throw() { }
virtual void on(HubUserCommand, Client*, int, int, const string&, const string&) throw() { }
virtual void on(HubFull, Client*) throw() { }
virtual void on(NickTaken, Client*) throw() { }
Modified: dcplusplus/trunk/dcpp/Util.cpp
===================================================================
--- dcplusplus/trunk/dcpp/Util.cpp 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/dcpp/Util.cpp 2008-02-02 22:09:23 UTC (rev 984)
@@ -890,8 +890,10 @@
return Util::emptyString; //if doesn't returned anything already, something is wrong...
}
-string Util::formatMessage(const string& nick, const string& message) {
- string tmp = '<' + nick + "> " + message;
+string Util::formatMessage(const string& nick, const string& message, bool thirdPerson) {
+ // let's *not* obey the spec here and add a space after the star. :P
+ string tmp = (thirdPerson ? "* " + nick + ' ' : '<' + nick + "> ") + message;
+
// Check all '<' and '[' after newlines as they're probably pasts...
size_t i = 0;
while( (i = tmp.find('\n', i)) != string::npos) {
@@ -903,6 +905,7 @@
}
i++;
}
+
return Text::toDOS(tmp);
}
Modified: dcplusplus/trunk/dcpp/Util.h
===================================================================
--- dcplusplus/trunk/dcpp/Util.h 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/dcpp/Util.h 2008-02-02 22:09:23 UTC (rev 984)
@@ -183,7 +183,7 @@
static string cleanPathChars(string aNick);
static string formatBytes(const string& aString) { return formatBytes(toInt64(aString)); }
- static string formatMessage(const string& nick, const string& message);
+ static string formatMessage(const string& nick, const string& message, bool thirdPerson);
static string getShortTimeString(time_t t = time(NULL) );
Modified: dcplusplus/trunk/smartwin/source/widgets/WidgetTextBox.cpp
===================================================================
--- dcplusplus/trunk/smartwin/source/widgets/WidgetTextBox.cpp 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/smartwin/source/widgets/WidgetTextBox.cpp 2008-02-02 22:09:23 UTC (rev 984)
@@ -1,61 +1,61 @@
-#include "../../include/smartwin/widgets/WidgetTextBox.h"
-
-namespace SmartWin {
-
-WidgetTextBox::Seed::Seed() :
- Widget::Seed(WC_EDIT, WS_CHILD | WS_VISIBLE | WS_TABSTOP, WS_EX_CLIENTEDGE),
- font(new Font(DefaultGuiFont))
-{
-}
-
-void WidgetTextBox::create( const Seed & cs )
-{
- ControlType::create(cs);
- if(cs.font)
- setFont( cs.font );
-}
-
-SmartUtil::tstring WidgetTextBox::getLine(int line) {
- SmartUtil::tstring tmp;
- tmp.resize(std::max(2, lineLength(lineIndex(line))));
-
- *reinterpret_cast<WORD*>(&tmp[0]) = static_cast<WORD>(tmp.size());
- tmp.resize(::SendMessage(this->handle(), EM_GETLINE, static_cast<WPARAM>(line), reinterpret_cast<LPARAM>(&tmp[0])));
- return tmp;
-}
-
-SmartUtil::tstring WidgetTextBox::textUnderCursor(const ScreenCoordinate& p) {
- int i = charFromPos(p);
- int line = lineFromPos(p);
- int c = i - lineIndex(line);
-
- SmartUtil::tstring tmp = getLine(line);
-
- SmartUtil::tstring::size_type start = tmp.find_last_of(_T(" <\t\r\n"), c);
- if(start == SmartUtil::tstring::npos)
- start = 0;
- else
- start++;
-
- SmartUtil::tstring::size_type end = tmp.find_first_of(_T(" >\t\r\n"), start + 1);
- if(end == SmartUtil::tstring::npos)
- end = tmp.size();
-
- return tmp.substr(start, end-start);
-}
-
-SmartUtil::tstring WidgetTextBoxBase::getSelection() const
-{
- DWORD start, end;
- this->sendMessage( EM_GETSEL, reinterpret_cast< WPARAM >( & start ), reinterpret_cast< LPARAM >( & end ) );
- SmartUtil::tstring retVal = this->getText().substr( start, end - start );
- return retVal;
-}
-
-ScreenCoordinate WidgetTextBox::getContextMenuPos() {
- RECT rc;
- ::GetClientRect(this->handle(), &rc);
- return ClientCoordinate (Point(rc.right/2, rc.bottom/2), this);
-}
-
-}
+#include "../../include/smartwin/widgets/WidgetTextBox.h"
+
+namespace SmartWin {
+
+WidgetTextBox::Seed::Seed() :
+ Widget::Seed(WC_EDIT, WS_CHILD | WS_VISIBLE | WS_TABSTOP, WS_EX_CLIENTEDGE),
+ font(new Font(DefaultGuiFont))
+{
+}
+
+void WidgetTextBox::create( const Seed & cs )
+{
+ ControlType::create(cs);
+ if(cs.font)
+ setFont( cs.font );
+}
+
+SmartUtil::tstring WidgetTextBox::getLine(int line) {
+ SmartUtil::tstring tmp;
+ tmp.resize(std::max(2, lineLength(lineIndex(line))));
+
+ *reinterpret_cast<WORD*>(&tmp[0]) = static_cast<WORD>(tmp.size());
+ tmp.resize(::SendMessage(this->handle(), EM_GETLINE, static_cast<WPARAM>(line), reinterpret_cast<LPARAM>(&tmp[0])));
+ return tmp;
+}
+
+SmartUtil::tstring WidgetTextBox::textUnderCursor(const ScreenCoordinate& p) {
+ int i = charFromPos(p);
+ int line = lineFromPos(p);
+ int c = (i - lineIndex(line)) & 0xFFFF;
+
+ SmartUtil::tstring tmp = getLine(line);
+
+ SmartUtil::tstring::size_type start = tmp.find_last_of(_T(" <\t\r\n"), c);
+ if(start == SmartUtil::tstring::npos)
+ start = 0;
+ else
+ start++;
+
+ SmartUtil::tstring::size_type end = tmp.find_first_of(_T(" >\t\r\n"), start + 1);
+ if(end == SmartUtil::tstring::npos)
+ end = tmp.size();
+
+ return tmp.substr(start, end-start);
+}
+
+SmartUtil::tstring WidgetTextBoxBase::getSelection() const
+{
+ DWORD start, end;
+ this->sendMessage( EM_GETSEL, reinterpret_cast< WPARAM >( & start ), reinterpret_cast< LPARAM >( & end ) );
+ SmartUtil::tstring retVal = this->getText().substr( start, end - start );
+ return retVal;
+}
+
+ScreenCoordinate WidgetTextBox::getContextMenuPos() {
+ RECT rc;
+ ::GetClientRect(this->handle(), &rc);
+ return ClientCoordinate (Point(rc.right/2, rc.bottom/2), this);
+}
+
+}
Modified: dcplusplus/trunk/win32/HubFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/HubFrame.cpp 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/win32/HubFrame.cpp 2008-02-02 22:09:23 UTC (rev 984)
@@ -880,8 +880,8 @@
speak(SET_WINDOW_TITLE, hubName);
}
-void HubFrame::on(Message, Client*, const OnlineUser& from, const string& msg) throw() {
- speak(ADD_CHAT_LINE, Util::formatMessage(from.getIdentity().getNick(), msg));
+void HubFrame::on(Message, Client*, const OnlineUser& from, const string& msg, bool thirdPerson) throw() {
+ speak(ADD_CHAT_LINE, Util::formatMessage(from.getIdentity().getNick(), msg, thirdPerson));
}
void HubFrame::on(StatusMessage, Client*, const string& line) throw() {
@@ -898,8 +898,8 @@
}
}
-void HubFrame::on(PrivateMessage, Client*, const OnlineUser& from, const OnlineUser& to, const OnlineUser& replyTo, const string& line) throw() {
- speak(from, to, replyTo, Util::formatMessage(from.getIdentity().getNick(), line));
+void HubFrame::on(PrivateMessage, Client*, const OnlineUser& from, const OnlineUser& to, const OnlineUser& replyTo, const string& line, bool thirdPerson) throw() {
+ speak(from, to, replyTo, Util::formatMessage(from.getIdentity().getNick(), line, thirdPerson));
}
void HubFrame::on(NickTaken, Client*) throw() {
Modified: dcplusplus/trunk/win32/HubFrame.h
===================================================================
--- dcplusplus/trunk/win32/HubFrame.h 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/win32/HubFrame.h 2008-02-02 22:09:23 UTC (rev 984)
@@ -274,9 +274,9 @@
virtual void on(Failed, Client*, const string&) throw();
virtual void on(GetPassword, Client*) throw();
virtual void on(HubUpdated, Client*) throw();
- virtual void on(Message, Client*, const OnlineUser&, const string&) throw();
+ virtual void on(Message, Client*, const OnlineUser&, const string&, bool = false) throw();
virtual void on(StatusMessage, Client*, const string&) throw();
- virtual void on(PrivateMessage, Client*, const OnlineUser&, const OnlineUser&, const OnlineUser&, const string&) throw();
+ virtual void on(PrivateMessage, Client*, const OnlineUser&, const OnlineUser&, const OnlineUser&, const string&, bool = false) throw();
virtual void on(NickTaken, Client*) throw();
virtual void on(SearchFlood, Client*, const string&) throw();
};
Modified: dcplusplus/trunk/win32/TransferView.cpp
===================================================================
--- dcplusplus/trunk/win32/TransferView.cpp 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/win32/TransferView.cpp 2008-02-02 22:09:23 UTC (rev 984)
@@ -147,7 +147,6 @@
void TransferView::handleTabSelected() {
int i = tabs->getSelectedIndex();
- dcdebug("Setting %d visible\n", i);
if(i == 0) {
::ShowWindow(downloadsWindow->handle(), SW_HIDE);
::ShowWindow(connectionsWindow->handle(), SW_SHOW);
@@ -165,11 +164,11 @@
void TransferView::layout() {
tabs->setBounds(SmartWin::Point(0,0), getClientAreaSize());
SmartWin::Rectangle rect = tabs->getUsableArea(true);
- dcdebug("Setting rect %u, %u, %u, %u\n", rect.pos.x, rect.pos.y, rect.size.x, rect.size.y);
+
connectionsWindow->setBounds(rect);
- connections->setBounds(connectionsWindow->getBounds(true));
+ connections->setBounds(SmartWin::Rectangle(connectionsWindow->getClientAreaSize()));
downloadsWindow->setBounds(rect);
- downloads->setBounds(downloadsWindow->getBounds(true));
+ downloads->setBounds(SmartWin::Rectangle(downloadsWindow->getClientAreaSize()));
}
void TransferView::prepareClose() {
Modified: dcplusplus/trunk/win32/po/da.po
===================================================================
--- dcplusplus/trunk/win32/po/da.po 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/win32/po/da.po 2008-02-02 22:09:23 UTC (rev 984)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: win32\n"
"Report-Msgid-Bugs-To: dcp...@li...\n"
-"POT-Creation-Date: 2008-02-02 00:46+0100\n"
+"POT-Creation-Date: 2008-02-02 21:32+0100\n"
"Last-Translator: <g2...@us...>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -21,7 +21,7 @@
"Open download page?"
msgstr "�n Download Stien"
-#: win32/TransferView.cpp:570
+#: win32/TransferView.cpp:569
#, boost-format
msgid "%1% (%2$0.2f)"
msgstr ""
@@ -55,7 +55,7 @@
msgstr[0] "Ingen bruger(e)"
msgstr[1] "Ingen bruger(e)"
-#: win32/TransferView.cpp:584 win32/TransferView.cpp:632
+#: win32/TransferView.cpp:583 win32/TransferView.cpp:631
#, boost-format
msgid "%1%/s"
msgstr ""
@@ -100,7 +100,7 @@
msgid "&Connect"
msgstr "Forbindelsen oprettet"
-#: win32/TransferView.cpp:201
+#: win32/TransferView.cpp:200
#, fuzzy
msgid "&Disconnect"
msgstr "Hurtigt Forbind"
@@ -129,7 +129,7 @@
msgid "&File"
msgstr "Fil"
-#: win32/TransferView.cpp:198
+#: win32/TransferView.cpp:197
msgid "&Force attempt"
msgstr ""
@@ -563,12 +563,12 @@
msgid "Connected"
msgstr "Forbindelsen oprettet"
-#: win32/TransferView.cpp:641 win32/TransferView.cpp:648
+#: win32/TransferView.cpp:640 win32/TransferView.cpp:647
#, fuzzy
msgid "Connecting"
msgstr "Forbindelse"
-#: win32/TransferView.cpp:285
+#: win32/TransferView.cpp:284
#, fuzzy
msgid "Connecting (forced)"
msgstr "Forbindelsen oprettet"
@@ -596,7 +596,7 @@
msgid "Copy &address to clipboard"
msgstr "Kopi�MAGNET link til Udklipsholderen"
-#: win32/TransferView.cpp:199 win32/HubFrame.cpp:1160
+#: win32/TransferView.cpp:198 win32/HubFrame.cpp:1160
#, fuzzy
msgid "Copy &nick to clipboard"
msgstr "Kopi�MAGNET link til Udklipsholderen"
@@ -782,12 +782,12 @@
msgid "Downloaded"
msgstr "Downloaded"
-#: win32/TransferView.cpp:719
+#: win32/TransferView.cpp:718
#, fuzzy, boost-format
msgid "Downloading %1%"
msgstr "Downloader..."
-#: win32/TransferView.cpp:630
+#: win32/TransferView.cpp:629
#, boost-format
msgid "Downloading from %1% user"
msgid_plural "Downloading from %1% users"
@@ -1140,7 +1140,7 @@
msgid "IP: %1%, Port: %2%/%3%/%4%"
msgstr ""
-#: win32/TransferView.cpp:536 win32/TransferView.cpp:832
+#: win32/TransferView.cpp:535 win32/TransferView.cpp:831
msgid "Idle"
msgstr ""
@@ -1709,7 +1709,7 @@
msgid "Reliability"
msgstr "P�delighed"
-#: win32/QueueFrame.cpp:483 win32/TransferView.cpp:660
+#: win32/QueueFrame.cpp:483 win32/TransferView.cpp:659
msgid "Remote client does not fully support TTH - cannot download"
msgstr "Fjernklienten har ikke TTH - st�kan ikke downloade!"
@@ -2015,7 +2015,7 @@
msgid "TTH Root"
msgstr "TTH Rod"
-#: win32/TransferView.cpp:671
+#: win32/TransferView.cpp:670
#, boost-format
msgid "TTH: %1%"
msgstr ""
@@ -2140,7 +2140,7 @@
msgid "Upload: %1%, Download: %2%"
msgstr ""
-#: win32/TransferView.cpp:797
+#: win32/TransferView.cpp:796
#, fuzzy, boost-format
msgid "Uploading %1%"
msgstr "Oploads"
@@ -2229,12 +2229,12 @@
msgid "Waiting Users"
msgstr "Venter p�rugere"
-#: win32/TransferView.cpp:626
+#: win32/TransferView.cpp:625
#, fuzzy
msgid "Waiting for slot"
msgstr "Venter p�rugere"
-#: win32/TransferView.cpp:648
+#: win32/TransferView.cpp:647
#, fuzzy
msgid "Waiting to retry"
msgstr "Venter p�rugere"
@@ -2259,7 +2259,7 @@
"or from Microsoft directly."
msgstr ""
-#: win32/TransferView.cpp:673
+#: win32/TransferView.cpp:672
#, fuzzy
msgid "file list"
msgstr "Filliste Menu"
Modified: dcplusplus/trunk/win32/po/fr.po
===================================================================
--- dcplusplus/trunk/win32/po/fr.po 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/win32/po/fr.po 2008-02-02 22:09:23 UTC (rev 984)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: win32\n"
"Report-Msgid-Bugs-To: dcp...@li...\n"
-"POT-Creation-Date: 2008-02-02 00:46+0100\n"
+"POT-Creation-Date: 2008-02-02 21:32+0100\n"
"Last-Translator: <sp...@us...>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -21,7 +21,7 @@
"Open download page?"
msgstr "Ouvrir le répertoire des téléchargements"
-#: win32/TransferView.cpp:570
+#: win32/TransferView.cpp:569
#, boost-format
msgid "%1% (%2$0.2f)"
msgstr ""
@@ -55,7 +55,7 @@
msgstr[0] "Pas d'utilisateur"
msgstr[1] "Pas d'utilisateur"
-#: win32/TransferView.cpp:584 win32/TransferView.cpp:632
+#: win32/TransferView.cpp:583 win32/TransferView.cpp:631
#, boost-format
msgid "%1%/s"
msgstr ""
@@ -101,7 +101,7 @@
msgid "&Connect"
msgstr "Connecté"
-#: win32/TransferView.cpp:201
+#: win32/TransferView.cpp:200
#, fuzzy
msgid "&Disconnect"
msgstr "Connexion Rapide"
@@ -131,7 +131,7 @@
msgid "&File"
msgstr "Fichier"
-#: win32/TransferView.cpp:198
+#: win32/TransferView.cpp:197
msgid "&Force attempt"
msgstr ""
@@ -576,12 +576,12 @@
msgid "Connected"
msgstr "Connecté"
-#: win32/TransferView.cpp:641 win32/TransferView.cpp:648
+#: win32/TransferView.cpp:640 win32/TransferView.cpp:647
#, fuzzy
msgid "Connecting"
msgstr "Connexion"
-#: win32/TransferView.cpp:285
+#: win32/TransferView.cpp:284
#, fuzzy
msgid "Connecting (forced)"
msgstr "Connecté"
@@ -609,7 +609,7 @@
msgid "Copy &address to clipboard"
msgstr "Copier lien Magnet"
-#: win32/TransferView.cpp:199 win32/HubFrame.cpp:1160
+#: win32/TransferView.cpp:198 win32/HubFrame.cpp:1160
#, fuzzy
msgid "Copy &nick to clipboard"
msgstr "Copier lien Magnet"
@@ -794,12 +794,12 @@
msgid "Downloaded"
msgstr "Téléchargé"
-#: win32/TransferView.cpp:719
+#: win32/TransferView.cpp:718
#, fuzzy, boost-format
msgid "Downloading %1%"
msgstr "Téléchargement..."
-#: win32/TransferView.cpp:630
+#: win32/TransferView.cpp:629
#, boost-format
msgid "Downloading from %1% user"
msgid_plural "Downloading from %1% users"
@@ -1154,7 +1154,7 @@
msgid "IP: %1%, Port: %2%/%3%/%4%"
msgstr ""
-#: win32/TransferView.cpp:536 win32/TransferView.cpp:832
+#: win32/TransferView.cpp:535 win32/TransferView.cpp:831
msgid "Idle"
msgstr ""
@@ -1724,7 +1724,7 @@
msgid "Reliability"
msgstr "Fiabilité"
-#: win32/QueueFrame.cpp:483 win32/TransferView.cpp:660
+#: win32/QueueFrame.cpp:483 win32/TransferView.cpp:659
msgid "Remote client does not fully support TTH - cannot download"
msgstr ""
"Le client distant ne supporte pas complètement la hache TTH - ne peut pas "
@@ -2032,7 +2032,7 @@
msgid "TTH Root"
msgstr "Racine TTH"
-#: win32/TransferView.cpp:671
+#: win32/TransferView.cpp:670
#, boost-format
msgid "TTH: %1%"
msgstr ""
@@ -2159,7 +2159,7 @@
msgid "Upload: %1%, Download: %2%"
msgstr ""
-#: win32/TransferView.cpp:797
+#: win32/TransferView.cpp:796
#, fuzzy, boost-format
msgid "Uploading %1%"
msgstr "Envois"
@@ -2250,12 +2250,12 @@
msgid "Waiting Users"
msgstr "Utilisateurs en attente"
-#: win32/TransferView.cpp:626
+#: win32/TransferView.cpp:625
#, fuzzy
msgid "Waiting for slot"
msgstr "Utilisateurs en attente"
-#: win32/TransferView.cpp:648
+#: win32/TransferView.cpp:647
#, fuzzy
msgid "Waiting to retry"
msgstr "Utilisateurs en attente"
@@ -2280,7 +2280,7 @@
"or from Microsoft directly."
msgstr ""
-#: win32/TransferView.cpp:673
+#: win32/TransferView.cpp:672
#, fuzzy
msgid "file list"
msgstr "Menu liste de fichiers"
Modified: dcplusplus/trunk/win32/po/id.po
===================================================================
--- dcplusplus/trunk/win32/po/id.po 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/win32/po/id.po 2008-02-02 22:09:23 UTC (rev 984)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: win32\n"
"Report-Msgid-Bugs-To: dcp...@li...\n"
-"POT-Creation-Date: 2008-02-02 00:46+0100\n"
+"POT-Creation-Date: 2008-02-02 21:32+0100\n"
"Last-Translator: <dod...@us...>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -21,7 +21,7 @@
"Open download page?"
msgstr "Buka direktori unduh"
-#: win32/TransferView.cpp:570
+#: win32/TransferView.cpp:569
#, boost-format
msgid "%1% (%2$0.2f)"
msgstr ""
@@ -55,7 +55,7 @@
msgstr[0] "Tak ada pengguna"
msgstr[1] "Tak ada pengguna"
-#: win32/TransferView.cpp:584 win32/TransferView.cpp:632
+#: win32/TransferView.cpp:583 win32/TransferView.cpp:631
#, boost-format
msgid "%1%/s"
msgstr ""
@@ -101,7 +101,7 @@
msgid "&Connect"
msgstr "Tersambung"
-#: win32/TransferView.cpp:201
+#: win32/TransferView.cpp:200
#, fuzzy
msgid "&Disconnect"
msgstr "Hubung Cepat"
@@ -131,7 +131,7 @@
msgid "&File"
msgstr "Arsip"
-#: win32/TransferView.cpp:198
+#: win32/TransferView.cpp:197
msgid "&Force attempt"
msgstr ""
@@ -567,12 +567,12 @@
msgid "Connected"
msgstr "Tersambung"
-#: win32/TransferView.cpp:641 win32/TransferView.cpp:648
+#: win32/TransferView.cpp:640 win32/TransferView.cpp:647
#, fuzzy
msgid "Connecting"
msgstr "Sambungan"
-#: win32/TransferView.cpp:285
+#: win32/TransferView.cpp:284
#, fuzzy
msgid "Connecting (forced)"
msgstr "Tersambung"
@@ -600,7 +600,7 @@
msgid "Copy &address to clipboard"
msgstr "Salin pautan magnet ke clipboard"
-#: win32/TransferView.cpp:199 win32/HubFrame.cpp:1160
+#: win32/TransferView.cpp:198 win32/HubFrame.cpp:1160
#, fuzzy
msgid "Copy &nick to clipboard"
msgstr "Salin pautan magnet ke clipboard"
@@ -786,12 +786,12 @@
msgid "Downloaded"
msgstr "Telah Diunduh"
-#: win32/TransferView.cpp:719
+#: win32/TransferView.cpp:718
#, fuzzy, boost-format
msgid "Downloading %1%"
msgstr "Mengunduh..."
-#: win32/TransferView.cpp:630
+#: win32/TransferView.cpp:629
#, boost-format
msgid "Downloading from %1% user"
msgid_plural "Downloading from %1% users"
@@ -1143,7 +1143,7 @@
msgid "IP: %1%, Port: %2%/%3%/%4%"
msgstr ""
-#: win32/TransferView.cpp:536 win32/TransferView.cpp:832
+#: win32/TransferView.cpp:535 win32/TransferView.cpp:831
msgid "Idle"
msgstr ""
@@ -1721,7 +1721,7 @@
msgid "Reliability"
msgstr "Kehandalan"
-#: win32/QueueFrame.cpp:483 win32/TransferView.cpp:660
+#: win32/QueueFrame.cpp:483 win32/TransferView.cpp:659
msgid "Remote client does not fully support TTH - cannot download"
msgstr ""
@@ -2025,7 +2025,7 @@
msgid "TTH Root"
msgstr "TTH Root"
-#: win32/TransferView.cpp:671
+#: win32/TransferView.cpp:670
#, boost-format
msgid "TTH: %1%"
msgstr ""
@@ -2146,7 +2146,7 @@
msgid "Upload: %1%, Download: %2%"
msgstr ""
-#: win32/TransferView.cpp:797
+#: win32/TransferView.cpp:796
#, fuzzy, boost-format
msgid "Uploading %1%"
msgstr "Unggahan"
@@ -2236,11 +2236,11 @@
msgid "Waiting Users"
msgstr "Menunggu (Pengguna online)"
-#: win32/TransferView.cpp:626
+#: win32/TransferView.cpp:625
msgid "Waiting for slot"
msgstr ""
-#: win32/TransferView.cpp:648
+#: win32/TransferView.cpp:647
msgid "Waiting to retry"
msgstr ""
@@ -2264,7 +2264,7 @@
"or from Microsoft directly."
msgstr ""
-#: win32/TransferView.cpp:673
+#: win32/TransferView.cpp:672
#, fuzzy
msgid "file list"
msgstr "Menu Daftar arsip"
Modified: dcplusplus/trunk/win32/po/it.po
===================================================================
--- dcplusplus/trunk/win32/po/it.po 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/win32/po/it.po 2008-02-02 22:09:23 UTC (rev 984)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: win32\n"
"Report-Msgid-Bugs-To: dcp...@li...\n"
-"POT-Creation-Date: 2008-02-02 00:46+0100\n"
+"POT-Creation-Date: 2008-02-02 21:32+0100\n"
"Last-Translator: <vec...@us...>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -21,7 +21,7 @@
"Open download page?"
msgstr "Apri cartella download"
-#: win32/TransferView.cpp:570
+#: win32/TransferView.cpp:569
#, boost-format
msgid "%1% (%2$0.2f)"
msgstr ""
@@ -55,7 +55,7 @@
msgstr[0] "Nessun utente"
msgstr[1] "Nessun utente"
-#: win32/TransferView.cpp:584 win32/TransferView.cpp:632
+#: win32/TransferView.cpp:583 win32/TransferView.cpp:631
#, boost-format
msgid "%1%/s"
msgstr ""
@@ -101,7 +101,7 @@
msgid "&Connect"
msgstr "Connesso"
-#: win32/TransferView.cpp:201
+#: win32/TransferView.cpp:200
#, fuzzy
msgid "&Disconnect"
msgstr "Connessione Rapida"
@@ -131,7 +131,7 @@
msgid "&File"
msgstr "File"
-#: win32/TransferView.cpp:198
+#: win32/TransferView.cpp:197
msgid "&Force attempt"
msgstr ""
@@ -566,12 +566,12 @@
msgid "Connected"
msgstr "Connesso"
-#: win32/TransferView.cpp:641 win32/TransferView.cpp:648
+#: win32/TransferView.cpp:640 win32/TransferView.cpp:647
#, fuzzy
msgid "Connecting"
msgstr "Connessione"
-#: win32/TransferView.cpp:285
+#: win32/TransferView.cpp:284
#, fuzzy
msgid "Connecting (forced)"
msgstr "Connesso"
@@ -599,7 +599,7 @@
msgid "Copy &address to clipboard"
msgstr "Copia link MAGNET negli appunti"
-#: win32/TransferView.cpp:199 win32/HubFrame.cpp:1160
+#: win32/TransferView.cpp:198 win32/HubFrame.cpp:1160
#, fuzzy
msgid "Copy &nick to clipboard"
msgstr "Copia link MAGNET negli appunti"
@@ -784,12 +784,12 @@
msgid "Downloaded"
msgstr "Scaricati"
-#: win32/TransferView.cpp:719
+#: win32/TransferView.cpp:718
#, fuzzy, boost-format
msgid "Downloading %1%"
msgstr "Download in corso..."
-#: win32/TransferView.cpp:630
+#: win32/TransferView.cpp:629
#, boost-format
msgid "Downloading from %1% user"
msgid_plural "Downloading from %1% users"
@@ -1141,7 +1141,7 @@
msgid "IP: %1%, Port: %2%/%3%/%4%"
msgstr ""
-#: win32/TransferView.cpp:536 win32/TransferView.cpp:832
+#: win32/TransferView.cpp:535 win32/TransferView.cpp:831
msgid "Idle"
msgstr ""
@@ -1710,7 +1710,7 @@
msgid "Reliability"
msgstr "Affidabilità"
-#: win32/QueueFrame.cpp:483 win32/TransferView.cpp:660
+#: win32/QueueFrame.cpp:483 win32/TransferView.cpp:659
msgid "Remote client does not fully support TTH - cannot download"
msgstr "Il client remoto non supporta il TTH - impossibile il download"
@@ -2012,7 +2012,7 @@
msgid "TTH Root"
msgstr "Radice TTH"
-#: win32/TransferView.cpp:671
+#: win32/TransferView.cpp:670
#, boost-format
msgid "TTH: %1%"
msgstr ""
@@ -2141,7 +2141,7 @@
msgid "Upload: %1%, Download: %2%"
msgstr ""
-#: win32/TransferView.cpp:797
+#: win32/TransferView.cpp:796
#, fuzzy, boost-format
msgid "Uploading %1%"
msgstr "Uploads"
@@ -2230,12 +2230,12 @@
msgid "Waiting Users"
msgstr "In attesa di Utenti"
-#: win32/TransferView.cpp:626
+#: win32/TransferView.cpp:625
#, fuzzy
msgid "Waiting for slot"
msgstr "In attesa di Utenti"
-#: win32/TransferView.cpp:648
+#: win32/TransferView.cpp:647
#, fuzzy
msgid "Waiting to retry"
msgstr "In attesa di Utenti"
@@ -2264,7 +2264,7 @@
"l'interfaccia. Si prega di scaricare la versione 5.80 o successive dalla "
"pagina web di DC++ o dal sito Microsoft."
-#: win32/TransferView.cpp:673
+#: win32/TransferView.cpp:672
#, fuzzy
msgid "file list"
msgstr "Menu Elenco File"
Modified: dcplusplus/trunk/win32/po/km.po
===================================================================
--- dcplusplus/trunk/win32/po/km.po 2008-02-02 00:05:24 UTC (rev 983)
+++ dcplusplus/trunk/win32/po/km.po 2008-02-02 22:09:23 UTC (rev 984)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: win32\n"
"Report-Msgid-Bugs-To: dcp...@li...\n"
-"POT-Creation-Date: 2008-02-02 00:46+0100\n"
+"POT-Creation-Date: 2008-02-02 21:32+0100\n"
"Last-Translator: <Vey...@us...>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -21,7 +21,7 @@
"Open download page?"
msgstr "បើកថតក្រូណូទាញយក"
-#: win32/TransferView.cpp:570
+#: win32/TransferView.cpp:569
#, boost-format
msgid "%1% (%2$0.2f)"
msgstr ""
@@ -55,7 +55,7 @@
msgstr[0] "គ្មានអ្នកប្រើ"
msgstr[1] "គ្មានអ្នកប្រើ"
-#: win32/TransferView.cpp:584 win32/TransferView.cpp:632
+#: win32/TransferView.cpp:583 win32/TransferView.cpp:631
#, boost-format
msgid "%1%/s"
msgstr ""
@@ -101,7 +101,7 @@
msgid "&Connect"
msgstr "បានតភ្ជាប់"
-#: win32/TransferView.cpp:201
+#: win32/TransferView.cpp:200
#, fuzzy
msgid "&Disconnect"
msgstr "តភ្ជាប់រហ័ស"
@@ -131,7 +131,7 @@
msgid "&File"
msgstr "ឯកសារ"
-#: win32/TransferView.cpp:198
+#: win32/TransferView.cpp:197
msgid "&Force attempt"
msgstr ""
@@ -563,12 +563,12 @@
msgid "Connected"
msgstr "បានតភ្ជាប់"
-#: win32/TransferView.cpp:641 win32/TransferView.cpp:648
+#: win32/TransferView.cpp:640 win32/TransferView.cpp:647
#, fuzzy
msgid "Connecting"
msgstr "ការតភ្ជាប់"
-#: win32/TransferView.cpp:285
+#: win32/TransferView.cpp:284
#, fuzzy
msgid "Connecting (forced)"
msgstr "បានតភ្ជាប់"
@@ -596,7 +596,7 @@
msgid "Copy &address to clipboard"
msgstr "ចម្លងតំណទាក់ចិត្ត ទៅក្តារតម្បៀតខ្ទាស់"
-#: win32/TransferView.cpp:199 win32/HubFrame.cpp:1160
+#: win32/TransferView.cpp:198 win32/HubFrame.cpp:1160
#, fuzzy
msgid "Copy &nick to clipboard"
msgstr "ចម្លងតំណទាក់ចិត្ត ទៅក្តារតម្បៀតខ្ទាស់"
@@ -779,12 +779,12 @@
msgid "Downloaded"
msgstr "បានទាញយក"
-#: win32/TransferView.cpp:719
+#: win32/TransferView.cpp:718
#, fuzzy, boost-format
msgid "Downloading %1%"
msgstr "កំពុងទាញយក..."
-#: win32/TransferView.cpp:630
+#: win32/TransferView.cpp:629
#, boost-format
msgid "Downloading from %1% user"
msgid_plural "Downloading from %1% users"
@@ -1134,7 +1134,7 @@
msgid "IP: %1%, Port: %2%/%3%/%4%"
msgstr ""
-#: win32/TransferView.cpp:536 win32/TransferView.cpp:832
+#: win32/TransferView.cpp:535 win32/TransferView.cpp:831
msgid "Idle"
msgstr ""
@@ -1701,7 +1701,7 @@
msgid "Reliability"
msgstr "ភាពអាចទុកចិត្តបាន"
-#: win32/QueueFrame.cpp:483 win32/TransferView.cpp:660
+#: win3...
[truncated message content] |
|
From: <arn...@us...> - 2008-02-02 23:28:29
|
Revision: 985
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=985&view=rev
Author: arnetheduck
Date: 2008-02-02 15:28:26 -0800 (Sat, 02 Feb 2008)
Log Message:
-----------
fix waiting users, don't build i18n by default in debug builds
Modified Paths:
--------------
dcplusplus/trunk/SConstruct
dcplusplus/trunk/build_util.py
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/UploadManager.cpp
Modified: dcplusplus/trunk/SConstruct
===================================================================
--- dcplusplus/trunk/SConstruct 2008-02-02 22:09:23 UTC (rev 984)
+++ dcplusplus/trunk/SConstruct 2008-02-02 23:28:26 UTC (rev 985)
@@ -12,6 +12,7 @@
BoolOption('verbose', 'Show verbose command lines', 'no'),
BoolOption('savetemps', 'Save intermediate compilation files (assembly output)', 'no'),
BoolOption('unicode', 'Build a Unicode version which fully supports international characters', 'yes'),
+ BoolOption('i18n', 'Rebuild i18n files in debug build', 'no'),
('prefix', 'Prefix to use when cross compiling', 'i386-mingw32-')
)
@@ -172,3 +173,4 @@
dev.client = dev.build('dcpp/')
dev.smartwin = dev.build('smartwin/')
dev.win32 = dev.build('win32/')
+
Modified: dcplusplus/trunk/build_util.py
===================================================================
--- dcplusplus/trunk/build_util.py 2008-02-02 22:09:23 UTC (rev 984)
+++ dcplusplus/trunk/build_util.py 2008-02-02 23:28:26 UTC (rev 985)
@@ -75,6 +75,9 @@
return local_env.SConscript(source_path + 'SConscript', exports={'dev' : self, 'source_path' : full_path })
def i18n (self, source_path, buildenv, sources, name):
+ if self.env['mode'] != 'release' and not self.env['i18n']:
+ return
+
p_oze = glob.glob('po/*.po')
languages = [ os.path.basename(po).replace ('.po', '') for po in p_oze ]
potfile = 'po/' + name + '.pot'
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-02-02 22:09:23 UTC (rev 984)
+++ dcplusplus/trunk/changelog.txt 2008-02-02 23:28:26 UTC (rev 985)
@@ -18,6 +18,7 @@
* Allow spaces in the description field (poy)
* [ADC] Handle third person formatting (thanks poy)
* Fix right-click issue when chat history is long (thanks poy)
+* In waiting users, show requested chunk (since we can't know % done)
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
Modified: dcplusplus/trunk/dcpp/UploadManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/UploadManager.cpp 2008-02-02 22:09:23 UTC (rev 984)
+++ dcplusplus/trunk/dcpp/UploadManager.cpp 2008-02-02 23:28:26 UTC (rev 985)
@@ -174,7 +174,7 @@
tFile = ShareManager::getInstance()->toVirtual(TTHValue(aFile.substr(4)));
addFailedUpload(aSource, tFile +
- " (" + Util::toString((aStartPos*1000/(size+10))/10.0)+"% of " + Util::formatBytes(size) + " done)");
+ " (" + Util::formatBytes(aStartPos) + " - " + Util::formatBytes(aStartPos + aBytes) + ")");
aSource.disconnect();
return false;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <arn...@us...> - 2008-02-03 16:12:28
|
Revision: 986
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=986&view=rev
Author: arnetheduck
Date: 2008-02-03 08:11:52 -0800 (Sun, 03 Feb 2008)
Log Message:
-----------
Crash fixes
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/DownloadManager.cpp
dcplusplus/trunk/dcpp/MerkleTree.h
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2008-02-02 23:28:26 UTC (rev 985)
+++ dcplusplus/trunk/changelog.txt 2008-02-03 16:11:52 UTC (rev 986)
@@ -19,6 +19,8 @@
* [ADC] Handle third person formatting (thanks poy)
* Fix right-click issue when chat history is long (thanks poy)
* In waiting users, show requested chunk (since we can't know % done)
+* Fixed crash when download connection was disconnected before any data was received
+* Fixed crash due to race condition on idle check (thans bigmuscle)
-- 0.704 2007-12-14 --
* Hub lists added to utilize Coral's distributed network (ullner)
Modified: dcplusplus/trunk/dcpp/DownloadManager.cpp
===================================================================
--- dcplusplus/trunk/dcpp/DownloadManager.cpp 2008-02-02 23:28:26 UTC (rev 985)
+++ dcplusplus/trunk/dcpp/DownloadManager.cpp 2008-02-03 16:11:52 UTC (rev 986)
@@ -471,6 +471,12 @@
}
void DownloadManager::failDownload(UserConnection* aSource, const string& reason) {
+
+ {
+ Lock l(cs);
+ idlers.erase(remove(idlers.begin(), idlers.end(), aSource), idlers.end());
+ }
+
Download* d = aSource->getDownload();
if(d) {
@@ -479,7 +485,10 @@
QueueManager::getInstance()->putDownload(d, false);
}
- removeConnection(aSource);
+
+ dcassert(aSource->getDownload() == NULL);
+ aSource->removeListener(this);
+ aSource->disconnect();
}
void DownloadManager::removeDownload(Download* d) {
Modified: dcplusplus/trunk/dcpp/MerkleTree.h
===================================================================
--- dcplusplus/trunk/dcpp/MerkleTree.h 2008-02-02 23:28:26 UTC (rev 985)
+++ dcplusplus/trunk/dcpp/MerkleTree.h 2008-02-03 16:11:52 UTC (rev 986)
@@ -114,6 +114,10 @@
}
uint8_t* finalize() {
+ // No updates yet, make sure we have at least one leaf for 0-length files...
+ if(leaves.empty() && blocks.empty()) {
+ update(0, 0);
+ }
while(blocks.size() > 1) {
MerkleBlock& a = blocks[blocks.size()-2];
MerkleBlock& b = blocks[blocks.size()-1];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|