diff options
| author | Jabiertxo Arraiza Cenoz <jtx@jtx.markerlab.es> | 2018-07-26 06:58:21 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Cenoz <jtx@jtx.markerlab.es> | 2018-07-26 06:58:21 +0000 |
| commit | d97ae1ddc154d48c538039741376f13099376cd1 (patch) | |
| tree | d4f696059dc88d181107dfb7047fd9f1ce6b119a /src/ui/widget/preferences-widget.cpp | |
| parent | Fixes pointed by maren in original MR (diff) | |
| download | inkscape-d97ae1ddc154d48c538039741376f13099376cd1.tar.gz inkscape-d97ae1ddc154d48c538039741376f13099376cd1.zip | |
Open folders in inkscape preferences with XGD. Also added a tentative for Mac
Diffstat (limited to 'src/ui/widget/preferences-widget.cpp')
| -rw-r--r-- | src/ui/widget/preferences-widget.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp index 584c4fb6d..6e1c619d5 100644 --- a/src/ui/widget/preferences-widget.cpp +++ b/src/ui/widget/preferences-widget.cpp @@ -902,14 +902,13 @@ void PrefOpenFolder::init(Glib::ustring const &entry_string, Glib::ustring const void PrefOpenFolder::onRelatedButtonClickedCallback() { g_mkdir_with_parents(relatedEntry->get_text().c_str(), 0700); - GError *error = NULL; + //https://stackoverflow.com/questions/42442189/how-to-open-spawn-a-file-with-glib-gtkmm-in-windows #ifdef WIN32 ShellExecute(NULL, "open", relatedEntry->get_text().c_str(), NULL, NULL, SW_SHOWDEFAULT); +#elif defined(__APPLE__) + system(("open " + relatedEntry->get_text()).c_str()); #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); - } + system(("xdg-open " + relatedEntry->get_text()).c_str()); #endif } |
