After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 309035 - gtkentry completion API support for getting dropdown item selection
gtkentry completion API support for getting dropdown item selection
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkEntry
3.22.x
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
: 778626 (view as bug list)
Depends on:
Blocks: 117892 314754
 
 
Reported: 2005-06-25 23:44 UTC by Reinout van Schouwen
Modified: 2018-05-02 14:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch (7.19 KB, patch)
2007-03-23 04:35 UTC, Matthias Clasen
none Details | Review

Description Reinout van Schouwen 2005-06-25 23:44:40 UTC
In Epiphany we need to be able to delete entries from the completion dropdown
list by pressing the Delete key. (See bug 117892) 

Please make this possible with the gtkentry completion API.
Comment 1 Reinout van Schouwen 2005-08-31 12:04:17 UTC
bug 314754 also requires other keypresses (Ctrl+Enter) to be retrieved from the
dropdown.
Comment 2 Christian Persch 2005-08-31 12:11:26 UTC
AFAICS the keypress event is already forwarded from the popup to the entry. So
if you don't want to implement 'delete' in GtkEntryCompletion itself, what's
needed here is API to check if popup is shown and if so, which item or action is
selected from it.
Comment 3 Reinout van Schouwen 2005-09-15 15:21:08 UTC
adjusting summary
Comment 4 Diego Escalante Urrelo (not reading bugmail) 2006-10-10 08:16:22 UTC
ping
Comment 5 Matthias Clasen 2007-03-23 04:35:16 UTC
Created attachment 85153 [details] [review]
a patch

Here is a patch that adds a GtkEntryCompletion::key-event signal that can be used to implement delete. Not sure if it is good for much else. It is not quite perfect for that purpose, since deleting a completion removes the selection, instead of moving it to the next selection. 

Unfortunately, implementing delete directly inside GtkEntryCompletion is not possible, since the model is just a GtkTreeModel
and thus effectively readonly.

The patch also fixes a bug in the current code: the model/iter passed to
match_selected are the internal filtermodel, not the user-provided model.
Comment 6 Reinout van Schouwen 2007-04-27 23:49:10 UTC
cc'ing Xan
Comment 7 Reinout van Schouwen 2008-02-13 00:31:24 UTC
Can we get this in for 2.22?
Comment 8 Reinout van Schouwen 2008-08-12 22:23:17 UTC
Ping?
Comment 9 Reinout van Schouwen 2010-06-14 09:06:16 UTC
Still valid.
Comment 10 Claudio Saavedra 2011-06-27 17:19:26 UTC
Review of attachment 85153 [details] [review]:

I started looking at this patch in order to update it (gtkentrycompletion code has changed a bit), but I have a few doubts.

::: gtk/gtkentrycompletion.c
@@ +1817,3 @@
+                                    GtkTreeModel       **model,
+                                    GtkTreeIter         *iter,
+                                    gint                *index_)

What was the purpose if this index_  variable?

@@ +1841,3 @@
+      gtk_tree_model_filter_convert_iter_to_child_iter (completion->priv->filter_model, iter, &filter_iter);
+    }
+      GtkTreeModel *filter_model;

At least now, there is a problem with this (not sure if originally it was the case): if the if clause is FALSE then model and iter are not initialized, so during the signal emission things go wrong. Maybe in such case this function should return FALSE?
Comment 11 Matthias Clasen 2018-02-10 04:37:03 UTC
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and
still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue
for it.
Comment 12 Alexandre Franke 2018-02-10 17:00:49 UTC
(In reply to Matthias Clasen from comment #11)
> If this issue is still important to you and
> still relevant with GTK+ 3.22 or master,

#117892 is still important to me and depends on this, so I'd like this to be reopened.

> please consider creating a gitlab issue for it.

I'd be happy to do that, but I'm not sure how I can make the Epiphany report on bugzilla depend on the GTK+ one on gitlab.

Also isn’t it a shame to lose the history here?
Comment 13 Emmanuele Bassi (:ebassi) 2018-02-10 18:46:06 UTC
(In reply to Alexandre Franke from comment #12)
> (In reply to Matthias Clasen from comment #11)
> > If this issue is still important to you and
> > still relevant with GTK+ 3.22 or master,
> 
> #117892 is still important to me and depends on this, so I'd like this to be
> reopened.

Done.

> > please consider creating a gitlab issue for it.
> 
> I'd be happy to do that, but I'm not sure how I can make the Epiphany report
> on bugzilla depend on the GTK+ one on gitlab.

You can link to it.

> Also isn’t it a shame to lose the history here?

The history of this product in Bugzilla will remain available until bugzilla.gnome.org exists.
Comment 14 Daniel Boles 2018-03-13 17:07:09 UTC
Is this bug really about what its title says, getting the currently active item - or is it really about having a keybinding to delete the currently focussed item?

If the former, then Bug 778626 is a dupe.
Comment 15 Daniel Boles 2018-03-16 21:14:50 UTC
*** Bug 778626 has been marked as a duplicate of this bug. ***
Comment 16 GNOME Infrastructure Team 2018-05-02 14:10:26 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/249.