Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : proto/epdf

Dir     : e17/proto/epdf/src/bin


Modified Files:
        epdf_ewl_test.c 


Log Message:
 * fix initial size of the ewl widget
 * clean ewl test
 * add guards around config.h

===================================================================
RCS file: /cvs/e/e17/proto/epdf/src/bin/epdf_ewl_test.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- epdf_ewl_test.c     21 May 2008 13:07:08 -0000      1.12
+++ epdf_ewl_test.c     25 May 2008 06:52:12 -0000      1.13
@@ -139,7 +139,7 @@
 
   if (argc == 1) {
     printf ("Usage: %s pdf_file\n", argv[0]);
-    return -1;
+    return EXIT_FAILURE;
   }
 
   ewl_init (&argc, (char **)argv);
@@ -148,17 +148,13 @@
 
   /* We open the pdf file */
   pdf = ewl_pdf_new ();
-  ewl_pdf_file_set (EWL_PDF (pdf), argv[1]);
-  document = EWL_PDF (pdf)->pdf_document;
-  if (!document) {
-    printf ("The file %s can't be opened\n", argv[1]);
-    ecore_list_destroy (str_data);
-    ewl_main_quit ();
-    return -1;
+  if (!ewl_pdf_file_set (EWL_PDF (pdf), argv[1])) {
+    printf ("Can not load the document %s\nExiting...", argv[1]);
+    ecore_list_destroy (list);
+    ewl_main_quit();
+    return EXIT_FAILURE;
   }
 
-  index = epdf_index_new (document);
-
   window = ewl_window_new ();
   ewl_window_title_set (EWL_WINDOW (window), "Ewl Pdf Test Application");
   ewl_callback_append (window, EWL_CALLBACK_DELETE_WINDOW,
@@ -176,6 +172,9 @@
   ewl_object_fill_policy_set (EWL_OBJECT (vbox), EWL_FLAG_FILL_ALL);
   ewl_widget_show (vbox);
 
+  document = ewl_pdf_pdf_document_get (EWL_PDF (pdf));
+  index = ewl_pdf_pdf_index_get (EWL_PDF (pdf));
+
   /* view for both the list and the tree (if the index exists) */
   view = ewl_label_view_get();
 
@@ -249,7 +248,7 @@
 
   ewl_main ();
 
-  return 0;
+  return EXIT_SUCCESS;
 }
 
 static void _quit_cb (Ewl_Widget * w, void *ev_data, void *user_data)



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to