diff options
author | infirit <[email protected]> | 2014-11-26 14:38:07 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-26 18:13:43 +0100 |
commit | d2d685818a85b773c49802c494a0c386917b5ee6 (patch) | |
tree | 918603ced900c21a124c7d6de37b609beda74046 /cpufreq | |
parent | 1499d577a67f2dd0f99e6707f29ebd9ba8f9b940 (diff) | |
download | mate-applets-d2d685818a85b773c49802c494a0c386917b5ee6.tar.bz2 mate-applets-d2d685818a85b773c49802c494a0c386917b5ee6.tar.xz |
Gtk3: Silence GtkVbox and GtkHbox deprecation warnings
Diffstat (limited to 'cpufreq')
-rw-r--r-- | cpufreq/src/cpufreq-applet.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 |