Changeset View
Changeset View
Standalone View
Standalone View
src/SpectacleCore.h
Context not available. | |||||
49 | void setFilename(const QString &filename); | 49 | void setFilename(const QString &filename); | ||
---|---|---|---|---|---|
50 | ImageGrabber::GrabMode grabMode() const; | 50 | ImageGrabber::GrabMode grabMode() const; | ||
51 | void setGrabMode(const ImageGrabber::GrabMode &grabMode); | 51 | void setGrabMode(const ImageGrabber::GrabMode &grabMode); | ||
52 | void takeNewScreenshotDBus(const ImageGrabber::GrabMode &mode, const bool &includePointer, const bool &includeDecorations, const bool &shouldSave); | ||||
rkflx: Is there any reason you need to introduce a new method here? AFAIK Spectacle could be called… | |||||
I can merge SpectacleCore::takeNewScreenshotDBus() back into SpectacleCore::takeNewScreenshot() but i think that it will only make a small difference in SpectacleCore::takeNewScreenshot(), which is: if(mStartMode != DBusMode) { ... } else { ... } kapillamba4: I can merge SpectacleCore::takeNewScreenshotDBus() back into SpectacleCore::takeNewScreenshot()… | |||||
Also we would have to add another parameter shouldSave to SpectacleCore::takeNewScreenshot() and make appropriate changes everywhere for SpectacleCore::takeNewScreenshot() kapillamba4: Also we would have to add another parameter shouldSave to SpectacleCore::takeNewScreenshot()… | |||||
That's preferable to simply copying the code around. Also, default parameters can help. Perhaps it would look similar to what I proposed in D9117#inline-50329. rkflx: That's preferable to simply copying the code around. Also, default parameters can help. Perhaps… | |||||
53 | | ||||
52 | 54 | | |||
53 | signals: | 55 | signals: | ||
54 | 56 | | |||
Context not available. | |||||
57 | void filenameChanged(QString filename); | 59 | void filenameChanged(QString filename); | ||
58 | void grabModeChanged(ImageGrabber::GrabMode mode); | 60 | void grabModeChanged(ImageGrabber::GrabMode mode); | ||
59 | void grabFailed(); | 61 | void grabFailed(); | ||
62 | void saveAndNotify(); | ||||
60 | 63 | | |||
61 | public slots: | 64 | public slots: | ||
62 | 65 | | |||
Context not available. | |||||
68 | void doStartDragAndDrop(); | 71 | void doStartDragAndDrop(); | ||
69 | void doNotify(const QUrl &savedAt); | 72 | void doNotify(const QUrl &savedAt); | ||
70 | void doCopyPath(const QUrl &savedAt); | 73 | void doCopyPath(const QUrl &savedAt); | ||
74 | void screenshotSaved(); | ||||
71 | 75 | | |||
72 | private: | 76 | private: | ||
73 | 77 | | |||
Context not available. |
Is there any reason you need to introduce a new method here? AFAIK Spectacle could be called from DBus before and you only a some new variants to this.
In general I feel because of this change you have to move a lot of things around, potentially introducing many bugs (did not look into this too much yet, though, so take this comment with a grain of salt).