~ubuntu-branches/debian/sid/docky/sid

« back to all changes in this revision

Viewing changes to Docky.Services/Docky.Services/DrawingService.cs

  • Committer: Bazaar Package Importer
  • Author(s): Mirco Bauer
  • Date: 2010-09-05 14:06:40 UTC
  • mfrom: (1.1.6 upstream) (9.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100905140640-im9ljgthb3e1lfi7
Tags: 2.0.6-2
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
223
223
                /// </returns>
224
224
                public string IconFromGIcon (GLib.Icon icon)
225
225
                {
 
226
                        string name = "";
226
227
                        if (icon is ThemedIcon) {
227
228
                                ThemedIcon themeIcon = new ThemedIcon (icon.Handle);
228
 
                                
229
 
                                // if the icon exists in the theme, this will return the relevent ion
 
229
                                // if the icon exists in the theme, this will return the relevent icon
230
230
                                if (themeIcon.Names.Any ())
231
 
                                        return themeIcon.Names.FirstOrDefault (n => IconTheme.Default.HasIcon (n));
 
231
                                        name = themeIcon.Names.FirstOrDefault (n => IconTheme.Default.HasIcon (n));
 
232
                                themeIcon.Dispose ();
 
233
                                
232
234
                        } else if (icon is FileIcon) {
233
235
                                // in some cases, devices provide their own icon.  This will use the device icon.
234
236
                                FileIcon iconFile = new FileIcon (icon.Handle);
235
 
                                
236
 
                                return iconFile.File.Path;
 
237
                                name = iconFile.File.Path;
 
238
                                iconFile.Dispose ();
237
239
                        }
238
 
                        return "";
 
240
                        return name;
239
241
                }
240
242
                
241
243
                /// <summary>