From 78609a86fb01fb80f6f1013ea95dc6f6359dabc5 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 1 Jan 2020 20:04:13 +0200 Subject: [PATCH] Put default value for "show on startup" in config_cache file Also put the checkbutton's string on the translation files --- Main.tscn | 1 - Prefabs/Dialogs/SplashDialog.tscn | 4 ++-- Scripts/Dialogs/SplashDialog.gd | 4 ++-- Scripts/Main.gd | 4 +++- Translations/Translations.pot | 3 +++ Translations/de.po | 3 +++ Translations/el.po | 3 +++ Translations/en.po | 3 +++ Translations/fr.po | 3 +++ Translations/pl.po | 3 +++ Translations/pt_BR.po | 3 +++ Translations/ru.po | 3 +++ Translations/zh_TW.po | 3 +++ 13 files changed, 34 insertions(+), 6 deletions(-) diff --git a/Main.tscn b/Main.tscn index fff9d0051..4beb5f4c9 100644 --- a/Main.tscn +++ b/Main.tscn @@ -1672,7 +1672,6 @@ current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρι [node name="ScaleImage" parent="." instance=ExtResource( 63 )] [node name="PreferencesDialog" parent="." instance=ExtResource( 64 )] -visible = false [node name="OutlineDialog" parent="." instance=ExtResource( 65 )] diff --git a/Prefabs/Dialogs/SplashDialog.tscn b/Prefabs/Dialogs/SplashDialog.tscn index 737c3d33f..0209cb5ba 100644 --- a/Prefabs/Dialogs/SplashDialog.tscn +++ b/Prefabs/Dialogs/SplashDialog.tscn @@ -48,7 +48,7 @@ mouse_default_cursor_shape = 2 text = "Art by Erevoid" flat = true -[node name="CheckBox" type="CheckBox" parent="Contents"] +[node name="ShowOnStartup" type="CheckBox" parent="Contents"] margin_top = 330.0 margin_right = 400.0 margin_bottom = 354.0 @@ -76,4 +76,4 @@ text = "Copyright 2019-2020 Orama Interactive" align = 1 [connection signal="about_to_show" from="." to="." method="_on_SplashDialog_about_to_show"] [connection signal="pressed" from="Contents/ArtCredits" to="." method="_on_ArtCredits_pressed"] -[connection signal="toggled" from="Contents/CheckBox" to="." method="_on_CheckBox_toggled"] +[connection signal="toggled" from="Contents/ShowOnStartup" to="." method="_on_ShowOnStartup_toggled"] diff --git a/Scripts/Dialogs/SplashDialog.gd b/Scripts/Dialogs/SplashDialog.gd index 64871bb9f..e45d1a32a 100644 --- a/Scripts/Dialogs/SplashDialog.gd +++ b/Scripts/Dialogs/SplashDialog.gd @@ -10,8 +10,8 @@ func _on_SplashDialog_about_to_show() -> void: func _on_ArtCredits_pressed() -> void: OS.shell_open("https://www.instagram.com/erevos_art") -func _on_CheckBox_toggled(pressed) -> void: +func _on_ShowOnStartup_toggled(pressed : bool) -> void: if pressed: Global.config_cache.set_value("preferences", "startup", false) else: - Global.config_cache.set_value("preferences", "startup", true) + Global.config_cache.set_value("preferences", "startup", true) \ No newline at end of file diff --git a/Scripts/Main.gd b/Scripts/Main.gd index 264e1cb12..d99c816e9 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -157,9 +157,11 @@ func _ready() -> void: Import.import_brushes("Brushes") $SplashDialog.popup_centered() # Splash screen + if not Global.config_cache.has_section_key("preferences", "startup"): + Global.config_cache.set_value("preferences", "startup", true) if not Global.config_cache.get_value("preferences", "startup"): $SplashDialog.hide() - + OS.set_window_title("(" + tr("untitled") + ") - Pixelorama") func _input(event : InputEvent) -> void: diff --git a/Translations/Translations.pot b/Translations/Translations.pot index 7b0edf1c5..281c5eaae 100644 --- a/Translations/Translations.pot +++ b/Translations/Translations.pot @@ -605,4 +605,7 @@ msgid "Create a new empty palette?" msgstr "" msgid "Edit Palette" +msgstr "" + +msgid "Don't show on the next startup" msgstr "" \ No newline at end of file diff --git a/Translations/de.po b/Translations/de.po index 44bdd1f4e..d7071f39f 100644 --- a/Translations/de.po +++ b/Translations/de.po @@ -688,6 +688,9 @@ msgstr "Erstelle eine neue leere Palette" msgid "Edit Palette" msgstr "Bearbeite Palette" +msgid "Don't show on the next startup" +msgstr "" + #~ msgid "Language:" #~ msgstr "Sprache:" diff --git a/Translations/el.po b/Translations/el.po index 9bc2d0247..cb3dbfb39 100644 --- a/Translations/el.po +++ b/Translations/el.po @@ -670,6 +670,9 @@ msgstr "Δημιουργία νέας κενής παλέττας;" msgid "Edit Palette" msgstr "Επεξεργασία Παλέττας" +msgid "Don't show on the next startup" +msgstr "Να μην εμφανιστεί στην επόμενη εκκίνηση" + #~ msgid "Language:" #~ msgstr "Γλώσσα:" diff --git a/Translations/en.po b/Translations/en.po index ab15c095e..b01119c3d 100644 --- a/Translations/en.po +++ b/Translations/en.po @@ -662,6 +662,9 @@ msgstr "Create a new empty palette?" msgid "Edit Palette" msgstr "Edit Palette" +msgid "Don't show on the next startup" +msgstr "Don't show on the next startup" + #~ msgid "Language:" #~ msgstr "Language:" diff --git a/Translations/fr.po b/Translations/fr.po index 881732845..019546e8b 100644 --- a/Translations/fr.po +++ b/Translations/fr.po @@ -690,6 +690,9 @@ msgstr "" msgid "Edit Palette" msgstr "" +msgid "Don't show on the next startup" +msgstr "" + #~ msgid "Language:" #~ msgstr "Langue :" diff --git a/Translations/pl.po b/Translations/pl.po index 9929d1062..d6d1818c9 100644 --- a/Translations/pl.po +++ b/Translations/pl.po @@ -679,6 +679,9 @@ msgstr "" msgid "Edit Palette" msgstr "" +msgid "Don't show on the next startup" +msgstr "" + #~ msgid "Language:" #~ msgstr "Język:" diff --git a/Translations/pt_BR.po b/Translations/pt_BR.po index cfe3081d2..5a3322c74 100644 --- a/Translations/pt_BR.po +++ b/Translations/pt_BR.po @@ -670,3 +670,6 @@ msgstr "Criar uma nova paleta vazia?" msgid "Edit Palette" msgstr "Editar Paleta" + +msgid "Don't show on the next startup" +msgstr "" diff --git a/Translations/ru.po b/Translations/ru.po index 838ee1393..b1cb5f296 100644 --- a/Translations/ru.po +++ b/Translations/ru.po @@ -678,6 +678,9 @@ msgstr "" msgid "Edit Palette" msgstr "" +msgid "Don't show on the next startup" +msgstr "" + #~ msgid "Language:" #~ msgstr "Язык:" diff --git a/Translations/zh_TW.po b/Translations/zh_TW.po index 713df2785..4f45606dc 100644 --- a/Translations/zh_TW.po +++ b/Translations/zh_TW.po @@ -678,6 +678,9 @@ msgstr "" msgid "Edit Palette" msgstr "" +msgid "Don't show on the next startup" +msgstr "" + #~ msgid "Language:" #~ msgstr "語言:"