const Gtk = imports.gi.Gtk;
const GObject = imports.gi.GObject;

Gtk.init(null);

let model = new Gtk.ListStore();
model.set_column_types([GObject.TYPE_STRING]);
for (let char of 'abcdefghijklmnopqrstuvwxyz'.split('')) {
    for (let index of [1, 2, 3, 4, 5]) {
        let entry = char + index;
        model.set(model.append(), [0], [entry]);
    }
}

let cell = new Gtk.CellRendererPixbuf();
let completion = new Gtk.EntryCompletion();
completion.model = model;
completion.set_text_column(0);
completion.pack_start(cell, false);
completion.reorder(cell, 0);

let entry = new Gtk.Entry();
entry.completion = completion;

let mwindow = new Gtk.Window();
mwindow.add(entry);
mwindow.show_all();
mwindow.connect("destroy", function() { Gtk.main_quit(); });

Gtk.main();
