~ubuntu-branches/ubuntu/lucid/last-exit/lucid

« back to all changes in this revision

Viewing changes to src/StockIcons.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-09-24 20:33:43 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060924203343-jenir1e2jklb987x
Tags: 3.0-0ubuntu1
* New upstream release
* debian/patches/01_dllmaps.patch:
  + Add missing dllmaps

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
                        "stock_volume-0",
33
33
                        "stock_volume-min",
34
34
                        "stock_volume-med",
35
 
                        "stock_volume-max"
 
35
                        "stock_volume-max",
 
36
                        "stock_media-next"
36
37
                };
37
38
 
 
39
                private static readonly string [] stock_icons = {
 
40
                        "face-sad",
 
41
                        "face-smile"
 
42
                };
 
43
 
38
44
                // Methods
39
45
                // Methods :: Public
40
46
                // Methods :: Public :: Initalize               
51
57
                                iconset.AddSource (iconsource);
52
58
                                factory.Add (name, iconset);
53
59
                        }
 
60
 
 
61
                        foreach (string name in stock_icons) {
 
62
                                Pixbuf  pixbuf  = new Pixbuf  (null, name + ".png");
 
63
                                IconSet iconset = new IconSet (pixbuf);
 
64
 
 
65
                                // Add menu variant if we have it
 
66
                                Assembly a = Assembly.GetCallingAssembly ();
 
67
 
 
68
                                Stream menu_stream = a.GetManifestResourceStream (name + "-16.png");
 
69
 
 
70
                                if (menu_stream != null) {
 
71
                                        IconSource source = new IconSource ();
 
72
                                        source.Pixbuf = new Pixbuf (menu_stream);
 
73
                                        source.Size = IconSize.Menu;
 
74
                                        source.SizeWildcarded = false;
 
75
 
 
76
                                        iconset.AddSource (source);
 
77
                                }
 
78
 
 
79
                                factory.Add (name, iconset);
 
80
                        }
54
81
                }
55
82
        }
56
83
}