]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/main.cpp
Merge commit '86023af46cb7b0057fd3c9dae743660b2968e255' into garux-merge
[xonotic/netradiant.git] / radiant / main.cpp
index d27d8c6b11a0ae78f93a8955e2ffe1710aa99154..d0962c2da74a77902dc09d4d62a168d720236313 100644 (file)
@@ -534,6 +534,29 @@ void user_shortcuts_save(){
        SaveCommandMap( path.c_str() );
 }
 
+/* FIXME: HACK: not GTK3 compatible
+ https://developer.gnome.org/gtk2/stable/gtk2-Resource-Files.html#gtk-rc-add-default-file
+ https://developer.gnome.org/gtk3/stable/gtk3-Resource-Files.html#gtk-rc-add-default-file
+ > gtk_rc_add_default_file has been deprecated since version 3.0 and should not be used in newly-written code.
+ > Use GtkStyleContext with a custom GtkStyleProvider instead
+*/
+void gtk_rc_add_default_file (const gchar *filename);
+
+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();
 
@@ -609,6 +632,8 @@ int main( int argc, char* argv[] ){
 
        paths_init();
 
+       add_local_rc_files();
+
        if ( !check_version() ) {
                return EXIT_FAILURE;
        }