Merge lp:~meese/slingshot/fix-1084886 into lp:~elementary-pantheon/slingshot/trunk

Proposed by meese
Status: Rejected
Rejected by: Cody Garver
Proposed branch: lp:~meese/slingshot/fix-1084886
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 20 lines (+9/-1)
1 file modified
src/SlingshotView.vala (+9/-1)
To merge this branch: bzr merge lp:~meese/slingshot/fix-1084886
Reviewer Review Type Date Requested Status
Cody Garver (community) Disapprove
Review via email: mp+233187@code.launchpad.net

Commit message

makes right click on search entry pastes clipboard contents

Description of the change

Partially fixes 1084886 by making right click on the top search entry paste clipboard contents. Copy isn't really necessary for a search entry as a user is unlikely to want to copy information they just put in themselves. Also popup menus do not play nicely with slingshots window in its current form.

To post a comment you must log in.
Revision history for this message
David Gomes (davidgomes) wrote :

You shouldn't be checking if event.button is 3. I believe there is a
cleaner approach but I'm on my phone now. Will look for it later.
On Sep 3, 2014 10:40 AM, "meese" <email address hidden> wrote:

> meese has proposed merging lp:~madelynn-r-may/slingshot/fix-1084886 into
> lp:slingshot.
>
> Commit message:
> makes right click on search entry pastes clipboard contents
>
> Requested reviews:
> elementary Pantheon team (elementary-pantheon)
> Related bugs:
> Bug #1084886 in Slingshot: "No right click menu in search [$15]"
> https://bugs.launchpad.net/slingshot/+bug/1084886
>
> For more details, see:
>
> https://code.launchpad.net/~madelynn-r-may/slingshot/fix-1084886/+merge/233187
>
> Partially fixes 1084886 by making right click on the top search entry
> paste clipboard contents. Copy isn't really necessary for a search entry as
> a user is unlikely to want to copy information they just put in themselves.
> Also popup menus do not play nicely with slingshots window in its current
> form.
> --
>
> https://code.launchpad.net/~madelynn-r-may/slingshot/fix-1084886/+merge/233187
> Your team elementary Pantheon team is requested to review the proposed
> merge of lp:~madelynn-r-may/slingshot/fix-1084886 into lp:slingshot.
>
> === modified file 'src/SlingshotView.vala'
> --- src/SlingshotView.vala 2014-08-31 21:38:07 +0000
> +++ src/SlingshotView.vala 2014-09-03 09:39:35 +0000
> @@ -164,7 +164,15 @@
> dummy_search_entry = new Gtk.SearchEntry ();
> dummy_search_entry.placeholder_text = _("Search Apps…");
> dummy_search_entry.width_request = 250;
> - dummy_search_entry.button_press_event.connect ((e) => {return
> e.button == 3;});
> + dummy_search_entry.button_press_event.connect ((event) => {
> + if (event.button == 3) {
> + var cb = Gtk.Clipboard.@get
> (Gdk.SELECTION_CLIPBOARD);
> + var text = cb.wait_for_text ();
> + dummy_search_entry.text = text;
> + return true;
> + }
> + return false;
> + });
>
> if (Slingshot.settings.show_category_filter) {
> top.attach (view_selector, 0, 0, 1, 1);
>
>
>

lp:~meese/slingshot/fix-1084886 updated
453. By meese

change to 3 to BUTTON_SECONDARY

Revision history for this message
meese (meese) wrote :

fixed

Revision history for this message
Cody Garver (codygarver) wrote :

This behavior is not desired

review: Disapprove

Unmerged revisions

453. By meese

change to 3 to BUTTON_SECONDARY

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/SlingshotView.vala'
2--- src/SlingshotView.vala 2014-08-31 21:38:07 +0000
3+++ src/SlingshotView.vala 2014-09-03 23:04:24 +0000
4@@ -164,7 +164,15 @@
5 dummy_search_entry = new Gtk.SearchEntry ();
6 dummy_search_entry.placeholder_text = _("Search Apps…");
7 dummy_search_entry.width_request = 250;
8- dummy_search_entry.button_press_event.connect ((e) => {return e.button == 3;});
9+ dummy_search_entry.button_press_event.connect ((event) => {
10+ if (event.button == Gdk.BUTTON_SECONDARY) {
11+ var cb = Gtk.Clipboard.@get (Gdk.SELECTION_CLIPBOARD);
12+ var text = cb.wait_for_text ();
13+ dummy_search_entry.text = text;
14+ return true;
15+ }
16+ return false;
17+ });
18
19 if (Slingshot.settings.show_category_filter) {
20 top.attach (view_selector, 0, 0, 1, 1);

Subscribers

People subscribed via source and target branches