mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Set "entry-text-column" on our combo boxes.
When we provide an editable text box with a drop-down list of useful
preset values, such as the one full of character sets in the
Translation panel, we implement it on GTK 2.4+ as a GtkComboBox
pointing at a two-column GtkListStore, in which the second column is
the actual text (the first being a numeric id). Therefore, we need to
set the "entry-text-column" property to tell GtkComboBox which of
those columns to look in for the value corresponding to the edit-box
text.
Thanks to Robert de Bath for spotting the problem and tracing it as
far as commit 5fa22495c
. That commit replaced a widget construction
call via gtk_combo_box_entry_new_with_model() with one using the newer
gtk_combo_box_new_with_model_and_entry(), overlooking the fact that
the former provided the text column number as a parameter, and the
latter didn't.
This commit is contained in:
parent
1659cf3f14
commit
45d5aacbfa
@ -2083,6 +2083,8 @@ GtkWidget *layout_ctrls(struct dlgparam *dp, struct Shortcuts *scs,
|
||||
G_TYPE_STRING);
|
||||
w = gtk_combo_box_new_with_model_and_entry
|
||||
(GTK_TREE_MODEL(uc->listmodel));
|
||||
g_object_set(G_OBJECT(w), "entry-text-column", 1,
|
||||
(const char *)NULL);
|
||||
/* We cannot support password combo boxes. */
|
||||
assert(!ctrl->editbox.password);
|
||||
uc->combo = w;
|
||||
|
Loading…
Reference in New Issue
Block a user