- Timestamp:
- May 3, 2016, 2:14:41 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/vendor/current/src/findsubtitles/findsubtitleswindow.cpp
r168 r175 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 4Ricardo Villalba <[email protected]>2 Copyright (C) 2006-201 Ricardo Villalba <[email protected]> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 147 147 file_downloader = new FileDownloader(this); 148 148 file_downloader->setModal(false); 149 150 149 151 connect( file_downloader, SIGNAL(downloadFailed(QString)), 150 152 this, SLOT(showError(QString)), Qt::QueuedConnection ); … … 177 179 osclient->setServer(os_server); 178 180 181 179 182 // Proxy 180 183 use_proxy = false; … … 186 189 187 190 setupProxy(); 191 188 192 } 189 193 … … 195 199 set = settings; 196 200 loadSettings(); 201 197 202 setupProxy(); 198 } 199 203 #endif 204 } 205 206 #ifdef FS_USE_PROXY 200 207 void FindSubtitlesWindow::setProxy(QNetworkProxy proxy) { 201 208 /* … … 212 219 proxy.hostName().toUtf8().constData(), proxy.port(), proxy.type()); 213 220 } 221 214 222 215 223 void FindSubtitlesWindow::retranslateStrings() { … … 761 769 762 770 d.setServer( os_server ); 771 772 773 774 763 775 d.setUseProxy( use_proxy ); 764 776 d.setProxyHostname( proxy_host ); … … 767 779 d.setProxyPassword( proxy_password ); 768 780 d.setProxyType( proxy_type ); 781 782 783 784 785 769 786 770 787 if (d.exec() == QDialog::Accepted) { 771 788 os_server = d.server(); 789 790 791 792 772 793 use_proxy = d.useProxy(); 773 794 proxy_host = d.proxyHostname(); … … 776 797 proxy_password = d.proxyPassword(); 777 798 proxy_type = d.proxyType(); 799 778 800 779 801 osclient->setServer(os_server); 802 780 803 setupProxy(); 781 } 782 } 783 804 #endif 805 806 #ifdef DOWNLOAD_SUBS 807 include_lang_on_filename = d.appendLang(); 808 #endif 809 } 810 } 811 812 #ifdef FS_USE_PROXY 784 813 void FindSubtitlesWindow::setupProxy() { 785 814 QNetworkProxy proxy; … … 803 832 setProxy(proxy); 804 833 } 834 805 835 806 836 void FindSubtitlesWindow::saveSettings() { … … 810 840 811 841 set->setValue("xmlrpc_server", os_server); 842 843 844 845 812 846 set->setValue("language", language()); 813 847 #ifdef DOWNLOAD_SUBS 814 848 set->setValue("include_lang_on_filename", includeLangOnFilename()); 815 849 #endif 850 851 816 852 set->setValue("proxy/use_proxy", use_proxy); 817 853 set->setValue("proxy/type", proxy_type); … … 820 856 set->setValue("proxy/username", proxy_username); 821 857 set->setValue("proxy/password", proxy_password); 858 822 859 823 860 set->endGroup(); … … 830 867 831 868 os_server = set->value("xmlrpc_server", os_server).toString(); 869 870 871 872 832 873 setLanguage( set->value("language", language()).toString() ); 833 874 #ifdef DOWNLOAD_SUBS 834 875 setIncludeLangOnFilename( set->value("include_lang_on_filename", includeLangOnFilename()).toBool() ); 835 876 #endif 877 878 836 879 use_proxy = set->value("proxy/use_proxy", use_proxy).toBool(); 837 880 proxy_type = set->value("proxy/type", proxy_type).toInt(); … … 840 883 proxy_username = set->value("proxy/username", proxy_username).toString(); 841 884 proxy_password = set->value("proxy/password", proxy_password).toString(); 885 842 886 843 887 set->endGroup();
Note:
See TracChangeset
for help on using the changeset viewer.
