Merge
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#include <glib/gstdio.h>
|
||||
#include <safekeyfile.h>
|
||||
#include <safegtk.h>
|
||||
#include "version.h"
|
||||
#include <version.h>
|
||||
|
||||
CacheImageData::CacheImageData ()
|
||||
: md5(""), supported(false), format(FT_Invalid), rankOld(-1), inTrashOld(false), recentlySaved(false),
|
||||
|
@@ -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(
|
||||
|
@@ -195,14 +195,12 @@ int Options::readFromFile (Glib::ustring fname) {
|
||||
|
||||
if (keyFile.has_group ("General")) {
|
||||
if (keyFile.has_key ("General", "TabbedEditor")) tabbedUI= keyFile.get_boolean ("General", "TabbedEditor");
|
||||
if (keyFile.has_key ("General", "StartupDirectory") && keyFile.get_string ("General", "StartupDirectory") == "home")
|
||||
startupDir = STARTUPDIR_HOME;
|
||||
else if (keyFile.has_key ("General", "StartupDirectory") && keyFile.get_string ("General", "StartupDirectory") == "current")
|
||||
startupDir = STARTUPDIR_CURRENT;
|
||||
else if (keyFile.has_key ("General", "StartupDirectory") && keyFile.get_string ("General", "StartupDirectory") == "last")
|
||||
startupDir = STARTUPDIR_LAST;
|
||||
else
|
||||
startupDir = STARTUPDIR_CUSTOM;
|
||||
if (keyFile.has_key ("General", "StartupDirectory")){
|
||||
if( keyFile.get_string ("General", "StartupDirectory") == "home") startupDir = STARTUPDIR_HOME;
|
||||
else if ( keyFile.get_string ("General", "StartupDirectory") == "current") startupDir = STARTUPDIR_CURRENT;
|
||||
else if ( keyFile.get_string ("General", "StartupDirectory") == "last") startupDir = STARTUPDIR_LAST;
|
||||
else if ( keyFile.get_string ("General", "StartupDirectory") == "custom") startupDir = STARTUPDIR_CUSTOM;
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("General", "StartupPath")) startupPath = keyFile.get_string ("General", "StartupPath");
|
||||
if (keyFile.has_key ("General", "DateFormat")) dateFormat = keyFile.get_string ("General", "DateFormat");
|
||||
@@ -513,24 +511,28 @@ void Options::load () {
|
||||
*
|
||||
* Folder redirection is then fully supported on WinVista/7, but not on Win2000/XP
|
||||
*/
|
||||
const gchar* dataPath;
|
||||
Glib::ustring dPath;
|
||||
|
||||
WCHAR path[MAX_PATH];
|
||||
// ->ODUIS: How to make that commented out code work ?
|
||||
|
||||
/*WCHAR path[MAX_PATH] = {0};
|
||||
if (SHGetSpecialFolderPathW(NULL, path, CSIDL_LOCAL_APPDATA, false)) {
|
||||
gchar* pathUTF8=g_utf16_to_utf8((const gunichar2*)path,-1,NULL,NULL,NULL);
|
||||
rtdir = Glib::ustring(pathUTF8) + Glib::ustring("\\") + Glib::ustring(CACHEFOLDERNAME);
|
||||
g_free(pathUTF8);
|
||||
dPath = path;
|
||||
printf("SHGetSpecialFolderPathW: \"%s\"\n", dPath.c_str());
|
||||
}
|
||||
else {
|
||||
// Should never fail, but old alternative way as backup
|
||||
const gchar* dataPath = g_getenv("LOCALAPPDATA");
|
||||
if (dataPath != NULL)
|
||||
rtdir = Glib::ustring(dataPath) + Glib::ustring("\\") + Glib::ustring(CACHEFOLDERNAME);
|
||||
else {
|
||||
dataPath = g_getenv("USERPROFILE");
|
||||
if (dataPath != NULL)
|
||||
rtdir = Glib::ustring(dataPath) + Glib::ustring("\\Local Settings\\Application Data\\") + Glib::ustring(CACHEFOLDERNAME);
|
||||
}
|
||||
}
|
||||
printf("SHGetSpecialFolderPathW: Fail!\n");
|
||||
}*/
|
||||
|
||||
dataPath = g_getenv("LOCALAPPDATA");
|
||||
if (dataPath != NULL)
|
||||
rtdir = Glib::ustring(dataPath) + Glib::ustring("\\") + Glib::ustring(CACHEFOLDERNAME);
|
||||
else {
|
||||
dataPath = g_getenv("USERPROFILE");
|
||||
if (dataPath != NULL)
|
||||
rtdir = Glib::ustring(dataPath) + Glib::ustring("\\Local Settings\\Application Data\\") + Glib::ustring(CACHEFOLDERNAME);
|
||||
}
|
||||
#else
|
||||
rtdir = Glib::ustring(g_get_user_config_dir ()) + Glib::ustring("/") + Glib::ustring(CACHEFOLDERNAME);
|
||||
#endif
|
||||
|
@@ -73,7 +73,7 @@ RTWindow::RTWindow ()
|
||||
mainNB->set_scrollable (true);
|
||||
mainNB->signal_switch_page().connect_notify( sigc::mem_fun(*this, &RTWindow::on_mainNB_switch_page) );
|
||||
|
||||
fpanel = Gtk::manage ( new FilePanel () );
|
||||
fpanel = new FilePanel () ;
|
||||
fpanel->setParent (this);
|
||||
|
||||
// decorate tab
|
||||
|
@@ -49,6 +49,7 @@ if [ -d "${APP}" ]; then
|
||||
fi
|
||||
echo "Removing any old disk images..."
|
||||
rm ${RELEASE}/rawtherapee*.dmg
|
||||
rm ${RELEASE}/rawtherapee*.dmg.zip
|
||||
|
||||
echo "Making application directory structure..."
|
||||
mkdir -p "${RESOURCES}"
|
||||
@@ -99,4 +100,7 @@ rm -rf ${APP}
|
||||
cd ${RELEASE}
|
||||
zip ${DMG}.zip ${DMG} AboutThisBuild.txt
|
||||
|
||||
cd ${RELEASE}
|
||||
zip ${DMG}.zip ${DMG} AboutThisBuild.txt
|
||||
|
||||
echo "All done!"
|
||||
|
Reference in New Issue
Block a user