Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

choosing which screen is used for taking a fullscreen ss (in the adva…

…nced menu) is now working
  • Loading branch information...
commit 99b471ae8d0e30a4833039ff997ce53ff3419c95 1 parent 8ca4b9c
Mikhail Slyusarev mikhailvs authored
3  code/OpenPuush/OpenPuush.pro
View
@@ -30,3 +30,6 @@ LIBS += -lphonon
FORMS += \
configwindow.ui \
tray_menu.ui
+
+RESOURCES += \
+ resources.qrc
2  code/OpenPuush/OpenPuush.pro.user
View
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.5.2, 2012-08-20T20:52:02. -->
+<!-- Written by Qt Creator 2.5.2, 2012-08-21T21:40:02. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
4 code/OpenPuush/configwindow.ui
View
@@ -665,14 +665,14 @@
<item>
<widget class="QRadioButton" name="capture_primary_screen">
<property name="text">
- <string>Capture screen containing mouse cursor</string>
+ <string>Always capture primary screen</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="capture_screen_with_cursor">
<property name="text">
- <string>Always capture primary screen</string>
+ <string>Capture screen containing mouse cursor</string>
</property>
</widget>
</item>
29 code/OpenPuush/openpuush.cpp
View
@@ -54,7 +54,7 @@ static const QString NOT_AUTHORIZED_MESSAGE = "Your action could not be complete
openpuush::openpuush(QObject *parent) :
QObject(parent),
- base_path(QDir::currentPath()),
+ base_path(":"),
dropbox_authenticated(false),
shortcuts_enabled(true),
follow_tray_icon_link(false)
@@ -327,7 +327,32 @@ void openpuush::fullscreen_ss()
{
if (dropbox_authenticated)
{
- QRect f = ss_overlay->geometry();
+ QRect f;
+ QDesktopWidget dw;
+ if (config::load(config::CAPTURE_ALL_SCREENS).toBool())
+ {
+ f = ss_overlay->geometry();
+ }
+ else if (config::load(config::CAPTURE_SCREEN_WITH_CURSOR).toBool())
+ {
+ QPoint p = QCursor::pos();
+
+ for (int i = 0; i < dw.screenCount(); ++i)
+ {
+ f = dw.screenGeometry(i);
+ qDebug() << f;
+
+ if (p.x() >= f.left())
+ {
+ break;
+ }
+ }
+ }
+ else if (config::load(config::CAPTURE_PRIMARY_SCREEN).toBool())
+ {
+ f = dw.screenGeometry(dw.primaryScreen());
+ }
+
got_screenshot(QPixmap::grabWindow(QApplication::desktop()->winId(),
f.left(), f.top(), f.width(), f.height()));
}
2  code/OpenPuush/openpuush.hpp
View
@@ -35,6 +35,8 @@ class configwindow;
class screenshot_overlay;
class tray_menu;
+class QUrl;
+
class openpuush : public QObject
{
Q_OBJECT
17 code/OpenPuush/resources.qrc
View
@@ -0,0 +1,17 @@
+<RCC>
+ <qresource prefix="/">
+ <file>icons/0.png</file>
+ <file>icons/1.png</file>
+ <file>icons/2.png</file>
+ <file>icons/3.png</file>
+ <file>icons/4.png</file>
+ <file>icons/5.png</file>
+ <file>icons/6.png</file>
+ <file>icons/7.png</file>
+ <file>icons/8.png</file>
+ <file>icons/9.png</file>
+ <file>icons/10.png</file>
+ <file>icons/error.png</file>
+ <file>icons/success.png</file>
+ </qresource>
+</RCC>
BIN  graphics/small_icons/0.png
View
Deleted file not rendered
BIN  graphics/small_icons/1.png
View
Deleted file not rendered
BIN  graphics/small_icons/10.png
View
Deleted file not rendered
BIN  graphics/small_icons/2.png
View
Deleted file not rendered
BIN  graphics/small_icons/3.png
View
Deleted file not rendered
BIN  graphics/small_icons/4.png
View
Deleted file not rendered
BIN  graphics/small_icons/5.png
View
Deleted file not rendered
BIN  graphics/small_icons/6.png
View
Deleted file not rendered
BIN  graphics/small_icons/7.png
View
Deleted file not rendered
BIN  graphics/small_icons/8.png
View
Deleted file not rendered
BIN  graphics/small_icons/9.png
View
Deleted file not rendered
BIN  graphics/small_icons/error.png
View
Deleted file not rendered
BIN  graphics/small_icons/success.png
View
Deleted file not rendered
Please sign in to comment.
Something went wrong with that request. Please try again.