]> gitweb.michael.orlitzky.com - xfce4-hdaps.git/blobdiff - panel-plugin/xfce4-hdaps-dialogs.c
xfce4-hdaps-dialogs.c: replace obsolete gtk_misc_set_alignment().
[xfce4-hdaps.git] / panel-plugin / xfce4-hdaps-dialogs.c
index b6da7cb95edab9e365a81dc0f243906c0ddbeba3..dc104fdff75f67329b4d84747e93d99fc4e8fe73 100644 (file)
@@ -62,7 +62,7 @@ static void hdaps_configure_response(GtkWidget   *dialog,
        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);
@@ -134,7 +134,8 @@ void hdaps_configure(XfcePanelPlugin *plugin,
 
   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);
@@ -152,14 +153,15 @@ void hdaps_configure(XfcePanelPlugin *plugin,
 
   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);
 
-  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. */
@@ -177,7 +179,7 @@ void hdaps_configure(XfcePanelPlugin *plugin,
        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]);
     }
   }