def __toolButtonScreenshotClicked(self, toolButton=None): """takes screenshots and sends it""" from sendScreenshot import getScreenshot try: #TODO: ask about screenshot type #TODO: use plugin wrapper to run in diffrent thread screenshotPath = getScreenshot(True) self.addFiles([screenshotPath,]) except Exception, e: showDialog(self, str(e), "getting screenshot failed")
def __toolButtonScreenshotClicked(self, toolButton=None): """takes screenshots and sends it""" from sendScreenshot import getScreenshot try: #TODO: ask about screenshot type #TODO: use plugin wrapper to run in diffrent thread import pynotify notification = pynotify.Notification(_("Window Screenshot"), _("Click on a window to take a picture of that window.\n -or- \nClick on the desktop to capture desktop."), "go-up") notification.show() screenshotPath = getScreenshot(True) self.addFiles([screenshotPath,]) except Exception, e: showDialog(self, str(e), "getting screenshot failed")