mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-07-14 23:12:49 +03:00
Native file dialogs support WIP (SpartanJ/ecode#653).
This commit is contained in:
@@ -1285,6 +1285,16 @@ UIMenu* SettingsMenu::createWindowMenu() {
|
||||
"of the current window unless no project is currently loaded." ) )
|
||||
->setId( "open-project-in-new-window" );
|
||||
|
||||
mWindowMenu
|
||||
->addCheckBox( i18n( "use_native_file_dialogs", "Enable Native File Dialogs" ),
|
||||
mApp->getConfig().ui.nativeFileDialogs )
|
||||
->setTooltipText(
|
||||
i18n( "use_native_file_dialogs_tooltip",
|
||||
"Try to use the OS native file dialogs if they are available." ) )
|
||||
->setId( "native-file-dialogs" );
|
||||
|
||||
mWindowMenu->addSeparator();
|
||||
|
||||
mWindowMenu
|
||||
->addCheckBox( i18n( "welcome_screen_enable", "Enable Welcome Screen" ),
|
||||
mApp->getConfig().ui.welcomeScreen )
|
||||
@@ -1303,6 +1313,7 @@ UIMenu* SettingsMenu::createWindowMenu() {
|
||||
} else if ( "welcome-screen-enable" == item->getId() ) {
|
||||
bool active = item->asType<UIMenuCheckBox>()->isActive();
|
||||
mApp->getConfig().ui.welcomeScreen = active;
|
||||
mApp->saveConfig();
|
||||
} else if ( "open-files-in-new-window-enable" == item->getId() ) {
|
||||
bool active = item->asType<UIMenuCheckBox>()->isActive();
|
||||
mApp->getConfig().ui.openFilesInNewWindow = active;
|
||||
@@ -1311,6 +1322,10 @@ UIMenu* SettingsMenu::createWindowMenu() {
|
||||
bool active = item->asType<UIMenuCheckBox>()->isActive();
|
||||
mApp->getConfig().ui.openProjectInNewWindow = active;
|
||||
mApp->saveConfig();
|
||||
} else if ( "native-file-dialogs" == item->getId() ) {
|
||||
bool active = item->asType<UIMenuCheckBox>()->isActive();
|
||||
mApp->getConfig().ui.nativeFileDialogs = active;
|
||||
mApp->saveConfig();
|
||||
} else {
|
||||
String text = String( event->getNode()->asType<UIMenuItem>()->getId() ).toLower();
|
||||
String::replaceAll( text, " ", "-" );
|
||||
|
||||
Reference in New Issue
Block a user