]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
disable gtktheme compilation
authorThomas Debesse <dev@illwieckz.net>
Sun, 24 Feb 2019 03:45:18 +0000 (04:45 +0100)
committerThomas Debesse <dev@illwieckz.net>
Mon, 25 May 2020 10:57:28 +0000 (12:57 +0200)
radiant/gtktheme.cpp
radiant/gtktheme.h
radiant/main.cpp
radiant/mainframe.cpp

index 0f3604a8d6802de35fc143b22611e23feb672777..c9508f55e9c1fa7d67e0e4c2157502899145cf19 100644 (file)
@@ -6,6 +6,8 @@
     email                : ashaduri '@' gmail.com
  ***************************************************************************/
 
+#define GARUX_DISABLE_GTKTHEME
+#ifndef GARUX_DISABLE_GTKTHEME
 
 #include <iostream>
 #include <fstream>
@@ -752,3 +754,5 @@ void apply_theme(const std::string& theme_name, const std::string& font)
 
 
 }
+
+#endif // GARUX_DISABLE_GTKTHEME
index 79425947fc50ba029387a7a92a15a375acd51b62..9aa723d8e9c9ef0f112db44424895dd5af1cd514 100644 (file)
@@ -6,9 +6,14 @@
     email                : ashaduri '@' gmail.com
  ***************************************************************************/
 
+#define GARUX_DISABLE_GTKTHEME
+#ifndef GARUX_DISABLE_GTKTHEME
+
 #ifndef _GTKTHEME_H_
 #define _GTKTHEME_H_
 
 void gtkThemeDlg();
 
 #endif
+
+#endif // GARUX_DISABLE_GTKTHEME
index d0962c2da74a77902dc09d4d62a168d720236313..88cd0cad4fd89e7a774ca8941be1a9fbd5b60144 100644 (file)
@@ -534,15 +534,16 @@ void user_shortcuts_save(){
        SaveCommandMap( path.c_str() );
 }
 
+void add_local_rc_files(){
+#define GARUX_DISABLE_GTKTHEME
+#ifndef GARUX_DISABLE_GTKTHEME
 /* 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";
@@ -555,6 +556,7 @@ void add_local_rc_files(){
                gtk_rc_add_default_file( path.c_str() );
        }
 #endif
+#endif // GARUX_DISABLE_GTKTHEME
 }
 
 int main( int argc, char* argv[] ){
index c9fcc01ee2d4ed5112dbddd45b33eb2e65045fd5..38c46fafefbcf3a4db7abf1b92ff054242f3a183 100644 (file)
 #include "referencecache.h"
 #include "texwindow.h"
 #include "filterbar.h"
+
+#define GARUX_DISABLE_GTKTHEME
+#ifndef GARUX_DISABLE_GTKTHEME
 #include "gtktheme.h"
+#endif
 
 
 struct layout_globals_t
@@ -1065,7 +1069,9 @@ ui::MenuItem create_colours_menu(){
        create_menu_item_with_mnemonic( menu_3, "Black and Green", "ColorSchemeBlackAndGreen" );
        create_menu_item_with_mnemonic( menu_3, "Maya/Max/Lightwave Emulation", "ColorSchemeYdnar" );
 
+#ifndef GARUX_DISABLE_GTKTHEME
        create_menu_item_with_mnemonic( menu_in_menu, "GTK Theme...", "gtkThemeDlg" );
+#endif
 
        menu_separator( menu_in_menu );
 
@@ -3467,7 +3473,9 @@ void MainFrame_Construct(){
        GlobalToggles_insert( "MouseScale", makeCallbackF(ScaleMode), ToggleItem::AddCallbackCaller( g_scalemode_button ) );
        GlobalToggles_insert( "MouseDrag", makeCallbackF(DragMode), ToggleItem::AddCallbackCaller( g_dragmode_button ), Accelerator( 'Q' ) );
 
+#ifndef GARUX_DISABLE_GTKTHEME
        GlobalCommands_insert( "gtkThemeDlg", makeCallbackF(gtkThemeDlg) );
+#endif
        GlobalCommands_insert( "ColorSchemeOriginal", makeCallbackF(ColorScheme_Original) );
        GlobalCommands_insert( "ColorSchemeQER", makeCallbackF(ColorScheme_QER) );
        GlobalCommands_insert( "ColorSchemeBlackAndGreen", makeCallbackF(ColorScheme_Black) );