]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
bikeshedding: unifying some variable in contrib/bobtoolz
authorThomas Debesse <dev@illwieckz.net>
Sat, 4 Apr 2020 05:21:15 +0000 (07:21 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sat, 4 Apr 2020 07:54:55 +0000 (09:54 +0200)
contrib/bobtoolz/bobToolz-GTK.cpp
contrib/bobtoolz/ctfToolz-GTK.cpp
contrib/bobtoolz/dialogs/dialogs-gtk.cpp

index 04f7d89bdd5e8073f5ea3fc3ad9b82b2aa8a3587..ff144ea06c57b2830892a630633b455e3c0b5100 100644 (file)
@@ -62,10 +62,10 @@ void BobToolz_destroy(){
 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
-static ui::Window g_pRadiantWnd{ui::null};
+static ui::Window main_window{ui::null};
 
 extern "C" const char* QERPlug_Init( void* hApp, void* pMainWidget ) {
-       g_pRadiantWnd = ui::Window::from(pMainWidget);
+       main_window = ui::Window::from(pMainWidget);
 
        return PLUGIN_NAME " for " RADIANT_NAME;
 }
@@ -148,7 +148,7 @@ extern "C" void QERPlug_Dispatch( const char *p, vec3_t vMin, vec3_t vMax, bool
                        RADIANT_NAME " " RADIANT_VERSION_STRING "\n"
                        __DATE__;
 
-               GlobalRadiant().m_pfnMessageBox( g_pRadiantWnd, label_text,
+               GlobalRadiant().m_pfnMessageBox( main_window, label_text,
                                                                                "About " PLUGIN_NAME,
                                                                                eMB_OK,
                                                                                eMB_ICONDEFAULT );
index 66b852d997f0041d0ff7de8df7411be19379582c..c4b6c6d511b869a461ae0010866a59fbb431dbde 100644 (file)
@@ -37,14 +37,14 @@ BOOL g_bBSPInitDone                 = FALSE;
 static const char *PLUGIN_COMMANDS = ABOUT_CMD ",Colour Changer...,Swap Light Colours,Change Angles 180,Swap Spawn Points";
 
 // globals
-GtkWidget *g_pRadiantWnd = NULL;
+GtkWidget *main_window = NULL;
 
 extern "C" LPVOID WINAPI QERPlug_GetFuncTable(){
        return &g_FuncTable;
 }
 
 extern "C" LPCSTR WINAPI QERPlug_Init( HMODULE hApp, GtkWidget* pMainWidget ){
-       g_pRadiantWnd = pMainWidget;
+       main_window = pMainWidget;
        memset( &g_FuncTable, 0, sizeof( _QERFuncTable_1 ) );
        g_FuncTable.m_fVersion = QER_PLUG_VERSION;
        g_FuncTable.m_nSize = sizeof( _QERFuncTable_1 );
@@ -85,7 +85,7 @@ extern "C" void WINAPI QERPlug_Dispatch( LPCSTR p, vec3_t vMin, vec3_t vMax, boo
                        RADIANT_NAME " " RADIANT_VERSION "\n"
                        __DATE__;
 
-               GlobalRadiant().m_pfnMessageBox( g_pRadiantWnd, label_text,
+               GlobalRadiant().m_pfnMessageBox( main_window, label_text,
                                                                                "About " PLUGIN_NAME,
                                                                                eMB_OK,
                                                                                eMB_ICONDEFAULT );
index 05376e3f0bc58825eb502a8da1b876f9c8d1a64b..a5732ff5cb30b00b87a9dd79221bb8905f0680ff 100644 (file)
@@ -1044,8 +1044,6 @@ EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs, ui::Window main_window ){
 
        gtk_widget_realize( window );
 
-
-
        auto vbox = ui::VBox( FALSE, 10 );
        window.add(vbox);
        vbox.show();