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 358024 - Gtk+ text entry completion doesn't generate all appropriate accessibility events.
Gtk+ text entry completion doesn't generate all appropriate accessibility eve...
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Accessibility
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 350214
 
 
Reported: 2006-09-27 20:07 UTC by Rich Burridge
Modified: 2018-04-15 00:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Standalone Python script to help reproduce the problem. (13.30 KB, text/x-python)
2006-09-27 20:08 UTC, Rich Burridge
  Details
Output generated by bug_350214.py when following the steps to reproduce the problem. (34.02 KB, application/octet-stream)
2006-09-27 20:08 UTC, Rich Burridge
  Details
draft patch (4.14 KB, patch)
2008-03-20 08:26 UTC, Li Yuan
none Details | Review

Description Rich Burridge 2006-09-27 20:07:15 UTC
Steps to reproduce:

1) Run the attached standalone application (bug_350214.py) in a terminal
   window.
2) Run gtk-demo, making sure GTK_MODULES=:gail:atk-bridge: is set, prior
   to running
3) Start the Entry Completion demo.
4) Make sure the text area in the entry completion demo has focus.
5) Type "t". A list of two available choices will appear.
6) Press the Down arrow to "select" the first "total" entry.
7) Press Return to use that to complete the entry in the text area.

You will notice from the output generated by this Python script, that
steps 6) and 7) do not generate any accessibility events.

8) Press F12 to terminate the Python script.

See the attached file (bug_350214.out) for the output generated by
running this script against the steps above.

The keypress event for the Down arrow key in step 6) is at line 236.
The keypress event for the Return key in step 7) is at line 238.

See also Orca bug #350214:

  http://bugzilla.gnome.org/show_bug.cgi?id=350214

which is blocked because of this problem.
Comment 1 Rich Burridge 2006-09-27 20:08:02 UTC
Created attachment 73515 [details]
Standalone Python script to help reproduce the problem.
Comment 2 Rich Burridge 2006-09-27 20:08:43 UTC
Created attachment 73516 [details]
Output generated by bug_350214.py when following the steps to reproduce the problem.
Comment 3 bill.haneman 2006-09-28 15:15:35 UTC
Hi Rich:

Looks like someone is going to have to poke into the internals of the text completion widget for this one (it won't be me anytime soon, because of my schedule).  I would suspect that this bug will be bounced to gtk+ for at least awhile since probably some "expected" gtk+ events are not being fired (otherwise gail would be picking up on at least some kind of gtk+ signals and firing some kind of events here - at least that's what I'd expect).  Some of the detailed events such as "selection-changed" are probably the responsibility of gail.

What's the GTK+ widget class of the entry completion widget?
Comment 4 Rich Burridge 2006-09-28 15:20:00 UTC
Here's the full source code of the gtk-demo Entry Completion example
(from the "Source" tab in the gtk-demo app:

#include <gtk/gtk.h>

static GtkWidget *window = NULL;

/* Creates a tree model containing the completions */
GtkTreeModel *
create_completion_model (void)
{
  GtkListStore *store;
  GtkTreeIter iter;
  
  store = gtk_list_store_new (1, G_TYPE_STRING);

  /* Append one word */
  gtk_list_store_append (store, &iter);
  gtk_list_store_set (store, &iter, 0, "GNOME", -1);

  /* Append another word */
  gtk_list_store_append (store, &iter);
  gtk_list_store_set (store, &iter, 0, "total", -1);

  /* And another word */
  gtk_list_store_append (store, &iter);
  gtk_list_store_set (store, &iter, 0, "totally", -1);
  
  return GTK_TREE_MODEL (store);
}


GtkWidget *
do_entry_completion (GtkWidget *do_widget)
{
  GtkWidget *vbox;
  GtkWidget *label;
  GtkWidget *entry;
  GtkEntryCompletion *completion;
  GtkTreeModel *completion_model;
  
  if (!window)
  {
    window = gtk_dialog_new_with_buttons ("GtkEntryCompletion",
					  GTK_WINDOW (do_widget),
					  0,
					  GTK_STOCK_CLOSE,
					  GTK_RESPONSE_NONE,
					  NULL);
    gtk_window_set_resizable (GTK_WINDOW (window), FALSE);

    g_signal_connect (window, "response",
		      G_CALLBACK (gtk_widget_destroy), NULL);
    g_signal_connect (window, "destroy",
		      G_CALLBACK (gtk_widget_destroyed), &window);

    vbox = gtk_vbox_new (FALSE, 5);
    gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
    gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);

    label = gtk_label_new (NULL);
    gtk_label_set_markup (GTK_LABEL (label), "Completion demo, try writing <b>total</b> or <b>gnome</b> for example.");
    gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);

    /* Create our entry */
    entry = gtk_entry_new ();
    gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);

    /* Create the completion object */
    completion = gtk_entry_completion_new ();

    /* Assign the completion to the entry */
    gtk_entry_set_completion (GTK_ENTRY (entry), completion);
    g_object_unref (completion);
    
    /* Create a tree model and use it as the completion model */
    completion_model = create_completion_model ();
    gtk_entry_completion_set_model (completion, completion_model);
    g_object_unref (completion_model);
    
    /* Use model column 0 as the text column */
    gtk_entry_completion_set_text_column (completion, 0);
  }

  if (!GTK_WIDGET_VISIBLE (window))
    gtk_widget_show_all (window);
  else
    gtk_widget_destroy (window);

  return window;
}


Comment 5 bill.haneman 2006-09-28 15:36:40 UTC
Offhand it looks like we need to create a GailEntryCompletion class, in a new file, gailentrycompletion.[ch]
Comment 6 bill.haneman 2006-09-28 17:05:23 UTC
Correction- GtkEntryCompletion is not a GtkWidget.  Looks like the issue(s) are with GtkEntry.  This is a regression which was introduced by the changes to GtkEntry which were introduced without corresponding modifications to the ATK support in GtkEntry (provided by GailEntry).

Comment 7 Rich Burridge 2008-02-04 16:46:48 UTC
This problem still exists in the latest version of atk.
Li, any idea on how much work is involved to fix it?

Thanks.
Comment 8 Li Yuan 2008-03-05 06:45:14 UTC
Liyan is working on the patch.
Comment 9 Li Yuan 2008-03-20 08:26:45 UTC
Created attachment 107662 [details] [review]
draft patch

OK, here is the draft patch. Now we emit "children-changed:add" on gtkentry, and set the gtktreeview as the gtkentry's child. Also implement the ref_child and get_n_children for gtkentry, so Orca can get the childCount of the gtkentry and ref the child. Works fine on accerciser, but seems Orca doesn't now read it, is there anything need to be changed in Orca? Is Orca listening "children-changed:add" on gtkentry now?
Comment 10 Matthias Clasen 2018-02-10 04:58:53 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 11 Matthias Clasen 2018-04-15 00:08:39 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new