GNOME Bugzilla – Bug 692643
Hide a CompletionInfo window
Last modified: 2013-04-15 10:53:58 UTC
If a CompletionInfo window is used without the Completion machinery, the application must hide the window explicitly on certain signals. So it's better to document this. To make the life easier for application writers, we can use the "GtkWindow:transient-for" or "GtkWindow:attached-to" properties of the CompletionInfo window, to hide the window when the focus-out-event signal is emitted on the specified widget. Do you think it's a good idea?
Created attachment 234546 [details] [review] Doc: explain when to hide a CompletionInfo window
Review of attachment 234546 [details] [review]: Looks good by fix the comment inline. Feel free to push after fixing it. ::: gtksourceview/gtksourcecompletioninfo.c @@ +51,3 @@ + * you should hide it when the #GtkWidget::focus-out-event signal is emitted by + * the #GtkTextView. You may also be interested by the + * #GtkTextBuffer:cursor-position property (when its value is modified). If you #GtkTextBuffer::cursor-position <- missing :
A property takes only one ":", else the link doesn't work IIRC. For the idea about the "GtkWindow:transient-for" or "GtkWindow:attached-to" properties, I think the "attached-to" property is better, because it can be any GtkWidget, while the "transient-for" property is a GtkWindow. For example, we can attach the calltip to the GtkSourceView widget, so when the document tab is changed in the text editor, the focus-out-event signal is emitted and the calltip is hidden. With the "transient-for", it's when the complete window looses focus.
After a discussion on IRC, Jesse has said it's a good idea, for the "attached-to". It is implemented on the wip/completion-next-cycle branch.
Pushed on the master branch.