This commit is contained in:
ffsup2
2011-05-29 19:12:15 +02:00
parent cf5d83f14b
commit 746c6f8afe
5 changed files with 42 additions and 36 deletions

View File

@@ -64,25 +64,25 @@ int main(int argc, char **argv)
Glib::ustring argv0_;
#ifdef WIN32
WCHAR exnameU[512] = {0};
char exname[512] = {0};
GetModuleFileNameW (NULL, exnameU, 512);
WideCharToMultiByte(CP_UTF8,0,exnameU,-1,exname,512,0,0 );
WCHAR exnameU[512] = {0};
char exname[512] = {0};
GetModuleFileNameW (NULL, exnameU, 512);
WideCharToMultiByte(CP_UTF8,0,exnameU,-1,exname,512,0,0 );
argv0_ = exname;
// get the path where the rawtherapee executable is stored
argv0 = Glib::path_get_dirname(argv0_);
// get the path where the rawtherapee executable is stored
argv0 = Glib::path_get_dirname(argv0_);
#else
// get the path to data (defined in config.h which is generated by cmake)
argv0 = DATA_SEARCH_PATH;
argv0 = DATA_SEARCH_PATH;
// check if path exists, otherwise revert back to behavior similar to windows
try {
Glib::Dir dir(DATA_SEARCH_PATH);
} catch (Glib::FileError) {
argv0_ = argv[0];
argv0 = Glib::path_get_dirname(argv0_);
argv0 = Glib::path_get_dirname(argv0_);
}
#endif
@@ -113,7 +113,7 @@ int main(int argc, char **argv)
if (!options.useSystemTheme)
{
std::vector<Glib::ustring> rcfiles;
std::vector<Glib::ustring> rcfiles;
rcfiles.push_back (argv0+"/themes/"+options.theme);
// Set the font face and size
Gtk::RC::parse_string (Glib::ustring::compose(