Hi Niklas,
Am Donnerstag, 26. Mai 2016 22:42:05 UTC+2 schrieb Niklas Mischkulnig:
>
> What does OSXStoreOpenFiles do? With this code added, MacOpenFiles never
> gets called,
>
It should prevent the call to MacOpenFiles when we parsed all options
already in OnInit.
What command line options gets PTBatcherGUI when you open it in finder with
a project? Is it empty (except argv[0])?
Does it works when we add an if(argc>1) like
#ifdef __WXMAC__
if(argc>1)
{
wxArrayString emptyFiles;
OSXStoreOpenFiles(emptyFiles);
}
#endif
see also attached patch.
Thomas
--
A list of frequently asked questions is available at:
http://wiki.panotools.org/Hugin_FAQ
---
You received this message because you are subscribed to the Google Groups
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/hugin-ptx/21cb1d55-8024-47ea-ae55-b05289bfc213%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent 5422e269f546cdad9d305767a1e608420d10bcf3
[mq]: ptbatcher_log.diff
diff --git a/src/hugin1/ptbatcher/PTBatcherGUI.cpp b/src/hugin1/ptbatcher/PTBatcherGUI.cpp
--- a/src/hugin1/ptbatcher/PTBatcherGUI.cpp
+++ b/src/hugin1/ptbatcher/PTBatcherGUI.cpp
@@ -167,7 +167,13 @@
};
wxCmdLineParser parser(cmdLineDesc, argc, argv);
- switch ( parser.Parse() )
+ for (int i = 0; i < argc; ++i)
+ {
+ wxString s;
+ s << "argv " << i << ": " << argv[i];
+ wxLogMessage(s);
+ };
+ switch (parser.Parse())
{
case -1: // -h or --help was given, and help displayed so exit
return false;
@@ -221,7 +227,7 @@
}
};
-#ifdef __WXMAC__
+#if 0 //def __WXMAC__
// see PTBatcherGUI::MacOpenFile for explanation
m_macFileNameToOpenOnStart = wxT("");
wxYield();
@@ -267,6 +273,9 @@
while (parser.GetParamCount() > count)
{
wxString param = parser.GetParam(count);
+ wxString s;
+ s << "Param " << count << ": " << param;
+ wxLogMessage(s);
count++;
if (!projectSpecified) //next parameter must be new script file
{
@@ -396,6 +405,13 @@
{
m_frame->RunBatch();
}
+#ifdef __WXMAC__
+ if (argc > 1)
+ {
+ wxArrayString emptyFiles;
+ OSXStoreOpenFiles(emptyFiles);
+ };
+#endif
return true;
}