[network-manager-applet] Don't use h/vboxes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] Don't use h/vboxes
- Date: Fri, 17 Jun 2011 22:48:32 +0000 (UTC)
commit b12388b7fea9ad851d301ffe3d506b438a942920
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jun 17 18:47:40 2011 -0400
Don't use h/vboxes
These have been deprecated in GTK+ 3.1.6, so use boxes there.
src/ap-menu-item.c | 4 ++++
src/applet-device-gsm.c | 4 ++++
src/applet-dialogs.c | 4 ++++
src/applet.c | 4 ++++
src/mb-menu-item.c | 4 ++++
src/utils/mobile-wizard.c | 35 ++++++++++++++++++++++++++++++++---
6 files changed, 52 insertions(+), 3 deletions(-)
---
diff --git a/src/ap-menu-item.c b/src/ap-menu-item.c
index e3b830c..f3287e5 100644
--- a/src/ap-menu-item.c
+++ b/src/ap-menu-item.c
@@ -39,7 +39,11 @@ G_DEFINE_TYPE (NMNetworkMenuItem, nm_network_menu_item, GTK_TYPE_IMAGE_MENU_ITEM
static void
nm_network_menu_item_init (NMNetworkMenuItem * item)
{
+#if GTK_CHECK_VERSION(3,1,6)
+ item->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#else
item->hbox = gtk_hbox_new (FALSE, 6);
+#endif
item->ssid = gtk_label_new (NULL);
gtk_misc_set_alignment (GTK_MISC (item->ssid), 0.0, 0.5);
diff --git a/src/applet-device-gsm.c b/src/applet-device-gsm.c
index e8865f0..8a27fea 100644
--- a/src/applet-device-gsm.c
+++ b/src/applet-device-gsm.c
@@ -662,7 +662,11 @@ ask_for_pin (GtkEntry **out_secret_entry)
w = gtk_alignment_new (0.5, 0.5, 0, 1.0);
gtk_box_pack_start (vbox, w, TRUE, TRUE, 0);
+#if GTK_CHECK_VERSION(3,1,6)
+ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#else
box = GTK_BOX (gtk_hbox_new (FALSE, 6));
+#endif
gtk_container_set_border_width (GTK_CONTAINER (box), 6);
gtk_container_add (GTK_CONTAINER (w), GTK_WIDGET (box));
diff --git a/src/applet-dialogs.c b/src/applet-dialogs.c
index 7d32a22..08bd959 100644
--- a/src/applet-dialogs.c
+++ b/src/applet-dialogs.c
@@ -847,7 +847,11 @@ applet_mobile_password_dialog_new (NMConnection *connection,
w = gtk_alignment_new (0.5, 0.5, 0, 1.0);
gtk_box_pack_start (vbox, w, TRUE, TRUE, 0);
+#if GTK_CHECK_VERSION(3,1,6)
+ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#else
box = GTK_BOX (gtk_hbox_new (FALSE, 6));
+#endif
gtk_container_set_border_width (GTK_CONTAINER (box), 6);
gtk_container_add (GTK_CONTAINER (w), GTK_WIDGET (box));
diff --git a/src/applet.c b/src/applet.c
index 2f2786e..ec28d89 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -602,7 +602,11 @@ applet_menu_item_add_complex_separator_helper (GtkWidget *menu,
int pos)
{
GtkWidget *menu_item = gtk_image_menu_item_new ();
+#if GTK_CHECK_VERSION(3,1,6)
+ GtkWidget *box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
GtkWidget *box = gtk_hbox_new (FALSE, 0);
+#endif
GtkWidget *xlabel = NULL;
if (label) {
diff --git a/src/mb-menu-item.c b/src/mb-menu-item.c
index eaf2e40..e8aa980 100644
--- a/src/mb-menu-item.c
+++ b/src/mb-menu-item.c
@@ -196,7 +196,11 @@ nm_mb_menu_item_init (NMMbMenuItem *self)
{
NMMbMenuItemPrivate *priv = NM_MB_MENU_ITEM_GET_PRIVATE (self);
+#if GTK_CHECK_VERSION(3,1,6)
+ priv->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#else
priv->hbox = gtk_hbox_new (FALSE, 6);
+#endif
priv->desc = gtk_label_new (NULL);
gtk_misc_set_alignment (GTK_MISC (priv->desc), 0.0, 0.5);
diff --git a/src/utils/mobile-wizard.c b/src/utils/mobile-wizard.c
index 0741ddc..471e488 100644
--- a/src/utils/mobile-wizard.c
+++ b/src/utils/mobile-wizard.c
@@ -189,10 +189,11 @@ confirm_setup (MobileWizard *self)
{
GtkWidget *vbox, *label, *alignment, *pbox;
+#if GTK_CHECK_VERSION(3,1,6)
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
vbox = gtk_vbox_new (FALSE, 6);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
-
- vbox = gtk_vbox_new (FALSE, 6);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
label = gtk_label_new (_("Your mobile broadband connection is configured with the following settings:"));
gtk_widget_set_size_request (label, 500, -1);
@@ -229,7 +230,11 @@ confirm_setup (MobileWizard *self)
alignment = gtk_alignment_new (0, 0.5, 0, 0);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 25, 0);
+#if GTK_CHECK_VERSION(3,1,6)
+ pbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+#else
pbox = gtk_vbox_new (FALSE, 0);
+#endif
gtk_container_add (GTK_CONTAINER (alignment), pbox);
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
@@ -465,7 +470,11 @@ plan_setup (MobileWizard *self)
GtkWidget *vbox, *label, *alignment, *hbox, *image;
GtkCellRenderer *renderer;
+#if GTK_CHECK_VERSION(3,1,6)
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
vbox = gtk_vbox_new (FALSE, 6);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
label = gtk_label_new_with_mnemonic (_("_Select your plan:"));
@@ -507,7 +516,11 @@ plan_setup (MobileWizard *self)
gtk_container_add (GTK_CONTAINER (alignment), self->plan_unlisted_entry);
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION(3,1,6)
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#else
hbox = gtk_hbox_new (FALSE, 6);
+#endif
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
@@ -717,7 +730,11 @@ providers_setup (MobileWizard *self)
GtkTreeViewColumn *column;
GtkTreeSelection *selection;
+#if GTK_CHECK_VERSION(3,1,6)
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
vbox = gtk_vbox_new (FALSE, 6);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
self->providers_view_radio = gtk_radio_button_new_with_mnemonic (NULL, _("Select your provider from a _list:"));
@@ -1054,7 +1071,11 @@ country_setup (MobileWizard *self)
GtkTreeSelection *selection;
GtkTreeIter unlisted_iter;
+#if GTK_CHECK_VERSION(3,1,6)
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
vbox = gtk_vbox_new (FALSE, 6);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
label = gtk_label_new (_("Country or Region List:"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
@@ -1343,7 +1364,11 @@ intro_setup (MobileWizard *self)
GtkCellRenderer *renderer;
char *s;
+#if GTK_CHECK_VERSION(3,1,6)
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
vbox = gtk_vbox_new (FALSE, 6);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
label = gtk_label_new (_("This assistant helps you easily set up a mobile broadband connection to a cellular (3G) network."));
@@ -1358,7 +1383,11 @@ intro_setup (MobileWizard *self)
alignment = gtk_alignment_new (0, 0, 1, 0);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 25, 25, 0);
+#if GTK_CHECK_VERSION(3,1,6)
+ info_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
info_vbox = gtk_vbox_new (FALSE, 6);
+#endif
gtk_container_add (GTK_CONTAINER (alignment), info_vbox);
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 6);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]