]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkvscrollbar.c
Updated Slovenian translation
[~andy/gtk] / gtk / gtkvscrollbar.c
index aa9965d349c6562d9d8abb9333530cbe85639a15..a5f34e169517818fa32d9c396ae9ba0ab73b9ae6 100644 (file)
@@ -1,4 +1,4 @@
-/* GTK - The GTK+ Toolkit
+/* GTK - The GIMP Toolkit
  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  * Copyright (C) 2001 Red Hat, Inc.
  *
  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
  * file for a list of people on the GTK+ Team.  See the ChangeLog
  * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
 #include "config.h"
+
+#include "gtkorientable.h"
 #include "gtkvscrollbar.h"
-#include "gdk/gdkkeysyms.h"
 #include "gtkintl.h"
 #include "gtkalias.h"
 
@@ -42,23 +43,27 @@ gtk_vscrollbar_class_init (GtkVScrollbarClass *class)
 static void
 gtk_vscrollbar_init (GtkVScrollbar *vscrollbar)
 {
-  GtkRange *range;
-
-  range = GTK_RANGE (vscrollbar);
-
-  range->orientation = GTK_ORIENTATION_VERTICAL;
+  gtk_orientable_set_orientation (GTK_ORIENTABLE (vscrollbar),
+                                  GTK_ORIENTATION_VERTICAL);
 }
 
-GtkWidget*
+/**
+ * gtk_vscrollbar_new:
+ * @adjustment: the #GtkAdjustment to use, or %NULL to create a new adjustment
+ *
+ * Creates a new vertical scrollbar.
+ *
+ * Returns: the new #GtkVScrollbar
+ */
+GtkWidget *
 gtk_vscrollbar_new (GtkAdjustment *adjustment)
 {
-  GtkWidget *vscrollbar;
-  
-  vscrollbar = g_object_new (GTK_TYPE_VSCROLLBAR,
-                            "adjustment", adjustment,
-                            NULL);
-  
-  return vscrollbar;
+  g_return_val_if_fail (adjustment == NULL || GTK_IS_ADJUSTMENT (adjustment),
+                        NULL);
+
+  return g_object_new (GTK_TYPE_VSCROLLBAR,
+                       "adjustment", adjustment,
+                       NULL);
 }
 
 #define __GTK_VSCROLLBAR_C__