Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3991)

Unified Diff: chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc

Issue 13864015: Move app launcher and chrome apps shortcut strings into the installer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@migrate_app_id_fix
Patch Set: fix linux unit tests Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 92f14b09ea4a27627707d5e36947438f3c1363bf..e534494b3bbb8ce1861760b36712cf97fd42f205 100644
--- a/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc
@@ -213,9 +213,12 @@ 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_)
+ creation_locations.in_applications_menu_chrome_apps_subdir = true;
+ else
+ creation_locations.in_applications_menu_root = true;
+ }
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
base::Bind(&CreateApplicationShortcutsDialogGtk::CreateDesktopShortcut,
this, shortcut_info_, creation_locations));
@@ -301,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);
}
@@ -323,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(

Powered by Google App Engine
This is Rietveld 408576698