~ubuntu-branches/ubuntu/feisty/monodevelop/feisty

« back to all changes in this revision

Viewing changes to Core/src/MonoDevelop.Core.Gui/MonoDevelop.Core.Gui.Dialogs/ResourceService.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-08-18 00:51:23 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060818005123-5iit07y0j7wjg55f
Tags: 0.11+svn20060818-0ubuntu1
* New SVN snapshot
  + Works with Gtk# 2.9.0
* debian/control:
  + Updated Build-Depends
* debian/patches/use_nunit2.2.dpatch,
  debian/patches/use_real_libs.dpatch:
  + Updated
* debian/patches/versioncontrol_buildfix.dpatch:
  + Fix build failure in the version control addin

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
                        stockMappings = new Hashtable ();
62
62
                        iconFactory.AddDefault ();
63
63
 
64
 
                        StockIconCodon[] icons = (StockIconCodon[]) Runtime.AddInService.GetTreeItems ("/SharpDevelop/Workbench/StockIcons", typeof(StockIconCodon));
65
 
                        foreach (StockIconCodon icon in icons) {
 
64
                        Runtime.AddInService.RegisterExtensionItemListener ("/SharpDevelop/Workbench/StockIcons", OnExtensionChange);
 
65
                }
 
66
                
 
67
                void OnExtensionChange (ExtensionAction action, object item)
 
68
                {
 
69
                        if (action == ExtensionAction.Add) {
 
70
                                StockIconCodon icon = (StockIconCodon) item;
66
71
                                foreach (Assembly a in icon.AddIn.RuntimeLibraries.Values) {
67
72
                                        try {
68
73
                                                System.IO.Stream s = a.GetManifestResourceStream (icon.Resource);
276
281
                        Gtk.IconSource source = new Gtk.IconSource ();
277
282
                        source.Pixbuf = pixbuf;
278
283
                        source.Size = iconSize;
 
284
                        if (iconSize == Gtk.IconSize.Invalid)
 
285
                                source.SizeWildcarded = true;
 
286
                        else
 
287
                                source.SizeWildcarded = false;
279
288
                        iconSet.AddSource (source);
280
289
                }
281
290