From 930c05bcf8a67a9830e67ccbfa6dc8588e9a6546 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sat, 4 Apr 2020 07:21:15 +0200 Subject: [PATCH] bikeshedding: unifying some variable in contrib/bobtoolz --- contrib/bobtoolz/bobToolz-GTK.cpp | 6 +++--- contrib/bobtoolz/ctfToolz-GTK.cpp | 6 +++--- contrib/bobtoolz/dialogs/dialogs-gtk.cpp | 2 -- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/contrib/bobtoolz/bobToolz-GTK.cpp b/contrib/bobtoolz/bobToolz-GTK.cpp index 04f7d89b..ff144ea0 100644 --- a/contrib/bobtoolz/bobToolz-GTK.cpp +++ b/contrib/bobtoolz/bobToolz-GTK.cpp @@ -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 ); diff --git a/contrib/bobtoolz/ctfToolz-GTK.cpp b/contrib/bobtoolz/ctfToolz-GTK.cpp index 66b852d9..c4b6c6d5 100644 --- a/contrib/bobtoolz/ctfToolz-GTK.cpp +++ b/contrib/bobtoolz/ctfToolz-GTK.cpp @@ -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 ); diff --git a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp index 05376e3f..a5732ff5 100644 --- a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp +++ b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp @@ -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(); -- 2.39.2