]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
gtk_combo_box_get_active_text didn't appear until GTK 2.6; bodge
authorSimon Tatham <anakin@pobox.com>
Fri, 4 Apr 2008 12:23:29 +0000 (12:23 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 4 Apr 2008 12:23:29 +0000 (12:23 +0000)
around it for earlier versions of GTK 2.

[originally from svn r7969]

unix/gtkdlg.c

index 12f8c5b98bc49756e729d8b564e4068bff5886cd..42b4d950b954ae89e6a8330528ce25d85d6d65a9 100644 (file)
@@ -368,7 +368,12 @@ void dlg_editbox_get(union control *ctrl, void *dlg, char *buffer, int length)
     } else {
        assert(uc->combo != NULL);
        strncpy(buffer,
+#if GTK_CHECK_VERSION(2,6,0)
                gtk_combo_box_get_active_text(GTK_COMBO_BOX(uc->combo)),
+#else
+               gtk_entry_get_text
+               (GTK_ENTRY(gtk_bin_get_child(GTK_BIN(uc->combo)))),
+#endif
                length);
        buffer[length-1] = '\0';
     }