[gtk+/treeview-refactor] Use gtk_scrollbar_new() instead gtk_[v|h]scrollbar_new()
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/treeview-refactor] Use gtk_scrollbar_new() instead gtk_[v|h]scrollbar_new()
- Date: Sat, 30 Oct 2010 08:34:22 +0000 (UTC)
commit 6c301d4b0a09f618db0108ce38fdbf69cecc73d2
Author: Javier Jardón <jjardon gnome org>
Date: Sat Oct 30 02:11:05 2010 +0200
Use gtk_scrollbar_new() instead gtk_[v|h]scrollbar_new()
examples/rangewidgets/rangewidgets.c | 2 +-
gtk/gtkmenu.c | 2 +-
gtk/gtkscrolledwindow.c | 4 ++--
gtk/gtkwidget.c | 2 +-
tests/testgtk.c | 8 ++++----
5 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/examples/rangewidgets/rangewidgets.c b/examples/rangewidgets/rangewidgets.c
index 3f97b85..fe274a3 100644
--- a/examples/rangewidgets/rangewidgets.c
+++ b/examples/rangewidgets/rangewidgets.c
@@ -128,7 +128,7 @@ static void create_range_controls( void )
gtk_widget_show (hscale);
/* Reuse the same adjustment again */
- scrollbar = gtk_hscrollbar_new (GTK_ADJUSTMENT (adj1));
+ scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (adj1));
/* Notice how this causes the scales to always be updated
* continuously when the scrollbar is moved */
gtk_range_set_update_policy (GTK_RANGE (scrollbar),
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index c5b3109..4240325 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -2171,7 +2171,7 @@ gtk_menu_set_tearoff_state (GtkMenu *menu,
g_object_connect (menu->tearoff_adjustment,
"signal::value-changed", gtk_menu_scrollbar_changed, menu,
NULL);
- menu->tearoff_scrollbar = gtk_vscrollbar_new (menu->tearoff_adjustment);
+ menu->tearoff_scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, menu->tearoff_adjustment);
gtk_box_pack_end (GTK_BOX (menu->tearoff_hbox),
menu->tearoff_scrollbar,
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 489d687..87a388b 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -551,7 +551,7 @@ gtk_scrolled_window_set_hadjustment (GtkScrolledWindow *scrolled_window,
if (!priv->hscrollbar)
{
gtk_widget_push_composite_child ();
- priv->hscrollbar = gtk_hscrollbar_new (hadjustment);
+ priv->hscrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, hadjustment);
gtk_widget_set_composite_name (priv->hscrollbar, "hscrollbar");
gtk_widget_pop_composite_child ();
@@ -614,7 +614,7 @@ gtk_scrolled_window_set_vadjustment (GtkScrolledWindow *scrolled_window,
if (!priv->vscrollbar)
{
gtk_widget_push_composite_child ();
- priv->vscrollbar = gtk_vscrollbar_new (vadjustment);
+ priv->vscrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, vadjustment);
gtk_widget_set_composite_name (priv->vscrollbar, "vscrollbar");
gtk_widget_pop_composite_child ();
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 34cf229..a3b228e 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -9567,7 +9567,7 @@ gtk_widget_get_composite_name (GtkWidget *widget)
* Here is a simple example:
* |[
* gtk_widget_push_composite_child ();
- * scrolled_window->hscrollbar = gtk_hscrollbar_new (hadjustment);
+ * scrolled_window->hscrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, hadjustment);
* gtk_widget_set_composite_name (scrolled_window->hscrollbar, "hscrollbar");
* gtk_widget_pop_composite_child ();
* gtk_widget_set_parent (scrolled_window->hscrollbar,
diff --git a/tests/testgtk.c b/tests/testgtk.c
index d47792f..81b7a0c 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -630,13 +630,13 @@ create_big_windows (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (eventbox), darea);
- scrollbar = gtk_hscrollbar_new (hadj);
+ scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, hadj);
gtk_table_attach (GTK_TABLE (table), scrollbar,
0, 1, 1, 2,
GTK_FILL | GTK_EXPAND, GTK_FILL,
0, 0);
- scrollbar = gtk_vscrollbar_new (vadj);
+ scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, vadj);
gtk_table_attach (GTK_TABLE (table), scrollbar,
1, 2, 0, 1,
GTK_FILL, GTK_EXPAND | GTK_FILL,
@@ -5837,7 +5837,7 @@ create_range_controls (GtkWidget *widget)
gtk_box_pack_start (GTK_BOX (box2), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
- scrollbar = gtk_hscrollbar_new (GTK_ADJUSTMENT (adjustment));
+ scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_ADJUSTMENT (adjustment));
gtk_range_set_update_policy (GTK_RANGE (scrollbar),
GTK_UPDATE_CONTINUOUS);
gtk_box_pack_start (GTK_BOX (box2), scrollbar, TRUE, TRUE, 0);
@@ -9206,7 +9206,7 @@ create_scroll_test (GtkWidget *widget)
adj = gtk_adjustment_new (0.0, 0.0, 1000.0, 1.0, 180.0, 200.0);
scroll_test_pos = 0.0;
- scrollbar = gtk_vscrollbar_new (adj);
+ scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, adj);
gtk_box_pack_start (GTK_BOX (hbox), scrollbar, FALSE, FALSE, 0);
gtk_widget_show (scrollbar);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]