diff options
author | Christian Neumair <cneumair@gnome.org> | 2008-07-22 14:02:52 +0000 |
---|---|---|
committer | Christian Neumair <cneumair@src.gnome.org> | 2008-07-22 14:02:52 +0000 |
commit | 537789810b3423493c3d892a0bc2d23e48c1c631 (patch) | |
tree | 36345e24f4b844db6724d506e453b522e1300ee4 | |
parent | a0b6303fc7a07a5ad37924729d42ff0b4fc1f17f (diff) | |
download | nautilus-537789810b3423493c3d892a0bc2d23e48c1c631.tar.gz |
Display submenu for more than two associated applications when all files
2008-07-22 Christian Neumair <cneumair@gnome.org>
* src/file-manager/fm-directory-view.c (reset_open_with_menu):
Display submenu for more than two associated applications when all
files are folders.
svn path=/trunk/; revision=14404
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/file-manager/fm-directory-view.c | 12 |
2 files changed, 15 insertions, 3 deletions
@@ -1,5 +1,11 @@ 2008-07-22 Christian Neumair <cneumair@gnome.org> + * src/file-manager/fm-directory-view.c (reset_open_with_menu): + Display submenu for more than two associated applications when all + files are folders. + +2008-07-22 Christian Neumair <cneumair@gnome.org> + * src/file-manager/fm-directory-view.c (action_save_search_as_callback): Make save button the default widget, and proxy entry activation to the diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c index 0d4675ba9..476e27468 100644 --- a/src/file-manager/fm-directory-view.c +++ b/src/file-manager/fm-directory-view.c @@ -329,6 +329,8 @@ static GdkDragAction ask_link_action (FMDirectoryView static void update_templates_directory (FMDirectoryView *view); static void user_dirs_changed (FMDirectoryView *view); +static gboolean file_list_all_are_folders (GList *file_list); + static void action_open_scripts_folder_callback (GtkAction *action, gpointer callback_data); static void action_cut_files_callback (GtkAction *action, @@ -4400,6 +4402,12 @@ reset_open_with_menu (FMDirectoryView *view, GList *selection) num_applications = g_list_length (applications); + + if (file_list_all_are_folders (selection)) { + submenu_visible = (num_applications > 2); + } else { + submenu_visible = (num_applications > 3); + } for (node = applications, index = 0; node != NULL; node = node->next, index++) { GAppInfo *application; @@ -4412,7 +4420,7 @@ reset_open_with_menu (FMDirectoryView *view, GList *selection) continue; } - if (num_applications > 3) { + if (submenu_visible) { menu_path = FM_DIRECTORY_VIEW_MENU_PATH_APPLICATIONS_SUBMENU_PLACEHOLDER; popup_path = FM_DIRECTORY_VIEW_POPUP_PATH_APPLICATIONS_SUBMENU_PLACEHOLDER; } else { @@ -4439,8 +4447,6 @@ reset_open_with_menu (FMDirectoryView *view, GList *selection) g_object_unref (default_app); } - submenu_visible = (num_applications > 3); - open_with_chooser_visible = other_applications_visible && g_list_length (selection) == 1; |