On 12 February 2017 at 17:48, Norbert de Jonge <m...@norbertdejonge.nl> wrote:
> As soon as you click anywhere outside the area with suggestions
> (matching entries), the overview of suggestions disappears. This means
> that users can never hover over a suggestion to highlight it and then
> press a delete button. Unless I'm misunderstanding what you have in
> mind.

If you hover the mouse over a particular matching entry, it is
highlighted. I would like to be able to then pick up delete key press
and know which matching entry was highlighted.

> Anyway, why not add a button to open a completely new window that allows
> users to remove suggestions from a tree view. This should also allow
> them to remove multiple entries at once. Another, lazier solution,
> could be to add a delete button that will delete the suggestion
> matching what's currently in the entry.

Both had crossed my mind. I don't like the first, because it seems
very cumbersome in comparison to the solution I would like. However
this is the only solution I currently know how to implement. The
second solution would be very annoying, as many users, having seen the
word they want is not suggested, press delete to clear extraneous data
from the entry, and would thus probably also delete a matching entry
they would have wanted to keep.

> Something else that may or may not be possible, is add a
> g_signal_connect (entry, "key_press_event", G_CALLBACK (Delete), NULL);
> and then check in Delete()
> if (strcmp (gdk_keyval_name (event->key.keyval), "Delete") == 0)
> and if that's the case, somehow obtain the active suggestion.
> The problem here is that a GtkEntryCompletion only contains only
> private data. At least, I think.
> I tried using
> selection = gtk_tree_view_get_selection (GTK_TREE_VIEW
> (completion->priv->tree_view_proposals));
> to get a selection, but this doesn't seem to work.

Indeed. This is what I have been failing to make work.

Thanks for the suggestions.

Regards

Jeff
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to