← Back to team overview

unity-dev team mailing list archive

Re: How to keep launcher when desktop file is temporarily removed?

 

----------------------------------------
> From: marco.trevisan@xxxxxxxxxxxxx
> To: chenxiaolong@xxxxxxxxxxx
> Date: Fri, 8 Feb 2013 15:08:40 +0100
> CC: unity-dev@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Unity-dev] How to keep launcher when desktop file is temporarily removed?
>
> Il giorno gio, 07/02/2013 alle 19.38 -0500, Xiao-Long Chen ha scritto:
> > Hi Unity developers,
> >
> > I'm the current packager for Unity-for-Arch project in Arch Linux.
>
> Cool!
>
> > On Arch, an upgrade operation is like this:
> >
> > * Remove old /usr/share/applications/firefox.desktop
> > * Install new /usr/share/applications/firefox.desktop
> >
> > This explains why the launchers were disappearing. How can I patch Unity
> > to deal
> > with this situation?
> >
> > I wrote a (quite ugly) patch: http://paste.ubuntu.com/1622682/
> >
> > The patch will wait for the package manager to exit before doing
> > anything, but
> > that hangs the launcher until the upgrade process is finished. Does the
> > wait_for_pacman() call belong someone else? Or should I approach this
> > differently?
> >
>
> Well, I wonder that just adding a simple timeout before unsticking the
> icon would fix this issue for you...
>
> Basically just doing http://pastebin.ubuntu.com/1622934/ should be
> enough. I also think that this change fits upstream too, so feel free to
> merge-propose it on launchpad. ;)
>

Thanks a lot for the patch! It works great! The new desktop file is usually 
installed within the timeout period, so no more disappearing launchers :)

I've created a bug report for this and proposed a merge: https://bugs.launchpad.net/unity/+bug/1119801

Cheers,
Xiao-Long Chen

(Sorry about the second email. I forgot to CC the mailing list in the first one :P) 		 	   		  

References