On 17/04/2012 20:57, Mateusz Marzantowicz wrote: > You wrote that this function is not used very often, but I'm curious > what is the recommended way of finding path to XML file for use in > Gtk::UIManager::add_ui_from_file() method? I was trying to obtain path > to data directory (/usr/local/share/ in my case.) If > Glib::get_system_data_dirs() is not used by people, is there a better > way of doing this? I found that in some projects base on GTK+ they use > automake/autoconf flags that are passed in compile time as preprocessor > macro to source file, but is it really better approach? I think this is probably the best approach, as doing so would allow you to find your files based on the configured --prefix/--datadir, which would directly relate to where the files were installed. I wouldn't expect Glib::get_system_data_dirs() to be know which --datadir a particular program was configured with. -- Kind regards, Loong Jin
Attachment:
signature.asc
Description: OpenPGP digital signature