diff options
author | Sascha Silbe <silbe@activitycentral.com> | 2011-03-12 17:44:09 (GMT) |
---|---|---|
committer | Sascha Silbe <silbe@activitycentral.com> | 2011-03-12 17:44:09 (GMT) |
commit | db56ac4562a9ab10308de0998b56262956f51b64 (patch) | |
tree | e9ea3923a6203538480822593354146c01d1341b /extensions/globalkey/screenshot.py | |
parent | 8cd75e783fec952497eda68ae06e00323a4c179b (diff) | |
parent | ff47b24c5aa032f830c6f3dc3ae32dfed3c72229 (diff) |
Merge commit 'refs/top-bases/t/bug-1755' into t/bug-1755t/bug-1755
* commit 'refs/top-bases/t/bug-1755': (261 commits)
Fix up style issues introduced by commit 3f8a1e1
Don't set default timezone
Restore setting a language with the command line OLPC #10681
battery frame device: replace HAL with UPower
use ConsoleKit instead of HAL for shutdown/reboot
fix recognition of JEBs outside of data store
Adjust the year in the licence visible in the control panel
Handle activities that cycle through windows dlo#10695
Speaker frame device: pop up palette on left-click instead of toggling mute
recognise translations using pgettext
Remove last few pieces of buddy-icon.jpg handling
fix whitespace error introduced by 4b6a534 (revert of 4a3416b)
Commit from Sugar Labs: Translation System by user RafaelOrtiz.: 374 of 374 messages translated (0 fuzzy).
Intro: Fall back to user name if GECOS real name field is empty
Sugar Ad-hoc icons show in search results when connect/disconnect to AP OLPC #10412
Show busy cursor during session shutdown
Show free space for the Journal in the Journal volumes toolbar (SL#2318)
Fix incorrect logging level for warning about missing GSM configuration
simplify extension loading exception error
Revert "Add cpu and memory resource indicator to frame" as agreed on with erikos. Scheduling for inclusion in 0.94 after potential artwork changes based on feedback from the Design Team.
...
Conflicts:
src/jarabe/util/emulator.py
Diffstat (limited to 'extensions/globalkey/screenshot.py')
-rw-r--r-- | extensions/globalkey/screenshot.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/extensions/globalkey/screenshot.py b/extensions/globalkey/screenshot.py index 8b4d4c2..0afe964 100644 --- a/extensions/globalkey/screenshot.py +++ b/extensions/globalkey/screenshot.py @@ -17,7 +17,6 @@ import os import tempfile -import time from gettext import gettext as _ import gtk @@ -31,6 +30,7 @@ from jarabe.model import shell BOUND_KEYS = ['<alt>1', 'Print'] + def handle_key_press(key): tmp_dir = os.path.join(env.get_profile_path(), 'data') fd, file_path = tempfile.mkstemp(dir=tmp_dir) @@ -45,7 +45,7 @@ def handle_key_press(key): height=height) screenshot.get_from_drawable(window, window.get_colormap(), x_orig, y_orig, 0, 0, width, height) - screenshot.save(file_path, "png") + screenshot.save(file_path, 'png') client = gconf.client_get_default() color = client.get_string('/desktop/sugar/user/color') @@ -87,14 +87,15 @@ def handle_key_press(key): jobject.destroy() del jobject + def _get_preview_data(screenshot): preview = screenshot.scale_simple(style.zoom(300), style.zoom(225), gtk.gdk.INTERP_BILINEAR) preview_data = [] + def save_func(buf, data): data.append(buf) preview.save_to_callback(save_func, 'png', user_data=preview_data) return dbus.ByteArray(''.join(preview_data)) - |