Merge lp:~kjtehprogrammer/pantheon-files/breadcrumb-copy into lp:~elementary-apps/pantheon-files/trunk

Proposed by KJ Lawrence
Status: Rejected
Rejected by: Cody Garver
Proposed branch: lp:~kjtehprogrammer/pantheon-files/breadcrumb-copy
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 28 lines (+11/-2)
1 file modified
src/View/LocationBar.vala (+11/-2)
To merge this branch: bzr merge lp:~kjtehprogrammer/pantheon-files/breadcrumb-copy
Reviewer Review Type Date Requested Status
xapantu (community) Needs Fixing
elementary UX Pending
Review via email: mp+211160@code.launchpad.net

Commit message

Adds ability to copy the path of a breadcrumb by right-click context menu

Description of the change

"Copy Path" added to right-click context menu for breadcrumbs. A minor feature that would be nice to have... Along the lines of https://blueprints.launchpad.net/pantheon-files/+spec/get-full-path-of-window, but isn't as complex to do!

To post a comment you must log in.
Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

A similar feature could be added to the context menus of the views and bookmarks too. My only concern is whether the utility of it warrants lengthening the menus. Something the UI team needs to decide I guess.

Revision history for this message
KJ Lawrence (kjtehprogrammer) wrote :

> A similar feature could be added to the context menus of the views and
> bookmarks too. My only concern is whether the utility of it warrants
> lengthening the menus. Something the UI team needs to decide I guess.

If it's not in those menus at least it's possible to to visit it and copy through the breadcrumb! I'm not sure if being the first item in the context menu or being called "Copy Path" is best, that's a UI team thing too.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Your branch lp:~kjtehprogrammer/pantheon-files/editable-pathbar makes this branch less needed now, doesn't it?

Revision history for this message
KJ Lawrence (kjtehprogrammer) wrote :

Pretty much. It's still not the worst thing to have a copy option when right-clicking the breadcrumbs, but it isn't as necessary now.

Revision history for this message
xapantu (xapantu) wrote :

Still, it is interesting. But your fix does not work properly for network shares for instance. Otherwise, it looks fine.

review: Needs Fixing

Unmerged revisions

1445. By KJ Lawrence

Add the ability to copy the path to a breadcrumb by right-click context menu item.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/View/LocationBar.vala'
2--- src/View/LocationBar.vala 2013-09-19 19:06:44 +0000
3+++ src/View/LocationBar.vala 2014-03-15 01:28:21 +0000
4@@ -279,7 +279,16 @@
5 }
6
7 private void on_files_loaded_menu () {
8- // First the "Open in new tab" menuitem is added to the menu.
9+ // First, add "Copy Path" menu item
10+ var menuitem_copypath = new Gtk.MenuItem.with_label (_("Copy Path"));
11+ menu.append (menuitem_copypath);
12+ menuitem_copypath.activate.connect (() => {
13+ Gtk.Clipboard clipboard = Gtk.Clipboard.get_for_display(Gdk.Display.get_default(), Gdk.SELECTION_CLIPBOARD);
14+ File loc = File.new_for_uri(current_right_click_path);
15+ clipboard.set_text(loc.get_path(), -1);
16+ });
17+
18+ // Second, add "Open in new tab" menuitem is added to the menu.
19 var menuitem_newtab = new Gtk.MenuItem.with_label (_("Open in New Tab"));
20 menu.append (menuitem_newtab);
21 menuitem_newtab.activate.connect (() => {
22@@ -409,4 +418,4 @@
23 Gtk.get_current_event_time ());
24 }
25 }
26-}
27+}
28\ No newline at end of file

Subscribers

People subscribed via source and target branches

to all changes: