summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <alan@eth0.org.uk>2012-06-05 22:07:58 +0100
committerGravatar Alan Fitton <alan@eth0.org.uk>2012-06-05 22:07:58 +0100
commita46c8201c42ac4ae85b50a5a1930759f8537d3c7 (patch)
tree3da13c2368b85b7fd7f2896541795445f8abd8fa /src/util.c
parent855532ed7ffd3415150c73574eb8e9038f1075eb (diff)
fix deprecation warnings for gtk_{h,v}box_new and gtk_{h,v}paned_new in gtk3
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 613ed50..93806e6 100644
--- a/src/util.c
+++ b/src/util.c
@@ -583,3 +583,27 @@ gboolean should_be_minimised(int argc, char *argv[])
return FALSE;
}
+
+GtkWidget *trg_hbox_new(gboolean homogeneous, gint spacing)
+{
+ GtkWidget *box;
+#if GTK_CHECK_VERSION( 3, 0, 0 )
+ box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, spacing);
+ gtk_box_set_homogeneous(GTK_BOX(box), homogeneous);
+#else
+ box = gtk_hbox_new(homogenous, spacing);
+#endif
+ return box;
+}
+
+GtkWidget *trg_vbox_new(gboolean homogeneous, gint spacing)
+{
+ GtkWidget *box;
+#if GTK_CHECK_VERSION( 3, 0, 0 )
+ box = gtk_box_new(GTK_ORIENTATION_VERTICAL, spacing);
+ gtk_box_set_homogeneous(GTK_BOX(box), homogeneous);
+#else
+ box = gtk_vbox_new(homogenous, spacing);
+#endif
+ return box;
+}