Remove deprecated code for GTK+-3.0.
This commit is contained in:
parent
615983e37a
commit
4421de675f
@ -92,14 +92,14 @@ zenity_entry (ZenityData *data, ZenityEntryData *entry_data)
|
||||
n_entries = g_slist_length (entries);
|
||||
|
||||
if (n_entries > 1) {
|
||||
entry = gtk_combo_box_entry_new_text ();
|
||||
entry = gtk_combo_box_new_with_entry ();
|
||||
|
||||
for (tmp = entries; tmp; tmp = tmp->next) {
|
||||
gtk_combo_box_append_text (GTK_COMBO_BOX (entry), tmp->data);
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (entry), tmp->data);
|
||||
}
|
||||
|
||||
if (entry_data->entry_text) {
|
||||
gtk_combo_box_prepend_text (GTK_COMBO_BOX (entry), entry_data->entry_text);
|
||||
gtk_combo_box_text_prepend_text (GTK_COMBO_BOX_TEXT (entry), entry_data->entry_text);
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (entry), 0);
|
||||
}
|
||||
|
||||
@ -145,7 +145,7 @@ zenity_entry_dialog_response (GtkWidget *widget, int response, gpointer data)
|
||||
case GTK_RESPONSE_OK:
|
||||
zen_data->exit_code = zenity_util_return_exit_code (ZENITY_OK);
|
||||
if (n_entries > 1) {
|
||||
text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry));
|
||||
text = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (entry));
|
||||
}
|
||||
else {
|
||||
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||
|
Reference in New Issue
Block a user