From d2d685818a85b773c49802c494a0c386917b5ee6 Mon Sep 17 00:00:00 2001 From: infirit Date: Wed, 26 Nov 2014 14:38:07 +0100 Subject: Gtk3: Silence GtkVbox and GtkHbox deprecation warnings --- cpufreq/src/cpufreq-applet.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cpufreq') diff --git a/cpufreq/src/cpufreq-applet.c b/cpufreq/src/cpufreq-applet.c index a053da5a..326701a5 100644 --- a/cpufreq/src/cpufreq-applet.c +++ b/cpufreq/src/cpufreq-applet.c @@ -43,6 +43,11 @@ #include "cpufreq-monitor-factory.h" #include "cpufreq-utils.h" +#if GTK_CHECK_VERSION (3, 0, 0) +#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) +#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) +#endif + struct _CPUFreqApplet { MatePanelApplet base; @@ -448,7 +453,7 @@ cpufreq_applet_size_request (GtkWidget *widget, GtkRequisition *requisition) gint icon_width; gtk_widget_get_preferred_width (applet->icon, &icon_width, NULL); - width = GTK_IS_HBOX (applet->box) ? + width = gtk_orientable_get_orientation (GTK_ORIENTABLE (applet->box)) == GTK_ORIENTATION_HORIZONTAL ? labels_width + icon_width + 2 : MAX (labels_width, icon_width + 2); #else -- cgit v1.2.1