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);
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);
snprintf(hdaps->sysfs_file, FILENAME_MAX, UNLOAD_HEADS_FMT, hdaps->device_name);
hdaps_save(hdaps->plugin, hdaps);
hdaps_reset_timeout(hdaps);
snprintf(hdaps->sysfs_file, FILENAME_MAX, UNLOAD_HEADS_FMT, hdaps->device_name);
hdaps_save(hdaps->plugin, hdaps);
hdaps_reset_timeout(hdaps);
- gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), vbox, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
+ vbox, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
label = gtk_label_new(_("Poll Frequency:"));
gtk_size_group_add_widget(sg, label);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
label = gtk_label_new(_("Poll Frequency:"));
gtk_size_group_add_widget(sg, label);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+ gtk_widget_set_halign(label, 0.0);
+ gtk_widget_set_valign(label, 0.5);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
hdaps->sb_poll_frequency = gtk_spin_button_new_with_range(100, 5000, 100);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
hdaps->sb_poll_frequency = gtk_spin_button_new_with_range(100, 5000, 100);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
label = gtk_label_new(_("Device Name:"));
gtk_size_group_add_widget(sg, label);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
label = gtk_label_new(_("Device Name:"));
gtk_size_group_add_widget(sg, label);
- gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+ gtk_widget_set_halign(label, 0.0);
+ gtk_widget_set_valign(label, 0.5);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
/* Add the current device name, it should always be available.
Oh, and it should be the default, too. */
/* Add the current device name, it should always be available.
Oh, and it should be the default, too. */
/* This function takes an index, and 0 should be the first
(only) index at this point. */
/* 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) {
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) {