How to start a filemanager in Gtk2 "the proper way"



Hello there,

I'm trying to implement an "open in file manager" button in Gtk2
(a specific path given).
After checking many different sites without finding an answer or any
reference to this issue, how to do this "the Gtk way", I'm asking you
guys.

Is there any "proper way" to do this or do I have use #ifdef syntax to
check for the system?

#ifdef __unix__
    //my start code
#elif __WIN32__
    // start windows code here
#else
    // fallback code..?
#endif


If there is no conventional way, I'd use the #ifdef-elif-else macros to
find out the operating system and call explorer.exe on Windows, xdg-open
on Linux/Unix and finder on Mac (although I have no way to test it on
Mac).


Thanks in advance!


Regards,
Christian



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