Fix issues with global menu
Smaller version of b5fcad3db0 that doesn't
have string changes.
This commit is contained in:
@@ -15,7 +15,7 @@ import org.kde.neochat.settings
|
|||||||
Labs.MenuBar {
|
Labs.MenuBar {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property NeoChatConnection connection
|
required property NeoChatConnection connection
|
||||||
|
|
||||||
Labs.Menu {
|
Labs.Menu {
|
||||||
title: i18nc("menu", "NeoChat")
|
title: i18nc("menu", "NeoChat")
|
||||||
@@ -40,7 +40,7 @@ Labs.MenuBar {
|
|||||||
Labs.MenuItem {
|
Labs.MenuItem {
|
||||||
text: i18nc("menu", "Find your friends")
|
text: i18nc("menu", "Find your friends")
|
||||||
enabled: pageStack.layers.currentItem.title !== i18n("Find your friends") && AccountRegistry.accountCount > 0
|
enabled: pageStack.layers.currentItem.title !== i18n("Find your friends") && AccountRegistry.accountCount > 0
|
||||||
onTriggered: pushReplaceLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage'), {
|
onTriggered: pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UserSearchPage'), {
|
||||||
connection: root.connection
|
connection: root.connection
|
||||||
}, {
|
}, {
|
||||||
title: i18nc("@title", "Find your friends")
|
title: i18nc("@title", "Find your friends")
|
||||||
@@ -51,8 +51,11 @@ Labs.MenuBar {
|
|||||||
enabled: pageStack.layers.currentItem.title !== i18n("Find your friends") && AccountRegistry.accountCount > 0
|
enabled: pageStack.layers.currentItem.title !== i18n("Find your friends") && AccountRegistry.accountCount > 0
|
||||||
shortcut: StandardKey.New
|
shortcut: StandardKey.New
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
const dialog = createRoomDialog.createObject(root.overlay);
|
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'CreateRoomDialog'), {
|
||||||
dialog.open();
|
connection: root.connection
|
||||||
|
}, {
|
||||||
|
title: i18nc("@title", "Create a Room")
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Labs.MenuItem {
|
Labs.MenuItem {
|
||||||
|
|||||||
@@ -73,9 +73,8 @@ Kirigami.ApplicationWindow {
|
|||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
active: Kirigami.Settings.hasPlatformMenuBar && !Kirigami.Settings.isMobile
|
active: Kirigami.Settings.hasPlatformMenuBar && !Kirigami.Settings.isMobile
|
||||||
sourceComponent: Qt.createComponent("org.kde.neochat", "GlobalMenu")
|
sourceComponent: GlobalMenu {
|
||||||
onActiveChanged: if (active) {
|
connection: root.connection
|
||||||
item.connection = root.connection;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user