~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/addins/CSharpBinding/gtk-gui/generated.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
        {
7
7
                private static bool initialized;
8
8
 
9
 
                static internal void Initialize (Gtk.Widget iconRenderer)
 
9
                internal static void Initialize (Gtk.Widget iconRenderer)
10
10
                {
11
11
                        if ((Stetic.Gui.initialized == false)) {
12
12
                                Stetic.Gui.initialized = true;
17
17
        internal class BinContainer
18
18
        {
19
19
                private Gtk.Widget child;
20
 
 
21
20
                private Gtk.UIManager uimanager;
22
21
 
23
22
                public static BinContainer Attach (Gtk.Bin bin)
67
66
                }
68
67
        }
69
68
 
 
69
        internal class IconLoader
 
70
        {
 
71
                public static Gdk.Pixbuf LoadIcon (Gtk.Widget widget, string name, Gtk.IconSize size)
 
72
                {
 
73
                        Gdk.Pixbuf res = widget.RenderIcon (name, size, null);
 
74
                        if ((res != null)) {
 
75
                                return res;
 
76
                        } else {
 
77
                                int sz;
 
78
                                int sy;
 
79
                                global::Gtk.Icon.SizeLookup (size, out  sz, out  sy);
 
80
                                try {
 
81
                                        return Gtk.IconTheme.Default.LoadIcon (name, sz, 0);
 
82
                                } catch (System.Exception) {
 
83
                                        if ((name != "gtk-missing-image")) {
 
84
                                                return Stetic.IconLoader.LoadIcon (widget, "gtk-missing-image", size);
 
85
                                        } else {
 
86
                                                Gdk.Pixmap pmap = new Gdk.Pixmap (Gdk.Screen.Default.RootWindow, sz, sz);
 
87
                                                Gdk.GC gc = new Gdk.GC (pmap);
 
88
                                                gc.RgbFgColor = new Gdk.Color (255, 255, 255);
 
89
                                                pmap.DrawRectangle (gc, true, 0, 0, sz, sz);
 
90
                                                gc.RgbFgColor = new Gdk.Color (0, 0, 0);
 
91
                                                pmap.DrawRectangle (gc, false, 0, 0, (sz - 1), (sz - 1));
 
92
                                                gc.SetLineAttributes (3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
 
93
                                                gc.RgbFgColor = new Gdk.Color (255, 0, 0);
 
94
                                                pmap.DrawLine (gc, (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)), ((sz - 1) - (sz / 4)));
 
95
                                                pmap.DrawLine (gc, ((sz - 1) - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)));
 
96
                                                return Gdk.Pixbuf.FromDrawable (pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz);
 
97
                                        }
 
98
                                }
 
99
                        }
 
100
                }
 
101
        }
 
102
 
70
103
        internal class ActionGroups
71
104
        {
72
105
                public static Gtk.ActionGroup GetActionGroup (System.Type type)