diff --git a/.gitignore b/.gitignore index ba23f70ef..17eca26d2 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,10 @@ tools *.wixpdb *.wixobj bracketsharvestmanager.wxs -fr-fr.mst \ No newline at end of file +fr-fr.mst + +appshell_extensions_js.o +Makefile +appshell.Makefile +Brackets.target.mk +libcef_dll_wrapper.target.mk diff --git a/appshell/cefclient_gtk.cpp b/appshell/cefclient_gtk.cpp index 206cdfcdc..08d790370 100644 --- a/appshell/cefclient_gtk.cpp +++ b/appshell/cefclient_gtk.cpp @@ -92,9 +92,7 @@ std::string AppGetRunningDirectory() { } CefString AppGetCachePath() { - std::string cachePath = "file://"; //To avoid Unix paths being interpreted as http:// URLs - cachePath.append(ClientApp::AppGetSupportDirectory()); - cachePath.append("/cef_data"); + std::string cachePath = std::string(ClientApp::AppGetSupportDirectory()) + "/cef_data"; return CefString(cachePath); } @@ -202,4 +200,4 @@ int main(int argc, char* argv[]) { CefShutdown(); return 0; -} \ No newline at end of file +} diff --git a/appshell/client_app_gtk.cpp b/appshell/client_app_gtk.cpp index 051c2e57a..d63621ed5 100644 --- a/appshell/client_app_gtk.cpp +++ b/appshell/client_app_gtk.cpp @@ -38,8 +38,15 @@ extern char _binary_appshell_appshell_extensions_js_start; CefString ClientApp::GetCurrentLanguage() { //TODO proper locale in GTK - printf("in GetCurrentLanguage\n"); - return CefString("en"); + printf("in GetCurrentLanguage: "); + const char* locconst = pango_language_to_string( gtk_get_default_language() ); + //printf( "%s\n", locconst ); // for me it prints "en-us", so I have to strip everything after the "-" + char loc[10] = {0}; + strncpy(loc, locconst, 9); + for(int i=0; i<8; i++) + if ( (loc[i] == '-') || (loc[i] == '_') ) { loc[i] = 0; break; } + printf( "%s\n", loc ); // here it prints just "en" + return CefString(loc); } std::string ClientApp::GetExtensionJSSource() diff --git a/appshell_paths.gypi b/appshell_paths.gypi index 86b921909..ce265d1db 100755 --- a/appshell_paths.gypi +++ b/appshell_paths.gypi @@ -156,6 +156,9 @@ 'appshell_bundle_resources_linux': [ '$(BUILDTYPE)/locales', 'appshell/res/brackets.ico', + '$(BUILDTYPE)/cef.pak', + '$(BUILDTYPE)/cef_resources.pak', + '$(BUILDTYPE)/devtools_resources.pak', ], 'appshell_bundle_libraries_linux': [ '$(BUILDTYPE)/lib.target/libcef.so',