want to save any settings that may have changed. */
g_object_set_data(G_OBJECT(hdaps->plugin), "dialog", NULL);
hdaps->poll_frequency = gtk_spin_button_get_value_as_int((GtkSpinButton*)hdaps->sb_poll_frequency);
- hdaps->device_name = gtk_combo_box_get_active_text((GtkComboBox*)hdaps->cb_device_name);
+ hdaps->device_name = gtk_combo_box_text_get_active_text((GtkComboBoxText*)hdaps->cb_device_name);
snprintf(hdaps->sysfs_file, FILENAME_MAX, UNLOAD_HEADS_FMT, hdaps->device_name);
hdaps_save(hdaps->plugin, hdaps);
hdaps_reset_timeout(hdaps);
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
- hdaps->cb_device_name = gtk_combo_box_new_text();
+ hdaps->cb_device_name = gtk_combo_box_text_new();
/* Add the current device name, it should always be available.
Oh, and it should be the default, too. */
- gtk_combo_box_append_text((GtkComboBox*)hdaps->cb_device_name, hdaps->device_name);
+ gtk_combo_box_text_append_text((GtkComboBoxText*)hdaps->cb_device_name, hdaps->device_name);
/* This function takes an index, and 0 should be the first
(only) index at this point. */
the only entry. Therefore, to avoid duplicates, we only
have to avoid adding the current device name a second time. */
if (strcmp(hdaps_devices[list_idx], hdaps->device_name) != 0) {
- gtk_combo_box_append_text((GtkComboBox*)hdaps->cb_device_name, hdaps_devices[list_idx]);
+ gtk_combo_box_text_append_text((GtkComboBoxText*)hdaps->cb_device_name, hdaps_devices[list_idx]);
}
}