Compare commits
1 Commits
work/runne
...
work/ratij
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d08e989695 |
@@ -80,4 +80,3 @@ X-Plasma-DBusRunner-Service=org.kde.neochat
|
|||||||
X-Plasma-DBusRunner-Path=/RoomRunner
|
X-Plasma-DBusRunner-Path=/RoomRunner
|
||||||
X-Plasma-Request-Actions-Once=true
|
X-Plasma-Request-Actions-Once=true
|
||||||
X-Plasma-Runner-Min-Letter-Count=3
|
X-Plasma-Runner-Min-Letter-Count=3
|
||||||
X-Plasma-Runner-Has-Activation=true
|
|
||||||
|
|||||||
@@ -134,23 +134,25 @@ QQC2.ScrollView {
|
|||||||
implicitWidth: Kirigami.Units.gridUnit * 2
|
implicitWidth: Kirigami.Units.gridUnit * 2
|
||||||
implicitHeight: Kirigami.Units.gridUnit * 2
|
implicitHeight: Kirigami.Units.gridUnit * 2
|
||||||
|
|
||||||
|
display: QQC2.AbstractButton.IconOnly
|
||||||
|
focusPolicy: Qt.NoFocus
|
||||||
|
|
||||||
z: 2
|
z: 2
|
||||||
visible: root.currentRoom && root.currentRoom.hasUnreadMessages && root.currentRoom.readMarkerLoaded
|
visible: root.currentRoom && root.currentRoom.hasUnreadMessages && root.currentRoom.readMarkerLoaded
|
||||||
action: Kirigami.Action {
|
action: Kirigami.Action {
|
||||||
|
icon.name: "go-up"
|
||||||
|
shortcut: "Shift+PgUp"
|
||||||
|
text: i18n("Jump to first unread message")
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (!Kirigami.Settings.isMobile) {
|
if (!Kirigami.Settings.isMobile) {
|
||||||
root.focusChatBox();
|
root.focusChatBox();
|
||||||
}
|
}
|
||||||
messageListView.goToEvent(root.currentRoom.readMarkerEventId)
|
messageListView.goToEvent(root.currentRoom.readMarkerEventId)
|
||||||
}
|
}
|
||||||
icon.name: "go-up"
|
|
||||||
shortcut: "Shift+PgUp"
|
|
||||||
}
|
|
||||||
|
|
||||||
QQC2.ToolTip {
|
|
||||||
text: i18n("Jump to first unread message")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QQC2.RoundButton {
|
QQC2.RoundButton {
|
||||||
id: goMarkAsReadFab
|
id: goMarkAsReadFab
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
@@ -160,18 +162,19 @@ QQC2.ScrollView {
|
|||||||
implicitWidth: Kirigami.Units.gridUnit * 2
|
implicitWidth: Kirigami.Units.gridUnit * 2
|
||||||
implicitHeight: Kirigami.Units.gridUnit * 2
|
implicitHeight: Kirigami.Units.gridUnit * 2
|
||||||
|
|
||||||
|
display: QQC2.AbstractButton.IconOnly
|
||||||
|
focusPolicy: Qt.NoFocus
|
||||||
|
|
||||||
z: 2
|
z: 2
|
||||||
visible: !messageListView.atYEnd
|
visible: !messageListView.atYEnd
|
||||||
action: Kirigami.Action {
|
action: Kirigami.Action {
|
||||||
|
icon.name: "go-down"
|
||||||
|
text: i18n("Jump to latest message")
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
messageListView.goToLastMessage();
|
messageListView.goToLastMessage();
|
||||||
root.currentRoom.markAllMessagesAsRead();
|
root.currentRoom.markAllMessagesAsRead();
|
||||||
}
|
}
|
||||||
icon.name: "go-down"
|
|
||||||
}
|
|
||||||
|
|
||||||
QQC2.ToolTip {
|
|
||||||
text: i18n("Jump to latest message")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
#include <QDBusMetaType>
|
#include <QDBusMetaType>
|
||||||
|
|
||||||
#include <KWindowSystem>
|
|
||||||
|
|
||||||
#include "controller.h"
|
#include "controller.h"
|
||||||
#include "neochatroom.h"
|
#include "neochatroom.h"
|
||||||
#include "roommanager.h"
|
#include "roommanager.h"
|
||||||
@@ -82,12 +80,10 @@ RemoteMatches Runner::Match(const QString &searchTerm)
|
|||||||
return matches;
|
return matches;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Runner::Run(const QString &id, const QString &actionId, const QString &activationToken)
|
void Runner::Run(const QString &id, const QString &actionId)
|
||||||
{
|
{
|
||||||
Q_UNUSED(actionId);
|
Q_UNUSED(actionId);
|
||||||
|
|
||||||
KWindowSystem::setCurrentXdgActivationToken(activationToken);
|
|
||||||
|
|
||||||
NeoChatRoom *room = qobject_cast<NeoChatRoom *>(Controller::instance().activeConnection()->room(id));
|
NeoChatRoom *room = qobject_cast<NeoChatRoom *>(Controller::instance().activeConnection()->room(id));
|
||||||
|
|
||||||
if (!room) {
|
if (!room) {
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @brief Handle action calls.
|
* @brief Handle action calls.
|
||||||
*/
|
*/
|
||||||
Q_SCRIPTABLE void Run(const QString &id, const QString &actionId, const QString &activationToken = QString());
|
Q_SCRIPTABLE void Run(const QString &id, const QString &actionId);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RemoteImage serializeImage(const QImage &image);
|
RemoteImage serializeImage(const QImage &image);
|
||||||
|
|||||||
Reference in New Issue
Block a user