[gimp] app: Fix gimp_dock_separator_get_insert_pos(), we must return an index
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] app: Fix gimp_dock_separator_get_insert_pos(), we must return an index
- Date: Sun, 15 Nov 2009 15:11:17 +0000 (UTC)
commit 8a473663d56093ea2ee5e354b981962456992b1b
Author: Martin Nordholts <martinn src gnome org>
Date: Sun Nov 15 16:10:59 2009 +0100
app: Fix gimp_dock_separator_get_insert_pos(), we must return an index
The insert position for new column in GimpDockColumns was sometimes
wrong, the problem was in gimp_dock_separator_get_insert_pos() not
return an index but a GtkAnchorType. Convert from GtkAnchorType to an
insert index.
app/widgets/gimpdockseparator.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimpdockseparator.c b/app/widgets/gimpdockseparator.c
index c400c6c..e244205 100644
--- a/app/widgets/gimpdockseparator.c
+++ b/app/widgets/gimpdockseparator.c
@@ -244,7 +244,19 @@ gimp_dock_separator_get_insert_pos (GimpDockSeparator *separator)
{
g_return_val_if_fail (GIMP_IS_DOCK_SEPARATOR (separator), GTK_ANCHOR_CENTER);
- return separator->p->anchor;
+ switch (separator->p->anchor)
+ {
+ case GTK_ANCHOR_NORTH:
+ case GTK_ANCHOR_WEST:
+ return 0;
+
+ case GTK_ANCHOR_SOUTH:
+ case GTK_ANCHOR_EAST:
+ return -1;
+
+ default:
+ g_assert_not_reached ();
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]