[rfc][icedtea-web] fixinf of desktop icon behaviour

Jiri Vanek jvanek at redhat.com
Mon Dec 24 06:06:21 PST 2012


On 12/21/2012 07:55 PM, Jiri Vanek wrote:
> On 12/21/2012 06:04 PM, Xerxes Rånby wrote:
>> 2012-12-21 17:05, Jiri Vanek skrev:
>>> Hi! This is fix for http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=725 - JNLP applications will prompt for creating desktop shortcuts every time they are run
>>>
>>> When I have seen Omairs original patch it was too much complicated, So I want at least to try this one.
>>> It is pretty simple. The disadvantage however is:
>>> + public File getFinalLinuxDesktopIconFile() {
>>> + return new File(System.getProperty("user.home")+"/Desktop/"+getDesktopIconFinalName()+".desktop");
>>> + }
>>>
>>> to be dependent on System.getProperty("user.home")+"/Desktop/" and .desktop suffix.
>>>
>>> However .. can it be enough?
>>>
>>> The second patch is for testing purposes of this case which I would like to push forward as soon as possible.
>>>
>>> J.
>>
>> This will be broken on non-english systems.
>>
>> The name of the Desktop folder gets localized on many distributions.
>> For example the Desktop folder is called Skrivbord on Swedish user systems.
>> The configuration of the user desktop folder location is set in the
>> ~/.config/user-dirs.dirs
>>
>> On my system this file contains:
>> xranby at xranby-ESPRIMO-P7935:~/.config$ cat user-dirs.dirs
>> # This file is written by xdg-user-dirs-update
>> # If you want to change or add directories, just edit the line you're
>> # interested in. All local changes will be retained on the next run
>> # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
>> # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
>> # absolute path. No other format is supported.
>> #
>> XDG_DESKTOP_DIR="$HOME/Skrivbord"
>> XDG_DOWNLOAD_DIR="$HOME/Hämtningar"
>> XDG_TEMPLATES_DIR="$HOME/Mallar"
>> XDG_PUBLICSHARE_DIR="$HOME/Publikt"
>> XDG_DOCUMENTS_DIR="$HOME/Dokument"
>> XDG_MUSIC_DIR="$HOME/Musik"
>> XDG_PICTURES_DIR="$HOME/Bilder"
>> XDG_VIDEOS_DIR="$HOME/Video"
>>
>
> I see.. This is very valid point and I have hoped to hear something like this.
> Do you think it is correct to get this information from ~/.config/user-dirs.dirs ?
> It sound good enough to me to parse it... As it is standartized in freedesktop.org.
>
> Thanx for reply,
>
> J.

So here is improved version which is parsing fro  ~/.config/user-dirs.dirs.

J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixedRecreationOfDesktopIcon-0002.patch
Type: text/x-patch
Size: 7908 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121224/fec43f45/fixedRecreationOfDesktopIcon-0002.patch 


More information about the distro-pkg-dev mailing list