> AFAIK kdialog is often distributed with KDE, which isn't the case
> for zenity/Gnome.

Of the gnome-using boxes I have ready access to, the Ubuntu 12.10 and F17 
versions do appear to have zenity, but some others do not (though these are for 
particular uses and may be atypical!)


But there's still the issue of coming to depend on it, if we can not be sure it 
is "always" available... But in any case, as long as we can fall back to the 
fltk built-in chooser, then the user will always get something, so maybe that 
does not matter?


> > In any case: We still need to address the issue of "guessing" what
> > desktop the user is running and then choosing either zenity or
> > kdialog accordingly...
> 
> There is a env variable XDG_CURRENT_DESKTOP and should indicate the
> name of running desktop; however, the variable was added silently
> (which is unfortunate) by Canonical, RedHat, who knows, and there is no
> definitive spec about it on freedesktop.org.
> 
> You can check how it is used (with a couple of hacks for other
> desktops) at
> http://cgit.freedesktop.org/xdg/xdg-utils/tree/scripts/xdg-utils-
> common.in
> (search for 'detectDE').

That might do, though I'd worry about ending having to maintain a list of 
different distros and so on; I guess what I had envisaged was a "magic" env var 
that said "I am gtk-based" or "I am KDE/QT based".

For example, "gnome" and "mate" are shown as being different values, but AFAICT 
from our perspective they are The Same Thing... (Also XFCE, it's GTK based too, 
is it not?) And so on...


> Also to not forget 'xdg-file-dialog' intended to be portable among
> desktops and if another desktop adds a tool like kdialog, it will
> probably end up there.

Yes, that might be a better option, insofar as, if the distro implements it, 
then *should* sort out the choice of host file-chooser for us.

But of course it triggers all of Mike's concerns about execing external 
processes and so on, since it is a shell script wrapper for zenity and 
kdialog...

It's tricky...




********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to