Re: [mlview-list]Completion table and document/DTD association (bug #127125)



Hi,
> > Then comes the hidding/showing of the completion widget. 
> > Today, the completion widget is packed in a GtkHPaned widget.
> > Putting the gutter GtkHPaned at the extreme right hand side would hide
> > the completion widget.
> 
> Maybe a simple gtk_widget_hide() (to hide totally the completion table)
> would be visually and functionnally cleaner.

I buy the gtk_widget_hide().

> > We could first the following API :
> > 
> > gboolean
> > MlViewXMLDocument::is_completion_possible (MlViewXMLDocument *a_this,
> >                                            xmlNode *a_current_xml_node,
> >                                            MlViewAppContext *a_ctxt) ;
> > 
> > It would obviously return TRUE if completion is possible, FALSE otherwise.
> Yes, I think this API would be useful.
> 
> >  But how to trigger the hidding/showing of the completion widget ?
> > As I said before, the "completion_is_possible" state is specific to each xml
> > node. So each time the user selects an xml node, we can just hide/show the
> > completion widget. To achieve this, we can connect to the
> > MlViewXMLDocument::node_selected signal (in MlViewTreeView::construct()),
> > test if completion is possible, and show/hide the completion widget accordingly.
> 
> Maybe showing the completion table when the user selects a node which
> supports completion, and then hiding it when he selects another node
> which does not support it, and then showing it again, etc. is not a very
> good idea for the GUI. 
> 
> I think we could enable the completion table for views associated with
> documents which have an usable DTD (when validation is activated)
> because some completion can be done with some of their nodes, and
> 'disable' it (or simply do nothing, visually speaking, in fact ; but we
> can also notice the user that the node is invalid (maybe that's too
> complicated, I don't know)) when completion is not possible on the
> current node. 

Hmmh, why not ? I would go for disabling the widget to start with.
Then, after some time and experimentation we will think of an efficient
way to visually report the validation state of each node, if necessary.

> Thus, we could need another API to know if a DTD is associated with a
> document, and signals to know when a DTD becomes associated with the
> document, just like I said before.
Okay.

All the best,

Dodji.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]