]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/main.cpp
Q3map2:
[xonotic/netradiant.git] / radiant / main.cpp
index 0a1eb3b1d3a709630a649ef68f75364cd7b4adfc..d17db3d6aa4f619eb26aedfcaa02d5eac1a47ab3 100644 (file)
@@ -543,6 +543,21 @@ void user_shortcuts_save(){
        SaveCommandMap( path.c_str() );
 }
 
+void add_local_rc_files(){
+       {
+               StringOutputStream path( 512 );
+               path << AppPath_get() << ".gtkrc-2.0.radiant";
+               gtk_rc_add_default_file( path.c_str() );
+       }
+#ifdef WIN32
+       {
+               StringOutputStream path( 512 );
+               path << AppPath_get() << ".gtkrc-2.0.win";
+               gtk_rc_add_default_file( path.c_str() );
+       }
+#endif
+}
+
 int main( int argc, char* argv[] ){
        crt_init();
 
@@ -573,6 +588,7 @@ int main( int argc, char* argv[] ){
 #endif
 
        gtk_disable_setlocale();
+
        gtk_init( &argc, &argv );
 
        // redirect Gtk warnings to the console
@@ -593,6 +609,8 @@ int main( int argc, char* argv[] ){
 
        paths_init();
 
+       add_local_rc_files();
+
        if ( !check_version() ) {
                return EXIT_FAILURE;
        }
@@ -634,13 +652,10 @@ int main( int argc, char* argv[] ){
 
        hide_splash();
 
-#ifdef WIN32
-       if( openCmdMap[0] != '\0' ){
+       if( openCmdMap && *openCmdMap ){
                Map_LoadFile( openCmdMap );
        }
-       else
-#endif // WIN32
-       if ( g_bLoadLastMap && !g_strLastMap.empty() ) {
+       else if ( g_bLoadLastMap && !g_strLastMap.empty() ) {
                Map_LoadFile( g_strLastMap.c_str() );
        }
        else