I found that the LoadMimeIcon function doesn't play nice with setting my own
Pixbuf's. I'm not sure why. But just setting a default Icon image works.
Maybe someone knows a better way?



public FileTile (Match match) : base (match)
        {
            string title = match.Properties.GetPropertyValue ("dc:title");

            if (String.IsNullOrEmpty (title))
                title = match.Properties.GetPropertyValue ("db:filename");

            Text = title;

            if(match.Properties.GetPropertyValue ("db:mimetype") ==
"image/jpeg")
                {
                    string myurl3 = match.UriAsString;
                    char[] mychar2 = {'f', 'i', 'l', 'e', ':', '/'};
                    string myurl4 = "/" + myurl3.TrimStart(mychar2);
                    Icon = new Gdk.Pixbuf(myurl4);

                }
            else{
                //Icon = LoadMimeIcon
(match.Properties.GetPropertyValue("db:mimetype"), 24);
                Icon = new Gdk.Pixbuf
("/usr/share/icons/gnome/48x48/mimetypes/openofficeorg-20-text.png");
            }
        }
_______________________________________________
Dashboard-hackers mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/dashboard-hackers

Reply via email to