From 6cdd1023ab743a1deda5e6f48a248c4f00fc18e5 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Sat, 18 Aug 2012 14:39:02 -0400 Subject: [PATCH] Get the icon and version from FindApp which works whether or not the app is currently running. This makes process controller show it's icon and version even though it lives in Deskbar. --- src/kits/shared/AboutWindow.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/kits/shared/AboutWindow.cpp b/src/kits/shared/AboutWindow.cpp index 46100e73b5..5f5f6e13af 100644 --- a/src/kits/shared/AboutWindow.cpp +++ b/src/kits/shared/AboutWindow.cpp @@ -172,11 +172,11 @@ AboutView::AppVersion(const char* signature) if (signature == NULL) return NULL; - app_info appInfo; - if (be_roster->GetAppInfo(signature, &appInfo) != B_OK) + entry_ref ref; + if (be_roster->FindApp(signature, &ref) != B_OK) return NULL; - BFile file(&appInfo.ref, B_READ_ONLY); + BFile file(&ref, B_READ_ONLY); BAppFileInfo appMime(&file); if (appMime.InitCheck() != B_OK) return NULL; @@ -212,8 +212,13 @@ AboutView::AppIcon(const char* signature) if (be_roster->FindApp(signature, &ref) != B_OK) return NULL; + BFile file(&ref, B_READ_ONLY); + BAppFileInfo appMime(&file); + if (appMime.InitCheck() != B_OK) + return NULL; + BBitmap* icon = new BBitmap(BRect(0.0, 0.0, 127.0, 127.0), B_RGBA32); - if (BNodeInfo::GetTrackerIcon(&ref, icon, (icon_size)128) == B_OK) + if (appMime.GetIcon(icon, (icon_size)128) == B_OK) return icon; delete icon;