From: Thomas Debesse Date: Sun, 24 Feb 2019 03:45:18 +0000 (+0100) Subject: disable gtktheme compilation X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ff48e71434a414958e6e56628ccf04284d030784;p=xonotic%2Fnetradiant.git disable gtktheme compilation --- diff --git a/radiant/gtktheme.cpp b/radiant/gtktheme.cpp index 0f3604a8..c9508f55 100644 --- a/radiant/gtktheme.cpp +++ b/radiant/gtktheme.cpp @@ -6,6 +6,8 @@ email : ashaduri '@' gmail.com ***************************************************************************/ +#define GARUX_DISABLE_GTKTHEME +#ifndef GARUX_DISABLE_GTKTHEME #include #include @@ -752,3 +754,5 @@ void apply_theme(const std::string& theme_name, const std::string& font) } + +#endif // GARUX_DISABLE_GTKTHEME diff --git a/radiant/gtktheme.h b/radiant/gtktheme.h index 79425947..9aa723d8 100644 --- a/radiant/gtktheme.h +++ b/radiant/gtktheme.h @@ -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 diff --git a/radiant/main.cpp b/radiant/main.cpp index d0962c2d..88cd0cad 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -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[] ){ diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index c9fcc01e..38c46faf 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -101,7 +101,11 @@ #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) );