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

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Pad.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-02-18 08:40:51 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090218084051-gh8m6ukvokbwj7cf
Tags: 1.9.2+dfsg-1ubuntu1
* Merge from Debian Experimental (LP: #330519), remaining Ubuntu changes:
  + debian/control:
    - Update for Gnome# 2.24
    - Add libmono-cairo1.0-cil to build-deps to fool pkg-config check

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
 
31
31
using System;
 
32
using System.Collections.Generic;
32
33
using System.Drawing;
33
34
using MonoDevelop.Core.Gui;
34
35
using MonoDevelop.Ide.Codons;
40
41
                IPadWindow window;
41
42
                PadCodon content;
42
43
                IWorkbench workbench;
 
44
                string[] categories;
43
45
                
44
46
                internal Pad (IWorkbench workbench, PadCodon content)
45
47
                {
47
49
                        this.content   = content;
48
50
                        this.workbench = workbench;
49
51
                }
 
52
 
 
53
                internal PadCodon InternalContent {
 
54
                        get { return content; }
 
55
                }
50
56
                
51
57
                public object Content {
52
58
                        get { return window.Content; }
64
70
                        get { return window.Id; }
65
71
                }
66
72
                
 
73
                public string[] Categories {
 
74
                        get {
 
75
                                if (categories == null) {
 
76
                                        List<string> list = new List<string> ();
 
77
                                        CategoryNode cat = content.Parent as CategoryNode;
 
78
                                        while (cat != null) {
 
79
                                                list.Insert (0, cat.Name);
 
80
                                                cat = cat.Parent as CategoryNode;
 
81
                                        }
 
82
                                        categories = list.ToArray ();
 
83
                                }
 
84
                                return categories;
 
85
                        }
 
86
                }
 
87
                
67
88
                public void BringToFront ()
68
89
                {
69
90
                        PadWindow.LastActivePadWindow = window;
78
99
                                window.Visible = value;
79
100
                        }
80
101
                }
 
102
 
 
103
                public bool Sticky {
 
104
                        get {
 
105
                                return window.Sticky;
 
106
                        }
 
107
                        set {
 
108
                                window.Sticky = value;
 
109
                        }
 
110
                }
81
111
                
82
112
                internal IPadWindow Window {
83
113
                        get { return window; }
84
114
                }
85
115
                
 
116
                internal IMementoCapable GetMementoCapable ()
 
117
                {
 
118
                        PadWindow pw = (PadWindow) window;
 
119
                        return pw.GetMementoCapable ();
 
120
                }
 
121
                
86
122
                public void Destroy ()
87
123
                {
88
124
                        Visible = false;