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

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

Issue 14383003: Application shortcuts in Linux are now installed into a "Chrome Apps" folder. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: GetDirectoryFileContents needs the same \n hack as GetDesktopFileContents. Created 7 years, 8 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
« no previous file with comments | « chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 99847ce37c4ea7330271874c26b0980afe192af4..1f2e7cd842d2121bb5363e0501e8056b57d13280 100644
--- a/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.cc
@@ -215,6 +215,7 @@ void CreateApplicationShortcutsDialogGtk::OnCreateDialogResponse(
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_;
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
base::Bind(&CreateApplicationShortcutsDialogGtk::CreateDesktopShortcut,
this, shortcut_info_, creation_locations));
@@ -300,6 +301,9 @@ 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.
+
CreateDialogBox(parent);
}
@@ -318,6 +322,10 @@ CreateChromeApplicationShortcutsDialogGtk::
app_(app),
profile_path_(profile->GetPath()) {
+ // Place Chrome app shortcuts in the "Chrome Apps" submenu.
+ shortcut_menu_subdir_ =
+ l10n_util::GetStringUTF16(IDS_APP_SHORTCUTS_SUBDIR_NAME);
+
// Get shortcut information and icon now; they are needed for our UI.
web_app::UpdateShortcutInfoAndIconForApp(
*app, profile,
« no previous file with comments | « chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698