source: libpipi/trunk/ThePimp/src/AboutWindow.cs @ 3145

Last change on this file since 3145 was 3098, checked in by Sam Hocevar, 14 years ago

ThePimp?: use spinbuttons instead of text areas for image dimensions.
ThePimp?: "Esc" now exits the about box.

File size: 1.5 KB
Line 
1//
2//  The Pimp      The Pathetic Image Manipulation Program
3//  Copyright (c) 2008 Sam Hocevar <sam@zoy.org>
4//                All Rights Reserved
5//
6//  $Id$
7//
8//  This library is free software. It comes without any warranty, to
9//  the extent permitted by applicable law. You can redistribute it
10//  and/or modify it under the terms of the Do What The Fuck You Want
11//  To Public License, Version 2, as published by Sam Hocevar. See
12//  http://sam.zoy.org/wtfpl/COPYING for more details.
13//
14
15using System;
16
17namespace ThePimp
18{
19    [Gtk.Binding(Gdk.Key.Escape, "Destroy")]
20    public partial class AboutWindow : Gtk.Window
21    {
22        public AboutWindow() : base(Gtk.WindowType.Toplevel)
23        {
24            this.Build();
25
26            this.AppPaintable = true;
27            Gdk.Pixbuf image = Gdk.Pixbuf.LoadFromResource("ThePimp.images.about.png");
28            Gdk.Pixmap pixmap, pixmap_mask;
29            image.RenderPixmapAndMask(out pixmap, out pixmap_mask, 255);
30            this.GdkWindow.SetBackPixmap(pixmap, false);
31
32            this.SetSizeRequest(image.Width, image.Height);
33            this.Resizable = false;
34
35            // FIXME: I have no idea how to enforce this in Stetic
36            buttonClose.HasFocus = true;
37        }
38
39        protected virtual void OnButtonCloseClicked (object sender, System.EventArgs e)
40        {
41            this.Destroy();
42        }
43
44        protected virtual void OnButtonLinkClicked (object sender, System.EventArgs e)
45        {
46            System.Diagnostics.Process.Start("http://caca.zoy.org/wiki/thepimp");
47        }
48    }
49}
Note: See TracBrowser for help on using the repository browser.