Skip to content

Commit 52e1953

Browse files
Screenshot popup alert
This feature adds a screenshot alert to Sugar. On pressing <Alt>+1 key or selecting 'Take a screenshot' option from bottom toolbar generates a popup alert where user can change the default name of that screenshot. The popup can be dismissed by clicking 'X' button or by pressing 'Escape' key.
1 parent 0056589 commit 52e1953

File tree

7 files changed

+458
-5
lines changed

7 files changed

+458
-5
lines changed

extensions/deviceicon/display.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
from jarabe.frame.frameinvoker import FrameWidgetInvoker
3636
from jarabe.model import brightness
37-
from jarabe.model.screenshot import take_screenshot
37+
from jarabe.screenshotpanel.gui import ScreenshotPanel
3838
from jarabe import frame
3939

4040

@@ -230,7 +230,7 @@ def __screenshot_cb(self, palette):
230230
def __take_screenshot_cb(self, frame_):
231231
if frame_.is_visible():
232232
return True
233-
take_screenshot()
233+
panel = ScreenshotPanel()
234234
frame_.show()
235235
return False
236236

extensions/globalkey/screenshot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
# along with this program; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1717

18-
from jarabe.model.screenshot import take_screenshot
18+
from jarabe.screenshotpanel.gui import ScreenshotPanel
1919

2020
BOUND_KEYS = ['<alt>1', 'Print']
2121

2222

2323
def handle_key_press(key):
24-
take_screenshot()
24+
panel = ScreenshotPanel()

src/jarabe/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
SUBDIRS = \
2-
controlpanel \
2+
controlpanel \
33
desktop \
44
frame \
55
journal \
66
model \
7+
screenshotpanel \
78
view \
89
intro \
910
util \
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sugardir = $(pythondir)/jarabe/screenshotpanel
2+
sugar_PYTHON = \
3+
__init__.py \
4+
gui.py \
5+
toolbar.py
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
#
4+
# Copyright (C) 2016 Utkarsh Tiwari
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
#
19+
# Contact information:
20+
# Utkarsh Tiwari [email protected]

0 commit comments

Comments
 (0)