]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/gtkdlgs.cpp
Split radiant target to a separate CMakeLists.txt
[xonotic/netradiant.git] / radiant / gtkdlgs.cpp
index ace48396db0c60365f29b3e9f21bb52dc28585ce..5a887b293c5242b22891ad7b0ad9028f2e19ba66 100644 (file)
@@ -590,7 +590,7 @@ void DoAbout(){
 // =============================================================================
 // TextureLayout dialog
 
-// remembers last used texture scale values
+// Last used texture scale values
 static float last_used_texture_layout_scale_x = 4.0;
 static float last_used_texture_layout_scale_y = 4.0;
 
@@ -687,14 +687,15 @@ EMessageBoxReturn DoTextureLayout( float *fx, float *fy ){
        sprintf( buf, "%f", last_used_texture_layout_scale_y );
        gtk_entry_set_text( y, buf );
 
-       // Set focus
+       // Set focus after intializing the values
        gtk_widget_grab_focus( GTK_WIDGET( x ) );
 
        EMessageBoxReturn ret = modal_dialog_show( window, dialog );
        if ( ret == eIDOK ) {
                *fx = static_cast<float>( atof( gtk_entry_get_text( x ) ) );
                *fy = static_cast<float>( atof( gtk_entry_get_text( y ) ) );
-               
+       
+               // Remember last used values
                last_used_texture_layout_scale_x = *fx;
                last_used_texture_layout_scale_y = *fy;
        }
@@ -922,7 +923,7 @@ EMessageBoxReturn DoLightIntensityDlg( int *intensity ){
 // =============================================================================
 // Add new shader tag dialog
 
-EMessageBoxReturn DoShaderTagDlg( CopiedString* tag, char* title ){
+EMessageBoxReturn DoShaderTagDlg( std::string* tag, const char* title ){
        ModalDialog dialog;
        GtkEntry* textentry;
        ModalDialogButton ok_button( dialog, eIDOK );
@@ -983,7 +984,7 @@ EMessageBoxReturn DoShaderTagDlg( CopiedString* tag, char* title ){
        return ret;
 }
 
-EMessageBoxReturn DoShaderInfoDlg( const char* name, const char* filename, char* title ){
+EMessageBoxReturn DoShaderInfoDlg( const char* name, const char* filename, const char* title ){
        ModalDialog dialog;
        ModalDialogButton ok_button( dialog, eIDOK );
 
@@ -1046,7 +1047,7 @@ bool g_TextEditor_useWin32Editor = true;
 #else
 // custom shader editor
 bool g_TextEditor_useCustomEditor = false;
-CopiedString g_TextEditor_editorCommand( "" );
+std::string g_TextEditor_editorCommand( "" );
 #endif
 
 void DoTextEditor( const char* filename, int cursorpos ){