Avoid warnings when compiling with Gtk+ >= 3.0

This commit is contained in:
Pierre Pronchery 2014-05-16 21:46:54 +02:00
parent 0e6454b414
commit e3970d9dfb

View File

@ -1,5 +1,5 @@
/* $Id$ */
/* Copyright (c) 2010-2013 Pierre Pronchery <khorben@defora.org> */
/* Copyright (c) 2010-2014 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS Desktop Panel */
/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -82,7 +82,11 @@ static Swap * _swap_init(PanelAppletHelper * helper, GtkWidget ** widget)
return NULL;
}
swap->helper = helper;
#if GTK_CHECK_VERSION(3, 0, 0)
swap->widget = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
#else
swap->widget = gtk_hbox_new(FALSE, 0);
#endif
desc = pango_font_description_new();
pango_font_description_set_weight(desc, PANGO_WEIGHT_BOLD);
label = gtk_label_new(_("Swap:"));