After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 650396 - Add an "Open containing folder" command
Add an "Open containing folder" command
Status: RESOLVED OBSOLETE
Product: gedit
Classification: Applications
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Gedit maintainers
Gedit maintainers
: 775291 (view as bug list)
Depends on: 636269
Blocks: document-centric
 
 
Reported: 2011-05-17 14:26 UTC by Akshay Gupta
Modified: 2020-11-24 10:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add Open Containing Folder command in gedit (5.37 KB, patch)
2011-05-17 15:26 UTC, Akshay Gupta
none Details | Review
Add Open Containing Folder command in gedit (5.01 KB, patch)
2011-05-20 22:01 UTC, Akshay Gupta
needs-work Details | Review

Description Akshay Gupta 2011-05-17 14:26:35 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).
Comment 1 Akshay Gupta 2011-05-17 15:26:29 UTC
Created attachment 187966 [details] [review]
Add Open Containing Folder command in gedit
Comment 2 Akshay Gupta 2011-05-20 22:00:08 UTC
Updated the patchset with a few code spruce-ups discussed here: https://bugzilla.gnome.org/show_bug.cgi?id=650402
Comment 3 Akshay Gupta 2011-05-20 22:01:34 UTC
Created attachment 188253 [details] [review]
Add Open Containing Folder command in gedit
Comment 4 Ignacio Casal Quinteiro (nacho) 2011-05-25 10:33:44 UTC
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
Comment 5 Bastien Nocera 2011-05-25 12:10:03 UTC
That just opens the parent folder, and doesn't select the file in question. Nautilus has API to do that correctly, use it.
Comment 6 Sindhu S 2014-01-10 17:49:11 UTC
Akshay, are you still working on this bug?
Comment 7 Nate Graham 2016-11-29 21:52:53 UTC
*** Bug 775291 has been marked as a duplicate of this bug. ***
Comment 8 Sébastien Wilmet 2020-11-24 10:00:51 UTC
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.