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

List:       kde-core-devel
Subject:    Re: Automatic addition of device icons to desktop
From:       George Staikos <staikos () kde ! org>
Date:       2001-03-22 7:05:39
[Download RAW message or body]

On Thursday 22 March 2001 01:37, Preston Brown wrote:
> Attached is a patch against KDE 2.1.1 which will attempt (valiantly, but it
> could definitely be improved) to add device icons for removable/user
> controllable devices to the desktop upon startup and whenever /etc/fstab
> changes.  If people like it, I am considering committing to HEAD.
>
> BTW, it was the first bit of KDE programming I have done in awhile.  It
> felt good.

   I was just about to do something similar myself. :)  Although I was 
planning to do it in a different way.  

   Reasons:
     I really like the MacOS style of PCMCIA card support.  When you insert a 
card, it appears as an icon on the desktop.  When you remove the card, the 
icon disappears.  Dragging the icon to the trash makes it disappear and 
ejects the card.  This also applies to memory sticks, jaz carts, etc, just as 
your patch does.

     It also makes it very easy to make dynamic icons.  Icons that are 
constantly updated by an app and have their properties change on the desktop 
immediately.  (via dcop perhaps?)

   
    What you have done here is really cool though.  I like this idea a lot 
and I have been playing around with a similar idea myself (though Ididn't 
really have any code written yet).  In particular, this would make it easy to 
attach little bits of code to do jaz lock/unlocking, setting the readonly 
bit, etc.

    Now I see that you've used an X-KDE-Dynamic-Device tag in a desktop file. 
 I considered this approach but I think it would be better to make a new 
class of desktop icons which only reside in memory.  This would be a single 
solution to all of the different uses for dynamic icons.  App could send dcop 
messages to create icons and have kdesktop send dcop signals back when 
actions occur (such as deleting the icon).  It could also make the icon 
unmovable from the top of the desktop (for consistency) and in the event of a 
crash, you wouldn't have all kinds of stale .desktop files on your Desktop.

   Do you think it makes sense to make such an interface and use that instead 
of writing/removing .desktop files?

-- 

George Staikos

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

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