Skip to content

Commit

Permalink
disable terminal button when there are no opened tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
milikhin committed Dec 20, 2020
1 parent ec63c20 commit a16464e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ubports-seabass/po/seabass2.mikhael.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: seabass2.mikhael\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-11-22 11:29+0000\n"
"POT-Creation-Date: 2020-12-20 12:30+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: ../qml/About.qml:22 ../qml/components/Header.qml:76
#: ../qml/About.qml:22 ../qml/components/Header.qml:83
msgid "About"
msgstr ""

Expand Down Expand Up @@ -64,7 +64,7 @@ msgstr ""
msgid "not exists"
msgstr ""

#: ../qml/Settings.qml:31 ../qml/components/Header.qml:71
#: ../qml/Settings.qml:31 ../qml/components/Header.qml:78
msgid "Settings"
msgstr ""

Expand Down Expand Up @@ -188,7 +188,7 @@ msgstr ""
msgid "%1 will be deleted"
msgstr ""

#: ../qml/components/Header.qml:65
#: ../qml/components/Header.qml:72
msgid "Keyboard extension"
msgstr ""

Expand Down
1 change: 1 addition & 0 deletions ubports-seabass/qml/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ ApplicationWindow {
buildable: api.filePath && api.filePath.match(/\/clickable\.json$/)
keyboardExtensionEnabled: settings.isKeyboardExtensionVisible && main.visible && tabsModel.count
searchEnabled: main.visible && tabsModel.count
terminalEnabled: main.visible && tabsModel.count
onKeyboardExtensionToggled: settings.isKeyboardExtensionVisible = !settings.isKeyboardExtensionVisible
onSearch: {
editor.forceActiveFocus()
Expand Down
2 changes: 2 additions & 0 deletions ubports-seabass/qml/components/Header.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CustomComponents.ToolBar {
property bool buildEnabled: false
property bool keyboardExtensionEnabled: false
property bool searchEnabled: false
property bool terminalEnabled: false

signal navBarToggled()
signal aboutPageRequested()
Expand Down Expand Up @@ -45,6 +46,7 @@ CustomComponents.ToolBar {
}
CustomComponents.ToolButton {
icon: "terminal-app-symbolic"
enabled: terminalEnabled
onClicked: openTerminalApp()
}
CustomComponents.ToolButton {
Expand Down

0 comments on commit a16464e

Please sign in to comment.