Chromium Code Reviews| Index: chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc |
| diff --git a/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc b/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc |
| index c3035cfdbcf903755c0fe1545b8f5f2496a7c7e2..a573724b1b92f3135590562c6580e5ad94d239b1 100644 |
| --- a/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc |
| +++ b/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc |
| @@ -210,9 +210,15 @@ void CreateApplicationShortcutsDialogGtk::OnCreateDialogResponse( |
| ShellIntegration::ShortcutLocations creation_locations; |
| creation_locations.on_desktop = |
| gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(desktop_checkbox_)); |
| - creation_locations.in_applications_menu = |
| - gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(menu_checkbox_)); |
| - creation_locations.applications_menu_subdir = shortcut_menu_subdir_; |
| + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(menu_checkbox_))) { |
| + if (create_in_chrome_apps_subdir_) { |
|
gab
2013/10/17 15:13:31
I think this is simpler as:
creation_locations.ap
calamity
2013/11/20 05:43:30
Done.
|
| + creation_locations.applications_menu_location = |
| + ShellIntegration::APP_MENU_LOCATION_SUBDIR_CHROMEAPPS; |
| + } else { |
| + creation_locations.applications_menu_location = |
| + ShellIntegration::APP_MENU_LOCATION_ROOT; |
| + } |
| + } |
| BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
| base::Bind(&CreateApplicationShortcutsDialogGtk::CreateDesktopShortcut, |
| this, shortcut_info_, creation_locations)); |
| @@ -298,8 +304,8 @@ CreateWebApplicationShortcutsDialogGtk::CreateWebApplicationShortcutsDialogGtk( |
| web_app::GetShortcutInfoForTab(web_contents, &shortcut_info_); |
| CreateIconPixBuf(shortcut_info_.favicon); |
| - // NOTE: Leave shortcut_menu_subdir_ blank to create URL app shortcuts in the |
| - // top-level menu. |
| + // Create URL app shortcuts in the top-level menu. |
| + create_in_chrome_apps_subdir_ = false; |
| CreateDialogBox(parent); |
| } |
| @@ -320,7 +326,7 @@ CreateChromeApplicationShortcutsDialogGtk:: |
| profile_path_(profile->GetPath()) { |
| // Place Chrome app shortcuts in the "Chrome Apps" submenu. |
| - shortcut_menu_subdir_ = web_app::GetAppShortcutsSubdirName(); |
| + create_in_chrome_apps_subdir_ = true; |
| // Get shortcut information and icon now; they are needed for our UI. |
| web_app::UpdateShortcutInfoAndIconForApp( |