Kurt Granroth wrote: > > Okay, so that subject got your attention. :-) > > There was some discussion before about changing how we deal with > toolbar icons and I'd like to make the first few baby steps in that > direction. The change would require moving our one 'share/toolbar' > directory to the current 'share/icons/*/*/' paradigm. > > What I want to do NOW is move our current toolbar icons from > 'share/toolbar' to 'share/icons/medium/locolor/toolbar' (based on the > upcoming sizes of 16x16 (Small) 22x22 (Medium) 32x32 (Large)) > > It will then be possible to get a toolbar icon with: > > iconLoader()->loadApplicationIcon("toolbar/filenew"); > > or just use the same old > > BarIcon("filenew"); > > This will require only two very small code changes: > > --- kstddirs.cpp 1999/12/14 10:19:52 1.83 > +++ kstddirs.cpp 1999/12/23 17:47:15 > @@ -507,7 +507,7 @@ > if (!strcmp(type, "config")) > return "share/config/"; > if (!strcmp(type, "toolbar")) > - return "share/toolbar/"; > + return "share/icons/"; > if (!strcmp(type, "apps")) > return "share/applnk/"; > if (!strcmp(type, "sound")) No, if then remove "toolbar" completly. > > --- kiconloader.cpp 1999/11/24 22:22:14 1.86 > +++ kiconloader.cpp 1999/12/23 17:50:10 > @@ -228,8 +228,6 @@ > > QPixmap BarIcon(const QString& pixmap , const KInstance* library ) > { > - return library->iconLoader()->loadIcon(pixmap, false); > + return library->iconLoader()->loadApplicationIcon("toolbar/" + pixmap, > + KIconLoader::Medium); > } Hmm, then we should get rid of loadIcon and rename loadApplicationIcon to it. Otherwise loadIcon would crash. So remove loadIcon, port all uses to the new way and then rename loadApplicationIcon.... > > So now my questions: > > 1) Am I forgetting something? Will this horribly break something that > I'm not aware of? It seems to work for every case I've tested for > so far. There is a lot of code out there using loadIcon, which would then access locate("toolbar", "filenew.png"). I would then favor to remove "toolbar" and the function loadIcon > > 2) Is there a better way to move the icons then removing the current > toolbar CVS module and re-importing it in the the new location? > Coolo? No - the current icons have pratical no history anyway as they were renamed to .png Greetings, Stephan -- It said Windows 95 or better, so in theory Linux should run it GeorgeH on /.