<br><div class="gmail_quote">On Thu, Jun 2, 2011 at 1:05 PM, Max Horn <span dir="ltr"><<a href="mailto:max@quendi.de">max@quendi.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Am 01.06.2011 um 16:23 schrieb Max Horn:<br>
[...]<br>
<div class="im"><br>
>><br>
>>> That would be nice. And easily doable on Mac, probably on Windows, not so sure on Linux. Alas, this would be encapsulated in an OSystem API, and I think it would be good to have this, at least everywhere we can implement it.<br>

>><br>
>>> For Unices in general, I see no alternative to providing the path to the log in the dialog / providing instructions to find it, sadly. But for Windows & Mac, an "open log" button would clearly superior. Let's do it ;).<br>

>><br>
>> I was thinking we could just name the log files with ".txt" and then call<br>
>> xdg-open, which I hope is present on most Linux machines, or Notepad on<br>
>> Windows, or TextEdit on Mac, or whatever the equivalent is on other OSes.<br>
><br>
> Sure, why not. So, we'd add a new OSystem API for that? Like<br>
>  virtual void OSystem::openLogFileInEditor() {}<br>
> or so...<br>
><br>
<br>
</div>So... do we do this? Any yeahs or nays?<br>
<br>
Note I specifically decided against an "openFileInEditor(FSNode )" because then we'd have to add a way to obtain an FSNode for the logfile. So, I figured, let's keep it simple. If we ever need this for other files, let's worry about that then :).<br>

<div><div></div><div class="h5"><br>
Cheers,<br>
Max<br></div></div></blockquote><div><br></div><div>Sounds like a good idea to me :)</div><div><br></div><div>For Windows, you don't need to call Notepad... you merely want to tell the OS to open the TXT file you require, and the appropriate program that is associated with the TXT extension in the user's system (Notepad, Notepad++, EditPlus, UltraEdit or whatever) will open. This is done using the ShellExecute or ShellExecuteEx functions:</div>
<div><a href="http://msdn.microsoft.com/en-us/library/bb762153(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/bb762153(v=vs.85).aspx</a></div><div><a href="http://msdn.microsoft.com/en-us/library/bb762154(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/bb762154(v=vs.85).aspx</a></div>
<div><br></div><div>Regards</div><div>Filippos</div></div>