[frogr] Ooops... use deprecated classes Gtk{H|V}Box for GTK2



commit 4d1e89f7160a20fd285293d2d0a052cd15f83ff3
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Thu Jul 7 14:10:23 2011 +0200

    Ooops... use deprecated classes Gtk{H|V}Box for GTK2

 src/frogr-details-dialog.c  |   43 +++++++++++++++++++++++++++++++++++++++++++
 src/frogr-settings-dialog.c |   36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 0 deletions(-)
---
diff --git a/src/frogr-details-dialog.c b/src/frogr-details-dialog.c
index 5550ba9..9969aad 100644
--- a/src/frogr-details-dialog.c
+++ b/src/frogr-details-dialog.c
@@ -147,8 +147,13 @@ _create_widgets (FrogrDetailsDialog *self)
 
   main_vbox = gtk_dialog_get_content_area (GTK_DIALOG (self));
 
+#ifdef GTK_API_VERSION_3
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
+  hbox = gtk_hbox_new (FALSE, 0);
+  vbox = gtk_vbox_new (FALSE, 6);
+#endif
 
   /* Left side (image, radio buttons, checkboxes...) */
 
@@ -171,8 +176,13 @@ _create_widgets (FrogrDetailsDialog *self)
 
   /* Visibility */
 
+#ifdef GTK_API_VERSION_3
   section_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   visibility_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
+  section_vbox = gtk_vbox_new (FALSE, 6);
+  visibility_vbox = gtk_vbox_new (FALSE, 6);
+#endif
 
   markup = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>",
                                     _("Visibility"));
@@ -184,7 +194,11 @@ _create_widgets (FrogrDetailsDialog *self)
   gtk_container_add (GTK_CONTAINER (align), widget);
   gtk_box_pack_start (GTK_BOX (section_vbox), align, FALSE, FALSE, 0);
 
+#ifdef GTK_API_VERSION_3
   internal_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#else
+  internal_hbox = gtk_hbox_new (FALSE, 6);
+#endif
 
   widget = gtk_radio_button_new_with_mnemonic (NULL, _("_Private"));
   gtk_box_pack_start (GTK_BOX (internal_hbox), widget, FALSE, FALSE, 0);
@@ -196,7 +210,11 @@ _create_widgets (FrogrDetailsDialog *self)
 
   gtk_box_pack_start (GTK_BOX (visibility_vbox), internal_hbox, FALSE, FALSE, 0);
 
+#ifdef GTK_API_VERSION_3
   private_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
+  private_vbox = gtk_vbox_new (FALSE, 6);
+#endif
 
   widget = gtk_check_button_new_with_mnemonic (_("Visible to _Family"));
   gtk_box_pack_start (GTK_BOX (private_vbox), widget, FALSE, FALSE, 0);
@@ -206,15 +224,30 @@ _create_widgets (FrogrDetailsDialog *self)
   gtk_box_pack_start (GTK_BOX (private_vbox), widget, FALSE, FALSE, 0);
   priv->friend_cb = widget;
 
+#ifdef GTK_API_VERSION_3
   internal_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
+  internal_hbox = gtk_hbox_new (FALSE, 0);
+#endif
+
   gtk_box_pack_start (GTK_BOX (internal_hbox), private_vbox, FALSE, FALSE, 12);
   gtk_box_pack_start (GTK_BOX (visibility_vbox), internal_hbox, FALSE, FALSE, 0);
 
+#ifdef GTK_API_VERSION_3
   internal_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
+  internal_hbox = gtk_hbox_new (FALSE, 0);
+#endif
+
   gtk_box_pack_start (GTK_BOX (internal_hbox), visibility_vbox, FALSE, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (section_vbox), internal_hbox, FALSE, FALSE, 0);
 
+#ifdef GTK_API_VERSION_3
   internal_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
+  internal_hbox = gtk_hbox_new (FALSE, 0);
+#endif
+
   widget = gtk_check_button_new_with_mnemonic (_("_Show up in Global Search Results"));
   gtk_box_pack_start (GTK_BOX (internal_hbox), widget, FALSE, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (section_vbox), internal_hbox, FALSE, FALSE, 0);
@@ -224,8 +257,13 @@ _create_widgets (FrogrDetailsDialog *self)
 
   /* Content type */
 
+#ifdef GTK_API_VERSION_3
   section_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   content_type_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#else
+  section_vbox = gtk_vbox_new (FALSE, 6);
+  content_type_hbox = gtk_hbox_new (FALSE, 6);
+#endif
 
   markup = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>",
                                     _("Content type"));
@@ -255,8 +293,13 @@ _create_widgets (FrogrDetailsDialog *self)
 
   /* Safety level */
 
+#ifdef GTK_API_VERSION_3
   section_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   safety_level_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#else
+  section_vbox = gtk_vbox_new (FALSE, 6);
+  safety_level_hbox = gtk_hbox_new (FALSE, 6);
+#endif
 
   markup = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>",
                                     _("Safety level"));
diff --git a/src/frogr-settings-dialog.c b/src/frogr-settings-dialog.c
index 13df333..fa217ea 100644
--- a/src/frogr-settings-dialog.c
+++ b/src/frogr-settings-dialog.c
@@ -149,7 +149,12 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
   gchar *markup = NULL;
 
   priv = FROGR_SETTINGS_DIALOG_GET_PRIVATE (self);
+
+#ifdef GTK_API_VERSION_3
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
+  vbox = gtk_vbox_new (FALSE, 6);
+#endif
 
   /* Default Visibility */
 
@@ -164,8 +169,13 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
   gtk_container_add (GTK_CONTAINER (align), label);
   gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 6);
 
+#ifdef GTK_API_VERSION_3
   box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+#else
+  box1 = gtk_vbox_new (FALSE, 6);
+  box2 = gtk_hbox_new (FALSE, 12);
+#endif
 
   _add_togleabble_item (self, GTK_BOX (box2), NULL, TRUE, _("_Private"), &priv->private_rb);
   _add_togleabble_item (self, GTK_BOX (box2), GTK_RADIO_BUTTON (priv->private_rb),
@@ -173,14 +183,23 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
 
   gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, FALSE, 0);
 
+#ifdef GTK_API_VERSION_3
   box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
+  box2 = gtk_vbox_new (FALSE, 6);
+#endif
 
   _add_togleabble_item (self, GTK_BOX (box2), NULL, FALSE,
                         _("Visible to _Family"), &priv->family_cb);
   _add_togleabble_item (self, GTK_BOX (box2), NULL, FALSE,
                         _("Visible to F_riends"), &priv->friend_cb);
 
+#ifdef GTK_API_VERSION_3
   padding_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
+  padding_hbox = gtk_hbox_new (FALSE, 0);
+#endif
+
   gtk_box_pack_start (GTK_BOX (padding_hbox), box2, FALSE, FALSE, 12);
   gtk_box_pack_start (GTK_BOX (box1), padding_hbox, FALSE, FALSE, 0);
 
@@ -203,7 +222,11 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
   gtk_container_add (GTK_CONTAINER (align), label);
   gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 6);
 
+#ifdef GTK_API_VERSION_3
   box1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+#else
+  box1 = gtk_hbox_new (FALSE, 12);
+#endif
 
   _add_togleabble_item (self, GTK_BOX (box1), NULL, TRUE,
                         _("P_hoto"), &priv->photo_content_rb);
@@ -227,7 +250,11 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
   gtk_container_add (GTK_CONTAINER (align), label);
   gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 6);
 
+#ifdef GTK_API_VERSION_3
   box1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+#else
+  box1 = gtk_hbox_new (FALSE, 12);
+#endif
 
   _add_togleabble_item (self, GTK_BOX (box1), NULL, TRUE,
                         _("S_afe"), &priv->safe_rb);
@@ -251,7 +278,11 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
   gtk_container_add (GTK_CONTAINER (align), label);
   gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 6);
 
+#ifdef GTK_API_VERSION_3
   box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
+  box1 = gtk_vbox_new (FALSE, 6);
+#endif
 
   _add_togleabble_item (self, GTK_BOX (box1), NULL, FALSE,
                         _("Disa_ble Tags Auto-Completion"),
@@ -279,7 +310,12 @@ _add_connection_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
   gchar *markup = NULL;
 
   priv = FROGR_SETTINGS_DIALOG_GET_PRIVATE (self);
+
+#ifdef GTK_API_VERSION_3
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
+  vbox = gtk_vbox_new (FALSE, 6);
+#endif
 
   /* Proxy settings */
 



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