This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 617
Proper fix for "Show in OS" for Linux. #477
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…r Linux. The target file is being highlighted, and "Show Extension Folder" (still) works. For the highlighting to work, I had to detect the default file manager on the system, then run it with the target file as a parameter. If we failed to automatically determine the default file manager, the fallback behavior is to just open the directory containing the file (without the file being highlighted). This is for https://trello.com/c/RF1ddQGK/898-linux-show-in-os-for-selected-file
Now using a IPC call to FileManager1, similar to what Firefox does. The fallback remains the same. That is - call gtk_show_uri() on the file's parent directory (probably not needed, but just in case). Also, fixed the URI generation. Also, updated the appshell.gyp file to include the new compilation/linking flags needed for the new function to compile properly. The library "libdbus-glib-1-dev" is now a dependency, so it should be added to the wiki page.
radorodopski
changed the title
Added proper implementation of the "ShowFolderInOSWindow" function for Linux
Proper fix for "Show in OS" for Linux.
Oct 21, 2014
Please note that this is (IMO) a more robust solution than PR #473 |
The GLib library now includes its own DBus bindings, and so they recommend switching to the new bindings for new applications. This requires glib-2.0 version at least 2.26 (at the moment of writing the latest version is 2.40). Removed the dependency of the binding library (libdbus-glib-1), updated appshell.gyp accordingly.
Looks good to me. Would you mind signing the CLA http://dev.brackets.io/brackets-contributor-license-agreement.html? This is required for us to accept contributions. Thanks |
Sure, I thought I signed that more than a year ago but maybe I'm mistaken. |
ingorichter
added a commit
that referenced
this pull request
Oct 24, 2014
Proper fix for "Show in OS" for Linux.
ingorichter
added a commit
that referenced
this pull request
Dec 8, 2015
Proper fix for "Show in OS" for Linux.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proper fix for "Show in OS" for Linux.
Now using an IPC method call (FileManager1.ShowItems) to show the file (highlighted) in its directory.
Also updated the appshell.gyp file.
Using the new DBus bindings which are provided by the GLib library (requires libglib-2.0 version 2.26 and up), so this no longer requires the old binding library (libdbus-glib-1).
If for some reason the above solution fails, the fallback behavior is to just open the directory containing the file (without the file being highlighted). This is done by calling gtk_show_uri() on the file's parent directory.
This is for https://trello.com/c/RF1ddQGK/898-linux-show-in-os-for-selected-file