Browse Source

Remove redundant DBus methods

NOTE: This breaks KDE shortcuts
Haris Gušić 3 years ago
parent
commit
73e6762e3d

+ 0 - 50
data/dbus/org.flameshot.Flameshot.xml

@@ -11,38 +11,6 @@
     <method name="requestCapture">
       <arg name="requestData" type="ay" direction="in"/>
     </method>
-    <!--
-        graphicCapture:
-        @path: the path where the screenshot will be saved. When the argument is empty the program will ask for a path graphically.
-        @toClipboard: Whether to copy the screenshot to clipboard or not.
-        @delay: delay time in milliseconds.
-        @id: identificator of the call.
-
-        Open the user interface used to capture the screen. Sends a captureTaken signal with the raw image after closing the GUI
-        due to a capture taken. It could send a captureFailed signal if the screenshot can't be retrieved.
-    -->
-    <method name="graphicCapture">
-      <arg name="path" type="s" direction="in"/>
-      <arg name="toClipboard" type="b" direction="in"/>
-      <arg name="delay" type="i" direction="in"/>
-      <arg name="id" type="u" direction="in"/>
-    </method>
-
-    <!--
-        fullScreen:
-        @path: the path where the screenshot will be saved. When the argument is empty the program will ask for a path graphically.
-        @toClipboard: Whether to copy the screenshot to clipboard or not.
-        @delay: delay time in milliseconds, both return the @id defined in the call of this method.
-        @id: identificator of the call.
-
-        Takes a screenshot of the whole screen and sends a captureTaken signal with the raw image or a captureFailed signal.
-    -->
-    <method name="fullScreen">
-      <arg name="path" type="s" direction="in"/>
-      <arg name="toClipboard" type="b" direction="in"/>
-      <arg name="delay" type="i" direction="in"/>
-      <arg name="id" type="u" direction="in"/>
-    </method>
 
     <!--
         openLauncher:
@@ -53,24 +21,6 @@
       <annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
     </method>
 
-    <!--
-        captureScreen:
-        @number: number of the screen to be captured.
-        @path: the path where the screenshot will be saved. When the argument is empty the program will ask for a path graphically.
-        @toClipboard: Whether to copy the screenshot to clipboard or not.
-        @delay: delay time in milliseconds, both return the @id defined in the call of this method.
-        @id: identificator of the call.
-
-        Takes a screenshot of the whole screen and sends a captureTaken signal with the raw image or a captureFailed signal.
-    -->
-    <method name="captureScreen">
-      <arg name="number" type="i" direction="in"/>
-      <arg name="path" type="s" direction="in"/>
-      <arg name="toClipboard" type="b" direction="in"/>
-      <arg name="delay" type="i" direction="in"/>
-      <arg name="id" type="u" direction="in"/>
-    </method>
-
     <!--
         openConfig:
 

+ 0 - 49
src/core/flameshotdbusadapter.cpp

@@ -35,60 +35,11 @@ void FlameshotDBusAdapter::requestCapture(const QByteArray& requestData)
     Controller::getInstance()->requestCapture(req);
 }
 
-void FlameshotDBusAdapter::graphicCapture(QString path,
-                                          bool toClipboard,
-                                          int delay,
-                                          uint id)
-{
-    CaptureRequest req(CaptureRequest::GRAPHICAL_MODE, delay);
-    if (toClipboard) {
-        req.addTask(CaptureRequest::COPY_TASK);
-    }
-    if (!path.isEmpty()) {
-        req.addSaveTask(path);
-    }
-    req.setStaticID(id);
-    Controller::getInstance()->requestCapture(req);
-}
-
-void FlameshotDBusAdapter::fullScreen(QString path,
-                                      bool toClipboard,
-                                      int delay,
-                                      uint id)
-{
-    CaptureRequest req(CaptureRequest::FULLSCREEN_MODE, delay, path);
-    if (toClipboard) {
-        req.addTask(CaptureRequest::COPY_TASK);
-    }
-    if (!path.isEmpty()) {
-        req.addSaveTask(path);
-    }
-    req.setStaticID(id);
-    Controller::getInstance()->requestCapture(req);
-}
-
 void FlameshotDBusAdapter::openLauncher()
 {
     Controller::getInstance()->openLauncherWindow();
 }
 
-void FlameshotDBusAdapter::captureScreen(int number,
-                                         QString path,
-                                         bool toClipboard,
-                                         int delay,
-                                         uint id)
-{
-    CaptureRequest req(CaptureRequest::SCREEN_MODE, delay, number);
-    if (toClipboard) {
-        req.addTask(CaptureRequest::COPY_TASK);
-    }
-    if (!path.isEmpty()) {
-        req.addSaveTask(path);
-    }
-    req.setStaticID(id);
-    Controller::getInstance()->requestCapture(req);
-}
-
 void FlameshotDBusAdapter::openConfig()
 {
     Controller::getInstance()->openConfigWindow();

+ 0 - 13
src/core/flameshotdbusadapter.h

@@ -22,19 +22,6 @@ signals:
 
 public slots:
     Q_NOREPLY void requestCapture(const QByteArray& requestData);
-    Q_NOREPLY void graphicCapture(QString path,
-                                  bool toClipboard,
-                                  int delay,
-                                  uint id);
-    Q_NOREPLY void fullScreen(QString path,
-                              bool toClipboard,
-                              int delay,
-                              uint id);
-    Q_NOREPLY void captureScreen(int number,
-                                 QString path,
-                                 bool toClipboard,
-                                 int delay,
-                                 uint id);
     Q_NOREPLY void openLauncher();
     Q_NOREPLY void openConfig();
     Q_NOREPLY void trayIconEnabled(bool enabled);