GNOME Bugzilla – Bug 745898
“Open with another application” silently fails when two files are selected
Last modified: 2015-03-11 14:41:37 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.
What we want here is hide that menu item when the selection is bigger than 1 item.
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>
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.
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>
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..
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>
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>
Review of attachment 299102 [details] [review]: Awesome thanks!!
Attachment 299102 [details] pushed as 52e534e - nautilus-view: disable open with app for multiple selection