]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/bobtoolz/bobToolz-GTK.cpp
cmake: do not look for graphical libs when not building radiant
[xonotic/netradiant.git] / contrib / bobtoolz / bobToolz-GTK.cpp
index 4eecfd92d5b210538188b3e91190826babe90f39..bbc3979c56332e3ea3ad9abaf954451ea5655fd5 100644 (file)
@@ -57,13 +57,13 @@ void BobToolz_destroy(){
 }
 
 // plugin name
-char* PLUGIN_NAME = "bobToolz";
+const char* PLUGIN_NAME = "bobToolz";
 
 // commands in the menu
-static char* PLUGIN_COMMANDS = "About...,-,Reset Textures...,PitOMatic,-,Vis Viewer,Brush Cleanup,Polygon Builder,Caulk Selection,-,Tree Planter,Drop Entity,Plot Splines,-,Merge Patches,Split patches,Split patches cols,Split patches rows,Turn edge";
+static const char* PLUGIN_COMMANDS = "About...,-,Reset Textures...,PitOMatic,-,Vis Viewer,Brush Cleanup,Polygon Builder,Caulk Selection,-,Tree Planter,Drop Entity,Plot Splines,-,Merge Patches,Split patches,Split patches cols,Split patches rows,Turn edge";
 
 // globals
-GtkWidget *g_pRadiantWnd = NULL;
+ui::Window g_pRadiantWnd{ui::null};
 
 static const char *PLUGIN_ABOUT =   "bobToolz for SDRadiant\n"
                                                                        "by digibob (digibob@splashdamage.com)\n"
@@ -72,7 +72,7 @@ static const char *PLUGIN_ABOUT =   "bobToolz for SDRadiant\n"
                                                                        "MarsMattel, RR2DO2\n";
 
 extern "C" const char* QERPlug_Init( void* hApp, void* pMainWidget ) {
-       g_pRadiantWnd = (GtkWidget*)pMainWidget;
+       g_pRadiantWnd = ui::Window::from(pMainWidget);
 
        return "bobToolz for GTKradiant";
 }
@@ -155,7 +155,7 @@ const char* QERPlug_GetCommandTitleList(){
 }
 
 
-#define NUM_TOOLBARBUTTONS 14
+const int NUM_TOOLBARBUTTONS = 14;
 
 std::size_t ToolbarButtonCount( void ) {
        return NUM_TOOLBARBUTTONS;
@@ -284,10 +284,10 @@ class BobToolzPluginDependencies :
 public:
 BobToolzPluginDependencies() :
        GlobalEntityModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "entities" ) ),
+       GlobalEntityClassManagerModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "entityclass" ) ),
        GlobalShadersModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "shaders" ) ),
        GlobalBrushModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "brushtypes" ) ),
-       GlobalPatchModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "patchtypes" ) ),
-       GlobalEntityClassManagerModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "entityclass" ) ){
+       GlobalPatchModuleRef( GlobalRadiant().getRequiredGameDescriptionKeyValue( "patchtypes" ) ){
 }
 };