зеркало из https://github.com/mozilla/pjs.git
HT_Launch() changes.
This commit is contained in:
Родитель
ccbdb73e5a
Коммит
a069c0d6ea
|
@ -393,7 +393,7 @@ PR_PUBLIC_API(HT_Error) HT_SetSelectionRange (HT_Resource node1, HT_Resource nod
|
|||
PR_PUBLIC_API(HT_Resource) HT_GetNextSelection(HT_View view, HT_Resource startingNode);
|
||||
PR_PUBLIC_API(void) HT_ToggleSelection(HT_Resource node);
|
||||
|
||||
PR_PUBLIC_API(void) HT_Launch(HT_Resource node);
|
||||
PR_PUBLIC_API(PRBool) HT_Launch(HT_Resource node, MWContext *context);
|
||||
|
||||
/*
|
||||
* HT_NewCursor, HT_GetNextItem, HT_DeleteCursor
|
||||
|
|
|
@ -5986,21 +5986,21 @@ HT_ToggleSelection(HT_Resource node)
|
|||
|
||||
|
||||
|
||||
PR_PUBLIC_API(void)
|
||||
HT_Launch(HT_Resource node)
|
||||
PR_PUBLIC_API(PRBool)
|
||||
HT_Launch(HT_Resource node, MWContext *context)
|
||||
{
|
||||
char *filename = resourceID(node->node);
|
||||
|
||||
XP_ASSERT(node != NULL);
|
||||
|
||||
#ifdef XP_PC
|
||||
|
||||
if (startsWith("lfs:",filename) && endsWith(".exe",filename))
|
||||
if (node != NULL)
|
||||
{
|
||||
/* XXX could launch the .exe */
|
||||
if ( (!HT_IsContainer(node)) && (!HT_IsSeparator(node)) )
|
||||
{
|
||||
/* XXX to do: determine if data source wants to handle launch */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return(PR_FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче