summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/preferences-widget.cpp
diff options
context:
space:
mode:
authorJabiertxo Arraiza Cenoz <jtx@jtx.markerlab.es>2018-07-25 12:43:33 +0000
committerJabiertxo Arraiza Cenoz <jtx@jtx.markerlab.es>2018-07-25 12:43:33 +0000
commite7a9946f278ab83fc7c5f541dc736f65060e4f55 (patch)
tree4c2d591eb98dc20d913e343a8a2dc5bcab737852 /src/ui/widget/preferences-widget.cpp
parentFix a win compiling bug and coding style (diff)
downloadinkscape-e7a9946f278ab83fc7c5f541dc736f65060e4f55.tar.gz
inkscape-e7a9946f278ab83fc7c5f541dc736f65060e4f55.zip
Fixing a win compiling bug and coding style
Diffstat (limited to 'src/ui/widget/preferences-widget.cpp')
-rw-r--r--src/ui/widget/preferences-widget.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp
index 5a48a2b0d..01701456e 100644
--- a/src/ui/widget/preferences-widget.cpp
+++ b/src/ui/widget/preferences-widget.cpp
@@ -902,15 +902,8 @@ void PrefOpenFolder::init(Glib::ustring const &entry_string, Glib::ustring const
void PrefOpenFolder::onRelatedButtonClickedCallback()
{
g_mkdir_with_parents(relatedEntry->get_text().c_str(), 0700);
-#ifdef WIN32
- System::Uri uri = new System::Uri(relatedEntry->get_text());
- Glib::ustring uri_open = (uri.AbsoluteUri)
- .c_str()
-#else
- Glib::ustring uri_open = ("file://" + relatedEntry->get_text()).c_str();
-#endif
- GError *error = NULL;
- if (!g_app_info_launch_default_for_uri(uri_open.c_str(), NULL, &error)) {
+ GError *error = NULL;
+ if (!g_app_info_launch_default_for_uri(g_filename_to_uri(relatedEntry->get_text()), NULL, &error)) {
g_warning("Failed to open uri: %s", error->message);
}
}