source: libpipi/trunk/ThePimp/AboutWindow.cs @ 2910

Last change on this file since 2910 was 2910, checked in by Sam Hocevar, 15 years ago

ThePimp?: add namespace before resource names.

File size: 1.5 KB
Line 
1//
2//  The Pimp      The Pathetic Image Manipulation Program
3//  Copyright (c) 2004-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    public partial class AboutWindow : Gtk.Window
20    {
21        public AboutWindow() : base(Gtk.WindowType.Toplevel)
22        {
23            this.Build();
24
25            this.AppPaintable = true;
26            Gdk.Pixbuf image = Gdk.Pixbuf.LoadFromResource("ThePimp.images.about.png");
27            Gdk.Pixmap pixmap, pixmap_mask;
28            image.RenderPixmapAndMask(out pixmap, out pixmap_mask, 255);
29            this.GdkWindow.SetBackPixmap(pixmap, false);
30
31            this.SetSizeRequest(image.Width, image.Height);
32            this.Resizable = false;
33
34            // FIXME: I have no idea how to enforce this in Stetic
35            buttonClose.HasFocus = true;
36        }
37
38        protected virtual void OnButtonCloseClicked (object sender, System.EventArgs e)
39        {
40            this.Destroy();
41        }
42
43        protected virtual void OnButtonLinkClicked (object sender, System.EventArgs e)
44        {
45            System.Diagnostics.Process.Start("http://caca.zoy.org/wiki/thepimp");
46        }
47    }
48}
Note: See TracBrowser for help on using the repository browser.