]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/build.cpp
contrib: update urls and names
[xonotic/netradiant.git] / radiant / build.cpp
index 9000f3b1300aa8f5775c8ab07a008bbb6f1f6e5e..5a539a6cab976694390ee8612904e6439523b9dc 100644 (file)
@@ -76,17 +76,16 @@ void setString( const char* string ){
        m_string = string;
 }
 void evaluate( StringBuffer& output ){
-       #if !(GDEF_OS_WINDOWS)
-       // strip .[ExecutableType] entirely (including preceding dot) on Mac and Linux
+       // replace ".[ExecutableType]" with "[ExecutableExt]"
        {
                StringBuffer output;
                const char *pattern = ".[ExecutableType]";
                for ( const char *i = m_string.c_str(); *i != '\0'; ++i )
                {
-                       if ( strcmp( pattern, i ) == 0 )
+                       if ( strncmp( pattern, i, sizeof( pattern ) ) == 0 )
                        {
-                               output.push_string("");
-                               i += strlen( pattern );
+                               output.push_string("[ExecutableExt]");
+                               i += strlen( pattern ) - 1;
                        }
                        else
                        {
@@ -95,7 +94,6 @@ void evaluate( StringBuffer& output ){
                }
                setString(output.c_str());
        }
-       #endif // !(GDEF_OS_WINDOWS)
 
        StringBuffer variable;
        bool in_variable = false;
@@ -844,6 +842,8 @@ gboolean commands_key_press( ui::TreeView widget, GdkEventKey* event, ui::ListSt
 ui::Window BuildMenuDialog_construct( ModalDialog& modal, ProjectList& projectList ){
        ui::Window window = MainFrame_getWindow().create_dialog_window("Build Menu", G_CALLBACK(dialog_delete_callback ), &modal, -1, 400 );
 
+       gtk_window_set_position( window, GTK_WIN_POS_CENTER_ALWAYS );
+
        {
                auto table1 = create_dialog_table( 2, 2, 4, 4, 4 );
                window.add(table1);