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 745898 - “Open with another application” silently fails when two files are selected
“Open with another application” silently fails when two files are selected
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
3.15.x
Other Linux
: Normal normal
: 3.16
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-09 14:23 UTC by Arnaud B.
Modified: 2015-03-11 14:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add "selection_count == 1" condition in g_simple_action_set_enabled () (1.38 KB, patch)
2015-03-11 10:26 UTC, Isaac Ge
none Details | Review
Add "selection_count == 1" condition in g_simple_action_set_enabled () (1.39 KB, patch)
2015-03-11 10:50 UTC, Isaac Ge
none Details | Review
Add "selection_count == 1" condition in g_simple_action_set_enabled () (1.39 KB, patch)
2015-03-11 14:25 UTC, Isaac Ge
none Details | Review
nautilus-view: disable open with app for multiple selection (1.38 KB, patch)
2015-03-11 14:36 UTC, Isaac Ge
committed Details | Review

Description Arnaud B. 2015-03-09 14:23:33 UTC
In 3.15.90, selecting two (or more) files and right-click > “Open with another application” silently fails to open the application-chooser dialog.
Comment 1 Carlos Soriano 2015-03-09 14:31:47 UTC
What we want here is hide that menu item when the selection is bigger than 1 item.
Comment 2 Isaac Ge 2015-03-11 10:26:42 UTC
Created attachment 299084 [details] [review]
Add "selection_count == 1" condition in g_simple_action_set_enabled ()

In 3.15.90, selecting two (or more) files and right-click > “Open with another
application” silently fails to open the application-chooser dialog. So what we
want here is hide that menu item when the selection is bigger than 1 item.

https://bugzilla.gnome.org/show_bug.cgi?id=745898

Signed-off-by: acgtyrant <acgtyrant@gmail.com>
Comment 3 Carlos Soriano 2015-03-11 10:42:00 UTC
Review of attachment 299084 [details] [review]:

The content of commit message is more or less okay, but the format is not good.
Please read https://wiki.gnome.org/GnomeLove/CodeContributionWorkflow

::: src/nautilus-view.c
@@ +5988,3 @@
 	action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group),
 					     "open-with-other-application");
+  g_simple_action_set_enabled (G_SIMPLE_ACTION (action), app != NULL && selection_count == 1);

You modified the indentation. Use what this file uses, tabs of 8.
Also the line is too long, could you break it like:
g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
                             app != NULL && selection_count == 1);

With the correct identation.
Comment 4 Isaac Ge 2015-03-11 10:50:55 UTC
Created attachment 299085 [details] [review]
Add "selection_count == 1" condition in g_simple_action_set_enabled ()

In 3.15.90, selecting two (or more) files and right-click > “Open with another
application” silently fails to open the application-chooser dialog. So what we
want here is hide that menu item when the selection is bigger than 1 item.

https://bugzilla.gnome.org/show_bug.cgi?id=745898

Signed-off-by: acgtyrant <acgtyrant@gmail.com>
Comment 5 Carlos Soriano 2015-03-11 11:47:14 UTC
Review of attachment 299085 [details] [review]:

The commit message format is still not correct

::: src/nautilus-view.c
@@ +5989,3 @@
 					     "open-with-other-application");
+	g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
+					app != NULL && selection_count == 1);

I know it's confusing...but for multi line aligments use spaces, so they can be perfectly aligned with the previous line. See how is done in previous lines..
Comment 6 Isaac Ge 2015-03-11 14:25:40 UTC
Created attachment 299100 [details] [review]
Add "selection_count == 1" condition in g_simple_action_set_enabled ()

In 3.15.90, selecting two (or more) files and right-click > “Open with another
application” silently fails to open the application-chooser dialog. So what we
want here is hide that menu item when the selection is bigger than 1 item.

https://bugzilla.gnome.org/show_bug.cgi?id=745898

Signed-off-by: acgtyrant <acgtyrant@gmail.com>
Comment 7 Isaac Ge 2015-03-11 14:36:39 UTC
Created attachment 299102 [details] [review]
nautilus-view: disable open with app for multiple selection

In 3.15.90, selecting two (or more) files and right-click > “Open with another
application” silently fails to open the application-chooser dialog. So what we
want here is hide that menu item when the selection is bigger than 1 item.

https://bugzilla.gnome.org/show_bug.cgi?id=745898

Signed-off-by: acgtyrant <acgtyrant@gmail.com>
Comment 8 Carlos Soriano 2015-03-11 14:39:20 UTC
Review of attachment 299102 [details] [review]:

Awesome thanks!!
Comment 9 Carlos Soriano 2015-03-11 14:41:34 UTC
Attachment 299102 [details] pushed as 52e534e - nautilus-view: disable open with app for multiple selection