diff options
author | Benjamin Otte <otte@redhat.com> | 2011-04-20 16:56:03 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-04-27 00:42:44 +0200 |
commit | 8331b45a5fcbfb919a3bb02ccb93ac6d66c515b9 (patch) | |
tree | dcf866b6fdcecd621813f86fed50048617058179 /gtk/gtkgrid.c | |
parent | 0094621e82d8ba6a624177a934d919ef2ddcdd31 (diff) | |
download | gtk+-8331b45a5fcbfb919a3bb02ccb93ac6d66c515b9.tar.gz |
grid: Fix homogeneuous properties being flipped
Diffstat (limited to 'gtk/gtkgrid.c')
-rw-r--r-- | gtk/gtkgrid.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c index 440b4d5400..f202bb4f84 100644 --- a/gtk/gtkgrid.c +++ b/gtk/gtkgrid.c @@ -171,11 +171,11 @@ gtk_grid_get_property (GObject *object, break; case PROP_ROW_HOMOGENEOUS: - g_value_set_boolean (value, ROWS (priv)->homogeneous); + g_value_set_boolean (value, COLUMNS (priv)->homogeneous); break; case PROP_COLUMN_HOMOGENEOUS: - g_value_set_boolean (value, COLUMNS (priv)->homogeneous); + g_value_set_boolean (value, ROWS (priv)->homogeneous); break; default: @@ -1465,9 +1465,10 @@ gtk_grid_set_row_homogeneous (GtkGrid *grid, priv = grid->priv; - if (ROWS (priv)->homogeneous != homogeneous) + /* Yes, homogeneous rows means all the columns have the same size */ + if (COLUMNS (priv)->homogeneous != homogeneous) { - ROWS (priv)->homogeneous = homogeneous; + COLUMNS (priv)->homogeneous = homogeneous; if (gtk_widget_get_visible (GTK_WIDGET (grid))) gtk_widget_queue_resize (GTK_WIDGET (grid)); @@ -1492,7 +1493,7 @@ gtk_grid_get_row_homogeneous (GtkGrid *grid) priv = grid->priv; - return ROWS (priv)->homogeneous; + return COLUMNS (priv)->homogeneous; } /** @@ -1511,9 +1512,10 @@ gtk_grid_set_column_homogeneous (GtkGrid *grid, priv = grid->priv; - if (COLUMNS (priv)->homogeneous != homogeneous) + /* Yes, homogeneous columns means all the rows have the same size */ + if (ROWS (priv)->homogeneous != homogeneous) { - COLUMNS (priv)->homogeneous = homogeneous; + ROWS (priv)->homogeneous = homogeneous; if (gtk_widget_get_visible (GTK_WIDGET (grid))) gtk_widget_queue_resize (GTK_WIDGET (grid)); @@ -1538,7 +1540,7 @@ gtk_grid_get_column_homogeneous (GtkGrid *grid) priv = grid->priv; - return COLUMNS (priv)->homogeneous; + return ROWS (priv)->homogeneous; } /** |