]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/build.cpp
bump MAX_IMAGES, MAX_MODELS
[xonotic/netradiant.git] / radiant / build.cpp
index c060d08ffdf083ebdb0420ad55db467ad1886ccc..2ff2b83d8c8b6a0d9dafe9660403033f1a924de9 100644 (file)
@@ -76,8 +76,7 @@ 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]";
@@ -85,7 +84,7 @@ void evaluate( StringBuffer& output ){
                {
                        if ( strncmp( pattern, i, sizeof( pattern ) ) == 0 )
                        {
-                               output.push_string("");
+                               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,12 @@ 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 );
 
+       // FIXME: GTK_WIN_POS_CENTER_ON_PARENT must be used instead but does not work
+       // for unknown reason.
+       // It's possible MaingFrame_getWindow() does not return the main window.
+       // It's known the preferences window has same issue when using MaingFrame_getWindow().
+       gtk_window_set_position( window, GTK_WIN_POS_CENTER_ALWAYS );
+
        {
                auto table1 = create_dialog_table( 2, 2, 4, 4, 4 );
                window.add(table1);