[gimp/metadata-browser] app/tests: The single-window-mode setting is in the sessionrc now



commit 16c94dc7111863f68ff2662c9cf7e334f538d3b0
Author: Martin Nordholts <martinn src gnome org>
Date:   Tue Jan 10 19:43:51 2012 +0100

    app/tests: The single-window-mode setting is in the sessionrc now
    
    We don't need to have a special gimprc because of it.

 app/tests/gimp-test-session-utils.c    |   11 +----------
 app/tests/gimpdir/Makefile.am          |    1 -
 app/tests/gimpdir/gimprc-single-window |   12 ------------
 app/tests/test-single-window-mode.c    |    7 +------
 4 files changed, 2 insertions(+), 29 deletions(-)
---
diff --git a/app/tests/gimp-test-session-utils.c b/app/tests/gimp-test-session-utils.c
index a5b3a6f..e2694aa 100644
--- a/app/tests/gimp-test-session-utils.c
+++ b/app/tests/gimp-test-session-utils.c
@@ -173,7 +173,6 @@ gimp_test_session_load_and_write_session_files (const gchar *loaded_sessionrc,
   GimpTestFileState  final_dockrc_state      = { NULL, NULL, { 0, 0 } };
   gchar             *sessionrc_filename      = NULL;
   gchar             *dockrc_filename         = NULL;
-  gchar             *gimprc_filename         = NULL;
 
   /* Make sure to run this before we use any GIMP functions */
   gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
@@ -198,15 +197,7 @@ gimp_test_session_load_and_write_session_files (const gchar *loaded_sessionrc,
   g_setenv ("GIMP_TESTING_DOCKRC_NAME", loaded_dockrc, TRUE /*overwrite*/);
 
   /* Start up GIMP */
-  if (single_window_mode)
-    {
-      gimprc_filename =
-        g_build_filename (g_getenv ("GIMP_TESTING_ABS_TOP_SRCDIR"),
-                          "app/tests/gimpdir/gimprc-single-window",
-                          NULL);
-    }
-  gimp = gimp_init_for_gui_testing_with_rc (TRUE /*show_gui*/, gimprc_filename);
-  g_free (gimprc_filename);
+  gimp = gimp_init_for_gui_testing (TRUE /*show_gui*/);
 
   /* Let the main loop run until idle to let things stabilize. This
    * includes parsing sessionrc and dockrc
diff --git a/app/tests/gimpdir/Makefile.am b/app/tests/gimpdir/Makefile.am
index d1cd1df..f503252 100644
--- a/app/tests/gimpdir/Makefile.am
+++ b/app/tests/gimpdir/Makefile.am
@@ -8,7 +8,6 @@ EXTRA_DIST = \
 	dockrc-2-6				\
 	dockrc-2-8				\
 	dockrc-expected				\
-	gimprc-single-window			\
 	sessionrc				\
 	sessionrc-2-6				\
 	sessionrc-2-8-multi-window		\
diff --git a/app/tests/test-single-window-mode.c b/app/tests/test-single-window-mode.c
index 2a5961c..ca1b2f3 100644
--- a/app/tests/test-single-window-mode.c
+++ b/app/tests/test-single-window-mode.c
@@ -129,7 +129,6 @@ int main(int argc, char **argv)
 {
   Gimp  *gimp   = NULL;
   gint   result = -1;
-  gchar *gimprc;
 
   gimp_test_bail_if_no_display ();
   gtk_test_init (&argc, &argv, NULL);
@@ -140,11 +139,7 @@ int main(int argc, char **argv)
 
   /* Launch GIMP in single-window mode */
   g_setenv ("GIMP_TESTING_SESSIONRC_NAME", "sessionrc-2-8-single-window", TRUE /*overwrite*/);
-  gimprc = g_build_filename (g_getenv ("GIMP_TESTING_ABS_TOP_SRCDIR"),
-                             "app/tests/gimpdir/gimprc-single-window",
-                             NULL);
-  gimp = gimp_init_for_gui_testing_with_rc (TRUE /*show_gui*/, gimprc);
-  g_free (gimprc);
+  gimp = gimp_init_for_gui_testing (TRUE /*show_gui*/);
   gimp_test_run_mainloop_until_idle ();
 
   ADD_TEST (new_dockable_not_in_new_window);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]