diff --git a/Changelog b/Changelog index 4afb0e38c..02b64000c 100644 --- a/Changelog +++ b/Changelog @@ -33,6 +33,8 @@ - FEATURE: Allow to drag 'n drop urls on the main window - FEATURE: Improved search engine (multipage support in all plugins) - FEATURE: Added BTJunkie search engine plugin + - FEATURE: Added an option to force full disk allocation for all torrents + - FEATURE: Added an option to add torrents in paused state - I18N: Added Hungarian translation - I18N: Added Brazilian translation - BUGFIX: Progress of paused torrents is now correct on restart @@ -57,7 +59,7 @@ - BUGFIX: ETA was wrong for torrents with filtered files - BUGFIX: Fixed drag'n drop on non-KDE systems - COSMETIC: Redesigned torrent properties a little - - COSMETIC: Redesigned options a little + - COSMETIC: Totally redesigned program preferences - COSMETIC: Display more logs messages concerning features - COSMETIC: Improved lists renderers - COSMETIC: Use a different icon for torrents being checked and for connecting ones diff --git a/TODO b/TODO index 7ef23cf22..a5d72d5b3 100644 --- a/TODO +++ b/TODO @@ -84,7 +84,7 @@ LANGUAGES UPDATED: - Spanish *BETA5* - German *BETA6* - Russian *BETA6* -- Korean *BETA5* +- Korean *BETA6* - Greek *BETA6* - Dutch *BETA5* - Romanian *BETA5* @@ -97,6 +97,9 @@ beta6->beta7 changelog: - FEATURE: Added zip support in search plugins manager (can put .py & .png inside) - FEATURE: Redesigned torrent creation dialog - FEATURE: Allow to set piece size when creating a torrent +- FEATURE: Added an option to force full disk allocation for all torrents +- FEATURE: Added an option to add torrents in paused state +- FEATURE: Allow to disable UPnP/NAT-PMP/LSD - BUGFIX: In torrent content, it is now easier to filter all torrents using right click menu - BUGFIX: Updated man page / README / INSTALL - BUGFIX: Paused torrents could be displayed as connected for a sec after checking @@ -112,3 +115,4 @@ beta6->beta7 changelog: - BUGFIX: Dropped Qt4.2 support, becomes too difficult to maintain - BUGFIX: Fixed deprecation warning with latest libtorrent svn - COSMETIC: Improved some icons +- COSMETIC: Totally redesigned program preferences diff --git a/src/FinishedTorrents.cpp b/src/FinishedTorrents.cpp index 995f410ef..6dc947e7b 100644 --- a/src/FinishedTorrents.cpp +++ b/src/FinishedTorrents.cpp @@ -314,7 +314,7 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){ // Enable/disable pause/start action given the DL state QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes(); QSettings settings("qBittorrent", "qBittorrent"); - QString previewProgram = settings.value("Options/Misc/PreviewProgram", QString()).toString(); + QString previewProgram = settings.value("Preferences/general/MediaPlayer", QString()).toString(); bool has_pause = false, has_start = false, has_preview = false; foreach(index, selectedIndexes) { if(index.column() == F_NAME) { diff --git a/src/GUI.cpp b/src/GUI.cpp index 947740c22..cc45dcefe 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -60,7 +60,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), for setupUi(this); setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(QString::fromUtf8(VERSION))); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); - systrayIntegration = settings.value(QString::fromUtf8("Options/Misc/Behaviour/SystrayIntegration"), true).toBool(); + systrayIntegration = settings.value(QString::fromUtf8("Preferences/General/SystrayEnabled"), true).toBool(); // Create tray icon if (QSystemTrayIcon::isSystemTrayAvailable()) { if(systrayIntegration) { @@ -243,7 +243,7 @@ void GUI::finishedTorrent(QTorrentHandle& h) const { QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); bool show_msg = true; QString fileName = h.name(); - int useOSD = settings.value(QString::fromUtf8("Options/OSDEnabled"), 1).toInt(); + bool useNotificationBalloons = settings.value(QString::fromUtf8("Preferences/General/NotificationBaloons"), true).toBool(); // Add it to finished tab QString hash = h.hash(); if(QFile::exists(misc::qBittorrentPath()+QString::fromUtf8("BT_backup")+QDir::separator()+hash+QString::fromUtf8(".finished"))) { @@ -254,7 +254,7 @@ void GUI::finishedTorrent(QTorrentHandle& h) const { downloadingTorrentTab->setInfoBar(tr("%1 has finished downloading.", "e.g: xxx.avi has finished downloading.").arg(fileName)); downloadingTorrentTab->deleteTorrent(hash); finishedTorrentTab->addTorrent(hash); - if(show_msg && systrayIntegration && (useOSD == 1 || (useOSD == 2 && (isMinimized() || isHidden())))) { + if(show_msg && systrayIntegration && useNotificationBalloons) { myTrayIcon->showMessage(tr("Download finished"), tr("%1 has finished downloading.", "e.g: xxx.avi has finished downloading.").arg(fileName), QSystemTrayIcon::Information, TIME_TRAY_BALLOON); } } @@ -262,8 +262,8 @@ void GUI::finishedTorrent(QTorrentHandle& h) const { // Notification when disk is full void GUI::fullDiskError(QTorrentHandle& h) const { QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); - int useOSD = settings.value(QString::fromUtf8("Options/OSDEnabled"), 1).toInt(); - if(systrayIntegration && (useOSD == 1 || (useOSD == 2 && (isMinimized() || isHidden())))) { + bool useNotificationBalloons = settings.value(QString::fromUtf8("Preferences/General/NotificationBaloons"), true).toBool(); + if(systrayIntegration && useNotificationBalloons) { myTrayIcon->showMessage(tr("I/O Error", "i.e: Input/Output Error"), tr("An error occured when trying to read or write %1. The disk is probably full, download has been paused", "e.g: An error occured when trying to read or write xxx.avi. The disk is probably full, download has been paused").arg(h.name()), QSystemTrayIcon::Critical, TIME_TRAY_BALLOON); } // Download will be paused by libtorrent. Updating GUI information accordingly @@ -412,7 +412,7 @@ void GUI::previewFile(QString filePath) { QStringList params; params << tmpPath; QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); - QString previewProgram = settings.value(QString::fromUtf8("Options/Misc/PreviewProgram"), QString()).toString(); + QString previewProgram = settings.value(QString::fromUtf8("Preferences/General/MediaPlayer"), QString()).toString(); previewProcess->start(previewProgram, params, QIODevice::ReadOnly); }else{ QMessageBox::critical(0, tr("Preview process already running"), tr("There is already another preview process running.\nPlease close the other one first.")); @@ -475,13 +475,13 @@ void GUI::on_actionAbout_triggered() { void GUI::closeEvent(QCloseEvent *e) { qDebug("Mainwindow received closeEvent"); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); - bool goToSystrayOnExit = settings.value(QString::fromUtf8("Options/Misc/Behaviour/GoToSystrayOnExit"), false).toBool(); + bool goToSystrayOnExit = settings.value(QString::fromUtf8("Preferences/General/CloseToTray"), false).toBool(); if(!force_exit && systrayIntegration && goToSystrayOnExit && !this->isHidden()) { hide(); e->ignore(); return; } - if(settings.value(QString::fromUtf8("Options/Misc/Behaviour/ConfirmOnExit"), true).toBool() && downloadingTorrentTab->getNbTorrentsInList()) { + if(settings.value(QString::fromUtf8("Preferences/General/ExitConfirm"), true).toBool() && downloadingTorrentTab->getNbTorrentsInList()) { show(); if(!isMaximized()) showNormal(); @@ -518,7 +518,7 @@ void GUI::on_actionCreate_torrent_triggered() { // Called when we minimize the program void GUI::hideEvent(QHideEvent *e) { QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); - if(systrayIntegration && settings.value(QString::fromUtf8("Options/Misc/Behaviour/GoToSystray"), true).toBool() && !e->spontaneous()) { + if(systrayIntegration && settings.value(QString::fromUtf8("Preferences/General/MinimizeToTray"), false).toBool() && !e->spontaneous()) { // Hide window hide(); } @@ -545,9 +545,9 @@ void GUI::dropEvent(QDropEvent *event) { // Add file to download list QString file; QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); - bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Options/Misc/TorrentAdditionDialog/Enabled"), true).toBool(); + bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool(); foreach(file, files) { - file = file.trimmed().replace(QString::fromUtf8("file://"), QString::fromUtf8("")); + file = file.trimmed().replace(QString::fromUtf8("file://"), QString::fromUtf8(""), Qt::CaseInsensitive); qDebug("Dropped file %s on download list", file.toUtf8().data()); if(file.startsWith(QString::fromUtf8("http://"), Qt::CaseInsensitive) || file.startsWith(QString::fromUtf8("ftp://"), Qt::CaseInsensitive) || file.startsWith(QString::fromUtf8("https://"), Qt::CaseInsensitive)) { BTSession->downloadFromUrl(file); @@ -584,16 +584,14 @@ void GUI::dragEnterEvent(QDragEnterEvent *event) { // Display a dialog to allow user to add // torrents to download list void GUI::on_actionOpen_triggered() { - QStringList pathsList; QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); // Open File Open Dialog // Note: it is possible to select more than one file - pathsList = QFileDialog::getOpenFileNames(0, + QStringList pathsList = QFileDialog::getOpenFileNames(0, tr("Open Torrent Files"), settings.value(QString::fromUtf8("MainWindowLastDir"), QDir::homePath()).toString(), tr("Torrent Files")+QString::fromUtf8(" (*.torrent)")); if(!pathsList.empty()) { - QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); - bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Options/Misc/TorrentAdditionDialog/Enabled"), true).toBool(); + bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool(); unsigned int listSize = pathsList.size(); for(unsigned int i=0; isetDefaultSavePath(options->getSavePath()); + // Downloads + BTSession->preAllocateAllFiles(options->preAllocateAllFiles()); + BTSession->startTorrentsInPause(options->addTorrentsInPause()); + // Connection old_listenPort = BTSession->getListenPort(); BTSession->setListeningPortsRange(options->getPorts()); new_listenPort = BTSession->getListenPort(); if(new_listenPort != old_listenPort) { downloadingTorrentTab->setInfoBar(tr("qBittorrent is bind to port: %1", "e.g: qBittorrent is bind to port: 1666").arg( misc::toQString(new_listenPort))); } + if(options->isUPnPEnabled()) { + BTSession->enableUPnP(true); + downloadingTorrentTab->setInfoBar(tr("UPnP support [ON]"), QString::fromUtf8("blue")); + } else { + BTSession->enableUPnP(false); + downloadingTorrentTab->setInfoBar(tr("UPnP support [OFF]"), QString::fromUtf8("blue")); + } + if(options->isNATPMPEnabled()) { + BTSession->enableNATPMP(true); + downloadingTorrentTab->setInfoBar(tr("NAT-PMP support [ON]"), QString::fromUtf8("blue")); + } else { + BTSession->enableNATPMP(false); + downloadingTorrentTab->setInfoBar(tr("NAT-PMP support [OFF]"), QString::fromUtf8("blue")); + } + // Bittorrent + if(options->isLSDEnabled()) { + BTSession->enableLSD(true); + downloadingTorrentTab->setInfoBar(tr("Local Peer Discovery [ON]"), QString::fromUtf8("blue")); + } else { + BTSession->enableLSD(false); + downloadingTorrentTab->setInfoBar(tr("Local Peer Discovery support [OFF]"), QString::fromUtf8("blue")); + } + if(options->isDHTEnabled()) { + BTSession->enableDHT(true); + downloadingTorrentTab->setInfoBar(tr("DHT support [ON], port: %1").arg(new_listenPort), QString::fromUtf8("blue")); + // Set DHT Port + BTSession->setDHTPort(new_listenPort); + }else{ + BTSession->enableDHT(false); + downloadingTorrentTab->setInfoBar(tr("DHT support [OFF]"), QString::fromUtf8("blue")); + } + // IP Filter + // Configure session regarding options + BTSession->setDefaultSavePath(options->getSavePath()); // Apply max connec limit (-1 if disabled) - BTSession->setMaxConnections(options->getMaxConnec()); - limits = options->getLimits(); + BTSession->setMaxConnections(options->getMaxConnecs()); + limits = options->getGlobalBandwidthLimits(); switch(limits.first) { case -1: // Download limit disabled case 0: @@ -812,19 +846,7 @@ void GUI::configureSession(bool deleteOptions) { BTSession->setUploadRateLimit(limits.second*1024); } // Apply ratio (0 if disabled) - BTSession->setGlobalRatio(options->getRatio()); - // DHT (Trackerless) - if(options->isDHTEnabled()) { - downloadingTorrentTab->setInfoBar(tr("DHT support [ON], port: %1").arg(options->getDHTPort()), QString::fromUtf8("blue")); - BTSession->enableDHT(); - // Set DHT Port - BTSession->setDHTPort(options->getDHTPort()); - }else{ - downloadingTorrentTab->setInfoBar(tr("DHT support [OFF]"), QString::fromUtf8("blue")); - BTSession->disableDHT(); - } - // UPnP can't be disabled - downloadingTorrentTab->setInfoBar(tr("UPnP support [ON]"), QString::fromUtf8("blue")); + BTSession->setGlobalRatio(options->getDesiredRatio()); // Encryption settings int encryptionState = options->getEncryptionSetting(); // The most secure, rc4 only so that all streams and encrypted @@ -848,7 +870,7 @@ void GUI::configureSession(bool deleteOptions) { } BTSession->applyEncryptionSettings(encryptionSettings); // PeX - if(!options->isPeXDisabled()) { + if(options->isPeXEnabled()) { qDebug("Enabling Peer eXchange (PeX)"); downloadingTorrentTab->setInfoBar(tr("PeX support [ON]"), QString::fromUtf8("blue")); BTSession->enablePeerExchange(); @@ -1189,7 +1211,7 @@ void GUI::on_actionOptions_triggered() { // Is executed each time options are saved void GUI::OptionsSaved(QString info, bool deleteOptions) { - bool newSystrayIntegration = options->useSystrayIntegration(); + bool newSystrayIntegration = options->systrayIntegration(); if(newSystrayIntegration && !systrayIntegration) { // create the trayicon createTrayIcon(); diff --git a/src/allocationDlg.h b/src/allocationDlg.h index fb94b9aa0..ee191596b 100644 --- a/src/allocationDlg.h +++ b/src/allocationDlg.h @@ -157,13 +157,13 @@ class BandwidthAllocationDialog : public QDialog, private Ui_bandwidth_dlg { s->set_upload_rate_limit(-1); else s->set_upload_rate_limit(val*1024); - settings.setValue(QString::fromUtf8("Options/Main/UPLimit"), val); + settings.setValue(QString::fromUtf8("Preferences/Connection/GlobalUPLimit"), val); }else{ if(!val) s->set_download_rate_limit(-1); else s->set_download_rate_limit(val*1024); - settings.setValue(QString::fromUtf8("Options/Main/DLLimit"), val); + settings.setValue(QString::fromUtf8("Preferences/Connection/GlobalDLLimit"), val); } } close(); diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index bbb3655c0..96ac5cea8 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -44,17 +44,13 @@ #define MAX_TRACKER_ERRORS 2 // Main constructor -bittorrent::bittorrent() : timerScan(0), DHTEnabled(false){ +bittorrent::bittorrent() : timerScan(0), DHTEnabled(false), preAllocateAll(false), addInPause(false){ // To avoid some exceptions fs::path::default_name_check(fs::no_check); // Creating bittorrent session s = new session(fingerprint("qB", VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, 0)); // Set severity level of libtorrent session s->set_severity_level(alert::info); - // Enable LSD/UPnP/NAT-PMP - s->start_lsd(); - s->start_natpmp(); - s->start_upnp(); // Enabling metadata plugin s->add_extension(&create_metadata_plugin); timerAlerts = new QTimer(); @@ -85,6 +81,25 @@ bittorrent::~bittorrent() { delete s; } +void bittorrent::preAllocateAllFiles(bool b) { + preAllocateAll = b; + if(b) { + // Reload All Torrents + std::vector handles = s->get_torrents(); + unsigned int nbHandles = handles.size(); + for(unsigned int i=0; iadd_torrent(t, fs::path(savePath.toUtf8().data()), resume_data, false, true); qDebug(" -> Full allocation mode"); }else{ @@ -450,7 +469,7 @@ void bittorrent::addTorrent(QString path, bool fromScanDir, QString from_url) { QFile::copy(file, newFile); } // Pause torrent if it was paused last time - if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".paused")) { + if(addInPause || QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".paused")) { torrentsToPauseAfterChecking << hash; qDebug("Adding a torrent to the torrentsToPauseAfterChecking list"); } @@ -543,30 +562,53 @@ bool bittorrent::isDHTEnabled() const{ return DHTEnabled; } -// Enable DHT -void bittorrent::enableDHT() { - if(!DHTEnabled) { - boost::filesystem::ifstream dht_state_file((misc::qBittorrentPath()+QString::fromUtf8("dht_state")).toUtf8().data(), std::ios_base::binary); - dht_state_file.unsetf(std::ios_base::skipws); - entry dht_state; - try{ - dht_state = bdecode(std::istream_iterator(dht_state_file), std::istream_iterator()); - }catch (std::exception&) {} - s->start_dht(dht_state); - s->add_dht_router(std::make_pair(std::string("router.bittorrent.com"), 6881)); - s->add_dht_router(std::make_pair(std::string("router.utorrent.com"), 6881)); - s->add_dht_router(std::make_pair(std::string("router.bitcomet.com"), 6881)); - DHTEnabled = true; - qDebug("DHT enabled"); +void bittorrent::enableUPnP(bool b) { + if(b) { + s->start_upnp(); + } else { + s->stop_upnp(); } } -// Disable DHT -void bittorrent::disableDHT() { - if(DHTEnabled) { - DHTEnabled = false; - s->stop_dht(); - qDebug("DHT disabled"); +void bittorrent::enableNATPMP(bool b) { + if(b) { + s->start_natpmp(); + } else { + s->stop_natpmp(); + } +} + +void bittorrent::enableLSD(bool b) { + if(b) { + s->start_lsd(); + } else { + s->stop_lsd(); + } +} + +// Enable DHT +void bittorrent::enableDHT(bool b) { + if(b) { + if(!DHTEnabled) { + boost::filesystem::ifstream dht_state_file((misc::qBittorrentPath()+QString::fromUtf8("dht_state")).toUtf8().data(), std::ios_base::binary); + dht_state_file.unsetf(std::ios_base::skipws); + entry dht_state; + try{ + dht_state = bdecode(std::istream_iterator(dht_state_file), std::istream_iterator()); + }catch (std::exception&) {} + s->start_dht(dht_state); + s->add_dht_router(std::make_pair(std::string("router.bittorrent.com"), 6881)); + s->add_dht_router(std::make_pair(std::string("router.utorrent.com"), 6881)); + s->add_dht_router(std::make_pair(std::string("router.bitcomet.com"), 6881)); + DHTEnabled = true; + qDebug("DHT enabled"); + } + } else { + if(DHTEnabled) { + DHTEnabled = false; + s->stop_dht(); + qDebug("DHT disabled"); + } } } diff --git a/src/bittorrent.h b/src/bittorrent.h index 88bf21ca1..9d185b4a2 100644 --- a/src/bittorrent.h +++ b/src/bittorrent.h @@ -57,6 +57,8 @@ class bittorrent : public QObject{ QStringList waitingForPause; QStringList finishedTorrents; QStringList unfinishedTorrents; + bool preAllocateAll; + bool addInPause; protected: QString getSavePath(QString hash); @@ -90,9 +92,8 @@ class bittorrent : public QObject{ void deleteTorrent(QString hash, bool permanent = false); bool pauseTorrent(QString hash); bool resumeTorrent(QString hash); - void enableDHT(); - void disableDHT(); void saveDHTEntry(); + void preAllocateAllFiles(bool b); void saveFastResumeAndRatioData(); void enableDirectoryScanning(QString scan_dir); void disableDirectoryScanning(); @@ -117,6 +118,7 @@ class bittorrent : public QObject{ void setDHTPort(int dht_port); void setProxySettings(proxy_settings proxySettings, bool trackers=true, bool peers=true, bool web_seeds=true, bool dht=true); void setSessionSettings(session_settings sessionSettings); + void startTorrentsInPause(bool b); void setDefaultSavePath(QString savepath); void applyEncryptionSettings(pe_settings se); void loadFilesPriorities(QTorrentHandle& h); @@ -124,6 +126,10 @@ class bittorrent : public QObject{ void setUploadLimit(QString hash, long val); void setUnfinishedTorrent(QString hash); void setFinishedTorrent(QString hash); + void enableUPnP(bool b); + void enableNATPMP(bool b); + void enableLSD(bool b); + void enableDHT(bool b); protected slots: void scanDirectory(); diff --git a/src/downloadingTorrents.cpp b/src/downloadingTorrents.cpp index 3dfe673ad..558fa2f52 100644 --- a/src/downloadingTorrents.cpp +++ b/src/downloadingTorrents.cpp @@ -246,7 +246,7 @@ void DownloadingTorrents::displayDLListMenu(const QPoint& pos) { // Enable/disable pause/start action given the DL state QModelIndexList selectedIndexes = downloadList->selectionModel()->selectedIndexes(); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); - QString previewProgram = settings.value(QString::fromUtf8("Options/Misc/PreviewProgram"), QString()).toString(); + QString previewProgram = settings.value(QString::fromUtf8("Preferences/general/MediaPlayer"), QString()).toString(); bool has_pause = false, has_start = false, has_preview = false; foreach(index, selectedIndexes) { if(index.column() == NAME) { diff --git a/src/engineSelectDlg.cpp b/src/engineSelectDlg.cpp index 862f17b2c..fb0a2e35f 100644 --- a/src/engineSelectDlg.cpp +++ b/src/engineSelectDlg.cpp @@ -79,17 +79,17 @@ void engineSelectDlg::dropEvent(QDropEvent *event) { foreach(file, files) { qDebug("dropped %s", file.toUtf8().data()); file = file.replace("file://", ""); - if(file.startsWith("http://") || file.startsWith("https://") || file.startsWith("ftp://")) { + if(file.startsWith("http://", Qt::CaseInsensitive) || file.startsWith("https://", Qt::CaseInsensitive) || file.startsWith("ftp://", Qt::CaseInsensitive)) { downloader->downloadUrl(file); continue; } - if(file.endsWith(".py")) { + if(file.endsWith(".py", Qt::CaseInsensitive)) { QString plugin_name = file.split(QDir::separator()).last(); plugin_name.replace(".py", ""); installPlugin(file, plugin_name); } #ifdef HAVE_ZZIP - if(file.endsWith(".zip")) { + if(file.endsWith(".zip", Qt::CaseInsensitive)) { installZipPlugin(file); } #endif @@ -332,7 +332,7 @@ QList engineSelectDlg::findItemsWithUrl(QString url){ QList res; for(int i=0; itopLevelItemCount(); ++i) { QTreeWidgetItem *item = pluginsTree->topLevelItem(i); - if(url.startsWith(item->text(ENGINE_URL))) + if(url.startsWith(item->text(ENGINE_URL), Qt::CaseInsensitive)) res << item; } return res; @@ -367,10 +367,10 @@ void engineSelectDlg::installZipPlugin(QString path) { while(zzip_dir_read(dir, &dirent)) { /* show info for first file */ QString name(dirent.d_name); - if(name.endsWith(".py")) { + if(name.endsWith(".py", Qt::CaseInsensitive)) { plugins << name; } else { - if(name.endsWith(".png")) { + if(name.endsWith(".png", Qt::CaseInsensitive)) { favicons << name; } } @@ -520,14 +520,14 @@ void engineSelectDlg::on_installButton_clicked() { #endif QString path; foreach(path, pathsList) { - if(path.endsWith(".py")) { + if(path.endsWith(".py", Qt::CaseInsensitive)) { QString plugin_name = path.split(QDir::separator()).last(); - plugin_name.replace(".py", ""); + plugin_name.replace(".py", "", Qt::CaseInsensitive); installPlugin(path, plugin_name); } #ifdef HAVE_ZZIP else { - if(path.endsWith(".zip")) { + if(path.endsWith(".zip", Qt::CaseInsensitive)) { installZipPlugin(path); } } @@ -582,7 +582,7 @@ bool engineSelectDlg::parseVersionsFile(QString versions_file, QString updateSer void engineSelectDlg::processDownloadedFile(QString url, QString filePath) { qDebug("engineSelectDlg received %s", url.toUtf8().data()); - if(url.endsWith("favicon.ico")){ + if(url.endsWith("favicon.ico", Qt::CaseInsensitive)){ // Icon downloaded QImage fileIcon; #ifdef HAVE_MAGICK @@ -628,7 +628,7 @@ void engineSelectDlg::processDownloadedFile(QString url, QString filePath) { QFile::remove(filePath); return; } - if(url.endsWith(".pyqBT") || url.endsWith(".py")) { + if(url.endsWith(".pyqBT", Qt::CaseInsensitive) || url.endsWith(".py", Qt::CaseInsensitive)) { QString plugin_name = url.split('/').last(); plugin_name.replace(".py", ""); plugin_name.replace(".pyqBT", ""); @@ -637,7 +637,7 @@ void engineSelectDlg::processDownloadedFile(QString url, QString filePath) { return; } #ifdef HAVE_ZZIP - if(url.endsWith(".zip")) { + if(url.endsWith(".zip", Qt::CaseInsensitive)) { installZipPlugin(filePath); QFile::remove(filePath); return; @@ -646,7 +646,7 @@ void engineSelectDlg::processDownloadedFile(QString url, QString filePath) { } void engineSelectDlg::handleDownloadFailure(QString url, QString reason) { - if(url.endsWith("favicon.ico")){ + if(url.endsWith("favicon.ico", Qt::CaseInsensitive)){ qDebug("Could not download favicon: %s, reason: %s", url.toUtf8().data(), reason.toUtf8().data()); return; } @@ -660,17 +660,17 @@ void engineSelectDlg::handleDownloadFailure(QString url, QString reason) { QMessageBox::warning(this, tr("Search plugin update")+" -- "+tr("qBittorrent"), tr("Sorry, update server is temporarily unavailable.")); return; } - if(url.endsWith(".pyqBT") || url.endsWith(".py")) { + if(url.endsWith(".pyqBT", Qt::CaseInsensitive) || url.endsWith(".py", Qt::CaseInsensitive)) { // a plugin update download has been failed QString plugin_name = url.split('/').last(); - plugin_name.replace(".pyqBT", ""); - plugin_name.replace(".py", ""); + plugin_name.replace(".pyqBT", "", Qt::CaseInsensitive); + plugin_name.replace(".py", "", Qt::CaseInsensitive); QMessageBox::warning(this, tr("Search plugin update")+" -- "+tr("qBittorrent"), tr("Sorry, %1 search plugin install failed.", "%1 is the name of the search engine").arg(plugin_name.toUtf8().data())); } #ifdef HAVE_ZZIP - if(url.endsWith(".zip")) { + if(url.endsWith(".zip", Qt::CaseInsensitive)) { QString plugin_name = url.split('/').last(); - plugin_name.replace(".zip", ""); + plugin_name.replace(".zip", "", Qt::CaseInsensitive); QMessageBox::warning(this, tr("Search plugin update")+" -- "+tr("qBittorrent"), tr("Sorry, %1 search plugin install failed.", "%1 is the name of the search engine").arg(plugin_name.toUtf8().data())); } #endif diff --git a/src/lang/qbittorrent_ko.ts b/src/lang/qbittorrent_ko.ts index 09ff920f4..e91c3ec5d 100644 --- a/src/lang/qbittorrent_ko.ts +++ b/src/lang/qbittorrent_ko.ts @@ -3,7 +3,7 @@ @default - + MB MB @@ -11,77 +11,77 @@ AboutDlg - + About qBittorrent 큐비토런트에 대하여 - + About 정보 - + Author 저자 - + qBitorrent Author 큐비토런트 제작자 - + Name: 이름: - + Country: 국가: - + E-mail: E-메일: - + Home page: 홈페이지: - + Christophe Dumez 크리스토프 두메스 - + France 프랑스 - + Thanks To 도와주신 분들 - + Translation 번역 - + License 라이센스 - + <h3><b>qBittorrent</b></h3> <h3><b>큐비토런트</b></h3> - + A bittorrent client using Qt4 and libtorrent, programmed in C++.<br> <br> Copyright © 2006 by Christophe Dumez<br> @@ -92,12 +92,12 @@ Copyright © 2006 by Christophe Dumez<br> <br> <u>Home Page:</u> <i>http://qbittorrent.sourceforge.net</i><br> - + qBittorrent Author 큐비토런트 제작자 - + A bittorrent client using Qt4 and libtorrent, programmed in C++.<br> <br> Copyright © 2006 by Christophe Dumez<br> @@ -108,37 +108,37 @@ Copyright © 2006 by Christophe Dumez<br> <br> <u>Home Page:</u> <i>http://www.qbittorrent.org</i><br> - + chris@qbittorrent.org - + http://www.dchris.eu - + Birthday: 생일: - + Occupation: 직업: - + 03/05/1985 03/05/1985 - + Student in computer science 컴퓨터과학 대학생 - + Thanks to 다음 분들에게 감사의 말씀을 드립니다 @@ -146,23 +146,23 @@ Copyright © 2006 by Christophe Dumez<br> BandwidthAllocationDialog - + Upload limit: 업로드 제한: - + Download limit: 다운로드 제한: - + Unlimited Unlimited (bandwidth) 무제한 - + KiB/s @@ -170,7 +170,7 @@ Copyright © 2006 by Christophe Dumez<br> DLListDelegate - + KiB/s @@ -178,78 +178,78 @@ Copyright © 2006 by Christophe Dumez<br> Dialog - + Options -- qBittorrent 설정 -- 큐비토런트 - + Options 환경설정 - + Main 주요설정 - + Scanned Dir: 스캔된 폴더: - + ... ... - + Save Path: 저장폴더 저장: - + Download Limit: 다운로드 속도 제한: - + Upload Limit: 업로드 속도 제한: - + Max Connects: 최대 동시 연결: - + Port range: 포트 영역: - + Kb/s Kb/s - + Disable 사용하지 않기 - + connections 연결 - + to 연결 대상 - + Enable directory scan (auto add torrent files inside) 자동 자료목록 @@ -257,474 +257,474 @@ inside) 것입니다.) - + Proxy 프록시 - + Enable connection through a proxy server 프록시 서버를 통해 연결하기 - + Proxy Settings 프록시 설정 - + Server IP: 서버 주소: - + 0.0.0.0 0.0.0.0 - + Port: 포트: - + Proxy server requires authentication 프록시 서버를 사용하기 위해서는 인증확인이 필요합니다 - + Authentication 인증 - + User Name: 아이디: - + Password: 비밀번호: - + Language 언어 - + Please choose your preferred language in the following list: 사용할 언어를 선택하세요 - + Language settings will take effect after restart. 언어설정 변경 사항은 프로그램 재시작 시 적용 될것입니다. - + OK 확인 - + Cancel 취소 - + Enable directory scan (auto add torrent files inside) 자동으로 목록 스캔하기(자동적으로 토렌트 파일 추가하기) - + Please choose your preferred language in the following list: 사용할 언어를 선택하세요 : - + Connection Settings 연결설정 - + Share ratio: 공유비율: - + KB UP max. KB 최고 업로딩 속도. - + Activate IP Filtering IP 필터링 사용 - + Filter Settings 필터 설정 - + ipfilter.dat URL or PATH: ipfilter.dat 웹주소 또는 경로: - + Start IP 시작 IP - + End IP 끝 IP - + Origin 출처 - + Comment 설명 - + Apply 적용 - + IP Filter IP 필터 - + Add Range 범위 확장 - + Remove Range 범위 축소 - + ipfilter.dat Path: ipfilter.dat 경로: - + Clear finished downloads on exit 종료시 완료된 파일목록 삭제 - + Ask for confirmation on exit 종료시 확인 - + Go to systray when minimizing window 최소화시 시스템 트레이에 아이콘 표시 - + Misc 기타 - + Localization 변환 - + Language: 언어: - + Behaviour 동작 - + OSD OSD(On Screen Display) - + Always display OSD OSD 항시 표시 - + Display OSD only if window is minimized or iconified 창이 최소화할때나 작업창 아이콘이 될때만 OSD 표시 - + Never display OSD OSD 표시하지 않기 - + 1 KiB DL = 1 KiB 다운로드 = - + KiB UP max. KIB 최대 업로드. - + DHT (Trackerless): DHT(트렉커 없음): - + Disable DHT (Trackerless) support DHT(트렉커 없음) 사용하지 않기 - + Automatically clear finished downloads 완료된 목록 자동으로 지우기 - + Preview program 미리보기 프로그램 - + Audio/Video player: 음악 및 영상 재생기: - + KiB/s - + DHT configuration DHT 설정 - + DHT port: DHT 포트: - + <b>Note:</b> Changes will be applied after qBittorrent is restarted. <b>참고:</b> 수정된 상항은 프로그램 재시작시 적용 될것입니다. - + <b>Translators note:</b> If qBittorrent is not available in your language, <br/>and if you would like to translate it in your mother tongue, <br/>please contact me (chris@qbittorrent.org). <b>번역자 노트:</b> 만약 큐비토렌트가 자신이 사용하는 언어로 번역되지 않았고, <br/>자신의 사용하는 언어로 번역/수정 작업에 참여하고 싶다면, <br/>저에게 email을 주십시오 (chris@qbittorrent.org). - + Display a torrent addition dialog everytime I add a torrent 토렌트 추가시 '토렌트 추가 다이얼로그' 보이기 - + Default save path 기본 저장 경로 - + Systray Messages 시스템 트레이 아이템 - + Always display systray messages 시스템 트레이 아이템 항시 보기 - + Display systray messages only when window is hidden 프로그램 윈도우가 최소화시에만 시스템 트레이 아이템 보여주기 - + Never display systray messages 시스템 트레이 아이템 사용하지 않기 - + Disable DHT (Trackerless) DHT(트렉커 없음) 사용하지 않기 - + Disable Peer eXchange (PeX) 피어 익스체인지(Pex) 사용하지 않기 - + Go to systray when closing main window 메인 창을 닫을 때 시스템 트레이에 아이템 보여주기 - + Connection 연결 - + Peer eXchange (PeX) 피어 익스체인지(Pex) - + DHT (trackerless) DHT(트렉커 없음) - + Torrent addition 토렌트 추가 - + Main window 메인 창 - + Systray messages 시스템 트레이 메세지 - + Directory scan 디렉터리 스켄 - + Style (Look 'n Feel) 스타일 (Look 'n Feel) - + Plastique style (KDE like) Plastique 스타일 (KDE 과 비슷) - + Cleanlooks style (GNOME like) 깨끗한 스타일 (GNOME 와 비슷) - + Motif style (default Qt style on Unix systems) Motif 스타일 (기본 Qt 스타일 on 유닉스 시스템) - + CDE style (Common Desktop Environment like) CDE 스타일 (Common Desktop Environment과 비슷) - + MacOS style (MacOSX only) MacOS 스타일 (MacOSX 전용) - + Exit confirmation when the download list is not empty 다운로드 리스트에 있는 파일이 남아 있을때 종료 확인하기 - + Disable systray integration 시스템 트레이 아이템 사용하지 않기 - + WindowsXP style (Windows XP only) WindowsXP 스타일 (Windows XP 전용) - + Server IP or url: 서버 주소 (Server IP or url): - + Proxy type: 프락시 종류 (Proxy type): - + HTTP - + SOCKS5 - + Affected connections 관련된 연결 - + Use proxy for connections to trackers 트렉커(tracker)에 연결하는데 프락시 사용 - + Use proxy for connections to regular peers 일반 사용자(peer)와 연결하는데 프락시 사용 - + Use proxy for connections to web seeds 웹 완전체(Web seed)와 연결하는데 프락시 사용 - + Use proxy for DHT messages DHT 메세지에 프락시 사용 - + Encryption 암호화(Encryption) - + Encryption state: 암호화(Encryption) 상태: - + Enabled 사용하기 - + Forced 강제 - + Disabled 사용하지 않기 @@ -732,124 +732,124 @@ list: DownloadingTorrents - + Name i.e: file name - 파일 이름 + 파일 이름 - + Size i.e: file size - 크기 + 크기 - + Progress i.e: % downloaded - 진행상황 + 진행상황 - + DL Speed i.e: Download speed - 다운로드 속도 + 다운로드 속도 - + UP Speed i.e: Upload speed - 업로드 속도 + 업로드 속도 - + Seeds/Leechs i.e: full/partial sources - 완전체 공유/부분 공유 + 완전체 공유/부분 공유 - + Ratio - 비율 + 비율 - + ETA i.e: Estimated Time of Arrival / Time left - 남은시간 + 남은시간 - + qBittorrent %1 started. e.g: qBittorrent v0.x started. - 큐비토런트 %1가 시작되었습니다. + 큐비토런트 %1가 시작되었습니다. - + Be careful, sharing copyrighted material without permission is against the law. - 허락없이 저작권이 있는 자료를 공유하는 것은 법에 저촉됩니다. + 허락없이 저작권이 있는 자료를 공유하는 것은 법에 저촉됩니다. - + <font color='red'>%1</font> <i>was blocked</i> x.y.z.w was blocked - <font color='red'>%1</font> <i>은/는 막혔습니다</i> + <font color='red'>%1</font> <i>은/는 막혔습니다</i> - + Fast resume data was rejected for torrent %1, checking again... - 토렌트 %1는 빨리 이어받기가 사용될수 없습니다, 확인중입니다... + 토렌트 %1는 빨리 이어받기가 사용될수 없습니다, 확인중입니다... - + Url seed lookup failed for url: %1, message: %2 - 다음 Url 완전체(Url seed)의 검색이 실패하였습니다: %1, 관련내용: %2 + 다음 Url 완전체(Url seed)의 검색이 실패하였습니다: %1, 관련내용: %2 - + '%1' added to download list. '/home/y/xxx.torrent' was added to download list. - '%1'가 다운로드 목록에 추가되었습니다. + '%1'가 다운로드 목록에 추가되었습니다. - + '%1' resumed. (fast resume) '/home/y/xxx.torrent' was resumed. (fast resume) - '%1'가 다시 시작되었습니다. (빠른 재개) + '%1'가 다시 시작되었습니다. (빠른 재개) - + '%1' is already in download list. e.g: 'xxx.avi' is already in download list. - '%1'는/은 이미 다운로드 목록에 포함되어 있습니다. + '%1'는/은 이미 다운로드 목록에 포함되어 있습니다. - + Unable to decode torrent file: '%1' e.g: Unable to decode torrent file: '/home/y/xxx.torrent' - 다음 파일을 디코드할수 없습니다: '%1' + 다음 파일을 디코드할수 없습니다: '%1' - + This file is either corrupted or this isn't a torrent. - 이 파일은 오류가 있거나 토런트 파일이 아닙니다. + 이 파일은 오류가 있거나 토런트 파일이 아닙니다. - + Couldn't listen on any of the given ports. - 설정하신 포트에 연결할수 없습니다. + 설정하신 포트에 연결할수 없습니다. - + Downloading '%1', please wait... e.g: Downloading 'xxx.torrent', please wait... - '%1'을 다운 중입니다, 잠시 기다려 주세요... + '%1'을 다운 중입니다, 잠시 기다려 주세요... FinishedListDelegate - + KiB/s @@ -857,65 +857,65 @@ list: FinishedTorrents - + Finished 완료됨 - + Name i.e: file name 파일 이름 - + Size i.e: file size 크기 - + Progress i.e: % downloaded 진행상황 - + DL Speed i.e: Download speed 다운로드 속도 - + UP Speed i.e: Upload speed 업로드 속도 - + Seeds/Leechs i.e: full/partial sources 완전체 공유/부분 공유 - + Status 상태 - + ETA i.e: Estimated Time of Arrival / Time left 남은시간 - + None i.e: No error message 없음 - + Ratio 비율 @@ -923,417 +923,417 @@ list: GUI - + started. 시작. - + DL Speed: 다운로딩 속도: - + kb/s kb/s - + UP Speed: 업로딩 속도: - + Open Torrent Files 토런트 파일 열기 - + Torrent Files 토런트 파일 - + Couldn't create the directory: 폴더를 만들수가 없습니다: - + already in download list. <file> already in download list. 이미 다운로드 리스트에 포함되어 있습니다. - + MB MB - + kb/s kb/s - + Unknown 알수 없음 - + added to download list. 다운로드 목록에 포함하기. - + resumed. (fast resume) 다시 시작됨. (빠르게 재개) - + Unable to decode torrent file: 토런트 파일을 읽을 수가 없습니다: - + This file is either corrupted or this isn't a torrent. 이 파일은 오류가 있거나 토런트 파일이 아닙니다. - + Are you sure? 재확인해주십시요? - + Are you sure you want to delete all files in download list? 다운로드 목록에 있는 모든 파일을 지우고 싶으세요? - + &Yes &예 - + &No &아니요 - + Download list cleared. 다운로딩 목록이 깨끗히 정리되었습니다. - + Are you sure you want to delete the selected item(s) in download list? 다운로딩 목록에서 선택하신 모든 아이템을 삭제하시겠습니까? - + removed. <file> removed. 삭제됨. - + Listening on port: 이미 연결 된 포트: - + Couldn't listen on any of the given ports 설정하신 포트에 연결할수 없습니다 - + paused 멈춤 - + All Downloads Paused. 모든 다움로드가 멈추었습니다. - + started 시작됨 - + All Downloads Resumed. 모든 다운로드가 다시 시작되었습니다. - + paused. <file> paused. 멈춤. - + resumed. <file> resumed. 다시 시작됨. - + Finished 완료 - + Checking... 확인중... - + Connecting... 연결중... - + Downloading... 다운로딩 중... - + m minutes - + h hours - + d days - + This file is either corrupted or this isn't a torrent. 이 파일은 오류가 있거나 토런트 파일이 아닙니다. - + Are you sure you want to delete all files in download list? 다운로드 목록에 있는 모든 파일을 지우고 싶으세요? - + Are you sure you want to delete the selected item(s) in download list? 다운로딩 목록에서 선택하신 모든 아이템을 삭제하시겠습니까? - + qBittorrent 큐비토런트 - + :: By Christophe Dumez :: Copyright (c) 2006 개발자: 크리스토프 두메스 :: Copyright (c) 2006 - + qBittorrent 큐비토런트 - + Are you sure? -- qBittorrent 재확인해주십시요? -- 큐비토런트 - + <b>Connection Status:</b><br>Online 연결상태: 연결됨 - + <b>Connection Status:</b><br>Firewalled?<br><i>No incoming connections...</i> 연결상태: 방화벽을 사용중이십니까? <i>연결이 되지않고 있습니다...</i> - + <b>Connection Status:</b><br>Offline<br><i>No peers found...</i> 연결 상태: 오프라인 상태 <i>다른 사용자를 찾을수 없습니다.</i> - + <b>qBittorrent</b><br>DL Speed: 큐비토런트 다운로딩 속도: - + has finished downloading. 가 완료되었습니다. - + Couldn't listen on any of the given ports. 설정하신 포트에 연결할수 없습니다. - + None 없음 - + Empty search pattern 빈 검색 양식 - + Please type a search pattern first 검색 양식을 작성해주십시오 - + No seach engine selected 검색엔진이 선택되지 않았음 - + You must select at least one search engine. 적어도 하나 이상의 검색 엔진을 선택해야 합니다. - + Searching... 검색중... - + Could not create search plugin. 검색 플러그인을 생성할수 없음. - + Stopped 정지됨 - + I/O Error I/O 에러 - + Couldn't create temporary file on hard drive. 하드 드라이브에서 임시파일을 생성할수 없음. - + Torrent file URL 토렌트 파일 URL - + Downloading using HTTP: HTTP로 다운로딩 중: - + Torrent file URL: 토렌트 파일 URL: - + A http download failed... http로 부터 다운로드 실패... - + A http download failed, reason: http로 부터 다운로드 실패한 이유: - + Are you sure you want to quit? -- qBittorrent 종료하시겠습니까? -- 큐비토런트 - + Are you sure you want to quit qbittorrent? 정말로 큐비토런트를 종료하시겠습니까? - + Timed out 시간 초과 - + Error during search... 검색 중 에러 발생... - + Failed to download: 다운로드 실패: - + A http download failed, reason: http로 부터 다운로드 실패, 그 이유는 다음과 같습니다: - + Stalled 대기중 - + Search is finished 검색 완료 - + An error occured during search... 검색 중 오류 발생... - + Search aborted 검색이 중단됨 - + Search returned no results 검색 결과가 없음 - + Search is Finished 검색 종료 - + Search plugin update -- qBittorrent 검색 플로그인 업데이트 -- 큐비토런트 - + Search plugin can be updated, do you want to update it? Changelog: @@ -1344,871 +1344,871 @@ Changelog: - + Sorry, update server is temporarily unavailable. 죄송합니다. 현재 임시적으로 업데이트 서버가 접속이 불가능합니다. - + Your search plugin is already up to date. 현재 최신 검색 엔진 플로그인을 사용중에 있습니다. - + Results 결과 - + Name 파일 이름 - + Size 크기 - + Progress 진행상황 - + DL Speed 다운로드 속도 - + UP Speed 업로드 속도 - + Status 상태 - + ETA 남은시간 - + Seeders 완전체 공유자 - + Leechers 부분 공유 - + Search engine 검색 엔진 - + Stalled state of a torrent whose DL Speed is 0 대기중 - + Paused 정지됨 - + Preview process already running 미리보기가 진행중입니다 - + There is already another preview process running. Please close the other one first. 미리보기가 진행중입니다. 다른 미리보기를 닫아주세요. - + Couldn't download Couldn't download <file> 다운로드 실패 - + reason: Reason why the download failed 이유: - + Downloading Example: Downloading www.example.com/test.torrent 다운로딩 중 - + Please wait... 기다려주십시오... - + Transfers 전송 - + Are you sure you want to quit qBittorrent? 정말로 큐비토런트를 종료하시겠습니까? - + Are you sure you want to delete the selected item(s) in download list and in hard drive? 정말로 지금 선택하신 파일들을 다운로드 목록과 하드 드라이브에서 삭제하시겠습니까? - + Download finished 다운로드 완료 - + has finished downloading. <filename> has finished downloading. 가 완료되었습니다. - + Search Engine 검색 엔진 - + qBittorrent %1 e.g: qBittorrent v0.x 큐비토런트 %1 - + Connection status: 연결 상태: - + Offline 오프라인 - + No peers found... 피어가 없습니다... - + Name i.e: file name 파일 이름 - + Size i.e: file size 크기 - + Progress i.e: % downloaded 진행상황 - + DL Speed i.e: Download speed 다운로드 속도 - + UP Speed i.e: Upload speed 업로드 속도 - + Seeds/Leechs i.e: full/partial sources 완전체 공유/부분 공유 - + ETA i.e: Estimated Time of Arrival / Time left 남은시간 - + Seeders i.e: Number of full sources 완전체 공유자 - + Leechers i.e: Number of partial sources 부분 공유 - + qBittorrent %1 started. e.g: qBittorrent v0.x started. 큐비토런트 %1가 시작되었습니다. - + DL speed: %1 KiB/s e.g: Download speed: 10 KiB/s 다운로딩 속도: %1 KiB/s - + UP speed: %1 KiB/s e.g: Upload speed: 10 KiB/s 업로딩 속도: %1 KiB/s - + Finished i.e: Torrent has finished downloading 완료되었습니다 - + Checking... i.e: Checking already downloaded parts... 확인중... - + Stalled i.e: State of a torrent whose download speed is 0kb/s 대기중 - + Are you sure you want to quit? 정말로 종료하시겠습니까? - + '%1' was removed. 'xxx.avi' was removed. '%1' 가 삭제되었습니다. - + '%1' added to download list. '/home/y/xxx.torrent' was added to download list. '%1'가 다운로드 목록에 추가되었습니다. - + '%1' resumed. (fast resume) '/home/y/xxx.torrent' was resumed. (fast resume) '%1'가 다시 시작되었습니다. (빠른 재개) - + '%1' is already in download list. e.g: 'xxx.avi' is already in download list. '%1'는/은 이미 다운로드 목록에 포함되어 있습니다. - + Unable to decode torrent file: '%1' e.g: Unable to decode torrent file: '/home/y/xxx.torrent' 다음 파일을 디코드할수 없습니다: '%1' - + None i.e: No error message 없음 - + Listening on port: %1 e.g: Listening on port: 1666 이미 연결 된 포트: %1 - + All downloads were paused. 모든 다운로드가 멈추었습니다. - + '%1' paused. xxx.avi paused. '%1'가 정지 되었습니다. - + Connecting... i.e: Connecting to the tracker... 연결중... - + All downloads were resumed. 모든 다운로드가 다시 시작되었습니다. - + '%1' resumed. e.g: xxx.avi resumed. '%1' 가 다운로드를 다시 시작되었습니다. - + %1 has finished downloading. e.g: xxx.avi has finished downloading. %1가 다운로드를 완료하였습니다. - + I/O Error i.e: Input/Output Error I/O 에러 - + An error occured when trying to read or write %1. The disk is probably full, download has been paused e.g: An error occured when trying to read or write xxx.avi. The disk is probably full, download has been paused %1을 사용하려고 하던 중 오류가 발생했습니다. 디스크 용량이 꽉찼고 다운로드가 중지되었습니다 - + An error occured (full fisk?), '%1' paused. e.g: An error occured (full fisk?), 'xxx.avi' paused. 오류 발생 (디스크가 꽉찼습니까?), '%1'가 정지 되었습니다. - + Connection Status: 연결 상태: - + Online 온라인 - + Firewalled? i.e: Behind a firewall/router? 방화벽이 설치되어있습니까? - + No incoming connections... 받는 연결이 없습니다... - + No search engine selected 검색엔진이 선택되지 않았음 - + Search plugin update 검색 엔진 플러그인 업데이트 - + Search has finished 검색 완료 - + Results i.e: Search results 결과 - + Downloading '%1', please wait... e.g: Downloading 'xxx.torrent', please wait... '%1'을 다운 중입니다, 잠시 기다려 주세요... - + An error occured (full disk?), '%1' paused. e.g: An error occured (full disk?), 'xxx.avi' paused. 오류 발생 (디스크가 꽉찼습니까?), '%1'가 정지 되었습니다. - + Search 검색 - + RSS - + qBittorrent is bind to port: %1 e.g: qBittorrent is bind to port: 1666 큐비토런트는 다음 포트을 사용하고 있습니다: %1 - + DHT support [ON], port: %1 DHT 지원 [사용함], 포트: %1 - + DHT support [OFF] DHT 지원 [사용안함] - + PeX support [ON] Pes 지원 [사용함] - + PeX support [OFF] Pes 지원 [사용안함] - + The download list is not empty. Are you sure you want to quit qBittorrent? 다운로드 리스트가 파일이 있습니다. 큐비토런트를 종료하시겠습니까? - + Downloads 다운로드 - + Are you sure you want to delete the selected item(s) in finished list? 현재 완료목록에서 선택된 파일을 지우시겠습니까? - + UPnP support [ON] UPnp 지원 [사용함] - + Be careful, sharing copyrighted material without permission is against the law. 허락없이 저작권이 있는 자료를 공유하는 것은 법에 저촉됩니다. - + Encryption support [ON] 암호화(Encryption) 지원 [사용함] - + Encryption support [FORCED] 암호화(Encryption) 지원 [강압적으로 사용] - + Encryption support [OFF] 암호화(Encryption) 지원 [사용안함] - + <font color='red'>%1</font> <i>was blocked</i> x.y.z.w was blocked <font color='red'>%1</font> <i>은/는 막혔습니다</i> - + Ratio 비율 - + Alt+1 shortcut to switch to first tab - + Alt+2 shortcut to switch to second tab - + Alt+4 shortcut to switch to fourth tab - + Url download error Url 다운로드 오류 - + Couldn't download file at url: %1, reason: %2. 다음 주소(Url)에서 파일을 다운로드할수 없습니다: %1, 이유:%2. - + Fast resume data was rejected for torrent %1, checking again... 토렌트 %1는 빨리 이어받기가 사용될수 없습니다, 확인중입니다... - + Are you sure you want to delete the selected item(s) from download list and from hard drive? 다운로드 목록에서 선택된 파일을 하드 드라이버에서도 지우시겠습니까? - + Are you sure you want to delete the selected item(s) from finished list and from hard drive? 완료 목록에서 선택된 파일을 하드 드라이버에서도 지우시겠습니까? - + '%1' was removed permanently. 'xxx.avi' was removed permanently. '%1' 는 영구삭제 되었습니다. - + Url seed lookup failed for url: %1, message: %2 다음 Url 완전체(Url seed)의 검색이 실패하였습니다: %1, 관련내용: %2 - + Alt+3 shortcut to switch to third tab - + - + Ctrl+F shortcut to switch to search tab - + MainWindow - + qBittorrent :: By Christophe Dumez 큐비토런트 :: 개발자: 크리스토프 두메스 - + Log: 로그: - + Total DL Speed: 총 다운로드 속도: - + Kb/s Kb/s - + Total UP Speed: 총 업로드 속도: - + Name 파일 이름 - + Size 크기 - + % DL % 상태 - + DL Speed 다운로드 속도 - + UP Speed 업로드 속도 - + Status 상태 - + ETA 남은시간 - + &Options &설정 - + &Edit &편집 - + &Help &도움말 - + &File &파일 - + Open 열기 - + Exit 끝내기 - + Preferences 설정사항 - + About 정보 - + Start 시작 - + Pause 정지 - + Delete 삭제 - + Pause All 모두 멈추기 - + Start All 모두 시작하기 - + Documentation 참고자료 - + Connexion Status 연결 상태 - + Delete All 모두 삭제 - + Torrent Properties 토렌트 구성요소 - + Connection Status 연결 상태 - + Downloads 다운로드 - + Search 검색 - + Search Pattern: 검색 양식: - + Status: 상태: - + Stopped 정지됨 - + Search Engines 검색 엔진 - + Results: 결과: - + Stop 정지 - + Seeds 완전체 - + Leechers 부분 공유 - + Search Engine 검색 엔진 - + Download from URL URL로 다운로드 - + Download 다운로드 - + Clear 모두 지우기 - + Create torrent 토렌트 파일 생성 - + Ratio: 비율: - + Update search plugin 검색 엔진 업데이트 - + Session ratio: 세션 비율: - + Transfers 전송 - + Preview file 미리보기 - + Clear log 로그 지우기 - + Delete Permanently 영구 삭제 - + Visit website 웹사이트 방문하기 - + Report a bug 버그 신고하기 - + Set upload limit 업로드 속도 제한하기 - + Set download limit 다운로드 속도 제한하기 - + Log 로그 - + IP filter IP 필터 - + Set global download limit 총 다운로드 속도 설정 - + Set global upload limit 총 업로드 속도 설정 - + Options 환경설정 @@ -2216,34 +2216,34 @@ Are you sure you want to quit qBittorrent? PropListDelegate - + False 아님 - + True 맞음 - + Ignored 무시 - + Normal Normal (priority) 보통 - + High High (priority) 높음 - + Maximum Maximum (priority) 최고 @@ -2252,7 +2252,7 @@ Are you sure you want to quit qBittorrent? QTextEdit - + Clear 모두 지우기 @@ -2260,67 +2260,67 @@ Are you sure you want to quit qBittorrent? RSS - + Search 검색 - + Delete 삭제 - + Rename 이름 바꾸기 - + Refresh 새로 고침 - + Create 생성하기 - + Delete selected streams 선택된 스트림 삭제하기 - + Refresh RSS streams RSS 스트림 새로고침 - + Add a new RSS stream 새 RSS 스트림 추가 - + <b>News:</b> <i>(double-click to open the link in your web browser)</i> <b>뉴스:</b> <i>(링크를 웹브라우저에서 열려면 더블 클릭하세요)</i> - + Add RSS stream RSS 스트림 추가 - + Refresh all streams 모든 스트림 새로고침 - + RSS streams: RSS 스트림: - + 2 2 @@ -2328,67 +2328,67 @@ Are you sure you want to quit qBittorrent? RSSImp - + Please type a rss stream url RSS 스트림 주소(url)를 입력하세요 - + Stream URL: 스트림 URL: - + Please choose a new name for this stream 이 스트림의 이름을 입력하세요 - + New stream name: 새 스트림 이름: - + Are you sure? -- qBittorrent 재확인 해주십시요? -- 큐비토런트 - + &Yes &예 - + &No &아니요 - + Are you sure you want to delete this stream from the list? 이 스트림을 리스트에서 지우시겠습니까? - + Description: 설명: - + url: - + Last refresh: 최근 새로고침: - + qBittorrent 큐비토런트 - + This rss feed is already in the list. 이 RSS 피드는 이미 리스트에 포함되어 있습니다. @@ -2396,7 +2396,7 @@ Are you sure you want to quit qBittorrent? RssItem - + No description available 관련 자료가 없습니다 @@ -2404,13 +2404,13 @@ Are you sure you want to quit qBittorrent? RssStream - + %1 ago 10min ago %1분전 - + Never 전혀 사용안함 @@ -2418,71 +2418,71 @@ Are you sure you want to quit qBittorrent? SearchEngine - + Name i.e: file name 파일 이름 - + Size i.e: file size 크기 - + Seeders i.e: Number of full sources 완전체 공유자 - + Leechers i.e: Number of partial sources 부분 공유 - + Search engine 검색 엔진 - + Empty search pattern 검색 양식 지우기 - + Please type a search pattern first 검색 양식을 작성해주십시오 - + No search engine selected 검색엔진이 선택되지 않았음 - + You must select at least one search engine. 적어도 하나 이상의 검색 엔진을 선택해야 합니다. - + Results 결과 - + Searching... 검색중... - + Search plugin update -- qBittorrent 검색 플로그인 업데이트 -- 큐비토런트 - + Search plugin can be updated, do you want to update it? Changelog: @@ -2493,161 +2493,156 @@ Changelog: - + &Yes &예 - + &No &아니요 - + Search plugin update 검색 엔진 플러그인 업데이트 - + qBittorrent 큐비토런트 - + Sorry, update server is temporarily unavailable. 죄송합니다. 현재 임시적으로 업데이트 서버가 접속이 불가능합니다. - + Your search plugin is already up to date. 님은 현재 최신 검색 엔진 플로그인을 사용중입니다. - + Search Engine 검색 엔진 - + Search has finished 검색 완료 - + An error occured during search... 검색 중 오류 발생... - + Search aborted 검색이 중단됨 - + Search returned no results 검색 결과가 없음 - + Results i.e: Search results 결과 - + Search plugin download error 검색 플러그인(plugin) 다운로드 오류 발생 - + Couldn't download search plugin update at url: %1, reason: %2. 다음 url에서 검색 플러그인 (Plugin)을 다운로드 할수 없습니다: %1, 이유: %2. - - - Unknown - 알수 없음 - Ui - + I would like to thank the following people who volonteered to translate qBittorrent: 큐비토런트를 번역하는데 도움을 주신 다음 분들에게 다시 한번 감사드립니다: - + Please contact me if you would like to translate qBittorrent to your own language. 큐비토런드 번역에 도움을 주실 분은 저에게 연락해 주십시오. - + qBittorrent 큐비토런트 - + I would like to thank sourceforge.net for hosting qBittorrent project. 큐비토런트 프로잭트를 호스팅해준 소스포지(Sourceforge.net)에 다시 한번 감사드립니다. - + I would like to thank the following people who volunteered to translate qBittorrent: 큐비토런트를 번역하는데 도움을 주신 다음 분들에게 다시 한번 감사드립니다: - + <ul><li>I would like to thank sourceforge.net for hosting qBittorrent project.</li> <ul><li>큐비토런트 프로잭트를 호스팅해준 소스포지(Sourceforge.net)에 다시 한번 감사드립니다.<li> - + <li>I also like to thank Jeffery Fernandez (developer@jefferyfernandez.id.au), our RPM packager, for his great work.</li></ul> <li>또한 RPM 패키지하는데 도움을 준 Fernandez (developer@jefferyfernandez.id.au)에게 감사드립니다.</li></ul> - + Preview impossible 미리보기 불가 - + Sorry, we can't preview this file 죄송합니다. 이 파일은 미리보기를 할수 없습니다 - + Name 파일 이름 - + Size 크기 - + Progress 진행상황 - + No URL entered 주소(URL)가 포함되지 않았습니다 - + Please type at least one URL. 적어도 하나의 주소(URL)를 적어주십시오. - + qBittorrent 큐비토런트 - + Please contact me if you would like to translate qBittorrent into your own language. 큐비토런트를 자신이 사용하는 언어로 번역하는데 관심이 있으시가면 제게 연락을 주십시오. @@ -2655,17 +2650,17 @@ Changelog: about - + qBittorrent 큐비토런트 - + I would like to thank the following people who volunteered to translate qBittorrent: 큐비토런트를 번역하는데 도움을 주신 다음 분들에게 다시 한번 감사드립니다: - + Please contact me if you would like to translate qBittorrent into your own language. 큐비토런트를 자신이 사용하는 언어로 번역하는데 관심이 있으시가면 제게 연락을 주십시오. @@ -2673,92 +2668,92 @@ Changelog: addTorrentDialog - + Torrent addition dialog 토렌트 추가 다이얼로그 - + Save path: 저장 경로: - + ... ... - + Torrent content: 토렌트 내용: - + File name 파일 이름 - + File size 파일 크기 - + Selected 선택됨 - + Download in correct order (slower but good for previewing) 순차적으로 다운받기(느리지만 미리보기에 편합니다) - + Add to download list in paused state 정지 상태로 다운로드 목록에 추가하기 - + Add 추가 - + Cancel 취소 - + select 선택 - + Unselect 선택하지 않기 - + Select 선택 - + Ignored 무시 - + Normal 보통 - + High 높음 - + Maximum 최고 @@ -2766,37 +2761,37 @@ Changelog: authentication - + Tracker authentication 트렉커 인증 - + Tracker: 트렉커: - + Login 로그인 - + Username: 사용자: - + Password: 비밀번호: - + Log in 로그인 - + Cancel 취소 @@ -2804,12 +2799,12 @@ Changelog: bandwidth_dlg - + Bandwidth allocation 인터넷 속도 분배 - + KiB/s @@ -2817,102 +2812,102 @@ Changelog: createTorrentDialog - + Create Torrent file 토렌트 파일 만들기 - + Destination torrent file: 토렌트 파일 저장 위치: - + Input file or directory: - 변환 할 파일 또는 폴더 경로: + 변환 할 파일 또는 폴더 경로: - + Comment: 설명: - + ... ... - + Create 생성하기 - + Cancel 취소 - + Announce url (Tracker): 발표 되는 url(Tracker 주소): - + Directory 디렉터리 - + Torrent Creation Tool 토렌트 파일 생성도구 - + <center>Destination torrent file:</center> <center>토렌트 파일 경로:</center> - + <center>Input file or directory:</center> <center>원본 파일 또는 폴더:</center> - + <center>Announce url:<br>(One per line)</center> <center>서버 url:<br>(한줄에 하나씩)</center> - + <center>Comment:</center> <center>설명:</center> - + Torrent file creation 토렌트 파일 만들기 - + Input files or directories: - 입력할 파일 또는 폴더 경로: + 입력할 파일 또는 폴더 경로: - + Announce urls (trackers): 발표 되는 url(Tracker 주소): - + Comment (optional): 의견(옵션): - + Private (won't be distributed on trackerless network / DHT if enabled) 은거하기 (이 기능을 선택하시면 님의 컴퓨터는 trackerless network나 DHT에 알려지지 않을 것입니다) - + Web seeds urls (optional): 웹시드(Web seeds) url (옵션사항): @@ -2920,141 +2915,136 @@ Changelog: createtorrent - + Select destination torrent file 토렌트 파일을 저장할 위치 지정 - + Torrent Files 토런트 파일 - + Select input directory or file 변환할 파일 위치 지정 - + No destination path set 저장 경로가 없음 - + Please type a destination path first 저장 경로를 설정해 주십시오 - + No input path set 변환할 파일 경로가 설정되지 않았습니다 - + Please type an input path first 파일 경로를 설정해 주십시오 - + Input path does not exist 변환할 파일 경로가 존재하지 않습니다 - + Please type a correct input path first 변환할 파일 경로를 재설정해 주십시오 - + Torrent creation 토렌트 생성 - + Torrent was created successfully: 토렌트가 성공적으로 생성되었습니다: - + Please type a valid input path first 먼저 변환 될 파일의 경로를 설정해 주십시오 - + Select a folder to add to the torrent 토텐트를 추가할 폴더를 지정해 주십시오 - + Select files to add to the torrent - 토렌트를 추가할 파일을 선택해 주십시오 + 토렌트를 추가할 파일을 선택해 주십시오 - + Please type an announce URL 발표되는 주소(announce URL)를 입력해 주십시오 - + Torrent creation was unsuccessful, reason: %1 토렌트 생성이 실패하였습니다, 이유: %1 - + Announce URL: Tracker URL 발표 되는 url(Tracker 주소): - + Please type a web seed url 웹에 있는 완전체의 주소(web seed url)를 입력해 주십시오 - + Web seed URL: 웹 시드 주소 (Web Seed URL): - - - Select a file to add to the torrent - - downloadFromURL - + Download Torrents from URLs URL에서 토렌트를 다운받기 - + Only one URL per line 한줄 당 하나의 URL을 쓰십시오 - + Download 다운로드 - + Cancel 취소 - + Download from urls URL로 부터 다운로드 받기 - + No URL entered 주소(URL)가 포함되지 않았습니다 - + Please type at least one URL. 적어도 하나의 주소(URL)를 적어주십시오. @@ -3062,353 +3052,357 @@ Changelog: downloading - + Search - 검색 + 검색 - + Total DL Speed: - 총 다운로드 속도: + 총 다운로드 속도: - + KiB/s - + - + Session ratio: - 세션 비율: + 세션 비율: - + Total UP Speed: - 총 업로드 속도: + 총 업로드 속도: - + Log - 로그 + 로그 - + IP filter - IP 필터 + IP 필터 - + Start - 시작 + 시작 - + Pause - 정지 + 정지 - + Delete - 삭제 + 삭제 - + Clear - 모두 지우기 + 모두 지우기 - + Preview file - 미리보기 + 미리보기 - + Set upload limit - 업로드 속도 제한하기 + 업로드 속도 제한하기 - + Set download limit - 다운로드 속도 제한하기 + 다운로드 속도 제한하기 - + Delete Permanently - 영구 삭제 + 영구 삭제 - + Torrent Properties - 토렌트 구성요소 + 토렌트 구성요소 engineSelect - + Search plugins - + 검색 엔진 플러그인 - + Installed search engines: - + 설치된 검색엔진: - + Name - 파일 이름 + 이름 - + Url - + - + Enabled - 사용하기 + 사용하기 - + You can get new search engine plugins here: <a href="http:plugins.qbittorrent.org">http://plugins.qbittorrent.org</a> - + 새 검색엔진 플러그인은 다음 링크에서 제공 받으실수 있습니다: <a href="http:plugins.qbittorrent.org">http://plugins.qbittorrent.org</a> - + Install a new one - + 새것 설치하기 - + Check for updates - + 업데이트 확인 - + Close - + 닫기 - + Enable - + 사용하기 - + Disable - 사용하지 않기 + 사용하지 않기 - + Uninstall - + 제거하기 engineSelectDlg - + True - 맞음 + 맞음 - + False - + 아님 - + Uninstall warning - + 언인스톨 경고 - + Some plugins could not be uninstalled because they are included in qBittorrent. Only the ones you added yourself can be uninstalled. However, those plugins were disabled. - + 개중 몇의 검색엔진 플러그인은 큐비토런트에 포함이 되있기 때문에 제거 될수 없습니다. + 사용자가 직접 설치한 플러그인만이 제거 할수 있습니다. +하지만 큐비토런트에 포함된 검색플러그인들을 사용하지 않으시려면 "사용하지 않기"를 선택하시면 됩니다. + - + Uninstall success - + 제거 완료 - + Select search plugins - + 검색 플러그인을 선택하십시오 - + qBittorrent search plugins - + 큐비토런트 검색엔진 - + Search plugin install - + 검색 엔진 설치 - + qBittorrent - 큐비토런트 + 큐비토런트 - + A more recent version of %1 search engine plugin is already installed. %1 is the name of the search engine - + 최신 버젼의 %1이 이미 설치되어있습니다. - + Search plugin update - 검색 엔진 플러그인 업데이트 + 검색 엔진 플러그인 업데이트 - + Sorry, update server is temporarily unavailable. - 죄송합니다. 현재 임시적으로 업데이트 서버가 접속이 불가능합니다. + 죄송합니다. 현재 임시적으로 업데이트 서버가 접속이 불가능합니다. + + + + Sorry, %1 search plugin update failed. + %1 is the name of the search engine + 죄송하지만 검색엔진 %1의 업데이트가 실패하였습니다. - + All your plugins are already up to date. - + 모든 검색엔진이 최신버젼입니다. - + %1 search engine plugin could not be updated, keeping old version. %1 is the name of the search engine - + 검색엔진 %1은 업데이트 될수 없습니다. 기존버젼을 유지하겠습니다. - + %1 search engine plugin could not be installed. %1 is the name of the search engine - + 검색엔진 %1은/는 설치될수 없습니다. - + All selected plugins were uninstalled successfully - + 선택된 모든 플러그인들이 성공적으로 제거 되었습니다 - + %1 search engine plugin was successfully updated. %1 is the name of the search engine - + 검색엔진 %1이 성공적으로 업데이트 되었습니다. - + %1 search engine plugin was successfully installed. %1 is the name of the search engine - - - - - Search engine plugin archive could not be read. - + 검색엔진 %1이 성공적으로 설치 되었습니다. - - Sorry, %1 search plugin install failed. + + %1 search plugin was successfully updated. %1 is the name of the search engine - + 검색엔진 %1이 성공적으로 업데이트 되었습니다. misc - + B bytes - + KiB kibibytes (1024 bytes) - + MiB mebibytes (1024 kibibytes) - + GiB gibibytes (1024 mibibytes) - + TiB tebibytes (1024 gibibytes) - + m minutes - + h hours - + d days - + Unknown 알수 없음 - + h hours - + d days - + Unknown Unknown (size) 알수 없음 - + < 1m < 1 minute < 1분 - + %1m e.g: 10minutes %1분 - + %1h%2m e.g: 3hours 5minutes %1시간%2분 - + %1d%2h%3m e.g: 2days 10hours 2minutes %1일%2시간%3분 @@ -3417,144 +3411,144 @@ However, those plugins were disabled. options_imp - + Options saved successfully! 환경설정 저장 완료! - + Choose Scan Directory 공유폴더 변경 - + Choose save Directory 저장폴더 변경 - + Choose ipfilter.dat file ipfilter.dat 파일 선택 - + I/O Error I/O 에러 - + Couldn't open: 다음 파일을 열수 없습니다: - + in read mode. 읽기전용. - + Invalid Line 잘못된 줄 - + Line - + is malformed. 이 잘못되었습니다. - + Range Start IP 시작하는 IP의 범위 - + Start IP: 시작 IP: - + Incorrect IP 잘못된 IP - + This IP is incorrect. 잘못된 IP입니다. - + Range End IP 끝나는 IP의 범위 - + End IP: 끝 IP: - + IP Range Comment IP 범위 설명 - + Comment: 설명: - + to <min port> to <max port> ~ - + Choose your favourite preview program 미리보기를 할 프로그램을 선택해 주십시오 - + Invalid IP 유효하지 않은 IP - + This IP is invalid. 유효하지 않은 IP 입니다. - + Options were saved successfully. 환경설정이 성공적으로 저장되었습니다. - + Choose scan directory 스켄할 곳을 선택해주세요 - + Choose an ipfilter.dat file ipfilter.dat의 경로를 선택해주세요 - + Choose a save directory 파일을 저장할 경로를 선택해주세요 - + I/O Error Input/Output Error I/O 에러 - + Couldn't open %1 in read mode. %1을 읽기전용 모드로 열수 없습니다. @@ -3562,28 +3556,28 @@ However, those plugins were disabled. preview - + Preview selection 미리보기 선택 - + File preview 파일 미리보기 - + The following files support previewing, <br>please select one of them: 다음 파일은 미리보기를 실행하실수 있습니다, 이 중 하나를 선택해 주십시오: - + Preview 미리보기 - + Cancel 취소 @@ -3591,27 +3585,27 @@ However, those plugins were disabled. previewSelect - + Preview impossible 미리보기 불가 - + Sorry, we can't preview this file 죄송합니다. 이 파일은 미리보기를 할수 없습니다 - + Name 파일 이름 - + Size 크기 - + Progress 진행상황 @@ -3619,404 +3613,404 @@ However, those plugins were disabled. properties - + Torrent Properties 토렌트 구성요소 - + Main Infos 주요 정보 - + File Name 파일 이름 - + Current Session 현재 세션 - + Total Uploaded: 총 업로드량: - + Total Downloaded: 총 다운로드량: - + Download state: 다운로딩 상태: - + Current Tracker: 현재 서버: - + Number of Peers: 공유자수: - + Torrent Content 토렌트 내용 - + OK 확인 - + Cancel 취소 - + Total Failed: 총 실패: - + Finished 완료됨 - + Queued for checking 확인을 위해 대기중 - + Checking files 파일 확인중 - + Connecting to tracker 서버에 연결중 - + Downloading Metadata 자료설명을 받는중 - + Downloading 다운로딩 중 - + Seeding 공유중 - + Allocating 할당중 - + MB MB - + Unknown 알수 없음 - + Complete: 완전함: - + Partial: 부분적: - + Files contained in current torrent: 현 토렌트에 있는 파일들: - + Size 크기 - + Selected 선택됨 - + Unselect 선택되지 않음 - + Select 선택함 - + You can select here precisely which files you want to download in current torrent. 여기서 현재 토렌트 중 다운로드 받을 파일을 선택할수 있습니다. - + False 아님 - + True 맞음 - + Tracker 서버 - + Trackers: 서버목록: - + None - Unreachable? 없음 - 접근할수 없습니까? - + Errors: 에러: - + Progress 진행상황 - + Main infos 주요 정보 - + Number of peers: 전송자수: - + Current tracker: 현재 트레커: - + Total uploaded: 총 업로드양: - + Total downloaded: 총 다운로드양: - + Total failed: 총 실패수: - + Torrent content 토렌트 내용 - + Options 환경설정 - + Download in correct order (slower but good for previewing) 순차적으로 다운받기(늘리지만 미리보기하기에 좋음) - + Share Ratio: 공유 비율: - + Seeders: 완전체 공유자: - + Leechers: 부분 공유: - + Save path: 저장 경로: - + Torrent infos 토렌트 정보 - + Creator: 생성자: - + Torrent hash: 토렌트 헤쉬(Hash): - + Comment: 설명: - + Current session 현재 색션 - + Share ratio: 공유비율: - + Trackers 트렉커(Trackers) - + New tracker 새 트렉커 - + New tracker url: 새 트렉커 주소 (url): - + Priorities: 구성요소: - + Normal: normal priority. Download order is dependent on availability 보통: 보통 우선순위로 다운로드 순서는 자료의 유효성에 의 해 정해집니다 - + High: higher than normal priority. Pieces are preferred over pieces with the same availability, but not over pieces with lower availability 높음: 보통보다 높은 우선순위로 동등한 유효성을 지닌 우선순위 보통의 자료들보다 우선적으로 다운로드 됩니다. - + Maximum: maximum priority, availability is disregarded, the piece is preferred over any other piece with lower priority 최고: 최고의 우선순위로 유효성에 상관없이 무조건 다른 우선순위 자료들보다 우선적으로 다운로드 됩니다. - + File name 파일 이름 - + Priority 우선순위 - + qBittorrent 큐비토런트 - + Trackers list can't be empty. 트렉커 리스트(Trackers List)를 비울수 없습니다. - + Ignored: file is not downloaded at all 무시: 무시된 파일은 전혀 다운로드 되지 않습니다 - + Ignored 무시 - + Normal 보통 - + Maximum 최고 - + High 높음 - + Url seeds Url 완전체(Url seeds) - + New url seed: 새 Url 완전체 (Url seed): - + This url seed is already in the list. 이 Url 완전체(Url seed)는 이미 리스트에 포함되어 있습니다. - + Hard-coded url seeds cannot be deleted. 직접적으로 입력된 url 완전체(Hard-Coded url seeds) 는 삭제될수 없습니다. - + None i.e: No error message 없음 - + New url seed New HTTP source 새 Url 완전체(seed) - + The following url seeds are available for this torrent: 다음 Url 완전체(seed)가 이 토렌트에 사용될수 있습니다. @@ -4024,110 +4018,110 @@ However, those plugins were disabled. search_engine - + Search 검색 - + Search Engines 검색 엔진 - + Search Pattern: 검색 양식: - + Stop 정지 - + Status: 상태: - + Stopped 정지됨 - + Results: 결과: - + Download 다운로드 - + Clear 모두 지우기 - + Update search plugin 검색 plugin 업데이트 - + Search engines... - + 검색 엔진... seeding - + Search 검색 - + The following torrents are finished and shared: 다음 토렌트는 완료되었으며 공유중입니다: - + <u>Note:</u> It is important that you keep sharing your torrents after they are finished for the well being of the network. <u>참고:</u> 파일 다운로드가 완료된 후에도 공유상태를 유지하는 것이 좋습니다. - + Start 시작 - + Pause 정지 - + Delete 삭제 - + Delete Permanently 영구 삭제 - + Torrent Properties 토렌트 구성요소 - + Preview file 미리보기 - + Set upload limit 업로드 속도 제한하기 @@ -4135,57 +4129,57 @@ However, those plugins were disabled. subDownloadThread - + Host is unreachable 호스트에 도달할수 없습니다 - + File was not found (404) 파일을 찾을수 없습니다 (404) - + Connection was denied 연결이 부인되었습니다. - + Url is invalid 주소(Url)가 유효하지 않습니다 - + Connection forbidden (403) 연결이 금지되었습니다 (403) - + Connection was not authorized (401) 연결이 허가되지 않았습니다 (401) - + Content has moved (301) 내용이 이동되었습니다 (301) - + Connection failure 연결 실패 - + Connection was timed out 연결 시간이 초과하였습니다 - + Incorrect network interface 네트웍크 인터페이스(network interface)가 맞지 않습니다. - + Unknown error 알수 없는 오류 @@ -4193,77 +4187,77 @@ However, those plugins were disabled. torrentAdditionDialog - + True 맞음 - + Unable to decode torrent file: 토런트 파일을 해독 할 수가 없습니다: - + This file is either corrupted or this isn't a torrent. 이 파일은 오류가 있거나 토런트 파일이 아닙니다. - + Choose save path 저장 경로 선택 - + False 틀림 - + Empty save path 저장 경로 지우기 - + Please enter a save path 저장 경로를 지정해주십시오 - + Save path creation error 저장 경로 설정이 잘못되었습니다 - + Could not create the save path 저장 경로를 생성할수가 없습니다 - + Invalid file selection 부적당한 파일 선택 - + You must select at least one file in the torrent 토렌트에서 적어도 하나 이상의 파일을 선택해야 합니다 - + File name 파일 이름 - + Size 크기 - + Progress 진행상황 - + Priority 우선순위 diff --git a/src/main.cpp b/src/main.cpp index aaa80cdd8..458531d2d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -44,33 +44,33 @@ #include "GUI.h" #include "misc.h" -void useStyle(QApplication *app, QString style){ - std::cout << "* Style: Using " << style.toStdString() << " style\n"; - if(style == QString::fromUtf8("Cleanlooks")){ - app->setStyle(new QCleanlooksStyle()); - return; - } - if(style == QString::fromUtf8("Motif")){ - app->setStyle(new QMotifStyle()); - return; - } - if(style == QString::fromUtf8("CDE")){ - app->setStyle(new QCDEStyle()); - return; - } +void useStyle(QApplication *app, int style){ + switch(style) { + case 0: + app->setStyle(new QPlastiqueStyle()); + break; + case 1: + app->setStyle(new QCleanlooksStyle()); + break; + case 2: + app->setStyle(new QMotifStyle()); + break; + case 3: + app->setStyle(new QCDEStyle()); + break; #ifdef Q_WS_MAC - if(style == QString::fromUtf8("MacOS")){ + case 4: app->setStyle(new QMacStyle()); - return; - } + break; #endif #ifdef Q_WS_WIN - if(style == QString::fromUtf8("WinXP")){ + case 4: app->setStyle(new QWindowsXPStyle()); - return; - } + break; #endif - app->setStyle(new QPlastiqueStyle()); + default: + app->setStyle(new QPlastiqueStyle()); + } } // Main @@ -123,27 +123,15 @@ int main(int argc, char *argv[]){ } QApplication app(argc, argv); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); - QString style; -#ifdef Q_WS_WIN - style = settings.value(QString::fromUtf8("Options/Style"), QString::fromUtf8("WinXP")).toString(); -#endif -#ifdef Q_WS_MAC - style = settings.value(QString::fromUtf8("Options/Style"), QString::fromUtf8("MacOS")).toString(); -#endif -#ifndef Q_WS_WIN - #ifndef Q_WS_MAC - style = settings.value(QString::fromUtf8("Options/Style"), QString::fromUtf8("Plastique")).toString(); - #endif -#endif - useStyle(&app, style); + useStyle(&app, settings.value("Preferences/General/Style", 4).toInt()); QSplashScreen *splash = new QSplashScreen(QPixmap(QString::fromUtf8(":/Icons/splash.png"))); splash->show(); // Open options file to read locale - locale = settings.value(QString::fromUtf8("Options/Language/Locale"), QString()).toString(); + locale = settings.value(QString::fromUtf8("Preferences/General/Locale"), QString()).toString(); QTranslator translator; if(locale.isEmpty()){ locale = QLocale::system().name(); - settings.setValue(QString::fromUtf8("Options/Language/Locale"), locale); + settings.setValue(QString::fromUtf8("Preferences/General/Locale"), locale); } if(translator.load(QString::fromUtf8(":/lang/qbittorrent_") + locale)){ qDebug("%s locale recognized, using translation.", (const char*)locale.toUtf8()); diff --git a/src/options.ui b/src/options.ui index 14cd0548f..47baf29ad 100644 --- a/src/options.ui +++ b/src/options.ui @@ -5,8 +5,8 @@ 0 0 - 594 - 530 + 597 + 560 @@ -19,12 +19,21 @@ Options -- qBittorrent - - 9 - 6 + + 9 + + + 9 + + + 9 + + + 9 + @@ -39,7 +48,7 @@ - Options + Preferences Qt::AlignCenter @@ -73,310 +82,471 @@ Qt::ElideLeft - + - Connection + General + + + :/Icons/star.png - - 9 - - - 6 - - + - Main + User interface settings - - 9 - - - 6 - - - 0 - - - 6 - - - + + + Language: + + + + + + + QComboBox::AdjustToContents + + 0 - - 6 + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 6 + true + + + + <b>Note:</b> Changes will be applied after qBittorrent is restarted. + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + Visual style: + + + + - - - Download Limit: - - - spin_download - - + + Plastique style (KDE like) + - - - Upload Limit: - - + + Cleanlooks style (Gnome like) + - - - Max Connects: - - - spin_port_min - - + + Motif style (Unix like) + + + + + CDE style (Common Desktop Environment like) + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Ask for confirmation on exit when download list is not empty + + + true + + + + + + + Display current speed in title bar + + + + + + + + + + System tray icon + + + + + + Disable system tray icon + + + + + + + Close to tray + + + + + + + Minimize to tray + + + false + + + + + + + Show notification balloons in tray + + + true + + + + + + + + + + Preview program + + + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Media player: + + + + + + + + + + ... + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + Downloads + + + :/Icons/gear.png + + + + + + Filesystem + + + + + + Put downloads in this folder: + + + + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + - + - Port range: - - - spin_port_min + - + - Share ratio: + ... - - - - 0 - + + + + + + Pre-allocate all files + + + + + + + + + + When adding a torrent + + + + + + Display torrent content and some options + + + true + + + + + + + Do not start download automatically + + + + + + + + + + Folder watching + + + + + + Automatically download torrents present in this folder: + + + + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + 6 + + 0 + + + 0 + + + 0 + + + 0 + - - - 0 - - - 6 + + + false - - - - false - - - - - - 1000000 - - - 1 - - - 200 - - - - - - - - 64 - 0 - - - - KiB/s - - - - - - - Disable - - - true - - - - - - - Qt::Horizontal - - - - 61 - 25 - - - - - + - - - 0 + + + false - - 6 + + ... - - - - false - - - - - - 1000000 - - - 1 - - - 10 - - - - - - - - 64 - 0 - - - - KiB/s - - - - - - - Disable - - - true - - - - - - - Qt::Horizontal - - - - 61 - 25 - - - - - + + + + + + + + + + + + Qt::Vertical + + + + 557 + 21 + + + + + + + + + Connection + + + :/Icons/connection.png + + + + + + + + + + Listening port + + - - 0 - - - 6 - - - - - false - - - 1000 - - - 1 - - - 600 - - - - - - - - 88 - 0 - - - - connections - - - - - - true - + - Disable - - - true + Port range: - - - Qt::Horizontal - - - - 40 - 20 - + + + 1000 - - - - - - - - 0 - - - 6 - - - 65525 - - 1000 - 6881 @@ -385,7 +555,7 @@ - + to Qt::AlignCenter @@ -393,753 +563,490 @@ - - - 65525 - + 1000 + + 65525 + 6889 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - 0 + + + Enable UPnP port mapping - - 6 + + true + + + + + + Enable NAT-PMP port mapping + + + true + + + + + + + + + + Global bandwidth limiting + + + + - - - 1 KiB DL = - - - - - - - false - - - Qt::AlignHCenter - - - 1 - - - 99.900000000000006 - - - 1.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - - 82 - 0 - - - - KiB UP max. - - - - - - - Disable - - - true - - + + + + + + 0 + 45 + + + + Upload: + + + true + + + + + + + + 0 + 37 + + + + Download: + + + + - - - Qt::Horizontal - - - - 40 - 20 - - - + + + + + + + true + + + + 0 + 27 + + + + + + + 1 + + + 1000000 + + + 50 + + + + + + + KiB/s + + + + + + + + + + + false + + + + 0 + 27 + + + + + + + 1 + + + 1000000 + + + 100 + + + + + + + KiB/s + + + + + + - - - - - - - - - - Peer eXchange (PeX) - - - - 9 - - - 6 - - - - - Disable Peer eXchange (PeX) - - - - - - - - - - 0 - - - 6 - + + + + - + + + true + - DHT (trackerless) + Proxy Settings - - 9 - - - 6 - - - - - Disable DHT (Trackerless) - - - - - - DHT configuration - - - - 9 - - - 6 - - - - - 0 + + + + + Type: + + + + + + + + (None) - - 6 + + + + HTTP - - - - DHT port: - - - - - - - - 6 - 0 - - - - 65525 - - - 1000 - - - 6881 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - + + + + SOCKS5 + + + + + + + + false + + + Proxy: + + + + + + + false + + + 0.0.0.0 + + + 15 + + + QLineEdit::Normal + + + + + + + false + + + Port: + + + + + + + false + + + 65525 + + + 8080 + + + + + + + Qt::Horizontal + + + + 21 + 29 + + + + + - - - - - - - Encryption - - - - 9 - - - 6 - - - 0 - - - 6 - - - - 0 + + + false - - 6 + + Authentication + + + + - - - Encryption state: - - - - - + - - Enabled - + + + false + + + Username: + + - - Forced - + + + false + + + Password: + + + + + + - - Disabled - + + + false + + + + + + 1000 + + + QLineEdit::Normal + + - + + + + false + + + + + + 1000 + + + QLineEdit::Password + + + + - Qt::Vertical + Qt::Horizontal - 20 - 40 + 40 + 20 - - - - - - - - - - - - - - - - Qt::Vertical - - - - 554 - 16 - - - - - - - - - Behaviour - - - - 9 - - - 6 - - - - - Torrent addition - - - - 9 - - - 6 - - - - - Display a torrent addition dialog everytime I add a torrent - - - true - - - - - - - false - - - Default save path - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - Save Path: - - - proxy_username - - - - - - - 0 - - - 6 - - - - - - - - - - - - ... - - - - - - - - - - - - - - - - - Main window - - - - 9 - - - 6 - - - - - Exit confirmation when the download list is not empty - - - true - - - - - - - Go to systray when minimizing window - - - true - - - - - - - Go to systray when closing main window - - - - - - - Disable systray integration - - - - - - - - - - Systray messages - - - - 9 - - - 6 - - - - - Always display systray messages - - - true - - - - - - - Display systray messages only when window is hidden - - - - - - - Never display systray messages - - - - - - - - - - Qt::Vertical - - - - 466 - 31 - - - - - - - - - Language - - - - 9 - - - 6 - - - - - Localization - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - - - - - - - Language: + + + false - - - - - 300 - 25 + 0 + 110 - - QComboBox::AdjustToContents - - - 0 - - - - - - - Qt::Horizontal - - - - 40 - 20 - + + Affected connections - - - - - - - - - - - <b>Note:</b> Changes will be applied after qBittorrent is restarted. - - - - - - - <b>Translators note:</b> If qBittorrent is not available in your language, <br/>and if you would like to translate it in your mother tongue, <br/>please contact me (chris@qbittorrent.org). - - - - - - - Qt::Vertical - - - - 20 - 40 - - - + + + + 10 + 20 + 341 + 22 + + + + Use proxy for connections to trackers + + + true + + + + + + 10 + 40 + 341 + 22 + + + + Use proxy for connections to regular peers + + + true + + + + + + 10 + 60 + 341 + 22 + + + + Use proxy for connections to web seeds + + + true + + + + + + 10 + 80 + 341 + 22 + + + + Use proxy for DHT messages + + + true + + + + + + + + - + - IP Filter + Bittorrent + + + :/Icons/bt_settings.png - - 9 - - - 6 - - - - - Activate IP Filtering - - - - - - false - + - Filter Settings + Connections limit - - 9 - - - 6 - - - - - - 0 - 171 - - - - - Sans Serif - 8 - 50 - false - false - false - false - - - - QAbstractItemView::ExtendedSelection - - - false - - - - Start IP - - - - - End IP - - - - - Origin - - - - - Comment - - - - - - 0 - - - 6 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - + - Add Range + Global maximum number of connections: + + + true - - - Remove Range + + + true + + + + 8 + + + + 2 + + + 2000 + + + 500 @@ -1160,94 +1067,31 @@ - - 0 - - - 6 - - + - ipfilter.dat Path: + Maximum number of connections per torrent: - - - - - - - - - ... + + true - - - - - - - - - - Proxy - - - - 9 - - - 6 - - - - - Enable connection through a proxy server - - - - - - - false - - - Proxy Settings - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - Server IP or url: + + + + 8 + - - - - - - 0.0.0.0 + + 2 - - 15 + + 2000 - - QLineEdit::Normal + + 100 @@ -1258,26 +1102,38 @@ - 21 + 40 20 + + + + - + - Port: + Maximum number of upload slots per torrent: + + + true - + + + + 8 + + - 65525 + 500 - 8080 + 4 @@ -1296,31 +1152,69 @@ + + + + + + + Additional Bittorrent features + + + + + + Enable DHT network (decentralized) + + + true + + + - - - 0 + + + Enable Peer eXchange (PeX) - - 6 + + true + + + + + + + Enable Local Peer Discovery + + true + + + + + - + - Proxy type: + Encryption: - + + + + Enabled + + - HTTP + Forced - SOCKS5 + Disabled @@ -1340,311 +1234,337 @@ - - - - Proxy server requires authentication - - - - - - - false - - - Authentication - - - - 9 + + + + + + + Share ratio settings + + + + + 11 + 30 + 535 + 31 + + + + + + + Desired ratio: - - 6 + + + + + + false - - - - 0 - - - 6 - - - - - 0 - - - 6 - - - - - User Name: - - - - - - - Password: - - - - - - - - - 0 - - - 6 - - - - - - - - 1000 - - - QLineEdit::Normal - - - - - - - - - - 1000 - - - QLineEdit::Password - - - - - - - - - - - - - - - 0 - 110 - - - - Affected connections - - - - - 10 - 20 - 341 - 22 - + + + 8 + - - Use proxy for connections to trackers + + Qt::AlignHCenter - - true + + 1 - - - - - 10 - 40 - 341 - 22 - + + 1.000000000000000 - - Use proxy for connections to regular peers + + 10.000000000000000 + + + 0.100000000000000 - - true + + 1.000000000000000 - - - - 10 - 60 - 341 - 22 - + + + + + Qt::Horizontal - - Use proxy for connections to web seeds + + + 40 + 20 + - - true + + + + + + + + 11 + 67 + 535 + 31 + + + + + + + Remove torrents when their ratio reaches: - - - - 10 - 80 - 341 - 22 - + + + + + false - - Use proxy for DHT messages + + + 8 + - - true + + Qt::AlignHCenter + + + 1 + + + 1.000000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 - - - - - - Qt::Vertical - - - - 20 - 21 - - - - - + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + - + - Misc + IP Filter + + + :/Icons/filter.png - - 9 - 6 + + 9 + + + 9 + + + 9 + + + 9 + + + + + Activate IP Filtering + + + - + + + false + - Directory scan + Filter Settings - - 9 - 6 + + 9 + + + 9 + + + 9 + + + 9 + - - - Enable directory scan (auto add torrent files inside) + + + + 0 + 171 + + + + Sans Serif + 8 + 50 + false + false + false + false + + + + QAbstractItemView::ExtendedSelection + + + false + + + + Start IP + + + + + End IP + + + + + Origin + + + + + Comment + + - - 0 - 6 + + 0 + + + 0 + + + 0 + + + 0 + - - - false + + + Qt::Horizontal + + + + 40 + 20 + + + + + - Scanned Dir: + Add Range - - proxy_username + + :/Icons/skin/add.png - - - 0 + + + Remove Range - - 6 + + :/Icons/skin/remove.png - - - - false - - - - - - - false - - - ... - - - - + + + + + + Qt::Horizontal + + + + 40 + 20 + + + - - - - - - - Preview program - - - - 9 - - - 6 - - - 0 - 6 + + 0 + + + 0 + + + 0 + + + 0 + - + - Audio/Video player: + Filter file path: - + - + ... @@ -1655,97 +1575,27 @@ - - - - Style (Look 'n Feel) - - - - 9 - - - 6 - - - - - Plastique style (KDE like) - - - true - - - - - - - Cleanlooks style (GNOME like) - - - - - - - Motif style (default Qt style on Unix systems) - - - - - - - CDE style (Common Desktop Environment like) - - - - - - - false - - - MacOS style (MacOSX only) - - - - - - - false - - - WindowsXP style (Windows XP only) - - - - - - - - - - Qt::Vertical - - - - 466 - 41 - - - - - - 0 - 6 + + 0 + + + 0 + + + 0 + + + 0 + @@ -1763,6 +1613,8 @@ - + + + diff --git a/src/optionsNG.ui b/src/optionsNG.ui deleted file mode 100644 index 132ca1f76..000000000 --- a/src/optionsNG.ui +++ /dev/null @@ -1,1590 +0,0 @@ - - Dialog - - - - 0 - 0 - 597 - 560 - - - - - 463 - 389 - - - - Options -- qBittorrent - - - - 6 - - - 9 - - - 9 - - - 9 - - - 9 - - - - - - Sans Serif - 12 - 75 - false - true - false - false - - - - Preferences - - - Qt::AlignCenter - - - - - - - Qt::Horizontal - - - - - - - QTabWidget::North - - - QTabWidget::Rounded - - - 0 - - - - 22 - 22 - - - - Qt::ElideLeft - - - - General - - - :/Icons/star.png - - - - - - User interface settings - - - - - - - - Language: - - - - - - - QComboBox::AdjustToContents - - - 0 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - 6 - true - - - - <b>Note:</b> Changes will be applied after qBittorrent is restarted. - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - Visual style: - - - - - - - - Plastique style (KDE like) - - - - - Cleanlooks style (Gnome like) - - - - - Motif style (Unix like) - - - - - CDE style (Common Desktop Environment like) - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Ask for confirmation on exit when download list is not empty - - - true - - - - - - - Display current speed in title bar - - - - - - - - - - System tray icon - - - - - - Disable system tray icon - - - - - - - Close to tray - - - - - - - Minimize to tray - - - false - - - - - - - Show notification balloons in tray - - - true - - - - - - - - - - Preview program - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Media player: - - - - - - - - - - ... - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - Downloads - - - :/Icons/gear.png - - - - - - Filesystem - - - - - - Put downloads in this folder: - - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - ... - - - - - - - - - - - Pre-allocate all files - - - - - - - - - - When adding a torrent - - - - - - Display torrent content and some options - - - true - - - - - - - Do not start download automatically - - - - - - - - - - Directory watching - - - - - - Automatically download torrents present in this folder: - - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - false - - - - - - - false - - - ... - - - - - - - - - - - - - - Qt::Vertical - - - - 557 - 21 - - - - - - - - - Connection - - - :/Icons/connection.png - - - - - 10 - 9 - 557 - 426 - - - - - - - - - Listening port - - - - - - - - Port range: - - - - - - - 1000 - - - 65525 - - - 6881 - - - - - - - to - - - Qt::AlignCenter - - - - - - - 1000 - - - 65525 - - - 6889 - - - - - - - - - Enable UPnP port mapping - - - - - - - Enable NAT-PMP port mapping - - - - - - - - - - Global bandwidth limiting - - - - - - - - - - Upload: - - - true - - - - - - - Download: - - - - - - - - - - - - - true - - - - - - 1 - - - 1000000 - - - 50 - - - - - - - KiB/s - - - - - - - - - - - false - - - - - - 1 - - - 1000000 - - - 1 - - - - - - - KiB/s - - - - - - - - - - - - - - - - - - true - - - Proxy Settings - - - - - - - - Type: - - - - - - - - (None) - - - - - HTTP - - - - - SOCKS5 - - - - - - - - false - - - Proxy: - - - - - - - false - - - 0.0.0.0 - - - 15 - - - QLineEdit::Normal - - - - - - - false - - - Port: - - - - - - - false - - - 65525 - - - 8080 - - - - - - - Qt::Horizontal - - - - 21 - 29 - - - - - - - - - - - - false - - - Authentication - - - - - - - - - - - false - - - Username: - - - - - - - false - - - Password: - - - - - - - - - - - false - - - - - - 1000 - - - QLineEdit::Normal - - - - - - - false - - - - - - 1000 - - - QLineEdit::Password - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - false - - - - 0 - 110 - - - - Affected connections - - - - - 10 - 20 - 341 - 22 - - - - Use proxy for connections to trackers - - - true - - - - - - 10 - 40 - 341 - 22 - - - - Use proxy for connections to regular peers - - - true - - - - - - 10 - 60 - 341 - 22 - - - - Use proxy for connections to web seeds - - - true - - - - - - 10 - 80 - 341 - 22 - - - - Use proxy for DHT messages - - - true - - - - - - - - - - - - - Bittorrent - - - :/Icons/bt_settings.png - - - - - - Connections limit - - - - - - - - Global maximum number of connections: - - - true - - - - - - - true - - - - 8 - - - - 2 - - - 2000 - - - 500 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Maximum number of connections per torrent: - - - true - - - - - - - - 8 - - - - 2 - - - 2000 - - - 100 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Maximum number of upload slots per torrent: - - - true - - - - - - - - 8 - - - - 500 - - - 4 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - Additional Bittorrent features - - - - - - Enable DHT network (decentralized) - - - true - - - - - - - Enable Peer eXchange (PeX) - - - true - - - - - - - Enable Local Peer Discovery - - - true - - - - - - - - - Encryption: - - - - - - - - Enabled - - - - - Forced - - - - - Disabled - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - Share ratio settings - - - - - 11 - 30 - 535 - 31 - - - - - - - Desired ratio: - - - - - - - false - - - - 8 - - - - Qt::AlignHCenter - - - 1 - - - 1.000000000000000 - - - 10.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 11 - 67 - 535 - 31 - - - - - - - Remove torrents when their ratio reaches: - - - - - - - false - - - - 8 - - - - Qt::AlignHCenter - - - 1 - - - 1.000000000000000 - - - 10.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - IP Filter - - - :/Icons/filter.png - - - - 6 - - - 9 - - - 9 - - - 9 - - - 9 - - - - - Activate IP Filtering - - - - - - - false - - - Filter Settings - - - - 6 - - - 9 - - - 9 - - - 9 - - - 9 - - - - - - 0 - 171 - - - - - Sans Serif - 8 - 50 - false - false - false - false - - - - QAbstractItemView::ExtendedSelection - - - false - - - - Start IP - - - - - End IP - - - - - Origin - - - - - Comment - - - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Add Range - - - - - - - Remove Range - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Filter file path: - - - - - - - - - - ... - - - - - - - - - - - - - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Qt::Horizontal - - - QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - true - - - - - - - - - - - - diff --git a/src/options_imp.cpp b/src/options_imp.cpp index eb9888a19..8a80c6a94 100644 --- a/src/options_imp.cpp +++ b/src/options_imp.cpp @@ -57,163 +57,153 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ } } connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(applySettings(QAbstractButton*))); - // Setting icons - tabOptions->setTabIcon(0, QIcon(QString::fromUtf8(":/Icons/connection.png"))); - tabOptions->setTabIcon(1, QIcon(QString::fromUtf8(":/Icons/style.png"))); - tabOptions->setTabIcon(2, QIcon(QString::fromUtf8(":/Icons/locale.png"))); - tabOptions->setTabIcon(3, QIcon(QString::fromUtf8(":/Icons/filter.png"))); - tabOptions->setTabIcon(4, QIcon(QString::fromUtf8(":/Icons/proxy.png"))); - tabOptions->setTabIcon(5, QIcon(QString::fromUtf8(":/Icons/wizard.png"))); - lbl_icon_i18n->setPixmap(QPixmap(QString::fromUtf8(":/Icons/locale.png"))); - lblencryption_icon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/password.png"))); - addFilterRange->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/add.png"))); - delFilterRange->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/remove.png"))); - enableProxyAuth_checkBox->setIcon(QIcon(QString::fromUtf8(":/Icons/encrypted.png"))); - to_range->setText(tr("to", " to ")); #ifdef Q_WS_WIN - radioWinXPStyle->setEnabled(true); + comboStyle->addItem("Windows XP Style (Windows Only)"); #endif #ifdef Q_WS_MAC - radioMacOSStyle->setEnabled(true); + comboStyle->addItem("MacOS Style (MacOS Only)"); #endif // Languages supported - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/united_kingdom.png"))), QString::fromUtf8("English")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/united_kingdom.png"))), QString::fromUtf8("English")); locales << "en_GB"; - combo_i18n->setCurrentIndex(0); - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/france.png"))), QString::fromUtf8("Français")); + comboI18n->setCurrentIndex(0); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/france.png"))), QString::fromUtf8("Français")); locales << "fr_FR"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/germany.png"))), QString::fromUtf8("Deutsch")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/germany.png"))), QString::fromUtf8("Deutsch")); locales << "de_DE"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/hungary.png"))), QString::fromUtf8("Magyar")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/hungary.png"))), QString::fromUtf8("Magyar")); locales << "hu_HU"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/italy.png"))), QString::fromUtf8("Italiano")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/italy.png"))), QString::fromUtf8("Italiano")); locales << "it_IT"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/netherlands.png"))), QString::fromUtf8("Nederlands")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/netherlands.png"))), QString::fromUtf8("Nederlands")); locales << "nl_NL"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/spain.png"))), QString::fromUtf8("Español")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/spain.png"))), QString::fromUtf8("Español")); locales << "es_ES"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/spain_catalunya.png"))), QString::fromUtf8("Català")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/spain_catalunya.png"))), QString::fromUtf8("Català")); locales << "ca_ES"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/portugal.png"))), QString::fromUtf8("Português")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/portugal.png"))), QString::fromUtf8("Português")); locales << "pt_PT"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/brazil.png"))), QString::fromUtf8("Português brasileiro")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/brazil.png"))), QString::fromUtf8("Português brasileiro")); locales << "pt_BR"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/poland.png"))), QString::fromUtf8("Polski")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/poland.png"))), QString::fromUtf8("Polski")); locales << "pl_PL"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/slovakia.png"))), QString::fromUtf8("Slovenčina")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/slovakia.png"))), QString::fromUtf8("Slovenčina")); locales << "sk_SK"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/romania.png"))), QString::fromUtf8("Română")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/romania.png"))), QString::fromUtf8("Română")); locales << "ro_RO"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/turkey.png"))), QString::fromUtf8("Türkçe")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/turkey.png"))), QString::fromUtf8("Türkçe")); locales << "tr_TR"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/greece.png"))), QString::fromUtf8("Ελληνικά")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/greece.png"))), QString::fromUtf8("Ελληνικά")); locales << "el_GR"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/sweden.png"))), QString::fromUtf8("Svenska")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/sweden.png"))), QString::fromUtf8("Svenska")); locales << "sv_SE"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/finland.png"))), QString::fromUtf8("Suomi")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/finland.png"))), QString::fromUtf8("Suomi")); locales << "fi_FI"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/norway.png"))), QString::fromUtf8("Norsk")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/norway.png"))), QString::fromUtf8("Norsk")); locales << "nb_NO"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/denmark.png"))), QString::fromUtf8("Dansk")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/denmark.png"))), QString::fromUtf8("Dansk")); locales << "da_DK"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/bulgaria.png"))), QString::fromUtf8("Български")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/bulgaria.png"))), QString::fromUtf8("Български")); locales << "bg_BG"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/ukraine.png"))), QString::fromUtf8("Українська")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/ukraine.png"))), QString::fromUtf8("Українська")); locales << "uk_UA"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/russia.png"))), QString::fromUtf8("Русский")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/russia.png"))), QString::fromUtf8("Русский")); locales << "ru_RU"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/japan.png"))), QString::fromUtf8("日本語")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/japan.png"))), QString::fromUtf8("日本語")); locales << "ja_JP"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/china.png"))), QString::fromUtf8("中文 (简体)")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/china.png"))), QString::fromUtf8("中文 (简体)")); locales << "zh_CN"; - combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/south_korea.png"))), QString::fromUtf8("한글")); + comboI18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/south_korea.png"))), QString::fromUtf8("한글")); locales << "ko_KR"; - QString home = QDir::homePath(); - if(home[home.length()-1] != QDir::separator()){ - home += QDir::separator(); - } - txt_savePath->setText(home+"qBT_dir"); // Load options loadOptions(); // Disable systray integration if it is not supported by the system if(!QSystemTrayIcon::isSystemTrayAvailable()){ - systrayDisabled(true); - check_disableSystray->setEnabled(false); + checkNoSystray->setEnabled(false); } // Connect signals / slots - connect(disableUPLimit, SIGNAL(stateChanged(int)), this, SLOT(disableUpload(int))); - connect(disableDLLimit, SIGNAL(stateChanged(int)), this, SLOT(disableDownload(int))); - connect(disableDHT, SIGNAL(stateChanged(int)), this, SLOT(disableDHTGroup(int))); - connect(check_disableSystray, SIGNAL(stateChanged(int)), this, SLOT(systrayDisabled(int))); - connect(disableRatio, SIGNAL(stateChanged(int)), this, SLOT(disableShareRatio(int))); - connect(activateFilter, SIGNAL(stateChanged(int)), this, SLOT(enableFilter(int))); - connect(enableProxy_checkBox, SIGNAL(stateChanged(int)), this, SLOT(enableProxy(int))); - connect(enableProxyAuth_checkBox, SIGNAL(stateChanged(int)), this, SLOT(enableProxyAuth(int))); - connect(enableScan_checkBox, SIGNAL(stateChanged(int)), this, SLOT(enableDirScan(int))); - connect(disableMaxConnec, SIGNAL(stateChanged(int)), this, SLOT(disableMaxConnecLimit(int))); - connect(checkAdditionDialog, SIGNAL(stateChanged(int)), this, SLOT(enableSavePath(int))); + // General tab + connect(checkNoSystray, SIGNAL(stateChanged(int)), this, SLOT(setSystrayOptionsState(int))); + // Downloads tab + connect(checkScanDir, SIGNAL(stateChanged(int)), this, SLOT(enableDirScan(int))); + // Connection tab + connect(checkUploadLimit, SIGNAL(stateChanged(int)), this, SLOT(enableUploadLimit(int))); + connect(checkDownloadLimit, SIGNAL(stateChanged(int)), this, SLOT(enableDownloadLimit(int))); + connect(comboProxyType, SIGNAL(currentIndexChanged(int)),this, SLOT(enableProxy(int))); + connect(checkProxyAuth, SIGNAL(stateChanged(int)), this, SLOT(enableProxyAuth(int))); + // Bittorrent tab + connect(checkMaxConnecs, SIGNAL(stateChanged(int)), this, SLOT(enableMaxConnecsLimit(int))); + connect(checkMaxConnecsPerTorrent, SIGNAL(stateChanged(int)), this, SLOT(enableMaxConnecsLimitPerTorrent(int))); + connect(checkMaxUploadsPerTorrent, SIGNAL(stateChanged(int)), this, SLOT(enableMaxUploadsLimitPerTorrent(int))); + connect(checkRatioLimit, SIGNAL(stateChanged(int)), this, SLOT(enableShareRatio(int))); + connect(checkRatioRemove, SIGNAL(stateChanged(int)), this, SLOT(enableDeleteRatio(int))); + // IP Filter tab + connect(checkIPFilter, SIGNAL(stateChanged(int)), this, SLOT(enableFilter(int))); + // Apply button is activated when a value is changed - // Main - connect(spin_download, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); - connect(spin_upload, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); - connect(spin_port_min, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); - connect(spin_port_max, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); - connect(spin_max_connec, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); - connect(spin_ratio, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); - connect(disableUPLimit, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(disableDLLimit, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(disableRatio, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(scanDir, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); - connect(enableScan_checkBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(disableMaxConnec, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(disableDHT, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(disablePeX, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(comboEncryption, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); - // Language - connect(combo_i18n, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); - // IPFilter - connect(activateFilter, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(filterFile, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); - // Proxy - connect(enableProxyAuth_checkBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(enableProxy_checkBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(proxy_port, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); - connect(proxy_ip, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); - connect(proxy_username, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); - connect(proxy_password, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); + // General tab + connect(comboI18n, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); + connect(comboStyle, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); + connect(checkConfirmExit, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkSpeedInTitle, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkNoSystray, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkCloseToSystray, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkMinimizeToSysTray, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkSystrayBalloons, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(textMediaPlayer, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); + // Downloads tab + connect(textSavePath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); + connect(checkPreallocateAll, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkAdditionDialog, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkStartPaused, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkScanDir, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(textScanDir, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); + // Connection tab + connect(spinPortMin, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); + connect(spinPortMax, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); + connect(checkUPnP, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkNATPMP, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkUploadLimit, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkDownloadLimit, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(spinUploadLimit, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); + connect(spinDownloadLimit, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); connect(comboProxyType, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); + connect(textProxyIP, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); + connect(spinProxyPort, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); + connect(checkProxyAuth, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(textProxyUsername, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); + connect(textProxyPassword, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); connect(checkProxyTrackers, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(checkProxyPeers, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(checkProxyWebseeds, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(checkProxyDHT, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - // Misc Settings - connect(checkAdditionDialog, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(txt_savePath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); - connect(check_goToSysTray, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(check_closeToSysTray, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(confirmExit_checkBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); - connect(preview_program, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); - connect(alwaysOSD, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); - connect(someOSD, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); - connect(neverOSD, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); - connect(radioPlastiqueStyle, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); - connect(radioCleanlooksStyle, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); - connect(radioMotifStyle, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); - connect(radioCDEStyle, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); - connect(check_disableSystray, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); -#ifdef Q_WS_WIN - connect(radioWinXPStyle, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); -#endif -#ifdef Q_WS_MAC - connect(radioMacOSStyle, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); -#endif + // Bittorrent tab + connect(checkMaxConnecs, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkMaxConnecsPerTorrent, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkMaxUploadsPerTorrent, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(spinMaxConnec, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); + connect(spinMaxConnecPerTorrent, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); + connect(spinMaxUploadsPerTorrent, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); + connect(checkDHT, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkPeX, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkLSD, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(comboEncryption, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); + connect(checkRatioLimit, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(checkRatioRemove, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(spinRatio, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); + connect(spinMaxRatio, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); + // IP Filter tab + connect(checkIPFilter, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(addFilterRangeButton, SIGNAL(clicked()), this, SLOT(enableApplyButton())); + connect(delFilterRangeButton, SIGNAL(clicked()), this, SLOT(enableApplyButton())); + connect(textFilterPath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); // Disable apply Button applyButton->setEnabled(false); if(!QSystemTrayIcon::supportsMessages()){ // Mac OS X doesn't support it yet - neverOSD->setChecked(true); - groupOSD->setEnabled(false); + checkSystrayBalloons->setChecked(false); + checkSystrayBalloons->setEnabled(false); } } @@ -223,32 +213,33 @@ options_imp::~options_imp(){ } void options_imp::useStyle(){ - QString style = getStyle(); - if(style == "Cleanlooks"){ - QApplication::setStyle(new QCleanlooksStyle()); - return; - } - if(style == "Motif"){ - QApplication::setStyle(new QMotifStyle()); - return; - } - if(style == "CDE"){ - QApplication::setStyle(new QCDEStyle()); - return; - } + int style = getStyle(); + switch(style) { + case 0: + QApplication::setStyle(new QPlastiqueStyle()); + break; + case 1: + QApplication::setStyle(new QCleanlooksStyle()); + break; + case 2: + QApplication::setStyle(new QMotifStyle()); + break; + case 3: + QApplication::setStyle(new QCDEStyle()); + break; #ifdef Q_WS_MAC - if(style == "MacOS"){ + case 4: QApplication::setStyle(new QMacStyle()); - return; - } + break; #endif #ifdef Q_WS_WIN - if(style == "WinXP"){ + case 4: QApplication::setStyle(new QWindowsXPStyle()); - return; - } + break; #endif - QApplication::setStyle(new QPlastiqueStyle()); + default: + QApplication::setStyle(new QPlastiqueStyle()); + } } void options_imp::saveOptions(){ @@ -258,101 +249,88 @@ void options_imp::saveOptions(){ useStyle(); // Check if min port < max port checkPortsLogic(); - settings.beginGroup("Options"); - // Main options - settings.beginGroup("Main"); - settings.setValue(QString::fromUtf8("DLLimit"), getLimits().first); - settings.setValue(QString::fromUtf8("UPLimit"), getLimits().second); - settings.setValue(QString::fromUtf8("MaxConnecs"), getMaxConnec()); - settings.setValue(QString::fromUtf8("PortRangeMin"), getPorts().first); - settings.setValue(QString::fromUtf8("PortRangeMax"), getPorts().second); - settings.setValue(QString::fromUtf8("ShareRatio"), getRatio()); - settings.setValue(QString::fromUtf8("EncryptionState"), getEncryptionSetting()); - settings.setValue(QString::fromUtf8("PeXState"), !isPeXDisabled()); - settings.setValue(QString::fromUtf8("DHTPort"), getDHTPort()); - settings.setValue(QString::fromUtf8("ScanDir"), getScanDir()); - // End Main options - settings.endGroup(); - // Language options - settings.beginGroup(QString::fromUtf8("Language")); + settings.beginGroup("Preferences"); + // General preferences + settings.beginGroup("General"); settings.setValue(QString::fromUtf8("Locale"), getLocale()); - // End Language options + settings.setValue(QString::fromUtf8("Style"), getStyle()); + settings.setValue(QString::fromUtf8("ExitConfirm"), confirmOnExit()); + settings.setValue(QString::fromUtf8("SpeedInTitleBar"), speedInTitleBar()); + settings.setValue(QString::fromUtf8("SystrayEnabled"), systrayIntegration()); + settings.setValue(QString::fromUtf8("CloseToTray"), closeToTray()); + settings.setValue(QString::fromUtf8("MinimizeToTray"), minimizeToTray()); + settings.setValue(QString::fromUtf8("NotificationBaloons"), OSDEnabled()); + settings.setValue(QString::fromUtf8("MediaPlayer"), getPreviewProgram()); + // End General preferences settings.endGroup(); - // IPFilter options - settings.beginGroup(QString::fromUtf8("IPFilter")); - bool enabled = isFilteringEnabled(); - settings.setValue(QString::fromUtf8("Enabled"), enabled); - if(enabled){ - settings.setValue(QString::fromUtf8("File"), filterFile->text()); - } - // End IPFilter options + // Downloads preferences + settings.beginGroup("Downloads"); + settings.setValue(QString::fromUtf8("SavePath"), getSavePath()); + settings.setValue(QString::fromUtf8("PreAllocation"), preAllocateAllFiles()); + settings.setValue(QString::fromUtf8("AdditionDialog"), useAdditionDialog()); + settings.setValue(QString::fromUtf8("StartInPause"), addTorrentsInPause()); + settings.setValue(QString::fromUtf8("ScanDir"), getScanDir()); + // End Downloads preferences settings.endGroup(); - // Proxy options - settings.beginGroup(QString::fromUtf8("Proxy")); - enabled = isProxyEnabled(); - settings.setValue(QString::fromUtf8("Enabled"), enabled); - if(enabled){ + // Connection preferences + settings.beginGroup("Connection"); + settings.setValue(QString::fromUtf8("PortRangeMin"), getPorts().first); + settings.setValue(QString::fromUtf8("PortRangeMax"), getPorts().second); + settings.setValue(QString::fromUtf8("UPnP"), isUPnPEnabled()); + settings.setValue(QString::fromUtf8("NAT-PMP"), isNATPMPEnabled()); + settings.setValue(QString::fromUtf8("GlobalDLLimit"), getGlobalBandwidthLimits().first); + settings.setValue(QString::fromUtf8("GlobalUPLimit"), getGlobalBandwidthLimits().second); + settings.setValue(QString::fromUtf8("ProxyType"), getProxyType()); + if(isProxyEnabled()) { + settings.beginGroup("Proxy"); + // Proxy is enabled, save settings settings.setValue(QString::fromUtf8("IP"), getProxyIp()); settings.setValue(QString::fromUtf8("Port"), getProxyPort()); - unsigned short val = getProxyType(); - if(val == HTTP || val == HTTP_PW){ - settings.setValue(QString::fromUtf8("ProxyType"), HTTP); - }else{ - settings.setValue(QString::fromUtf8("ProxyType"), SOCKS5); - } - settings.setValue(QString::fromUtf8("UseProxyForTrackers"), useProxyForTrackers()); - settings.setValue(QString::fromUtf8("UseProxyForPeers"), useProxyForPeers()); - settings.setValue(QString::fromUtf8("UseProxyForWebseeds"), useProxyForWebseeds()); - settings.setValue(QString::fromUtf8("UseProxyForDHT"), useProxyForDHT()); - enabled = isProxyAuthEnabled(); - settings.beginGroup(QString::fromUtf8("Authentication")); - settings.setValue(QString::fromUtf8("Enabled"), enabled); - if(enabled){ + settings.setValue(QString::fromUtf8("Authentication"), isProxyAuthEnabled()); + if(isProxyAuthEnabled()) { + // Credentials settings.setValue(QString::fromUtf8("Username"), getProxyUsername()); settings.setValue(QString::fromUtf8("Password"), getProxyPassword()); } - settings.endGroup(); - } - // End Proxy options + // Affected connections + settings.setValue(QString::fromUtf8("AffectTrackers"), useProxyForTrackers()); + settings.setValue(QString::fromUtf8("AffectPeers"), useProxyForPeers()); + settings.setValue(QString::fromUtf8("AffectWebSeeds"), useProxyForWebseeds()); + settings.setValue(QString::fromUtf8("AffectDHT"), useProxyForDHT()); + settings.endGroup(); // End Proxy + } + // End Connection preferences settings.endGroup(); - // Misc options - settings.beginGroup(QString::fromUtf8("Misc")); - settings.beginGroup(QString::fromUtf8("TorrentAdditionDialog")); - enabled = useAdditionDialog(); - settings.setValue(QString::fromUtf8("Enabled"), enabled); - if(!enabled){ - settings.setValue(QString::fromUtf8("SavePath"), getSavePath()); - } - settings.endGroup(); - settings.beginGroup(QString::fromUtf8("Behaviour")); - settings.setValue(QString::fromUtf8("ConfirmOnExit"), getConfirmOnExit()); - settings.setValue(QString::fromUtf8("GoToSystray"), getGoToSysTrayOnMinimizingWindow()); - settings.setValue(QString::fromUtf8("GoToSystrayOnExit"), getGoToSysTrayOnExitingWindow()); - settings.setValue(QString::fromUtf8("SystrayIntegration"), useSystrayIntegration()); - // End Behaviour group - settings.endGroup(); - settings.setValue(QString::fromUtf8("PreviewProgram"), getPreviewProgram()); - // End Misc options + // Bittorrent preferences + settings.beginGroup("Bittorrent"); + settings.setValue(QString::fromUtf8("MaxConnecs"), getMaxConnecs()); + settings.setValue(QString::fromUtf8("MaxConnecsPerTorrent"), getMaxConnecsPerTorrent()); + settings.setValue(QString::fromUtf8("MaxUploadsPerTorrent"), getMaxUploadsPerTorrent()); + settings.setValue(QString::fromUtf8("DHT"), isDHTEnabled()); + settings.setValue(QString::fromUtf8("PeX"), isPeXEnabled()); + settings.setValue(QString::fromUtf8("LSD"), isLSDEnabled()); + settings.setValue(QString::fromUtf8("Encryption"), getEncryptionSetting()); + settings.setValue(QString::fromUtf8("DesiredRatio"), getDesiredRatio()); + settings.setValue(QString::fromUtf8("MaxRatio"), getDeleteRatio()); + // End Bittorrent preferences settings.endGroup(); - if(getUseOSDAlways()){ - settings.setValue(QString::fromUtf8("OSDEnabled"), 1); - }else{ - if(getUseOSDWhenHiddenOnly()){ - settings.setValue(QString::fromUtf8("OSDEnabled"), 2); - }else{ - settings.setValue(QString::fromUtf8("OSDEnabled"), 0); - } + // IPFilter preferences + settings.beginGroup("IPFilter"); + settings.setValue(QString::fromUtf8("Enabled"), isFilteringEnabled()); + if(isFilteringEnabled()){ + settings.setValue(QString::fromUtf8("File"), textFilterPath->text()); } - settings.setValue(QString::fromUtf8("Style"), getStyle()); - // End Options group + // End IPFilter preferences + settings.endGroup(); + // End preferences settings.endGroup(); } bool options_imp::isFilteringEnabled() const{ - return activateFilter->isChecked(); + return checkIPFilter->isChecked(); } -unsigned short options_imp::getProxyType() const{ +int options_imp::getProxyType() const{ if(comboProxyType->currentIndex() == HTTP){ if(isProxyAuthEnabled()){ return HTTP_PW; @@ -360,12 +338,15 @@ unsigned short options_imp::getProxyType() const{ return HTTP; } }else{ - if(isProxyAuthEnabled()){ - return SOCKS5_PW; - }else{ - return SOCKS5; + if(comboProxyType->currentIndex() == SOCKS5){ + if(isProxyAuthEnabled()){ + return SOCKS5_PW; + }else{ + return SOCKS5; + } } } + return -1; // disabled } bool options_imp::useProxyForTrackers() const{ @@ -384,254 +365,204 @@ bool options_imp::useProxyForDHT() const{ return checkProxyDHT->isChecked(); } -QString options_imp::getStyle() const{ - if(radioPlastiqueStyle->isChecked()) return QString::fromUtf8("Plastique"); - if(radioCleanlooksStyle->isChecked()) return QString::fromUtf8("Cleanlooks"); - if(radioMotifStyle->isChecked()) return QString::fromUtf8("Motif"); - if(radioCDEStyle->isChecked()) return QString::fromUtf8("CDE"); - if(radioMacOSStyle->isChecked()) return QString::fromUtf8("MacOS"); - if(radioWinXPStyle->isChecked()) return QString::fromUtf8("WinXP"); -#ifdef Q_WS_WIN - return QString::fromUtf8("WinXP"); -#endif -#ifdef Q_WS_MAC - return QString::fromUtf8("MacOS"); -#endif - return QString::fromUtf8("Plastique"); +int options_imp::getStyle() const{ + return comboStyle->currentIndex(); } -void options_imp::setStyle(QString style){ - if(style == QString::fromUtf8("Cleanlooks")){ - radioCleanlooksStyle->setChecked(true); - return; - } - if(style == QString::fromUtf8("Motif")){ - radioMotifStyle->setChecked(true); - return; - } - if(style == QString::fromUtf8("CDE")){ - radioCDEStyle->setChecked(true); - return; - } - if(style == QString::fromUtf8("MacOS")){ - radioMacOSStyle->setChecked(true); - return; - } - if(style == QString::fromUtf8("WinXP")){ - radioWinXPStyle->setChecked(true); - return; - } - radioPlastiqueStyle->setChecked(true); +void options_imp::setStyle(int style){ + if(style >= comboStyle->count() || style < 0) + style = 0; + comboStyle->setCurrentIndex(style); } void options_imp::loadOptions(){ - int value; + int intValue; float floatValue; - bool boolValue; QString strValue; QSettings settings("qBittorrent", "qBittorrent"); - // Check if min port < max port - checkPortsLogic(); - settings.beginGroup(QString::fromUtf8("Options")); - // Main options - settings.beginGroup(QString::fromUtf8("Main")); - value = settings.value(QString::fromUtf8("DLLimit"), -1).toInt(); - if(value < 0){ - disableDLLimit->setChecked(true); - spin_download->setEnabled(false); - }else{ - disableDLLimit->setChecked(false); - spin_download->setEnabled(true); - spin_download->setValue(value); - } - value = settings.value(QString::fromUtf8("UPLimit"), -1).toInt(); - if(value < 0){ - disableUPLimit->setChecked(true); - spin_upload->setEnabled(false); - }else{ - disableUPLimit->setChecked(false); - spin_upload->setEnabled(true); - spin_upload->setValue(value); - } - value = settings.value(QString::fromUtf8("MaxConnecs"), -1).toInt(); - if(value < 0){ - disableMaxConnec->setChecked(true); - spin_max_connec->setEnabled(false); - }else{ - disableMaxConnec->setChecked(false); - spin_max_connec->setEnabled(true); - spin_max_connec->setValue(value); - } - spin_port_min->setValue(settings.value(QString::fromUtf8("PortRangeMin"), 6881).toInt()); - spin_port_max->setValue(settings.value(QString::fromUtf8("PortRangeMax"), 6889).toInt()); - floatValue = settings.value(QString::fromUtf8("ShareRatio"), 0).toDouble(); - if(floatValue == 0){ - disableRatio->setChecked(true); - spin_ratio->setEnabled(false); - }else{ - disableRatio->setChecked(false); - spin_ratio->setEnabled(true); - spin_ratio->setValue(floatValue); - } - value = settings.value(QString::fromUtf8("DHTPort"), 6881).toInt(); - if(value < 0){ - disableDHT->setChecked(true); - groupDHT->setEnabled(false); - }else{ - disableDHT->setChecked(false); - groupDHT->setEnabled(true); - if(value < 1000){ - value = 6881; - } - spin_dht_port->setValue(value); - } - value = settings.value(QString::fromUtf8("EncryptionState"), 0).toInt(); - comboEncryption->setCurrentIndex(value); - boolValue = settings.value(QString::fromUtf8("PeXState"), true).toBool(); - if(boolValue){ - // Pex disabled - disablePeX->setChecked(false); - }else{ - // PeX enabled - disablePeX->setChecked(true); - } - strValue = settings.value(QString::fromUtf8("ScanDir"), QString()).toString(); - if(!strValue.isEmpty()){ - enableScan_checkBox->setChecked(true); - lbl_scanDir->setEnabled(true); - scanDir->setEnabled(true); - browse_button_scan->setEnabled(true); - scanDir->setText(strValue); - }else{ - enableScan_checkBox->setChecked(false); - lbl_scanDir->setEnabled(false); - browse_button_scan->setEnabled(false); - scanDir->setEnabled(false); - } - // End Main options + settings.beginGroup("Preferences"); + // General preferences + settings.beginGroup("General"); + setLocale(settings.value(QString::fromUtf8("Locale"), "en_GB").toString()); + // The following will select Windows style as default on Windows, MacOS style + // on MacOS and it will fallback to Plastique style on other systems + setStyle(settings.value(QString::fromUtf8("Style"), 4).toInt()); + checkConfirmExit->setChecked(settings.value(QString::fromUtf8("ExitConfirm"), true).toBool()); + checkSpeedInTitle->setChecked(settings.value(QString::fromUtf8("SpeedInTitleBar"), false).toBool()); + checkNoSystray->setChecked(!settings.value(QString::fromUtf8("SystrayEnabled"), true).toBool()); + if(!systrayIntegration()) { + disableSystrayOptions(); + } else { + enableSystrayOptions(); + checkCloseToSystray->setChecked(settings.value(QString::fromUtf8("CloseToTray"), false).toBool()); + checkMinimizeToSysTray->setChecked(settings.value(QString::fromUtf8("MinimizeToTray"), false).toBool()); + checkSystrayBalloons->setChecked(settings.value(QString::fromUtf8("NotificationBaloons"), true).toBool()); + } + textMediaPlayer->setText(settings.value(QString::fromUtf8("MediaPlayer"), QString()).toString()); + // End General preferences settings.endGroup(); - // Language options - settings.beginGroup(QString::fromUtf8("Language")); - strValue = settings.value(QString::fromUtf8("Locale"), QString::fromUtf8("en_GB")).toString(); - setLocale(strValue); - // End Language options - settings.endGroup(); - // IPFilter options - settings.beginGroup(QString::fromUtf8("IPFilter")); - if(settings.value(QString::fromUtf8("Enabled"), false).toBool()){ - strValue = settings.value(QString::fromUtf8("File"), QString()).toString(); - activateFilter->setChecked(true); - filterGroup->setEnabled(true); - filterFile->setText(strValue); - processFilterFile(strValue); - }else{ - activateFilter->setChecked(false); - filterGroup->setEnabled(false); + // Downloads preferences + settings.beginGroup("Downloads"); + QString home = QDir::homePath(); + if(home[home.length()-1] != QDir::separator()){ + home += QDir::separator(); } - // End IPFilter options + textSavePath->setText(settings.value(QString::fromUtf8("SavePath"), home+"qBT_dir").toString()); + checkPreallocateAll->setChecked(settings.value(QString::fromUtf8("PreAllocation"), false).toBool()); + checkAdditionDialog->setChecked(settings.value(QString::fromUtf8("AdditionDialog"), true).toBool()); + checkStartPaused->setChecked(settings.value(QString::fromUtf8("StartInPause"), false).toBool()); + strValue = settings.value(QString::fromUtf8("ScanDir"), QString()).toString(); + if(strValue.isEmpty()) { + // Disable + checkScanDir->setChecked(false); + enableDirScan(0); + } else { + // enable + checkScanDir->setChecked(true); + enableDirScan(2); + } + // End Downloads preferences settings.endGroup(); - // Proxy options - settings.beginGroup(QString::fromUtf8("Proxy")); - if(settings.value(QString::fromUtf8("Enabled"), false).toBool()){ - strValue = settings.value(QString::fromUtf8("IP"), QString()).toString(); - if(strValue.isEmpty()){ - enableProxy_checkBox->setChecked(false); - groupProxy->setEnabled(false); - }else{ - enableProxy_checkBox->setChecked(true); - groupProxy->setEnabled(true); - proxy_ip->setText(strValue); - proxy_port->setValue(settings.value(QString::fromUtf8("Port"), 8080).toInt()); - comboProxyType->setCurrentIndex(settings.value(QString::fromUtf8("ProxyType"), HTTP).toInt()); - checkProxyTrackers->setChecked(settings.value(QString::fromUtf8("useProxyForTrackers"), true).toBool()); - checkProxyPeers->setChecked(settings.value(QString::fromUtf8("useProxyForPeers"), true).toBool()); - checkProxyWebseeds->setChecked(settings.value(QString::fromUtf8("useProxyForWebseeds"), true).toBool()); - checkProxyDHT->setChecked(settings.value(QString::fromUtf8("useProxyForDHT"), true).toBool()); - settings.beginGroup(QString::fromUtf8("Authentication")); - if(settings.value(QString::fromUtf8("Enabled"), false).toBool()){ - enableProxyAuth_checkBox->setChecked(true); - groupProxyAuth->setEnabled(true); - proxy_username->setText(settings.value(QString::fromUtf8("Username"), QString()).toString()); - proxy_password->setText(settings.value(QString::fromUtf8("Password"), QString()).toString()); - }else{ - enableProxyAuth_checkBox->setChecked(false); - groupProxyAuth->setEnabled(false); - } - settings.endGroup(); + // Connection preferences + settings.beginGroup("Connection"); + spinPortMin->setValue(settings.value(QString::fromUtf8("PortRangeMin"), 6881).toInt()); + spinPortMax->setValue(settings.value(QString::fromUtf8("PortRangeMax"), 6889).toInt()); + // Check if min port < max port + checkPortsLogic(); + checkUPnP->setChecked(settings.value(QString::fromUtf8("UPnP"), true).toBool()); + checkNATPMP->setChecked(settings.value(QString::fromUtf8("NAT-PMP"), true).toBool()); + intValue = settings.value(QString::fromUtf8("GlobalDLLimit"), -1).toInt(); + if(intValue != -1) { + // Enabled + checkDownloadLimit->setChecked(true); + spinDownloadLimit->setEnabled(true); + spinDownloadLimit->setValue(intValue); + } else { + // Disabled + checkDownloadLimit->setChecked(false); + spinDownloadLimit->setEnabled(false); + } + intValue = settings.value(QString::fromUtf8("GlobalUPLimit"), 50).toInt(); + if(intValue != -1) { + // Enabled + checkUploadLimit->setChecked(true); + spinUploadLimit->setEnabled(true); + spinUploadLimit->setValue(intValue); + } else { + // Disabled + checkUploadLimit->setChecked(false); + spinUploadLimit->setEnabled(false); + } + intValue = settings.value(QString::fromUtf8("ProxyType"), 0).toInt(); + comboProxyType->setCurrentIndex(intValue); + enableProxy(intValue); + if(isProxyEnabled()) { + settings.beginGroup("Proxy"); + // Proxy is enabled, save settings + textProxyIP->setText(settings.value(QString::fromUtf8("IP"), "0.0.0.0").toString()); + spinProxyPort->setValue(settings.value(QString::fromUtf8("Port"), 8080).toInt()); + checkProxyAuth->setChecked(settings.value(QString::fromUtf8("Authentication"), false).toBool()); + if(isProxyAuthEnabled()) { + enableProxyAuth(2); // Enable + // Credentials + textProxyUsername->setText(settings.value(QString::fromUtf8("Username"), QString()).toString()); + textProxyPassword->setText(settings.value(QString::fromUtf8("Password"), QString()).toString()); + } else { + enableProxyAuth(0); // Disable } - }else{ - enableProxy_checkBox->setChecked(false); - groupProxy->setEnabled(false); - } - // End Proxy options - settings.endGroup(); - // Misc options - settings.beginGroup(QString::fromUtf8("Misc")); - settings.beginGroup(QString::fromUtf8("TorrentAdditionDialog")); - if(settings.value(QString::fromUtf8("Enabled"), true).toBool()){ - checkAdditionDialog->setChecked(true); - groupSavePath->setEnabled(false); - }else{ - checkAdditionDialog->setChecked(false); - groupSavePath->setEnabled(true); - txt_savePath->setText(settings.value(QString::fromUtf8("SavePath"), QString()).toString()); - } + // Affected connections + checkProxyTrackers->setChecked(settings.value(QString::fromUtf8("AffectTrackers"), true).toBool()); + checkProxyPeers->setChecked(settings.value(QString::fromUtf8("AffectPeers"), true).toBool()); + checkProxyWebseeds->setChecked(settings.value(QString::fromUtf8("AffectWebSeeds"), true).toBool()); + checkProxyDHT->setChecked(settings.value(QString::fromUtf8("AffectDHT"), true).toBool()); + settings.endGroup(); // End Proxy + } + // End Connection preferences settings.endGroup(); - settings.beginGroup(QString::fromUtf8("Behaviour")); - confirmExit_checkBox->setChecked(settings.value(QString::fromUtf8("ConfirmOnExit"), true).toBool()); - check_goToSysTray->setChecked(settings.value(QString::fromUtf8("GoToSystray"), true).toBool()); - check_closeToSysTray->setChecked(settings.value(QString::fromUtf8("GoToSystrayOnExit"), false).toBool()); - boolValue = settings.value(QString::fromUtf8("SystrayIntegration"), true).toBool(); - check_disableSystray->setChecked(!boolValue); - systrayDisabled(!boolValue); - // End Behaviour group + // Bittorrent preferences + settings.beginGroup("Bittorrent"); + intValue = settings.value(QString::fromUtf8("MaxConnecs"), 500).toInt(); + if(intValue != -1) { + // enable + checkMaxConnecs->setChecked(true); + spinMaxConnec->setEnabled(true); + spinMaxConnec->setValue(intValue); + } else { + // disable + checkMaxConnecs->setChecked(false); + spinMaxConnec->setEnabled(false); + } + intValue = settings.value(QString::fromUtf8("MaxConnecsPerTorrent"), 100).toInt(); + if(intValue != -1) { + // enable + checkMaxConnecsPerTorrent->setChecked(true); + spinMaxConnecPerTorrent->setEnabled(true); + spinMaxConnecPerTorrent->setValue(intValue); + } else { + // disable + checkMaxConnecsPerTorrent->setChecked(false); + spinMaxConnecPerTorrent->setEnabled(false); + } + intValue = settings.value(QString::fromUtf8("MaxUploadsPerTorrent"), 4).toInt(); + if(intValue != -1) { + // enable + checkMaxUploadsPerTorrent->setChecked(true); + spinMaxUploadsPerTorrent->setEnabled(true); + spinMaxUploadsPerTorrent->setValue(intValue); + } else { + // disable + checkMaxUploadsPerTorrent->setChecked(false); + spinMaxUploadsPerTorrent->setEnabled(false); + } + checkDHT->setChecked(settings.value(QString::fromUtf8("DHT"), true).toBool()); + checkPeX->setChecked(settings.value(QString::fromUtf8("PeX"), true).toBool()); + checkLSD->setChecked(settings.value(QString::fromUtf8("LSD"), true).toBool()); + comboEncryption->setCurrentIndex(settings.value(QString::fromUtf8("Encryption"), 0).toInt()); + floatValue = settings.value(QString::fromUtf8("DesiredRatio"), 0).toDouble(); + if(floatValue) { + // Enable + checkRatioLimit->setChecked(true); + spinRatio->setEnabled(true); + spinRatio->setValue(floatValue); + } else { + // Disable + checkRatioLimit->setChecked(false); + spinRatio->setEnabled(false); + } + floatValue = settings.value(QString::fromUtf8("MaxRatio"), 0).toDouble(); + if(floatValue) { + // Enable + checkRatioRemove->setChecked(true); + spinMaxRatio->setEnabled(true); + spinMaxRatio->setValue(floatValue); + } else { + // Disable + checkRatioRemove->setChecked(false); + spinMaxRatio->setEnabled(false); + } + // End Bittorrent preferences settings.endGroup(); - preview_program->setText(settings.value(QString::fromUtf8("PreviewProgram"), QString()).toString()); - // End Misc group + // IPFilter preferences + settings.beginGroup("IPFilter"); + checkIPFilter->setChecked(settings.value(QString::fromUtf8("Enabled"), false).toBool()); + if(isFilteringEnabled()) { + filterBox->setEnabled(true); + textFilterPath->setText(settings.value(QString::fromUtf8("File"), QString()).toString()); + processFilterFile(textFilterPath->text()); + } else { + // Disable + filterBox->setEnabled(false); + } + // End IPFilter preferences settings.endGroup(); - value = settings.value(QString::fromUtf8("OSDEnabled"), 1).toInt(); - if(value == 0){ - neverOSD->setChecked(true); - }else{ - if(value == 2){ - someOSD->setChecked(true); - }else{ - alwaysOSD->setChecked(true); - } - } - setStyle(settings.value(QString::fromUtf8("Style"), QString()).toString()); - // End Options group + // End Preferences settings.endGroup(); } -void options_imp::systrayDisabled(int val){ - if(val){ - // No SystrayIntegration - check_closeToSysTray->setChecked(false); - check_closeToSysTray->setEnabled(false); - check_goToSysTray->setChecked(false); - check_goToSysTray->setEnabled(false); - neverOSD->setChecked(true); - groupOSD->setEnabled(false); - }else{ - check_closeToSysTray->setEnabled(true); - check_goToSysTray->setEnabled(true); - groupOSD->setEnabled(true); - } -} - // return min & max ports // [min, max] std::pair options_imp::getPorts() const{ - return std::make_pair(this->spin_port_min->value(), this->spin_port_max->value()); -} - -int options_imp::getDHTPort() const{ - if(isDHTEnabled()){ - return spin_dht_port->value(); - }else{ - return -1; - } + return std::make_pair(spinPortMin->value(), spinPortMax->value()); } int options_imp::getEncryptionSetting() const{ @@ -639,70 +570,84 @@ int options_imp::getEncryptionSetting() const{ } QString options_imp::getPreviewProgram() const{ - QString preview_txt = preview_program->text(); - preview_txt.trimmed(); + QString preview_txt = textMediaPlayer->text(); + preview_txt = preview_txt.trimmed(); return preview_txt; } -bool options_imp::getGoToSysTrayOnMinimizingWindow() const{ - return check_goToSysTray->isChecked(); +bool options_imp::minimizeToTray() const{ + if(checkNoSystray->isChecked()) return false; + return checkMinimizeToSysTray->isChecked(); +} + +bool options_imp::closeToTray() const{ + if(checkNoSystray->isChecked()) return false; + return checkCloseToSystray->isChecked(); } -bool options_imp::getGoToSysTrayOnExitingWindow() const{ - return check_closeToSysTray->isChecked(); +bool options_imp::confirmOnExit() const{ + return checkConfirmExit->isChecked(); } -bool options_imp::getConfirmOnExit() const{ - return confirmExit_checkBox->isChecked(); +bool options_imp::isDirScanEnabled() const { + return checkScanDir->isChecked(); } bool options_imp::isDHTEnabled() const{ - return !disableDHT->isChecked(); + return checkDHT->isChecked(); +} + +bool options_imp::isPeXEnabled() const{ + return checkPeX->isChecked(); } -bool options_imp::isPeXDisabled() const{ - return disablePeX->isChecked(); +bool options_imp::isLSDEnabled() const{ + return checkLSD->isChecked(); } + +bool options_imp::isUPnPEnabled() const{ + return checkUPnP->isChecked(); +} + +bool options_imp::isNATPMPEnabled() const{ + return checkNATPMP->isChecked(); +} + // Return Download & Upload limits in kbps // [download,upload] -QPair options_imp::getLimits() const{ +QPair options_imp::getGlobalBandwidthLimits() const{ int DL = -1, UP = -1; - if(!disableDLLimit->isChecked()){ - DL = this->spin_download->value(); + if(checkDownloadLimit->isChecked()){ + DL = spinDownloadLimit->value(); } - if(!disableUPLimit->isChecked()){ - UP = this->spin_upload->value(); + if(checkUploadLimit->isChecked()){ + UP = spinUploadLimit->value(); } return qMakePair(DL, UP); } -// Should the program use OSD? -bool options_imp::getUseOSDAlways() const{ - if(!QSystemTrayIcon::supportsMessages()){ - // Mac OS X doesn't support it yet - return false; - } - return alwaysOSD->isChecked(); +bool options_imp::OSDEnabled() const { + if(checkNoSystray->isChecked()) return false; + return checkSystrayBalloons->isChecked(); } -// Should the program use OSD when the window is hidden only? -bool options_imp::getUseOSDWhenHiddenOnly() const{ - if(!QSystemTrayIcon::supportsMessages()){ - // Mac OS X doesn't support it yet - return false; - } - return someOSD->isChecked(); +bool options_imp::systrayIntegration() const{ + if (!QSystemTrayIcon::isSystemTrayAvailable()) return false; + return (!checkNoSystray->isChecked()); } -bool options_imp::useSystrayIntegration() const{ - if (!QSystemTrayIcon::isSystemTrayAvailable()) return false; - return (!check_disableSystray->isChecked()); +// Return Share ratio +float options_imp::getDesiredRatio() const{ + if(checkRatioLimit->isChecked()){ + return spinRatio->value(); + } + return 0; } // Return Share ratio -float options_imp::getRatio() const{ - if(!disableRatio->isChecked()){ - return spin_ratio->value(); +float options_imp::getDeleteRatio() const{ + if(checkRatioRemove->isChecked()){ + return spinMaxRatio->value(); } return 0; } @@ -713,18 +658,34 @@ QString options_imp::getSavePath() const{ if(home[home.length()-1] != QDir::separator()){ home += QDir::separator(); } - if(txt_savePath->text().trimmed().isEmpty()){ - txt_savePath->setText(home+QString::fromUtf8("qBT_dir")); + if(textSavePath->text().trimmed().isEmpty()){ + textSavePath->setText(home+QString::fromUtf8("qBT_dir")); } - return txt_savePath->text(); + return textSavePath->text(); } // Return max connections number -int options_imp::getMaxConnec() const{ - if(disableMaxConnec->isChecked()){ +int options_imp::getMaxConnecs() const{ + if(!checkMaxConnecs->isChecked()){ return -1; }else{ - return spin_max_connec->value(); + return spinMaxConnec->value(); + } +} + +int options_imp::getMaxConnecsPerTorrent() const{ + if(!checkMaxConnecsPerTorrent->isChecked()){ + return -1; + }else{ + return spinMaxConnecPerTorrent->value(); + } +} + +int options_imp::getMaxUploadsPerTorrent() const{ + if(!checkMaxUploadsPerTorrent->isChecked()){ + return -1; + }else{ + return spinMaxUploadsPerTorrent->value(); } } @@ -758,67 +719,87 @@ void options_imp::on_buttonBox_rejected(){ reject(); } -void options_imp::disableDownload(int checkBoxValue){ - if(checkBoxValue==2){ +void options_imp::enableDownloadLimit(int checkBoxValue){ + if(checkBoxValue!=2){ //Disable - spin_download->setEnabled(false); + spinDownloadLimit->setEnabled(false); }else{ //enable - spin_download->setEnabled(true); + spinDownloadLimit->setEnabled(true); } } -void options_imp::disableDHTGroup(int checkBoxValue){ - if(checkBoxValue==2){ +bool options_imp::useAdditionDialog() const{ + return checkAdditionDialog->isChecked(); +} + +void options_imp::enableMaxConnecsLimit(int checkBoxValue){ + if(checkBoxValue != 2){ //Disable - groupDHT->setEnabled(false); + spinMaxConnec->setEnabled(false); }else{ //enable - groupDHT->setEnabled(true); + spinMaxConnec->setEnabled(true); } } -void options_imp::enableSavePath(int checkBoxValue){ - if(checkBoxValue==2){ - //enable - groupSavePath->setEnabled(false); +void options_imp::enableMaxConnecsLimitPerTorrent(int checkBoxValue){ + if(checkBoxValue != 2){ + //Disable + spinMaxConnecPerTorrent->setEnabled(false); }else{ - //disable - groupSavePath->setEnabled(true); + //enable + spinMaxConnecPerTorrent->setEnabled(true); } } -bool options_imp::useAdditionDialog() const{ - return checkAdditionDialog->isChecked(); +void options_imp::enableSystrayOptions() { + checkCloseToSystray->setEnabled(true); + checkMinimizeToSysTray->setEnabled(true); + checkSystrayBalloons->setEnabled(true); } -void options_imp::disableMaxConnecLimit(int checkBoxValue){ - if(checkBoxValue==2){ +void options_imp::disableSystrayOptions() { + checkCloseToSystray->setEnabled(false); + checkMinimizeToSysTray->setEnabled(false); + checkSystrayBalloons->setEnabled(false); +} + +void options_imp::setSystrayOptionsState(int checkBoxValue) { + if(checkBoxValue == 2) { + disableSystrayOptions(); + } else { + enableSystrayOptions(); + } +} + +void options_imp::enableMaxUploadsLimitPerTorrent(int checkBoxValue){ + if(checkBoxValue != 2){ //Disable - spin_max_connec->setEnabled(false); + spinMaxUploadsPerTorrent->setEnabled(false); }else{ //enable - spin_max_connec->setEnabled(true); + spinMaxUploadsPerTorrent->setEnabled(true); } } void options_imp::enableFilter(int checkBoxValue){ if(checkBoxValue!=2){ //Disable - filterGroup->setEnabled(false); + filterBox->setEnabled(false); }else{ //enable - filterGroup->setEnabled(true); + filterBox->setEnabled(true); } } -void options_imp::disableUpload(int checkBoxValue){ - if(checkBoxValue==2){ +void options_imp::enableUploadLimit(int checkBoxValue){ + if(checkBoxValue != 2){ //Disable - spin_upload->setEnabled(false); + spinUploadLimit->setEnabled(false); }else{ //enable - spin_upload->setEnabled(true); + spinUploadLimit->setEnabled(true); } } @@ -828,133 +809,177 @@ void options_imp::enableApplyButton(){ } } -void options_imp::disableShareRatio(int checkBoxValue){ - if(checkBoxValue==2){ +void options_imp::enableShareRatio(int checkBoxValue){ + if(checkBoxValue != 2){ //Disable - spin_ratio->setEnabled(false); + spinRatio->setEnabled(false); }else{ //enable - spin_ratio->setEnabled(true); + spinRatio->setEnabled(true); } } -void options_imp::enableProxy(int checkBoxValue){ - if(checkBoxValue==2){ +void options_imp::enableDeleteRatio(int checkBoxValue){ + if(checkBoxValue != 2){ + //Disable + spinMaxRatio->setEnabled(false); + }else{ + //enable + spinMaxRatio->setEnabled(true); + } +} + +void options_imp::enableProxy(int index){ + if(index){ //enable - groupProxy->setEnabled(true); + lblProxyIP->setEnabled(true); + textProxyIP->setEnabled(true); + lblProxyPort->setEnabled(true); + spinProxyPort->setEnabled(true); + checkProxyAuth->setEnabled(true); + ProxyConnecsBox->setEnabled(true); }else{ //disable - groupProxy->setEnabled(false); + lblProxyIP->setEnabled(false); + textProxyIP->setEnabled(false); + lblProxyPort->setEnabled(false); + spinProxyPort->setEnabled(false); + checkProxyAuth->setEnabled(false); + ProxyConnecsBox->setEnabled(false); } } void options_imp::enableProxyAuth(int checkBoxValue){ if(checkBoxValue==2){ //enable - groupProxyAuth->setEnabled(true); + lblProxyUsername->setEnabled(true); + lblProxyPassword->setEnabled(true); + textProxyUsername->setEnabled(true); + textProxyPassword->setEnabled(true); }else{ //disable - groupProxyAuth->setEnabled(false); + lblProxyUsername->setEnabled(false); + lblProxyPassword->setEnabled(false); + textProxyUsername->setEnabled(false); + textProxyPassword->setEnabled(false); } } void options_imp::enableDirScan(int checkBoxValue){ if(checkBoxValue==2){ //enable - lbl_scanDir->setEnabled(true); - scanDir->setEnabled(true); - browse_button_scan->setEnabled(true); + textScanDir->setEnabled(true); + browseScanDirButton->setEnabled(true); }else{ //disable - lbl_scanDir->setEnabled(false); - scanDir->setEnabled(false); - browse_button_scan->setEnabled(false); + textScanDir->setEnabled(false); + browseScanDirButton->setEnabled(false); } } +bool options_imp::speedInTitleBar() const { + return checkSpeedInTitle->isChecked(); +} + +bool options_imp::preAllocateAllFiles() const { + return checkPreallocateAll->isChecked(); +} + +bool options_imp::addTorrentsInPause() const { + return checkStartPaused->isChecked(); +} + // Proxy settings bool options_imp::isProxyEnabled() const{ - return groupProxy->isEnabled(); + return (!comboProxyType->currentIndex()); } bool options_imp::isProxyAuthEnabled() const{ - return groupProxyAuth->isEnabled(); + return checkProxyAuth->isChecked(); } QString options_imp::getProxyIp() const{ - return proxy_ip->text(); + QString ip = textProxyIP->text(); + ip = ip.trimmed(); + return ip; } unsigned short options_imp::getProxyPort() const{ - return proxy_port->value(); + return spinProxyPort->value(); } QString options_imp::getProxyUsername() const{ - return proxy_username->text(); + QString username = textProxyUsername->text(); + username = username.trimmed(); + return username; } QString options_imp::getProxyPassword() const{ - return proxy_password->text(); + QString password = textProxyPassword->text(); + password = password.trimmed(); + return password; } // Locale Settings QString options_imp::getLocale() const{ - return locales.at(combo_i18n->currentIndex()); + return locales.at(comboI18n->currentIndex()); } void options_imp::setLocale(QString locale){ int indexLocales=locales.indexOf(QRegExp(locale)); if(indexLocales != -1){ - combo_i18n->setCurrentIndex(indexLocales); + comboI18n->setCurrentIndex(indexLocales); } } // Is called before saving to check if minPort < maxPort void options_imp::checkPortsLogic(){ - int maxValue = spin_port_max->value(); - if(spin_port_min->value() > spin_port_max->value()){ - spin_port_max->setValue(spin_port_min->value()); - spin_port_min->setValue(maxValue); + int maxValue = spinPortMax->value(); + if(spinPortMin->value() > spinPortMax->value()){ + spinPortMax->setValue(spinPortMin->value()); + spinPortMin->setValue(maxValue); } } // Return scan dir set in options -QString options_imp::getScanDir() const{ - if(scanDir->isEnabled()){ - return scanDir->text(); +QString options_imp::getScanDir() const { + if(checkScanDir->isChecked()){ + QString scanDir = textScanDir->text(); + scanDir = scanDir.trimmed(); + return scanDir; }else{ return QString(); } } // Display dialog to choose scan dir -void options_imp::on_browse_button_scan_clicked(){ +void options_imp::on_browseScanDirButton_clicked() { QString dir = QFileDialog::getExistingDirectory(this, tr("Choose scan directory"), QDir::homePath()); if(!dir.isNull()){ - scanDir->setText(dir); + textScanDir->setText(dir); } } -void options_imp::on_filterBrowse_clicked(){ +void options_imp::on_browseFilterButton_clicked() { QString ipfilter = QFileDialog::getOpenFileName(this, tr("Choose an ipfilter.dat file"), QDir::homePath()); if(!ipfilter.isNull()){ - filterFile->setText(ipfilter); + textFilterPath->setText(ipfilter); processFilterFile(ipfilter); } } -void options_imp::on_browsePreview_clicked(){ +void options_imp::on_browsePreviewButton_clicked() { QString program_txt = QFileDialog::getOpenFileName(this, tr("Choose your favourite preview program"), QDir::homePath()); if(!program_txt.isNull()){ - preview_program->setText(program_txt); + textMediaPlayer->setText(program_txt); } } // Display dialog to choose save dir -void options_imp::on_browse_button_clicked(){ +void options_imp::on_browseSaveDirButton_clicked(){ QString dir = QFileDialog::getExistingDirectory(this, tr("Choose a save directory"), QDir::homePath()); if(!dir.isNull()){ - txt_savePath->setText(dir); + textSavePath->setText(dir); } } @@ -1075,7 +1100,7 @@ ip_filter options_imp::getFilter() const{ } // Add an IP Range to ipFilter -void options_imp::on_addFilterRange_clicked(){ +void options_imp::on_addFilterRangeButton_clicked(){ bool ok; // Ask user for start ip QString startIP = QInputDialog::getText(this, tr("Range Start IP"), @@ -1132,17 +1157,17 @@ void options_imp::on_addFilterRange_clicked(){ QTextStream out(&ipfilter); out << startIP << " - " << lastIP << ", 0, " << comment << "\n"; ipfilter.close(); - processFilterFile(filterFile->text()); + processFilterFile(textFilterPath->text()); enableApplyButton(); } // Delete selected IP range in list and ipfilter.dat file // User can only delete IP added manually -void options_imp::on_delFilterRange_clicked(){ +void options_imp::on_delFilterRangeButton_clicked(){ bool changed = false; QList selectedItems = filtersList->selectedItems(); // Delete from list - for(int i=0;itext(2) == QString::fromUtf8("Manual")){ delete item; diff --git a/src/options_imp.h b/src/options_imp.h index b8520a0b9..2c3ed2da2 100644 --- a/src/options_imp.h +++ b/src/options_imp.h @@ -25,10 +25,10 @@ #include "ui_options.h" #include -#define HTTP 0 -#define SOCKS5 1 -#define HTTP_PW 2 -#define SOCKS5_PW 3 +#define HTTP 1 +#define SOCKS5 2 +#define HTTP_PW 3 +#define SOCKS5_PW 4 using namespace libtorrent; @@ -51,71 +51,82 @@ class options_imp : public QDialog, private Ui::Dialog{ // Methods void saveOptions(); void loadOptions(); - // Main options - std::pair getPorts() const; - QPair getLimits() const; - float getRatio() const; - int getMaxConnec() const; + // General options + QString getLocale() const; + int getStyle() const; + bool confirmOnExit() const; + bool speedInTitleBar() const; + bool systrayIntegration() const; + bool minimizeToTray() const; + bool closeToTray() const; + bool OSDEnabled() const; + QString getPreviewProgram() const; + // Downloads + QString getSavePath() const; + bool preAllocateAllFiles() const; + bool useAdditionDialog() const; + bool addTorrentsInPause() const; + bool isDirScanEnabled() const; QString getScanDir() const; - bool isDHTEnabled() const; - int getDHTPort() const; - int getEncryptionSetting() const; - bool isPeXDisabled() const; - // Filter Settings - bool isFilteringEnabled() const; - ip_filter getFilter() const; - // Proxy settings + // Connection options + std::pair getPorts() const; + bool isUPnPEnabled() const; + bool isNATPMPEnabled() const; + QPair getGlobalBandwidthLimits() const; bool isProxyEnabled() const; bool isProxyAuthEnabled() const; QString getProxyIp() const; unsigned short getProxyPort() const; QString getProxyUsername() const; QString getProxyPassword() const; - unsigned short getProxyType() const; + int getProxyType() const; bool useProxyForTrackers() const; bool useProxyForPeers() const; bool useProxyForWebseeds() const; bool useProxyForDHT() const; - // Language Settings - QString getLocale() const; - // Misc Settings - bool useAdditionDialog() const; - QString getSavePath() const; - bool getGoToSysTrayOnMinimizingWindow() const; - bool getGoToSysTrayOnExitingWindow() const; - bool getConfirmOnExit() const; - QString getPreviewProgram() const; - bool getUseOSDAlways() const; - bool getUseOSDWhenHiddenOnly() const; - QString getStyle() const; - bool useSystrayIntegration() const; + // Bittorrent options + int getMaxConnecs() const; + int getMaxConnecsPerTorrent() const; + int getMaxUploadsPerTorrent() const; + bool isDHTEnabled() const; + bool isPeXEnabled() const; + bool isLSDEnabled() const; + int getEncryptionSetting() const; + float getDesiredRatio() const; + float getDeleteRatio() const; + // IP Filter + bool isFilteringEnabled() const; + ip_filter getFilter() const; protected slots: + void enableUploadLimit(int checkBoxValue); + void enableDownloadLimit(int checkBoxValue); + void enableDirScan(int checkBoxValue); + void enableProxy(int comboIndex); + void enableProxyAuth(int checkBoxValue); + void enableMaxConnecsLimit(int); + void enableMaxConnecsLimitPerTorrent(int checkBoxValue); + void enableMaxUploadsLimitPerTorrent(int checkBoxValue); + void enableShareRatio(int checkBoxValue); + void enableDeleteRatio(int checkBoxValue); + void enableFilter(int checkBoxValue); + void setStyle(int style); void on_buttonBox_accepted(); void closeEvent(QCloseEvent *e); void on_buttonBox_rejected(); void applySettings(QAbstractButton* button); - void on_addFilterRange_clicked(); - void on_delFilterRange_clicked(); - void on_browse_button_scan_clicked(); - void on_browsePreview_clicked(); - void on_filterBrowse_clicked(); - void disableDownload(int checkBoxValue); - void disableDHTGroup(int checkBoxValue); - void disableMaxConnecLimit(int); - void enableFilter(int checkBoxValue); - void disableUpload(int checkBoxValue); - void disableShareRatio(int checkBoxValue); - void enableProxy(int checkBoxValue); - void enableProxyAuth(int checkBoxValue); - void enableDirScan(int checkBoxValue); - void on_browse_button_clicked(); + void on_addFilterRangeButton_clicked(); + void on_delFilterRangeButton_clicked(); + void on_browseScanDirButton_clicked(); + void on_browsePreviewButton_clicked(); + void on_browseFilterButton_clicked(); + void on_browseSaveDirButton_clicked(); void processFilterFile(QString filePath=QString()); void enableApplyButton(); void checkPortsLogic(); - void enableSavePath(int checkBoxValue); - void setStyle(QString style); - void systrayDisabled(int val); + void enableSystrayOptions(); + void disableSystrayOptions(); + void setSystrayOptionsState(int checkBoxValue); public slots: void setLocale(QString locale); diff --git a/src/searchEngine.cpp b/src/searchEngine.cpp index 06645a051..761effeb2 100644 --- a/src/searchEngine.cpp +++ b/src/searchEngine.cpp @@ -389,8 +389,8 @@ void SearchEngine::updateNova() { // Error | Stopped by user | Finished normally void SearchEngine::searchFinished(int exitcode,QProcess::ExitStatus){ QSettings settings("qBittorrent", "qBittorrent"); - int useOSD = settings.value("Options/OSDEnabled", 1).toInt(); - if(systrayIntegration && (useOSD == 1 || (useOSD == 2 && (isMinimized() || isHidden())))) { + bool useNotificationBalloons = settings.value("Preferences/General/NotificationBaloons", true).toBool(); + if(systrayIntegration && useNotificationBalloons) { myTrayIcon->showMessage(tr("Search Engine"), tr("Search has finished"), QSystemTrayIcon::Information, TIME_TRAY_BALLOON); } if(exitcode){ diff --git a/src/torrentAddition.h b/src/torrentAddition.h index 077f58889..450e2a12b 100644 --- a/src/torrentAddition.h +++ b/src/torrentAddition.h @@ -83,6 +83,10 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{ } QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); savePathTxt->setText(settings.value(QString::fromUtf8("LastDirTorrentAdd"), home+QString::fromUtf8("qBT_dir")).toString()); + if(settings.value("Preferences/Downloads/StartInPause", false).toBool()) { + addInPause->setChecked(true); + addInPause->setEnabled(false); + } } void showLoad(QString filePath, bool fromScanDir=false, QString from_url=QString::null){