[gimp] app/tests: Also add error margin to 'gimpsessioninfo-book.c'
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app/tests: Also add error margin to 'gimpsessioninfo-book.c'
- Date: Sun, 20 Jun 2010 18:24:40 +0000 (UTC)
commit ce33255588f4f33e7a0a75a53c7f6c2997d65004
Author: Martin Nordholts <martinn src gnome org>
Date: Sun Jun 20 18:59:39 2010 +0200
app/tests: Also add error margin to 'gimpsessioninfo-book.c'
Also add error margin to 'gimpsessioninfo-book.c' and update reference
files. This makes 'make distcheck' pass, and it passes more reliably.
app/tests/gimpdir/dockrc | 10 +++++-----
app/tests/gimpdir/dockrc-expected | 4 ++--
app/tests/gimpdir/sessionrc | 24 ++++++++++++------------
app/tests/gimpdir/sessionrc-expected | 6 +++---
app/widgets/gimpsessioninfo-book.c | 14 +++++++++++++-
5 files changed, 35 insertions(+), 23 deletions(-)
---
diff --git a/app/tests/gimpdir/dockrc b/app/tests/gimpdir/dockrc
index a6f0d21..14fbda4 100644
--- a/app/tests/gimpdir/dockrc
+++ b/app/tests/gimpdir/dockrc
@@ -1,8 +1,8 @@
# recently closed docks
(GimpSessionInfo "Palettes - FG/BG - Images"
- (position 586 116)
- (size 200 573)
+ (position 585 115)
+ (size 200 575)
(open-on-exit)
(aux-info
(show-image-menu "false")
@@ -13,19 +13,19 @@
(dockable "gimp-palette-list"
(tab-style preview)))
(book
- (position 141)
+ (position 140)
(current-page 0)
(dockable "gimp-color-editor"
(tab-style preview)
(aux-info
(current-page "GimpColorSelect"))))
(book
- (position 414)
+ (position 415)
(current-page 0)
(dockable "gimp-image-list"
(tab-style preview)))))
(GimpSessionInfo "Selection, Fonts"
- (position 200 179)
+ (position 200 180)
(size 200 300)
(open-on-exit)
(aux-info
diff --git a/app/tests/gimpdir/dockrc-expected b/app/tests/gimpdir/dockrc-expected
index ed2da0e..fc7b255 100644
--- a/app/tests/gimpdir/dockrc-expected
+++ b/app/tests/gimpdir/dockrc-expected
@@ -14,14 +14,14 @@
(dockable "gimp-palette-list"
(tab-style preview)))
(book
- (position 141)
+ (position 140)
(current-page 0)
(dockable "gimp-color-editor"
(tab-style preview)
(aux-info
(current-page "GimpColorSelect"))))
(book
- (position 414)
+ (position 415)
(current-page 0)
(dockable "gimp-image-list"
(tab-style preview)))))
diff --git a/app/tests/gimpdir/sessionrc b/app/tests/gimpdir/sessionrc
index 0e02373..f71aa9b 100644
--- a/app/tests/gimpdir/sessionrc
+++ b/app/tests/gimpdir/sessionrc
@@ -6,7 +6,7 @@
# you quit GIMP. If this file isn't found, defaults are used.
(session-info "dock" "dock"
- (position 566 171)
+ (position 565 170)
(size 210 535)
(open-on-exit)
(aux-info
@@ -26,8 +26,8 @@
(dockable "gimp-brush-grid"
(tab-style preview)))))
(session-info "dock" "dock"
- (position 141 291)
- (size 406 300)
+ (position 140 290)
+ (size 405 300)
(open-on-exit)
(aux-info
(show-image-menu "false")
@@ -43,7 +43,7 @@
(dockable "gimp-device-status"
(tab-style icon)))))
(session-info "dock" "dock"
- (position 795 43)
+ (position 795 45)
(size 200 265)
(open-on-exit)
(aux-info
@@ -57,8 +57,8 @@
(dockable "gimp-gradient-list"
(tab-style preview)))))
(session-info "dock" "dock"
- (position 803 344)
- (size 200 404)
+ (position 805 345)
+ (size 200 450)
(open-on-exit)
(aux-info
(show-image-menu "true")
@@ -70,7 +70,7 @@
(tab-style automatic)
(preview-size 32)))
(book
- (position 162)
+ (position 200)
(current-page 0)
(dockable "gimp-palette-editor"
(tab-style icon)
@@ -81,16 +81,16 @@
# Enable this when we have a way to handle that the toolbox size is
# likely to change due to the use of GDK_HINT_RESIZE_INC
# (session-info "toolbox" "dock"
-# (position 13 37)
-# (size 96 620)
+# (position 15 35)
+# (size 95 620)
# (open-on-exit))
(session-info "toplevel" "gimp-file-open-dialog"
- (position 392 140)
- (size 902 816))
+ (position 390 140)
+ (size 900 815))
(session-info "toplevel" "gimp-image-new-dialog"
(position 100 100))
(session-info "display" "gimp-empty-image-window"
- (position 140 32)
+ (position 140 30)
(size 610 190))
(last-tip-shown 0)
diff --git a/app/tests/gimpdir/sessionrc-expected b/app/tests/gimpdir/sessionrc-expected
index 2dcc553..f4beca9 100644
--- a/app/tests/gimpdir/sessionrc-expected
+++ b/app/tests/gimpdir/sessionrc-expected
@@ -22,7 +22,7 @@
(dockable "gimp-undo-history"
(tab-style icon)))
(book
- (position 289)
+ (position 290)
(current-page 0)
(dockable "gimp-brush-grid"
(tab-style preview)))))
@@ -62,7 +62,7 @@
(session-info "toplevel"
(factory-entry "gimp-dock-window")
(position 805 345)
- (size 200 420)
+ (size 200 450)
(open-on-exit)
(aux-info
(show-image-menu "true")
@@ -74,7 +74,7 @@
(tab-style automatic)
(preview-size 32)))
(book
- (position 162)
+ (position 200)
(current-page 0)
(dockable "gimp-palette-editor"
(tab-style icon)
diff --git a/app/widgets/gimpsessioninfo-book.c b/app/widgets/gimpsessioninfo-book.c
index ac969fa..d88f3b0 100644
--- a/app/widgets/gimpsessioninfo-book.c
+++ b/app/widgets/gimpsessioninfo-book.c
@@ -31,6 +31,7 @@
#include "gimpdialogfactory.h"
#include "gimpdock.h"
#include "gimpdockbook.h"
+#include "gimpsessioninfo.h" /* for gimp_session_info_class_apply_position_accuracy() */
#include "gimpsessioninfo-book.h"
#include "gimpsessioninfo-dockable.h"
@@ -80,9 +81,20 @@ gimp_session_info_book_serialize (GimpConfigWriter *writer,
if (info->position != 0)
{
+ GimpSessionInfoClass *klass;
+ gint pos_to_write;
+
+ klass = g_type_class_ref (GIMP_TYPE_SESSION_INFO);
+
+ pos_to_write =
+ gimp_session_info_class_apply_position_accuracy (klass,
+ info->position);
+
gimp_config_writer_open (writer, "position");
- gimp_config_writer_printf (writer, "%d", info->position);
+ gimp_config_writer_printf (writer, "%d", pos_to_write);
gimp_config_writer_close (writer);
+
+ g_type_class_unref (klass);
}
gimp_config_writer_open (writer, "current-page");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]