GNOME Bugzilla – Bug 650396
Add an "Open containing folder" command
Last modified: 2020-11-24 10:00:51 UTC
Based on: https://bugzilla.gnome.org/show_bug.cgi?id=627443 This patch adds the same "Open Containing Folder" to gedit's toolbar, the File menu and the tab popup menu to launch the corresponding directory in the default file manager where the gedit file resides. (See above listed bug for more details).
Created attachment 187966 [details] [review] Add Open Containing Folder command in gedit
Updated the patchset with a few code spruce-ups discussed here: https://bugzilla.gnome.org/show_bug.cgi?id=650402
Created attachment 188253 [details] [review] Add Open Containing Folder command in gedit
Review of attachment 188253 [details] [review]: Comments inline. ::: gedit/gedit-commands-file.c @@ +914,3 @@ + return; + + GFile *parent; let's just do the cast directly @@ +917,3 @@ + + doc = gedit_tab_get_document (tab); + no need for this. This is always true. @@ +920,3 @@ + + file = gedit_document_get_location (doc); + no need for this, if you are already checking if (file) @@ +923,3 @@ + parent = NULL; + + tab = gedit_window_get_active_tab (window); brackets in a newline @@ +928,3 @@ + } + + return; ditto @@ +932,3 @@ + + parent_uri = g_file_get_uri (parent); + gedit_window_widget = GTK_WIDGET (window); ditto @@ +941,3 @@ + + error = NULL; + ditto
That just opens the parent folder, and doesn't select the file in question. Nautilus has API to do that correctly, use it.
Akshay, are you still working on this bug?
*** Bug 775291 has been marked as a duplicate of this bug. ***
Mass-closing of all gedit bugzilla tickets. Special "code" to find again all those gedit bugzilla tickets that were open before the mass-closing: 2bfe1b0590a78457e1f1a6a90fb975f5878cb60064ccfe1d7db76ca0da52f0f3 By searching the above sha256sum in bugzilla, the gedit contributors can find again the tickets. We may be interested to do so when we work on a specific area of the code, to at least know the known problems and possible enhancements. We do this mass-closing because bugzilla.gnome.org is being replaced by gitlab.gnome.org.