X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=contrib%2Fbobtoolz%2Fdialogs%2Fdialogs-gtk.cpp;h=c1169a9d166cd7f6ab566b5f51d074c05078e7bb;hb=318eb70605627162c9aefbaf240697e800e08bd6;hp=b596f0591a846ec8c50575818221155fcbdb6fbf;hpb=7fc621fc78d0e040dc2c12f38dc53dd9048215dc;p=xonotic%2Fnetradiant.git diff --git a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp index b596f059..c1169a9d 100644 --- a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp +++ b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp @@ -20,6 +20,7 @@ #include "dialogs-gtk.h" #include "../funchandlers.h" +#include #include "str.h" #include #include @@ -115,7 +116,7 @@ static void dialog_button_callback_settex( GtkWidget *widget, gpointer data ){ Data validation Routines ---------------------------------*/ -bool ValidateTextFloat( const char* pData, char* error_title, float* value ){ +bool ValidateTextFloat( const char* pData, const char* error_title, float* value ){ if ( pData ) { float testNum = (float)atof( pData ); @@ -134,7 +135,7 @@ bool ValidateTextFloat( const char* pData, char* error_title, float* value ){ return FALSE; } -bool ValidateTextFloatRange( const char* pData, float min, float max, char* error_title, float* value ){ +bool ValidateTextFloatRange( const char* pData, float min, float max, const char* error_title, float* value ){ char error_buffer[256]; sprintf( error_buffer, "Please Enter A Floating Point Number Between %.3f and %.3f", min, max ); @@ -156,7 +157,7 @@ bool ValidateTextFloatRange( const char* pData, float min, float max, char* erro return FALSE; } -bool ValidateTextIntRange( const char* pData, int min, int max, char* error_title, int* value ){ +bool ValidateTextIntRange( const char* pData, int min, int max, const char* error_title, int* value ){ char error_buffer[256]; sprintf( error_buffer, "Please Enter An Integer Between %i and %i", min, max ); @@ -178,7 +179,7 @@ bool ValidateTextIntRange( const char* pData, int min, int max, char* error_titl return FALSE; } -bool ValidateTextInt( const char* pData, char* error_title, int* value ){ +bool ValidateTextInt( const char* pData, const char* error_title, int* value ){ if ( pData ) { int testNum = atoi( pData ); @@ -597,7 +598,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ EMessageBoxReturn ret; int loop = 1; - char *text = "Please set a value in the boxes below and press 'OK' to build the stairs"; + const gchar *text = "Please set a value in the boxes below and press 'OK' to build the stairs"; window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); @@ -1909,7 +1910,7 @@ EMessageBoxReturn DoMakeChainBox( MakeChainRS* rs ){ EMessageBoxReturn ret; int loop = 1; - char *text = "Please set a value in the boxes below and press 'OK' to make a chain"; + const gchar *text = "Please set a value in the boxes below and press 'OK' to make a chain"; window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); @@ -2012,4 +2013,4 @@ EMessageBoxReturn DoMakeChainBox( MakeChainRS* rs ){ gtk_widget_destroy( window ); return ret; -} \ No newline at end of file +}