linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #02707
[Branch ~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n] Rev 410: Remove URI support since core does not support it
------------------------------------------------------------
revno: 410
committer: Steven Sheehy <steven.sheehy@xxxxxxxxx>
branch nick: linuxdcpp-i18n
timestamp: Thu 2010-12-09 23:50:31 -0600
message:
Remove URI support since core does not support it
modified:
glade/hub.glade
glade/settingsdialog.glade
linux/WulforUtil.cc
linux/WulforUtil.hh
linux/settingsdialog.cc
--
lp:~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n
https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n
Your team LinuxDC++ Team is subscribed to branch lp:~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n.
To unsubscribe from this branch go to https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n/+edit-subscription
=== modified file 'glade/hub.glade'
--- glade/hub.glade 2010-10-11 06:05:22 +0000
+++ glade/hub.glade 2010-12-10 05:50:31 +0000
@@ -106,7 +106,7 @@
</child>
</widget>
<widget class="GtkDialog" id="passwordDialog">
- <property name="title" translatable="yes">Enter hub password</property>
+ <property name="title" translatable="yes">Hub Password</property>
<property name="resizable">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<child internal-child="vbox">
@@ -139,8 +139,7 @@
<child>
<widget class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Enter your password</b></property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Enter your password:</property>
</widget>
<packing>
<property name="type">label_item</property>
=== modified file 'glade/settingsdialog.glade'
--- glade/settingsdialog.glade 2010-11-28 02:27:56 +0000
+++ glade/settingsdialog.glade 2010-12-10 05:50:31 +0000
@@ -756,7 +756,7 @@
<child>
<widget class="GtkLabel" id="label8">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Outgoing connection settings</b></property>
+ <property name="label" translatable="yes"><b>Outgoing Connection Settings</b></property>
<property name="use_markup">True</property>
</widget>
<packing>
=== modified file 'linux/WulforUtil.cc'
--- linux/WulforUtil.cc 2010-11-28 02:27:56 +0000
+++ linux/WulforUtil.cc 2010-12-10 05:50:31 +0000
@@ -234,14 +234,6 @@
}
}
-std::string WulforUtil::filenameToUri(const std::string &filename)
-{
- if (g_path_is_absolute(filename.c_str()))
- return "file://" + filename;
- else
- return filename;
-}
-
string WulforUtil::makeMagnet(const string &name, const int64_t size, const string &tth)
{
if (name.empty() || tth.empty())
=== modified file 'linux/WulforUtil.hh'
--- linux/WulforUtil.hh 2010-11-28 02:27:56 +0000
+++ linux/WulforUtil.hh 2010-12-10 05:50:31 +0000
@@ -46,7 +46,6 @@
static std::string getTextFromMenu(GtkMenuItem *item);
static std::vector<std::string>& getCharsets();
static void openURI(const std::string &uri);
- static std::string filenameToUri(const std::string &filename);
// Magnet links
static std::string makeMagnet(const std::string &name, const int64_t size, const std::string &tth);
static bool splitMagnet(const std::string &magnet, std::string &name, int64_t &size, std::string &tth);
=== modified file 'linux/settingsdialog.cc'
--- linux/settingsdialog.cc 2010-11-28 02:27:56 +0000
+++ linux/settingsdialog.cc 2010-12-10 05:50:31 +0000
@@ -331,11 +331,11 @@
void Settings::saveFileChooserPath_gui(GtkWidget *fileChooser, dcpp::SettingsManager::StrSetting setting)
{
- gchar *uri = gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(fileChooser));
- if (uri)
+ gchar *path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(fileChooser));
+ if (path)
{
- SettingsManager::getInstance()->set(setting, uri);
- g_free(uri);
+ SettingsManager::getInstance()->set(setting, path);
+ g_free(path);
}
}
@@ -426,10 +426,8 @@
g_signal_connect(getWidget("publicHubsDownButton"), "clicked", G_CALLBACK(onPublicMoveDown_gui), (gpointer)this);
g_signal_connect(getWidget("publicHubsRemoveButton"), "clicked", G_CALLBACK(onPublicRemove_gui), (gpointer)this);
- string finishedDownloads = WulforUtil::filenameToUri(SETTING(DOWNLOAD_DIRECTORY));
- string unfinishedDownloads = WulforUtil::filenameToUri(SETTING(TEMP_DOWNLOAD_DIRECTORY));
- gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(getWidget("finishedDownloadsFileChooserButton")), finishedDownloads.c_str());
- gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(getWidget("unfinishedDownloadsFileChooserButton")), unfinishedDownloads.c_str());
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(getWidget("finishedDownloadsFileChooserButton")), SETTING(DOWNLOAD_DIRECTORY).c_str());
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(getWidget("unfinishedDownloadsFileChooserButton")), SETTING(TEMP_DOWNLOAD_DIRECTORY).c_str());
gtk_spin_button_set_value(GTK_SPIN_BUTTON(getWidget("maxDownloadsSpinButton")), (double)SETTING(DOWNLOAD_SLOTS));
gtk_spin_button_set_value(GTK_SPIN_BUTTON(getWidget("newDownloadsSpinButton")), (double)SETTING(MAX_DOWNLOAD_SPEED));
gtk_entry_set_text(GTK_ENTRY(getWidget("proxyEntry")), SETTING(HTTP_PROXY).c_str());
@@ -635,8 +633,7 @@
void Settings::initLog_gui()
{
- string logDirectory = WulforUtil::filenameToUri(SETTING(LOG_DIRECTORY));
- gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(getWidget("logDirectoryFileChooserButton")), logDirectory.c_str());
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(getWidget("logDirectoryFileChooserButton")), SETTING(LOG_DIRECTORY).c_str());
g_signal_connect(getWidget("logMainCheckButton"), "toggled", G_CALLBACK(onLogMainClicked_gui), (gpointer)this);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(getWidget("logMainCheckButton")), BOOLSETTING(LOG_MAIN_CHAT));
@@ -730,12 +727,9 @@
}
{ // Security Certificates
- string privateKey = WulforUtil::filenameToUri(SETTING(TLS_PRIVATE_KEY_FILE));
- string certificateFile = WulforUtil::filenameToUri(SETTING(TLS_CERTIFICATE_FILE));
- string trustedCertificatesPath = WulforUtil::filenameToUri(SETTING(TLS_TRUSTED_CERTIFICATES_PATH));
- gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(getWidget("privateKeyFileChooserButton")), privateKey.c_str());
- gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(getWidget("certificateFileChooserButton")), certificateFile.c_str());
- gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(getWidget("trustedCertificatesPathFileChooserButton")), trustedCertificatesPath.c_str());
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(getWidget("privateKeyFileChooserButton")), SETTING(TLS_PRIVATE_KEY_FILE).c_str());
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(getWidget("certificateFileChooserButton")), SETTING(TLS_CERTIFICATE_FILE).c_str());
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(getWidget("trustedCertificatesPathFileChooserButton")), SETTING(TLS_TRUSTED_CERTIFICATES_PATH).c_str());
createOptionsView_gui(certificatesView, certificatesStore, "certificatesTreeView");