aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/gui_utils.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-04-21 20:45:35 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-04-21 20:45:35 +0000
commitc48331700661d96b7f824539ddd07d1d550b4465 (patch)
tree17f44309c0899dd6e31334e47ae37e10e1a0ed8d /ui/gtk/gui_utils.c
parent780061ed7469efc504128d8e61a1e8ad0b219c5c (diff)
port gtk_scrollbar_new() gtk_paned_new() gtk_separator_new() to GTK2
svn path=/trunk/; revision=42186
Diffstat (limited to 'ui/gtk/gui_utils.c')
-rw-r--r--ui/gtk/gui_utils.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/ui/gtk/gui_utils.c b/ui/gtk/gui_utils.c
index 49f97598c1..a6f0eff6b7 100644
--- a/ui/gtk/gui_utils.c
+++ b/ui/gtk/gui_utils.c
@@ -1909,4 +1909,31 @@ GtkWidget * gtk_button_box_new(GtkOrientation orientation)
return gtk_vbutton_box_new();
}
}
+
+GtkWidget * gtk_scrollbar_new(GtkOrientation orientation, GtkAdjustment *adjustment)
+{
+ if (orientation == GTK_ORIENTATION_HORIZONTAL){
+ return gtk_hscrollbar_new(GtkAdjustment *adjustment);
+ }else{
+ return gtk_vscrollbar_new(GtkAdjustment *adjustment);
+ }
+}
+
+GtkWidget * gtk_paned_new(GtkOrientation orientation)
+{
+ if (orientation == GTK_ORIENTATION_HORIZONTAL){
+ return gtk_hpaned_new();
+ }else{
+ return gtk_vpaned_new();
+ }
+}
+
+GtkWidget * gtk_separator_new (GtkOrientation orientation)
+{
+ if (orientation == GTK_ORIENTATION_HORIZONTAL){
+ return gtk_hseparator_new ();
+ }else{
+ return gtk_vseparator_new ();
+ }
+}
#endif /* GTK_CHECK_VERSION(3,0,0) */