public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, ref string label, ref Gdk.Pixbuf icon, ref Gdk.Pixbuf closedIcon)
        {
            ProjectFile pf = (ProjectFile)dataObject;

            //do not show custom icon for generated source files
            if (pf.DependsOn == null)
            {
                GtkComponentType type = pf.GetComponentType();

                switch (type)
                {
                case GtkComponentType.Dialog:
                    icon = ImageService.GetPixbuf("md-gtkcore-dialog", Gtk.IconSize.Menu);
                    break;

                case GtkComponentType.Widget:
                    icon = ImageService.GetPixbuf("md-gtkcore-widget", Gtk.IconSize.Menu);
                    break;

                case GtkComponentType.ActionGroup:
                    icon = ImageService.GetPixbuf("md-gtkcore-actiongroup", Gtk.IconSize.Menu);
                    break;

                case GtkComponentType.IconFactory:
                    icon  = ImageService.GetPixbuf("md-gtkcore-iconfactory", Gtk.IconSize.Menu);
                    label = "Stock icons";
                    break;
                }
            }
        }
Exemple #2
0
 public static bool IsComponentFile(this ProjectFile pf)
 {
     return(pf.GetComponentType() != GtkComponentType.None);
 }