Support for previews in the journal.

This commit is contained in:
Tomeu Vizoso
2007-06-15 18:03:17 +02:00
parent 6c0885b490
commit f0e18ba785
4 changed files with 39 additions and 5 deletions
+3 -3
View File
@@ -214,13 +214,13 @@ class Shell(gobject.GObject):
file_path = os.path.join(tempfile.gettempdir(), '%i' % time.time())
window = gtk.gdk.get_default_root_window()
width, height = window.get_size();
x_orig, y_orig = window.get_origin();
width, height = window.get_size()
x_orig, y_orig = window.get_origin()
screenshot = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, has_alpha=False,
bits_per_sample=8, width=width, height=height)
screenshot.get_from_drawable(window, window.get_colormap(), x_orig, y_orig, 0, 0,
width, height);
width, height)
screenshot.save(file_path, "png")
jobject = datastore.create()