Get toolbar collapsed/hidden state on createion, and save toolbar collapsed/hidden state on destruction. (Note: no event notification.)
This commit is contained in:
Родитель
ea450acff8
Коммит
9c09647728
|
@ -113,6 +113,8 @@ typedef struct _RDF_NCVocabStruct {
|
|||
RDF_Resource RDF_Receipts;
|
||||
#endif
|
||||
RDF_Resource RDF_Toolbar;
|
||||
RDF_Resource RDF_collapsed;
|
||||
RDF_Resource RDF_hidden;
|
||||
RDF_Resource RDF_JSec;
|
||||
RDF_Resource RDF_JSecPrincipal;
|
||||
RDF_Resource RDF_JSecTarget;
|
||||
|
|
|
@ -2152,6 +2152,7 @@ HT_NewView (RDF_Resource topNode, HT_Pane pane, PRBool useColumns, void *feData,
|
|||
RDF_Cursor cursor;
|
||||
RDF_Resource r, selectedView;
|
||||
PRBool err = false, workspaceAdded;
|
||||
char *state = NULL;
|
||||
uint32 workspacePos;
|
||||
|
||||
do
|
||||
|
@ -2309,6 +2310,24 @@ HT_NewView (RDF_Resource topNode, HT_Pane pane, PRBool useColumns, void *feData,
|
|||
}
|
||||
++(pane->viewListCount);
|
||||
|
||||
/* get collapsed and hidden state */
|
||||
HT_GetNodeData (view->top, gNavCenter->RDF_collapsed, HT_COLUMN_STRING, (void *)&state);
|
||||
if (state != NULL)
|
||||
{
|
||||
if (compareStrings(state, "yes"))
|
||||
{
|
||||
view->collapsedFlag = PR_TRUE;
|
||||
}
|
||||
}
|
||||
HT_GetNodeData (view->top, gNavCenter->RDF_hidden, HT_COLUMN_STRING, (void *)&state);
|
||||
if (state != NULL)
|
||||
{
|
||||
if (compareStrings(state, "yes"))
|
||||
{
|
||||
view->hiddenFlag = PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
sendNotification(view->top, HT_EVENT_VIEW_ADDED, NULL, HT_COLUMN_UNKNOWN);
|
||||
|
||||
if (pane->special == false)
|
||||
|
@ -2579,8 +2598,13 @@ HT_DeleteView (HT_View view)
|
|||
|
||||
XP_ASSERT(view != NULL);
|
||||
|
||||
if (view->top != NULL) /* delete nodes */
|
||||
if (view->top != NULL)
|
||||
{
|
||||
/* save collapsed and hidden state */
|
||||
HT_SetNodeData (view->top, gNavCenter->RDF_collapsed, HT_COLUMN_STRING, ((view->collapsedFlag) ? "yes":"no"));
|
||||
HT_SetNodeData (view->top, gNavCenter->RDF_hidden, HT_COLUMN_STRING, ((view->hiddenFlag) ? "yes":"no"));
|
||||
|
||||
/* delete nodes */
|
||||
destroyViewInt(view->top, PR_TRUE);
|
||||
}
|
||||
if (view->itemList != NULL) /* delete itemList */
|
||||
|
|
|
@ -194,6 +194,8 @@ createNavCenterVocab () {
|
|||
setResourceType(gNavCenter->RDF_Cookies, COOKIE_RT);
|
||||
|
||||
gNavCenter->RDF_Toolbar = createContainer("NC:Toolbar");
|
||||
gNavCenter->RDF_collapsed = RDF_GetResource(gCoreDB, "collapsed", true);
|
||||
gNavCenter->RDF_hidden = RDF_GetResource(gCoreDB, "hidden", true);
|
||||
gNavCenter->RDF_JSec = createContainer("NC:Jsec");
|
||||
gNavCenter->RDF_JSecPrincipal = RDF_GetResource(gCoreDB, "JsecPrincipal", true);
|
||||
gNavCenter->RDF_JSecTarget = RDF_GetResource(gCoreDB, "JsecTarget", true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче