diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-03-16 21:58:44 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-03-16 21:58:44 +0900 |
commit | ab3e99d8ee8ef5b53dcd1e6f90e3cdbbc08322e3 (patch) | |
tree | e622bfddde12ec89c8a84bfefec8dce7140109db /src/qtraylabel.h | |
parent | d9e1d9fa71544a674d213117c0b675a0e874e556 (diff) | |
download | tdedocker-ab3e99d8ee8ef5b53dcd1e6f90e3cdbbc08322e3.tar.gz tdedocker-ab3e99d8ee8ef5b53dcd1e6f90e3cdbbc08322e3.zip |
Conversion to TDE application.
Notable changes:
1) save/restore data are saved in TDE session files.
2) remove -a, -l options. Removed "Launch on startup" option.
3) docked application are restored automatically by the TDE session
manager. After being restored, tdedocker will wait for 5 seconds to let
the various applications be restored, then it will try to grab the
required windows.
4) save/restore of docked applications is now working properly.
5) due to the way TDE manages command line options, at the moment
additional parameters cannot be passed to the application to be
docked. This will be address in a subsequent commit.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/qtraylabel.h')
-rw-r--r-- | src/qtraylabel.h | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/src/qtraylabel.h b/src/qtraylabel.h index 7fb645c..c0a9e72 100644 --- a/src/qtraylabel.h +++ b/src/qtraylabel.h @@ -42,6 +42,7 @@ class TQMouseEvent; class TQDragEnterEvent; class TQPoint; +class TDEConfig; class TQTrayLabel : public TQLabel { @@ -69,8 +70,8 @@ public: bool x11EventFilter(XEvent * event); // Session Management - virtual bool saveState(TQSettings& settings); - virtual bool restoreState(TQSettings& settings); + virtual void saveState(TDEConfig *config); + virtual bool restoreState(TDEConfig *config); public slots: void dock(void); // puts us in the system tray @@ -89,7 +90,7 @@ public slots: protected slots: void scanClients(void); // scans existing client connections - + signals: void clicked(const ButtonState&, const TQPoint&); void docked(TQTrayLabel *); // emitted when we get docked @@ -103,18 +104,18 @@ protected: // reimplement these event handlers in subclass as needed virtual void mouseReleaseEvent(TQMouseEvent *event); virtual void dragEnterEvent(TQDragEnterEvent *event); - + // the events that follow are events of the docked window (NOT TQTrayLabel) virtual void updateIcon(void); // updates the icon virtual void updateTitle(void); // sets the tooltip virtual void balloonText(void); // balloons text virtual void obscureEvent(void) { } virtual void mapEvent(void) { } - virtual void focusLostEvent(void) { } + virtual void focusLostEvent(void) { } virtual void unmapEvent(void) { } virtual void minimizeEvent(void); virtual void destroyEvent(void); - + // needs to return if we can unsubscribe for root virtual bool canUnsubscribeFromRoot(void) { return true; } // needs to return if we can dock a candidate window @@ -136,26 +137,28 @@ private: void initialize(void); void handleTitleChange(void); void handleIconChange(void); +public: const char *me(void) const; +private: // Member variables - long mDesktop; // desktop on which the window is being shown - TQLabel *mBalloon; // tooltip text simulator - TQString mCustomIcon; // CustomIcon of the docked application - Window mDockedWindow; // the window which is being docked - int mBalloonTimeout; + long mDesktop; // desktop on which the window is being shown + TQLabel *mBalloon; // tooltip text simulator + TQString mCustomIcon; // CustomIcon of the docked application + Window mDockedWindow; // the window which is being docked + int mBalloonTimeout; bool mDocked, mWithdrawn, mSkippingTaskbar; bool mDockWhenMinimized; - TQString mTitle, mClass; // Title and hint of mDockedWindow + TQString mTitle, mClass; // Title and hint of mDockedWindow TQPixmap mAppIcon; // The current app icon (may not be same as pixmap()) - XSizeHints mSizeHint; // SizeHint of mDockedWindow + XSizeHints mSizeHint; // SizeHint of mDockedWindow - TQTimer mRealityMonitor; // Helps us sync up with reality - TQStringList mProgName; // The program whose window we are docking + TQTimer mRealityMonitor; // Helps us sync up with reality + TQStringList mProgName; // The program whose window we are docking pid_t mPid; // The PID of program whose window we are docking - Window mSysTray; // System tray window id + Window mSysTray; // System tray window id }; #endif // _QTRAYLABEL_H |