summaryrefslogtreecommitdiff
path: root/src/math-variable-popup.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-10-28 11:18:08 +0100
committerStefano Karapetsas <[email protected]>2013-10-28 11:18:08 +0100
commitb4826d2439153ed3d2ca0740040ca8f5a2b79b88 (patch)
tree7a7f4b4a9a27e3528011bd7b4387ead7bfda92e0 /src/math-variable-popup.c
parent5e27c642d0f755771873254c936261126d20deb8 (diff)
downloadmate-calc-b4826d2439153ed3d2ca0740040ca8f5a2b79b88.tar.bz2
mate-calc-b4826d2439153ed3d2ca0740040ca8f5a2b79b88.tar.xz
Fix gtk_*box_new deprecations
Diffstat (limited to 'src/math-variable-popup.c')
-rw-r--r--src/math-variable-popup.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/math-variable-popup.c b/src/math-variable-popup.c
index 1287f7a..2ad7e1f 100644
--- a/src/math-variable-popup.c
+++ b/src/math-variable-popup.c
@@ -131,7 +131,11 @@ make_variable_entry(MathVariablePopup *popup, const gchar *name, const MPNumber
GtkWidget *hbox, *button, *label;
gchar *text;
+#if GTK_CHECK_VERSION (3, 2, 0)
+ hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
+#else
hbox = gtk_hbox_new(FALSE, 6);
+#endif
if (value)
{
@@ -211,7 +215,11 @@ math_variable_popup_set_property(GObject *object,
}
g_strfreev(names);
+#if GTK_CHECK_VERSION (3, 2, 0)
+ entry = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
+#else
entry = gtk_hbox_new(FALSE, 6);
+#endif
gtk_widget_show(entry);
// TODO: Show greyed "variable name" text to give user a hint how to use
@@ -301,7 +309,11 @@ math_variable_popup_init(MathVariablePopup *popup)
/* Destroy this window when it loses focus */
g_signal_connect(G_OBJECT(popup), "focus-out-event", G_CALLBACK(variable_focus_out_event_cb), popup);
+#if GTK_CHECK_VERSION (3, 2, 0)
+ popup->priv->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
+#else
popup->priv->vbox = gtk_vbox_new(FALSE, 6);
+#endif
gtk_box_set_homogeneous(GTK_BOX(popup->priv->vbox), TRUE);
gtk_container_add(GTK_CONTAINER(popup), popup->priv->vbox);
gtk_widget_show(popup->priv->vbox);