summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/preferences-widget.cpp
diff options
context:
space:
mode:
authorJabiertxo Arraiza Cenoz <jtx@jtx.markerlab.es>2018-07-25 15:17:30 +0000
committerJabiertxo Arraiza Cenoz <jtx@jtx.markerlab.es>2018-07-25 15:17:30 +0000
commit19486fdb506cf415413088aa47c7585aee2f6ec3 (patch)
treebe4e3a86fec8200a39a611289aa9c3bb6600ed91 /src/ui/widget/preferences-widget.cpp
parentFixing coding style (diff)
downloadinkscape-19486fdb506cf415413088aa47c7585aee2f6ec3.tar.gz
inkscape-19486fdb506cf415413088aa47c7585aee2f6ec3.zip
Fixing a win bug open folders
Diffstat (limited to 'src/ui/widget/preferences-widget.cpp')
-rw-r--r--src/ui/widget/preferences-widget.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp
index 135382b14..584c4fb6d 100644
--- a/src/ui/widget/preferences-widget.cpp
+++ b/src/ui/widget/preferences-widget.cpp
@@ -903,10 +903,14 @@ void PrefOpenFolder::onRelatedButtonClickedCallback()
{
g_mkdir_with_parents(relatedEntry->get_text().c_str(), 0700);
GError *error = NULL;
+#ifdef WIN32
+ ShellExecute(NULL, "open", relatedEntry->get_text().c_str(), NULL, NULL, SW_SHOWDEFAULT);
+#else
if (!g_app_info_launch_default_for_uri(g_filename_to_uri(relatedEntry->get_text().c_str(), NULL, &error), NULL,
&error)) {
g_warning("Failed to open uri: %s", error->message);
}
+#endif
}
void PrefFileButton::init(Glib::ustring const &prefs_path)