[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    BREAKAGE possible
From:       Kurt Granroth <granroth () kde ! org>
Date:       1999-12-23 18:06:52
[Download RAW message or body]

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"))

  --- 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);
   }

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.

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?
-- 
Kurt Granroth            | http://www.pobox.com/~kurt_granroth
KDE Developer/Evangelist | SuSE Labs Open Source Developer
granroth@kde.org         | granroth@suse.com
           KDE -- Putting a Friendly Face on Unix

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic