]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/prtview/prtview.cpp
Merge commit 'c845c5cd8f427d39665d6a8b1f6eeff401370d80' into garux-merge
[xonotic/netradiant.git] / contrib / prtview / prtview.cpp
index 2b3d9c047a82657aa915080310bd8e344523cf51..fe6bf41a8ba47798c57c137c5a5c6aa1d22daa2d 100644 (file)
@@ -22,6 +22,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <uilib/uilib.h>
+
 #include "profile/profile.h"
 
 #include "qerplugin.h"
@@ -48,23 +50,23 @@ CopiedString INIfn;
 /////////////////////////////////////////////////////////////////////////////
 // CPrtViewApp construction
 
-#define RENDER_2D "Render2D"
-#define WIDTH_2D "Width2D"
-#define AA_2D "AntiAlias2D"
-#define COLOR_2D "Color2D"
-
-#define RENDER_3D "Render3D"
-#define WIDTH_3D "Width3D"
-#define AA_3D "AntiAlias3D"
-#define COLOR_3D "Color3D"
-#define COLOR_FOG "ColorFog"
-#define FOG "Fog"
-#define ZBUFFER "ZBuffer"
-#define POLYGON "Polygons"
-#define LINE "Lines"
-#define TRANS_3D "Transparency"
-#define CLIP_RANGE "ClipRange"
-#define CLIP "Clip"
+const char *RENDER_2D = "Render2D";
+const char *WIDTH_2D = "Width2D";
+const char *AA_2D = "AntiAlias2D";
+const char *COLOR_2D = "Color2D";
+
+const char *RENDER_3D = "Render3D";
+const char *WIDTH_3D = "Width3D";
+const char *AA_3D = "AntiAlias3D";
+const char *COLOR_3D = "Color3D";
+const char *COLOR_FOG = "ColorFog";
+const char *FOG = "Fog";
+const char *ZBUFFER = "ZBuffer";
+const char *POLYGON = "Polygons";
+const char *LINE = "Lines";
+const char *TRANS_3D = "Transparency";
+const char *CLIP_RANGE = "ClipRange";
+const char *CLIP = "Clip";
 
 
 void PrtView_construct(){
@@ -160,9 +162,9 @@ void SaveConfig(){
 }
 
 
-#define CONFIG_SECTION "Configuration"
+const char *CONFIG_SECTION = "Configuration";
 
-int INIGetInt( char *key, int def ){
+int INIGetInt( const char *key, int def ){
        char value[1024];
 
        if ( read_var( INIfn.c_str(), CONFIG_SECTION, key, value ) ) {
@@ -173,7 +175,7 @@ int INIGetInt( char *key, int def ){
        }
 }
 
-void INISetInt( char *key, int val, char *comment /* = NULL */ ){
+void INISetInt( const char *key, int val, const char *comment /* = NULL */ ){
        char s[1000];
 
        if ( comment ) {
@@ -201,10 +203,10 @@ static const char *PLUGIN_COMMANDS =
        Q3R_CMD_LOAD;
 
 
-GtkWidget *g_pRadiantWnd = NULL;
+ui::Widget g_pRadiantWnd{ui::null};
 
 const char* QERPlug_Init( void *hApp, void* pMainWidget ){
-       g_pRadiantWnd = (GtkWidget*)pMainWidget;
+       g_pRadiantWnd = ui::Window::from(pMainWidget);
        return "Portal Viewer for Q3Radiant";
 }