diff --git a/modules/rdf/include/htrdf.h b/modules/rdf/include/htrdf.h index 663d1d783977..ed4f70c23170 100644 --- a/modules/rdf/include/htrdf.h +++ b/modules/rdf/include/htrdf.h @@ -186,6 +186,14 @@ PR_PUBLIC_API(HT_Pane) HT_NewPersonalToolbarPane (HT_Notification notify); PR_PUBLIC_API(HT_Pane) HT_NewBreadcrumbPane (HT_Notification notify); +PR_PUBLIC_API(void) HT_SetViewCollapsedState(HT_View view, PRBool collapsedFlag); +PR_PUBLIC_API(PRBool) HT_IsViewCollapsed(HT_View view); + +PR_PUBLIC_API(void) HT_SetViewHiddenState(HT_View view, PRBool hiddenFlag); +PR_PUBLIC_API(PRBool) HT_IsViewHidden(HT_View view); + +PR_PUBLIC_API(PRBool) HT_IsPaneBusy(HT_Pane pane); + PR_PUBLIC_API(void) HT_AddToContainer (HT_Resource container, char *url, char *optionalTitle); PR_PUBLIC_API(void) HT_AddBookmark (char *url, char *optionalTitle); diff --git a/modules/rdf/src/ht.c b/modules/rdf/src/ht.c index 77b6160cde85..51efe8bd2135 100644 --- a/modules/rdf/src/ht.c +++ b/modules/rdf/src/ht.c @@ -171,11 +171,16 @@ ht_UpdateURLstate(char *url, PRBool inProgressFlag, int status) { /* start node icon animation */ node->flags |= HT_CONTENTS_LOADING_FLAG; + ++(node->view->pane->loadingCount); } else { /* stop node icon animation */ node->flags &= (~HT_CONTENTS_LOADING_FLAG); + if (node->view->pane->loadingCount > 0) + { + --(node->view->pane->loadingCount); + } } sendNotification(node, HT_EVENT_NODE_VPROP_CHANGED, gNavCenter->RDF_smallIcon, HT_COLUMN_STRING); @@ -2067,6 +2072,78 @@ HT_SetWorkspaceOrder(HT_View src, HT_View dest, PRBool afterDestFlag) +PR_PUBLIC_API(void) +HT_SetViewCollapsedState(HT_View view, PRBool collapsedFlag) +{ + XP_ASSERT(view != NULL); + if (view != NULL) + { + view->collapsedFlag = collapsedFlag; + } +} + + + +PR_PUBLIC_API(PRBool) +HT_IsViewCollapsed(HT_View view) +{ + PRBool collapsedFlag = PR_FALSE; + + XP_ASSERT(view != NULL); + if (view != NULL) + { + collapsedFlag = view->collapsedFlag; + } + return(collapsedFlag); +} + + + +PR_PUBLIC_API(void) +HT_SetViewHiddenState(HT_View view, PRBool hiddenFlag) +{ + XP_ASSERT(view != NULL); + if (view != NULL) + { + view->hiddenFlag = hiddenFlag; + } +} + + + +PR_PUBLIC_API(PRBool) +HT_IsViewHidden(HT_View view) +{ + PRBool hiddenFlag = PR_FALSE; + + XP_ASSERT(view != NULL); + if (view != NULL) + { + hiddenFlag = view->hiddenFlag; + } + return(hiddenFlag); +} + + + +PR_PUBLIC_API(PRBool) +HT_IsPaneBusy(HT_Pane pane) +{ + PRBool isLoadingFlag = PR_FALSE; + + XP_ASSERT(pane != NULL); + if (pane != NULL) + { + if (pane->viewListCount > 0) + { + isLoadingFlag = PR_TRUE; + } + } + return(isLoadingFlag); +} + + + HT_View HT_NewView (RDF_Resource topNode, HT_Pane pane, PRBool useColumns, void *feData, PRBool autoOpen) { diff --git a/modules/rdf/src/ht.h b/modules/rdf/src/ht.h index c93607483012..f0f950fc5bae 100644 --- a/modules/rdf/src/ht.h +++ b/modules/rdf/src/ht.h @@ -119,6 +119,7 @@ typedef struct _HT_PaneStruct { struct _HT_URLSiteMapAssoc *smp; struct _HT_URLSiteMapAssoc *sbp; uint32 viewListCount; + uint32 loadingCount; PRBool autoFlushFlag; SBProvider smartBrowsingProviders; PRBool dirty; @@ -161,6 +162,8 @@ typedef struct _HT_ViewStruct { PRBool descendingFlag; PRBool refreshingItemListp; PRBool inited; + PRBool collapsedFlag; + PRBool hiddenFlag; RDF_Resource treeRel; } HT_ViewStruct;