X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fgtkdlg.c;h=8e1364bd349d8cc19379429b2d1f94a7f90aab1b;hb=8c09f85a64ff31d05f37304a041fd766507a19f0;hp=86fa310e0a5201c9be6ec5cdb3a22abb6bdb8a37;hpb=bd119b1fbab64824267bf1f75f667ba0ccdb804e;p=PuTTY.git diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index 86fa310e..8e1364bd 100644 --- a/unix/gtkdlg.c +++ b/unix/gtkdlg.c @@ -2276,15 +2276,22 @@ GtkWidget *layout_ctrls(struct dlgparam *dp, struct Shortcuts *scs, cols = cols ? cols : 1; for (i = 0; i < cols; i++) { GtkTreeViewColumn *column; + GtkCellRenderer *cellrend; /* * It appears that GTK 2 doesn't leave us any * particularly sensible way to honour the * "percentages" specification in the ctrl * structure. */ + cellrend = gtk_cell_renderer_text_new(); + if (!ctrl->listbox.hscroll) { + gtk_object_set(GTK_OBJECT(cellrend), + "ellipsize", PANGO_ELLIPSIZE_END, + "ellipsize-set", TRUE, + NULL); + } column = gtk_tree_view_column_new_with_attributes - ("heading", gtk_cell_renderer_text_new(), - "text", i+1, (char *)NULL); + ("heading", cellrend, "text", i+1, (char *)NULL); gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_GROW_ONLY); gtk_tree_view_append_column(GTK_TREE_VIEW(w), column); @@ -3543,6 +3550,7 @@ static void eventlog_destroy(GtkWidget *widget, gpointer data) es->window = NULL; sfree(es->seldata); + es->seldata = NULL; dlg_cleanup(&es->dp); ctrl_free_box(es->eventbox); }