[gnome-shell] [AppWell] Fix D&D for ShellApp



commit d9df7c1b1e5d62a3daa8a34ffc736cc0ca438f42
Author: Colin Walters <walters verbum org>
Date:   Wed Oct 14 17:25:17 2009 -0400

    [AppWell] Fix D&D for ShellApp
    
    The drag and drop case needed to be updated to use ShellApp
    correctly.  Export _is_transient for better compatibility.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=598227

 js/ui/appDisplay.js |    8 ++++----
 src/shell-app.c     |    6 ++++++
 src/shell-app.h     |    1 +
 3 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 47dd726..e3da485 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -850,7 +850,7 @@ AppWell.prototype = {
         let contextId = "";
 
         let running = this._appMonitor.get_running_apps(contextId);
-        let runningIds = this._appIdListToHash(running)
+        let runningIds = this._appIdListToHash(running);
 
         for (let i = 0; i < favorites.length; i++) {
             let app = favorites[i];
@@ -891,10 +891,10 @@ AppWell.prototype = {
 
         let id = app.get_id();
 
-        let favoriteIds = this._appSystem.get_favorites();
-        let favoriteIdsObject = this._arrayValues(favoriteIds);
+        let favorites = this._appMonitor.get_favorites();
+        let favoriteIds = this._appIdListToHash(favorites);
 
-        let srcIsFavorite = (id in favoriteIdsObject);
+        let srcIsFavorite = (id in favoriteIds);
 
         if (srcIsFavorite) {
             return false;
diff --git a/src/shell-app.c b/src/shell-app.c
index 8effd1b..6ce0983 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -64,6 +64,12 @@ shell_app_get_description (ShellApp *app)
   return shell_app_info_get_description (app->info);
 }
 
+gboolean
+shell_app_is_transient (ShellApp *app)
+{
+  return shell_app_info_is_transient (app->info);
+}
+
 /**
  * shell_app_get_info:
  *
diff --git a/src/shell-app.h b/src/shell-app.h
index 9af07c6..232b07a 100644
--- a/src/shell-app.h
+++ b/src/shell-app.h
@@ -34,6 +34,7 @@ const char *shell_app_get_id (ShellApp *app);
 ClutterActor *shell_app_create_icon_texture (ShellApp *app, float size);
 char *shell_app_get_name (ShellApp *app);
 char *shell_app_get_description (ShellApp *app);
+gboolean shell_app_is_transient (ShellApp *app);
 
 ShellAppInfo *shell_app_get_info (ShellApp *app);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]