1
0
mirror of https://github.com/gryf/pygtktalog.git synced 2026-03-27 14:33:34 +01:00

* Added support for add/remove pictures for any files or directories.

This commit is contained in:
2008-04-09 15:41:11 +00:00
parent a36ca62b73
commit 5ffbf9a15a
8 changed files with 1140 additions and 225 deletions

43
src/views/v_image.py Normal file
View File

@@ -0,0 +1,43 @@
# This Python file uses the following encoding: utf-8
#
# Author: Roman 'gryf' Dobosz gryf@elysium.pl
#
# Copyright (C) 2007 by Roman 'gryf' Dobosz
#
# This file is part of pyGTKtalog.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# -------------------------------------------------------------------------
import os.path
import gtk
import utils.globals
class ImageView(object):
"""simple image viewer. no scaling, no zooming, no rotating.
simply show stupid image"""
def __init__(self, image_filename):
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
image = gtk.Image()
image.set_from_file(image_filename)
window.add(image)
image.show()
window.show()
return
pass # end of class