[sip-comm-dev] Question about use of sun.awt.shell.ShellFolder


#1

Hi,
in FileUtils class you use the Sun proprietary API sun.awt.shell.ShellFolder
to get icons for files.
But why not getting this icon from
FileSystemView.getSystemIcon(File) method, is the result different ? (I
cannot tell since I'm on Ubuntu and both are failing on linux)

Matthieu


#2

Hi Matthieu,

According to JavaDoc of FileSystemView::getSystemIcon(File):
"The default implementation gets information from the ShellFolder class. "

So why not, we could replace occurence of ShellFolder by this method, it will remove two warnings when compiling.

And according to ./src/net/java/sip/communicator/util/FileUtils.java line 55 from the javadoc of getIcon: "TODO: Use JNA to implement this under Linux."

So maybe ShellFolder is not supported by Linux (or maybe it is related to desktop environment such as Gnome, KDE, ...).

Have you tried on other OS such as Windows or Mac OS X ?

Regards,

···

--
Seb

Matthieu Casanova a �crit :

Hi,
in FileUtils class you use the Sun proprietary API sun.awt.shell.ShellFolder to get icons for files.
But why not getting this icon from FileSystemView.getSystemIcon(File) method, is the result different ? (I cannot tell since I'm on Ubuntu and both are failing on linux)

Matthieu

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi, I know that it works on Windows (this is the method that is used in
jEdit in the FileSystemBrowser to get system icons), I did not try on Mac
but I could.

Matthieu

···

2010/2/18 Sebastien Vincent <seb@sip-communicator.org>

Hi Matthieu,

According to JavaDoc of FileSystemView::getSystemIcon(File):
"The default implementation gets information from the ShellFolder class. "

So why not, we could replace occurence of ShellFolder by this method, it
will remove two warnings when compiling.

And according to ./src/net/java/sip/communicator/util/FileUtils.java line
55 from the javadoc of getIcon: "TODO: Use JNA to implement this under
Linux."

So maybe ShellFolder is not supported by Linux (or maybe it is related to
desktop environment such as Gnome, KDE, ...).

Have you tried on other OS such as Windows or Mac OS X ?

Regards,
--
Seb

Matthieu Casanova a écrit :

Hi,

in FileUtils class you use the Sun proprietary API
sun.awt.shell.ShellFolder to get icons for files.
But why not getting this icon from FileSystemView.getSystemIcon(File)
method, is the result different ? (I cannot tell since I'm on Ubuntu and
both are failing on linux)

Matthieu

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hi Matthieu,

FileSystemView.getSystemIcon has replaced ShellFolder in revision 6788.

Thanks for the suggestion and for two "long-time" compilation warnings finally fixed.

Regards,

···

--
Seb

Matthieu Casanova a �crit :

Hi, I know that it works on Windows (this is the method that is used in jEdit in the FileSystemBrowser to get system icons), I did not try on Mac but I could.

Matthieu

2010/2/18 Sebastien Vincent <seb@sip-communicator.org <mailto:seb@sip-communicator.org>>

    Hi Matthieu,

    According to JavaDoc of FileSystemView::getSystemIcon(File):
    "The default implementation gets information from the ShellFolder
    class. "

    So why not, we could replace occurence of ShellFolder by this
    method, it will remove two warnings when compiling.

    And according to
    ./src/net/java/sip/communicator/util/FileUtils.java line 55 from
    the javadoc of getIcon: "TODO: Use JNA to implement this under Linux."

    So maybe ShellFolder is not supported by Linux (or maybe it is
    related to desktop environment such as Gnome, KDE, ...).

    Have you tried on other OS such as Windows or Mac OS X ?

    Regards,
    --
    Seb

    Matthieu Casanova a �crit :

        Hi,
        in FileUtils class you use the Sun proprietary API
        sun.awt.shell.ShellFolder to get icons for files.
        But why not getting this icon from
        FileSystemView.getSystemIcon(File) method, is the result
        different ? (I cannot tell since I'm on Ubuntu and both are
        failing on linux)

        Matthieu

    ---------------------------------------------------------------------
    To unsubscribe, e-mail:
    dev-unsubscribe@sip-communicator.dev.java.net
    <mailto:dev-unsubscribe@sip-communicator.dev.java.net>
    For additional commands, e-mail:
    dev-help@sip-communicator.dev.java.net
    <mailto:dev-help@sip-communicator.dev.java.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net