* open/save dialogs: use current file path, name, focus it, if present

brushexport plugin: case insensitive extension check
This commit is contained in:
Garux
2020-03-01 19:38:27 +03:00
parent 04bf329bf2
commit 4b2f9d6080
10 changed files with 67 additions and 30 deletions

View File

@@ -1982,15 +1982,18 @@ const char* getMapsPath(){
}
const char* map_open( const char* title ){
return file_dialog( GTK_WIDGET( MainFrame_getWindow() ), TRUE, title, getMapsPath(), MapFormat::Name(), true, false, false );
const char* path = Map_Unnamed( g_map )? getMapsPath() : g_map.m_name.c_str();
return file_dialog( GTK_WIDGET( MainFrame_getWindow() ), true, title, path, MapFormat::Name(), true, false, false );
}
const char* map_import( const char* title ){
return file_dialog( GTK_WIDGET( MainFrame_getWindow() ), TRUE, title, getMapsPath(), MapFormat::Name(), false, true, false );
const char* path = Map_Unnamed( g_map )? getMapsPath() : g_map.m_name.c_str();
return file_dialog( GTK_WIDGET( MainFrame_getWindow() ), true, title, path, MapFormat::Name(), false, true, false );
}
const char* map_save( const char* title ){
return file_dialog( GTK_WIDGET( MainFrame_getWindow() ), FALSE, title, getMapsPath(), MapFormat::Name(), false, false, true );
const char* path = Map_Unnamed( g_map )? getMapsPath() : g_map.m_name.c_str();
return file_dialog( GTK_WIDGET( MainFrame_getWindow() ), false, title, path, MapFormat::Name(), false, false, true );
}
void OpenMap(){