[postr] Fixed drag & drop for images (Pixbuf)
- From: GermÃn Poà CaamaÃo <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [postr] Fixed drag & drop for images (Pixbuf)
- Date: Wed, 3 Oct 2012 23:41:30 +0000 (UTC)
commit 0c72e2f5aef3ebc607a4ce617d49d7957a325eee
Author: GermÃn Poo-CaamaÃo <gpoo gnome org>
Date: Wed Oct 3 16:35:11 2012 -0700
Fixed drag & drop for images (Pixbuf)
Do not set the fields with None. It seems is not accepted
anymore, but the default value is None anyway.
Use long instesd of int for size.
Signed-off-by: GermÃn Poo-CaamaÃo <gpoo gnome org>
src/postr.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/postr.py b/src/postr.py
index 822820e..8ee87b4 100644
--- a/src/postr.py
+++ b/src/postr.py
@@ -879,10 +879,10 @@ class Postr(UniqueApp):
# size of the PNG
size = pixbuf.get_width() * pixbuf.get_height() * pixbuf.get_n_channels()
+ print selection
self.model.set(self.model.append(),
ImageStore.COL_IMAGE, pixbuf,
- ImageStore.COL_SIZE, size,
- ImageStore.COL_URI, None,
+ ImageStore.COL_SIZE, long(size),
ImageStore.COL_PREVIEW, preview,
ImageStore.COL_THUMBNAIL, thumb,
ImageStore.COL_TITLE, "",
@@ -890,7 +890,6 @@ class Postr(UniqueApp):
ImageStore.COL_TAGS, "",
ImageStore.COL_VISIBLE, True)
-
elif targetType == ImageList.DRAG_URI:
for uri in selection.get_uris():
gfile = Gio.File.new_for_uri(uri)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]