From 1159971950396eb92f8476a4990eea3198603280 Mon Sep 17 00:00:00 2001 From: "radha%netscape.com" Date: Wed, 12 Aug 1998 22:55:16 +0000 Subject: [PATCH] Cut and refresh context menus fixed. basic code for "rename" context menu. It doesn't work though. --- cmd/xfe/src/RDFTreeView.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/cmd/xfe/src/RDFTreeView.cpp b/cmd/xfe/src/RDFTreeView.cpp index a62a8096d9b7..afcac3991f5d 100644 --- a/cmd/xfe/src/RDFTreeView.cpp +++ b/cmd/xfe/src/RDFTreeView.cpp @@ -543,6 +543,12 @@ XFE_RDFTreeView::notify(HT_Notification /* ns */, HT_Resource n, HT_GetNodeName(n));); break; } + case HT_EVENT_NODE_EDIT: + { + int row = HT_GetNodeIndex(_ht_rdfView, n); + XmLGridEditBegin(m_widget, True, row, 0); + break; + } case HT_EVENT_VIEW_REFRESH: { int row = HT_GetNodeIndex(_ht_rdfView, n); @@ -551,7 +557,13 @@ XFE_RDFTreeView::notify(HT_Notification /* ns */, HT_Resource n, if (expands) HT_GetOpenState(n, &isExpanded); if (expands && isExpanded) - XmLTreeDeleteChildren(m_widget, row); + { + if (n == HT_TopNode(_ht_rdfView)) + /* It is the top most node. Delete all rows */ + XmLGridDeleteAllRows(m_widget, XmCONTENT); + else + XmLTreeDeleteChildren(m_widget, row); + } refresh(n); @@ -676,7 +688,6 @@ XFE_RDFTreeView::add_row /*D( fprintf(stderr,"XFE_RDFTreeView::add_row(0x%x %d) name(%s) depth(%d)\n", node,row, name, depth);)*/ - Pixmap pixmap, mask; //pixmap = XmUNSPECIFIED_PIXMAP;