~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageLinksList.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
namespace MonoDevelop.Ide.WelcomePage
33
33
{
34
 
        public class WelcomePageLinksList : VBox
 
34
        public class WelcomePageLinksList : WelcomePageSection
35
35
        {
36
 
                public WelcomePageLinksList (XElement el)
 
36
                public WelcomePageLinksList (string title = null, Gtk.IconSize iconSize = IconSize.Menu, bool homogeneous = false, params WelcomePageLinkButton[] links): base (title)
37
37
                {
38
 
                        IconSize iconSize = IconSize.Menu;
39
 
                        var iconSizeAtt = el.Attribute ("iconSize");
40
 
                        if (iconSizeAtt != null) {
41
 
                                iconSize = (IconSize) Enum.Parse (typeof (IconSize), (string) iconSizeAtt);
42
 
                        }
43
 
                        
44
 
                        var homogeneousAtt = el.Attribute ("homogeneous");
45
 
                        if (homogeneousAtt != null)
46
 
                                this.Homogeneous = (bool) homogeneousAtt;
47
 
                        
48
 
                        foreach (var child in el.Elements ()) {
49
 
                                if (child.Name != "Link")
50
 
                                        throw new InvalidOperationException ("Unexpected child '" + child.Name + "'");
51
 
                                var button = new WelcomePageLinkButton (child, iconSize);
52
 
                                this.PackStart (button, true, false, 0);
53
 
                        }
 
38
                        Gtk.VBox box = new VBox ();
 
39
                        box.Homogeneous = homogeneous;
 
40
                        
 
41
                        foreach (var button in links)
 
42
                                box.PackStart (button, true, false, 0);
 
43
 
 
44
                        SetContent (box);
54
45
                }
55
46
        }
56
47
}
 
 
b'\\ No newline at end of file'