Launching scripts via the Roster is now actually working (there were some app
registering stuff left that prevented that before). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17475 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1793,8 +1793,8 @@ BRoster::_LaunchApp(const char *mimeType, const entry_ref *ref,
|
|||||||
if (GetRunningAppInfo(team, &appInfo) == B_OK)
|
if (GetRunningAppInfo(team, &appInfo) == B_OK)
|
||||||
otherAppFlags = appInfo.flags;
|
otherAppFlags = appInfo.flags;
|
||||||
}
|
}
|
||||||
|
DBG(OUT(" pre-register: %s (%lx)\n", strerror(error), error));
|
||||||
}
|
}
|
||||||
DBG(OUT(" pre-register: %s (%lx)\n", strerror(error), error));
|
|
||||||
|
|
||||||
// launch the app
|
// launch the app
|
||||||
if (error == B_OK && !alreadyRunning) {
|
if (error == B_OK && !alreadyRunning) {
|
||||||
@@ -1817,7 +1817,7 @@ BRoster::_LaunchApp(const char *mimeType, const entry_ref *ref,
|
|||||||
|
|
||||||
DBG(OUT(" load image: %s (%lx)\n", strerror(error), error));
|
DBG(OUT(" load image: %s (%lx)\n", strerror(error), error));
|
||||||
// finish the registration
|
// finish the registration
|
||||||
if (error == B_OK)
|
if (error == B_OK && !isScript)
|
||||||
error = _SetThreadAndTeam(appToken, appThread, team);
|
error = _SetThreadAndTeam(appToken, appThread, team);
|
||||||
|
|
||||||
DBG(OUT(" set thread and team: %s (%lx)\n", strerror(error), error));
|
DBG(OUT(" set thread and team: %s (%lx)\n", strerror(error), error));
|
||||||
@@ -1830,7 +1830,8 @@ BRoster::_LaunchApp(const char *mimeType, const entry_ref *ref,
|
|||||||
if (error != B_OK) {
|
if (error != B_OK) {
|
||||||
if (appThread >= 0)
|
if (appThread >= 0)
|
||||||
kill_thread(appThread);
|
kill_thread(appThread);
|
||||||
_RemovePreRegApp(appToken);
|
if (!isScript)
|
||||||
|
_RemovePreRegApp(appToken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user