Changeset 274
- Timestamp:
- 05/04/07 07:24:59 (18 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
THANKS (modified) (1 diff)
-
src/main.cxx (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/THANKS
r270 r274 3 3 4 4 - Enrico Tröger <enrico.troeger@uvena.de>, for his full screen patch. 5 - Igor Vagulin <igor_vagulin@mail.ru>, for his Russian translation .5 - Igor Vagulin <igor_vagulin@mail.ru>, for his Russian translation and patches. 6 6 - LoneFox <>, for his patches. 7 7 - Moritz Heiber <moe@xfce.org>, for his German translation. -
trunk/src/main.cxx
r267 r274 25 25 26 26 using namespace ePDFView; 27 28 struct LoadFileInfo 29 { 30 gchar *fileName; 31 MainPter *mainPter; 32 PDFDocument *document; 33 }; 34 35 static int 36 loadFileFromCommandLine (gpointer data) 37 { 38 LoadFileInfo *info = static_cast<LoadFileInfo *> (data); 39 40 info->mainPter->setOpenState (info->fileName, FALSE); 41 info->document->load (info->fileName, NULL); 42 43 g_free (info->fileName); 44 delete info; 45 46 return FALSE; 47 } 27 48 28 49 int … … 57 78 // Let know to the presenter which is its view. 58 79 mainPter->setView (mainView); 59 // Enter the main loop and wait for user interaction. */60 80 // Now check if we have additional parameters. Any additional parameter 61 81 // will be a file name to open. 62 82 if ( argc > 1 ) 63 83 { 64 mainPter->setOpenState (argv[1], FALSE); 65 document->load (argv[1], NULL); 84 LoadFileInfo *info = new LoadFileInfo; 85 info->mainPter = mainPter; 86 info->document = document; 87 info->fileName = g_strdup (argv[1]); 88 g_idle_add (loadFileFromCommandLine, info); 66 89 } 67 90
