Bug#399529: GtkEntryCompletion: Strange matches with case insensitive

Marco Túlio Gontijo e Silva malebria at riseup.net
Mon Nov 20 11:47:18 CET 2006


Package: libgtk2.0-0
Version: 2.8.20-3
Severity: normal

I wrote a small test program with 3 entries with EntryCompletion. The problem
is that, in the first, when I type M, it completes Mar and marco. In the
second, when I type M is completes Major, but not minor. The third is just to
show that from b it show only Big in the popup but doens't in the inline
completion (as described in bug #399443).

Code of the program:

#include <gtk/gtk.h>

static gboolean delete (GtkWidget *widget, GdkEvent *event, gpointer data)
{
  gtk_main_quit ();
  return TRUE;
}

int main (int argc, char **argv)
{
  GtkWindow *window;
  GtkEntry *entry1, *entry2, *entry3;
  GtkEntryCompletion *completion;
  GtkListStore *list;
  GtkTreeIter iter;
  GtkVBox *box;

  gtk_init (&argc, &argv);

  window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
  g_signal_connect
    (G_OBJECT (window), "delete-event", G_CALLBACK (delete), NULL);
  
  entry1 = GTK_ENTRY (gtk_entry_new ());
  completion = gtk_entry_completion_new ();
  gtk_entry_completion_set_text_column (completion, 0);
  gtk_entry_completion_set_inline_completion (completion, TRUE);
  list = gtk_list_store_new (1, G_TYPE_STRING);
  gtk_list_store_append (list, &iter);
  gtk_list_store_set (list, &iter, 0, "Mar", -1);
  gtk_list_store_append (list, &iter);
  gtk_list_store_set (list, &iter, 0, "marco", -1);
  gtk_entry_completion_set_model (completion, GTK_TREE_MODEL (list));
  gtk_entry_set_completion (GTK_ENTRY (entry1), completion);

  entry2 = GTK_ENTRY (gtk_entry_new ());
  completion = gtk_entry_completion_new ();
  gtk_entry_completion_set_text_column (completion, 0);
  gtk_entry_completion_set_inline_completion (completion, TRUE);
  list = gtk_list_store_new (1, G_TYPE_STRING);
  gtk_list_store_append (list, &iter);
  gtk_list_store_set (list, &iter, 0, "Major", -1);
  gtk_list_store_append (list, &iter);
  gtk_list_store_set (list, &iter, 0, "minor", -1);
  gtk_entry_completion_set_model (completion, GTK_TREE_MODEL (list));
  gtk_entry_set_completion (GTK_ENTRY (entry2), completion);

  entry3 = GTK_ENTRY (gtk_entry_new ());
  completion = gtk_entry_completion_new ();
  gtk_entry_completion_set_text_column (completion, 0);
  gtk_entry_completion_set_inline_completion (completion, TRUE);
  list = gtk_list_store_new (1, G_TYPE_STRING);
  gtk_list_store_append (list, &iter);
  gtk_list_store_set (list, &iter, 0, "Big", -1);
  gtk_list_store_append (list, &iter);
  gtk_list_store_set (list, &iter, 0, "small", -1);
  gtk_entry_completion_set_model (completion, GTK_TREE_MODEL (list));
  gtk_entry_set_completion (GTK_ENTRY (entry3), completion);

  box = GTK_VBOX (gtk_vbox_new (TRUE, 0));
  gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (entry1), TRUE, TRUE, 0);
  gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (entry2), TRUE, TRUE, 0);
  gtk_box_pack_end (GTK_BOX (box), GTK_WIDGET (entry3), TRUE, TRUE, 0);

  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (box));
  gtk_widget_show_all (GTK_WIDGET (window));

  gtk_main ();

  return 0;
}

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-2-686
Locale: LANG=pt_BR, LC_CTYPE=pt_BR (charmap=ISO-8859-1)

Versions of packages libgtk2.0-0 depends on:
ii  libatk1.0-0                  1.12.3-1    The ATK accessibility toolkit
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  libcairo2                    1.2.4-4     The Cairo 2D vector graphics libra
ii  libfontconfig1               2.4.1-2     generic font configuration library
ii  libglib2.0-0                 2.12.4-2    The GLib library of C routines
ii  libgtk2.0-common             2.8.20-3    Common files for the GTK+ graphica
ii  libjpeg62                    6b-13       The Independent JPEG Group's JPEG 
ii  libpango1.0-0                1.14.7-1    Layout and rendering of internatio
ii  libpng12-0                   1.2.8rel-7  PNG library - runtime
ii  libtiff4                     3.8.2-6     Tag Image File Format (TIFF) libra
ii  libx11-6                     2:1.0.3-3   X11 client-side library
ii  libxcursor1                  1.1.7-4     X cursor management library
ii  libxext6                     1:1.0.1-2   X11 miscellaneous extension librar
ii  libxfixes3                   1:4.0.1-4   X11 miscellaneous 'fixes' extensio
ii  libxi6                       1:1.0.1-3   X11 Input extension library
ii  libxinerama1                 1:1.0.1-4.1 X11 Xinerama extension library
ii  libxrandr2                   2:1.1.0.2-4 X11 RandR extension library
ii  libxrender1                  1:0.9.1-3   X Rendering Extension client libra

Versions of packages libgtk2.0-0 recommends:
ii  hicolor-icon-theme            0.8-4      default fallback theme for FreeDes
ii  libgtk2.0-bin                 2.8.20-3   The programs for the GTK+ graphica

-- no debconf information







More information about the Pkg-gnome-maintainers mailing list