logo

scripts

A bunch of scripts, some to be moved to their own repository
commit: 314ace19e9e45a0a9f8886e4c52e60d38a46bed0
parent: d3f49573718bcb6ed410e05bfdd6de75250a85d2
Author: lanodan <lanodan.delta@free.fr>
Date:   Mon, 16 Sep 2013 19:21:32 +0200

	modified:   image.py

Diffstat:

Mimage.py13+++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/image.py b/image.py @@ -1,19 +1,18 @@ #!/usr/bin/env python - import gtk +window = gtk.Window() +window.set_default_size(640, 480) +window.set_title("Image Viewer") + class Image: def __init__(self): - window = gtk.Window() - window.set_default_size(640, 480) vbox = gtk.VBox(False, 5) - scrolledwindow = gtk.ScrolledWindow() - self.image = gtk.Image() + self.image = gtk.Image() self.button = gtk.FileChooserButton("Select Image", None) - self.button.connect("file-set", self.load_image) window.add(vbox) @@ -26,6 +25,8 @@ class Image: def load_image(self, widget): self.image.set_from_file(self.button.get_filename()) + window.set_title("Image Viewer - " + self.button.get_filename()) + window.set_icon_from_file(self.button.get_filename()) Image() gtk.main()