From 4664fac566d0f52e7be941650757dd5044deeac7 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Fri, 1 May 2009 16:21:00 -0400 Subject: [PATCH] Improve comments about startup notification Do a better job at describe the problems in docDisplay.js related to not reading the desktop files and finding StartupNotify=true. Also, fix a typo. http://bugzilla.gnome.org/show_bug.cgi?id=580658 --- js/ui/docDisplay.js | 10 ++++++---- js/ui/main.js | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/js/ui/docDisplay.js b/js/ui/docDisplay.js index 1b5906d44..d27e0b21c 100644 --- a/js/ui/docDisplay.js +++ b/js/ui/docDisplay.js @@ -80,10 +80,12 @@ DocDisplayItem.prototype = { let appInfo = Gio.app_info_create_from_commandline(appExec, null, 0, null); - // The app launch context doesn't work as well as we might like because - // it doesn't get the right StartupNotify key from the application's - // desktop file. So, we don't get startup notification, the application - // doesn't stick to the current workspace, and so forth. + // The point of passing an app launch context to launch() is mostly to get + // startup notification and associated benefits like the app appearing + // on the right desktop; but it doesn't really work for now because we aren't + // reading the application's desktop file, and thus don't find the + // StartupNotify=true in it. So, despite passing the app launch context, + // no startup notification occurs. appInfo.launch([], Main.create_app_launch_context()); } else { log("Failed to get application info for " + this._docInfo.get_uri()); diff --git a/js/ui/main.js b/js/ui/main.js index 7fcc004c2..cc98d2b8a 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -176,7 +176,7 @@ function create_app_launch_context() { context.set_timestamp(display.get_current_time()); // Make sure that the app is opened on the current workspace even if - // the user switches before it seetarts + // the user switches before it starts context.set_desktop(screen.get_active_workspace_index()); return context;