From: Michael Orlitzky Date: Wed, 23 Oct 2019 13:11:28 +0000 (-0400) Subject: xfce4-hdaps-dialogs.c: switch from hbox/vbox to generic box. X-Git-Tag: v1.0.0~18 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=05a5da89a97689a8a6a06e1e6c34fedc0e5a6f35;p=xfce4-hdaps.git xfce4-hdaps-dialogs.c: switch from hbox/vbox to generic box. The gtk_vbox_new() and gtk_hbox_new() functions have been deprecated as of gtk+-3.2. Instead, we're supposed to use the generic gtk_box_new() function and pass in an orientation like GTK_ORIENTATION_VERTICAL. Ok, no problem. That change is somewhat trivial. But, in a related change, a GtkDialog no longer exposes its content vbox via a member variable in gtk+-3.x. So, we have to get it with the gtk_dialog_get_content_area() accessor function. This change is also trivial, once you have figured out that the vbox it accesses is the same one that was removed from the public API of GtkDialog. I sure hope it is. --- diff --git a/panel-plugin/xfce4-hdaps-dialogs.c b/panel-plugin/xfce4-hdaps-dialogs.c index dc104fd..cd8f36a 100644 --- a/panel-plugin/xfce4-hdaps-dialogs.c +++ b/panel-plugin/xfce4-hdaps-dialogs.c @@ -122,14 +122,15 @@ void hdaps_configure(XfcePanelPlugin *plugin, G_CALLBACK(hdaps_configure_response), hdaps); - vbox = gtk_vbox_new(FALSE, DEFAULT_BORDER_WIDTH); + vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, DEFAULT_BORDER_WIDTH); gtk_container_set_border_width(GTK_CONTAINER(vbox), DEFAULT_BORDER_WIDTH - 2); - 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); /* Create size group to keep widgets aligned */ sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - hbox = gtk_hbox_new(FALSE, DEFAULT_BORDER_WIDTH); + hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, DEFAULT_BORDER_WIDTH); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Poll Frequency:")); @@ -148,7 +149,7 @@ void hdaps_configure(XfcePanelPlugin *plugin, 0); /* Create the device name dropdown. */ - hbox = gtk_hbox_new(FALSE, DEFAULT_BORDER_WIDTH); + hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, DEFAULT_BORDER_WIDTH); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new(_("Device Name:"));