[gtk+] grid: Swap wrong spacing properties
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] grid: Swap wrong spacing properties
- Date: Mon, 5 Sep 2011 16:56:27 +0000 (UTC)
commit d717a2dcfc8603561f8a0f78982244e8b8fd9006
Author: Benjamin Otte <otte redhat com>
Date: Tue Aug 30 15:11:02 2011 +0200
grid: Swap wrong spacing properties
row-spacing behaved like column-spacing should have and vice versa.
Also update tests that erroneously checked this behavior.
Thanks to Joanmarie Diggs for finding this.
gtk/gtkgrid.c | 16 ++++++++--------
tests/reftests/grid-spacing1.ui | 2 +-
tests/reftests/grid-spacing2.ui | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index df6d74d..f6ec2f1 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -163,11 +163,11 @@ gtk_grid_get_property (GObject *object,
break;
case PROP_ROW_SPACING:
- g_value_set_int (value, ROWS (priv)->spacing);
+ g_value_set_int (value, COLUMNS (priv)->spacing);
break;
case PROP_COLUMN_SPACING:
- g_value_set_int (value, COLUMNS (priv)->spacing);
+ g_value_set_int (value, ROWS (priv)->spacing);
break;
case PROP_ROW_HOMOGENEOUS:
@@ -1821,9 +1821,9 @@ gtk_grid_set_row_spacing (GtkGrid *grid,
priv = grid->priv;
- if (ROWS (priv)->spacing != spacing)
+ if (COLUMNS (priv)->spacing != spacing)
{
- ROWS (priv)->spacing = spacing;
+ COLUMNS (priv)->spacing = spacing;
if (gtk_widget_get_visible (GTK_WIDGET (grid)))
gtk_widget_queue_resize (GTK_WIDGET (grid));
@@ -1848,7 +1848,7 @@ gtk_grid_get_row_spacing (GtkGrid *grid)
priv = grid->priv;
- return ROWS (priv)->spacing;
+ return COLUMNS (priv)->spacing;
}
/**
@@ -1868,9 +1868,9 @@ gtk_grid_set_column_spacing (GtkGrid *grid,
priv = grid->priv;
- if (COLUMNS (priv)->spacing != spacing)
+ if (ROWS (priv)->spacing != spacing)
{
- COLUMNS (priv)->spacing = spacing;
+ ROWS (priv)->spacing = spacing;
if (gtk_widget_get_visible (GTK_WIDGET (grid)))
gtk_widget_queue_resize (GTK_WIDGET (grid));
@@ -1896,5 +1896,5 @@ gtk_grid_get_column_spacing (GtkGrid *grid)
priv = grid->priv;
- return COLUMNS (priv)->spacing;
+ return ROWS (priv)->spacing;
}
diff --git a/tests/reftests/grid-spacing1.ui b/tests/reftests/grid-spacing1.ui
index a8a330a..eda8526 100644
--- a/tests/reftests/grid-spacing1.ui
+++ b/tests/reftests/grid-spacing1.ui
@@ -13,7 +13,7 @@
<object class="GtkGrid" id="grid0">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="row-spacing">20</property>
+ <property name="column-spacing">20</property>
<child>
<object class="GtkLabel" id="one">
<property name="visible">True</property>
diff --git a/tests/reftests/grid-spacing2.ui b/tests/reftests/grid-spacing2.ui
index 0e9c82f..fe28a55 100644
--- a/tests/reftests/grid-spacing2.ui
+++ b/tests/reftests/grid-spacing2.ui
@@ -13,7 +13,7 @@
<object class="GtkGrid" id="grid0">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="column-spacing">20</property>
+ <property name="row-spacing">20</property>
<child>
<object class="GtkLabel" id="one">
<property name="visible">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]