diff options
author | Alan Fitton <alan@eth0.org.uk> | 2012-06-05 22:07:58 +0100 |
---|---|---|
committer | Alan Fitton <alan@eth0.org.uk> | 2012-06-05 22:07:58 +0100 |
commit | a46c8201c42ac4ae85b50a5a1930759f8537d3c7 (patch) | |
tree | 3da13c2368b85b7fd7f2896541795445f8abd8fa /src/util.c | |
parent | 855532ed7ffd3415150c73574eb8e9038f1075eb (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.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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; +} |