Commit 790eae82 authored by Jiří Klimeš's avatar Jiří Klimeš
Browse files

core: get rid of remaining gtk_hbox_new()/gtk_vbox_new() calls

These have been deprecated in GTK+ 3.1.6 in favour of gtk_box_new().
parent e182d7d4
......@@ -17,7 +17,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* (C) Copyright 2008 - 2010 Red Hat, Inc.
* (C) Copyright 2008 - 2011 Red Hat, Inc.
*/
#include "config.h"
......@@ -650,7 +650,11 @@ mobile_connection_new (GtkWindow *parent,
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 12, 12, 12, 12);
gtk_box_pack_start (GTK_BOX (content), alignment, TRUE, FALSE, 6);
#if GTK_CHECK_VERSION (3,1,6)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
#else
hbox = gtk_hbox_new (FALSE, 6);
#endif
gtk_container_add (GTK_CONTAINER (alignment), hbox);
image = gtk_image_new_from_icon_name ("nm-device-wwan", GTK_ICON_SIZE_DIALOG);
......@@ -658,7 +662,11 @@ mobile_connection_new (GtkWindow *parent,
gtk_misc_set_padding (GTK_MISC (image), 0, 6);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 6);
#if GTK_CHECK_VERSION (3,1,6)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
#else
vbox = gtk_vbox_new (FALSE, 6);
#endif
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, FALSE, 0);
label = gtk_label_new (_("Select the technology your mobile broadband provider uses. If you are unsure, ask your provider."));
......
......@@ -17,7 +17,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* (C) Copyright 2008 - 2010 Red Hat, Inc.
* (C) Copyright 2008 - 2011 Red Hat, Inc.
*/
#include "config.h"
......@@ -120,7 +120,11 @@ ce_page_wired_security_new (NMConnection *connection,
parent = CE_PAGE (self);
priv = CE_PAGE_WIRED_SECURITY_GET_PRIVATE (self);
#if GTK_CHECK_VERSION (3,1,6)
parent->page = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
#else
parent->page = gtk_vbox_new (FALSE, 6);
#endif
g_object_ref_sink (G_OBJECT (parent->page));
gtk_container_set_border_width (GTK_CONTAINER (parent->page), 6);
......
......@@ -19,6 +19,8 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* (C) Copyright 2009 - 2011 Red Hat, Inc.
*
*/
#ifdef HAVE_CONFIG_H
......@@ -1079,7 +1081,11 @@ get_config_widgets (const char *bdaddr, const char **uuids)
G_CALLBACK (default_adapter_powered_changed), info);
/* UI setup */
#if GTK_CHECK_VERSION (3,1,6)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
#else
vbox = gtk_vbox_new (FALSE, 6);
#endif
g_object_set_data_full (G_OBJECT (vbox), "info", info, plugin_info_destroy);
if (pan) {
......@@ -1100,11 +1106,19 @@ get_config_widgets (const char *bdaddr, const char **uuids)
gtk_box_pack_start (GTK_BOX (vbox), info->dun_button, FALSE, TRUE, 6);
}
#if GTK_CHECK_VERSION (3,1,6)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
#else
hbox = gtk_hbox_new (FALSE, 6);
#endif
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 6);
/* Spinner's hbox */
#if GTK_CHECK_VERSION (3,1,6)
info->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
#else
info->hbox = gtk_hbox_new (FALSE, 6);
#endif
gtk_box_pack_start (GTK_BOX (hbox), info->hbox, FALSE, FALSE, 0);
info->label = gtk_label_new ("");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment