forked from Silverfish/proton-bridge
Revert "GODT-1427: fix window status tray-icon for i3 wm [skip-ci]"
This reverts commit 3d22d0c9d71af879edc721724f2b197686c076ae.
This commit is contained in:
@ -41,23 +41,9 @@ QMLBackend::QMLBackend()
|
||||
//****************************************************************************************************************************************************
|
||||
void QMLBackend::init()
|
||||
{
|
||||
|
||||
users_ = new UserList(this);
|
||||
|
||||
app().grpc().setLog(&app().log());
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
QProcess process;
|
||||
QString pidof("pidof");
|
||||
QStringList args = QStringList() << "i3";
|
||||
process.start(pidof, args);
|
||||
process.waitForReadyRead();
|
||||
if(!process.readAllStandardOutput().isEmpty()) {
|
||||
useQtDialogFlag_ = true;
|
||||
app().log().info("Bridge is running on i3 Window manager.");
|
||||
}
|
||||
#endif // Q_OS_LiNUX
|
||||
|
||||
this->connectGrpcEvents();
|
||||
|
||||
QString error;
|
||||
|
||||
@ -78,7 +78,6 @@ public: // Qt/QML properties. Note that the NOTIFY-er signal is required even fo
|
||||
Q_PROPERTY(QString currentKeychain READ currentKeychain NOTIFY currentKeychainChanged) // _ string `property:"currentKeychain"`
|
||||
Q_PROPERTY(UserList* users MEMBER users_ NOTIFY usersChanged)
|
||||
Q_PROPERTY(bool dockIconVisible READ dockIconVisible WRITE setDockIconVisible NOTIFY dockIconVisibleChanged) // _ bool `property:dockIconVisible`
|
||||
Q_PROPERTY(bool useQtDialogFlag READ useQtDialogFlag NOTIFY useQtDialogFlagChanged) // _ bool `property:useQtDialogFlag`
|
||||
|
||||
// Qt Property system setters & getters.
|
||||
bool showOnStartup() const { bool v = false; app().grpc().showOnStartup(v); return v; };
|
||||
@ -110,7 +109,6 @@ public: // Qt/QML properties. Note that the NOTIFY-er signal is required even fo
|
||||
QString currentKeychain() const { QString keychain; app().grpc().currentKeychain(keychain); return keychain; }
|
||||
bool dockIconVisible() const { return getDockIconVisibleState(); };
|
||||
void setDockIconVisible(bool visible) { setDockIconVisibleState(visible); emit dockIconVisibleChanged(visible); }
|
||||
bool useQtDialogFlag() const { return useQtDialogFlag_; }
|
||||
|
||||
signals: // Signal used by the Qt property system. Many of them are unused but required to avoir warning from the QML engine.
|
||||
void showSplashScreenChanged(bool value);
|
||||
@ -140,7 +138,6 @@ signals: // Signal used by the Qt property system. Many of them are unused but r
|
||||
void portSMTPChanged(int port);
|
||||
void usersChanged(UserList* users);
|
||||
void dockIconVisibleChanged(bool value);
|
||||
void useQtDialogFlagChanged(bool value);
|
||||
|
||||
public slots: // slot for signals received from QML -> To be forwarded to Bridge via RPC Client calls.
|
||||
void toggleAutostart(bool active); // _ func(makeItActive bool) `slot:"toggleAutostart"`
|
||||
@ -226,7 +223,6 @@ private: // data members
|
||||
QString goos_; ///< The cached version of the GOOS variable.
|
||||
QUrl logsPath_; ///< The logs path. Retrieved from bridge on startup.
|
||||
QUrl licensePath_; ///< The license path. Retrieved from bridge on startup.
|
||||
bool useQtDialogFlag_ { false }; ///< Define if the status window needs to propose QtDialog flag (i3wm case)
|
||||
|
||||
friend class AppController;
|
||||
};
|
||||
|
||||
@ -30,7 +30,7 @@ Window {
|
||||
height: contentLayout.implicitHeight
|
||||
width: contentLayout.implicitWidth
|
||||
|
||||
flags: (Qt.platform.os === "linux" ? Qt.Tool : 0) | Qt.FramelessWindowHint | Qt.NoDropShadowWindowHint | Qt.WindowStaysOnTopHint | Qt.WA_TranslucentBackground | (Backend.useQtDialogFlag ? Qt.Dialog : 0)
|
||||
flags: (Qt.platform.os === "linux" ? Qt.Tool : 0) | Qt.FramelessWindowHint | Qt.NoDropShadowWindowHint | Qt.WindowStaysOnTopHint | Qt.WA_TranslucentBackground
|
||||
color: "transparent"
|
||||
|
||||
property ColorScheme colorScheme: ProtonStyle.currentStyle
|
||||
|
||||
Reference in New Issue
Block a user