[network-manager-applet] core: get rid of remaining gtk_hbox_new()/gtk_vbox_new() calls



commit 790eae82c51fb1caf283e3778364caee9fc04abd
Author: JiÅÃ KlimeÅ <jklimes redhat com>
Date:   Tue Jun 21 12:19:02 2011 +0200

    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().

 src/connection-editor/page-mobile.c         |   10 +++++++++-
 src/connection-editor/page-wired-security.c |    6 +++++-
 src/gnome-bluetooth/bt-widget.c             |   14 ++++++++++++++
 3 files changed, 28 insertions(+), 2 deletions(-)
---
diff --git a/src/connection-editor/page-mobile.c b/src/connection-editor/page-mobile.c
index ab2e2ee..e27b9e1 100644
--- a/src/connection-editor/page-mobile.c
+++ b/src/connection-editor/page-mobile.c
@@ -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."));
diff --git a/src/connection-editor/page-wired-security.c b/src/connection-editor/page-wired-security.c
index c53b36e..30ee72b 100644
--- a/src/connection-editor/page-wired-security.c
+++ b/src/connection-editor/page-wired-security.c
@@ -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);
 
diff --git a/src/gnome-bluetooth/bt-widget.c b/src/gnome-bluetooth/bt-widget.c
index 23c51c8..df850d9 100644
--- a/src/gnome-bluetooth/bt-widget.c
+++ b/src/gnome-bluetooth/bt-widget.c
@@ -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 ("");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]