[gnome-commander/CppUnit: 15/16] Fixes hard-codes paths in this test; Cutomatically stop the application in the test



commit 8954fdadebb90db698c9c03bde5ba2590edae44b
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sun Oct 4 00:26:34 2015 +0200

    Fixes hard-codes paths in this test; Cutomatically stop the application in the test

 tests/intviewer/dualrenderer.cc |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/tests/intviewer/dualrenderer.cc b/tests/intviewer/dualrenderer.cc
index 13443de..67271c5 100644
--- a/tests/intviewer/dualrenderer.cc
+++ b/tests/intviewer/dualrenderer.cc
@@ -54,7 +54,7 @@ int main(int argc, char *argv[])
         scroll_box_get_v_adjustment(SCROLL_BOX(iscrollbox)));
     image_render_set_h_adjustment(IMAGE_RENDER(imgr),
         scroll_box_get_h_adjustment(SCROLL_BOX(iscrollbox)));
-    image_render_load_file(IMAGE_RENDER(imgr), "/home/assaf/Projects/gnome-cmd/00012.jpg");
+    image_render_load_file(IMAGE_RENDER(imgr), "../../pixmaps/gnome-commander.png");
     image_render_set_best_fit(IMAGE_RENDER(imgr), TRUE);
     image_render_set_scale_factor(IMAGE_RENDER(imgr), 1);
     scroll_box_set_client(SCROLL_BOX(iscrollbox),imgr);
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
         scroll_box_get_v_adjustment(SCROLL_BOX(tscrollbox)));
     text_render_set_h_adjustment(TEXT_RENDER(textr),
         scroll_box_get_h_adjustment(SCROLL_BOX(tscrollbox)));
-    text_render_load_file(TEXT_RENDER(textr), "/home/assaf/Projects/gnome-cmd/00012.txt");
+    text_render_load_file(TEXT_RENDER(textr), "../../INSTALL");
     scroll_box_set_client(SCROLL_BOX(tscrollbox),textr);
     gtk_widget_show(textr);
     gtk_widget_show(tscrollbox);
@@ -82,7 +82,10 @@ int main(int argc, char *argv[])
     gtk_widget_show(box);
     gtk_widget_show(window);
 
-    gtk_main();
-
+    while (g_main_context_pending(NULL))
+    {
+        g_main_context_iteration(NULL, FALSE);
+    }
+    gtk_widget_destroy (window);
     return 0;
 }


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