Minimal Widget

I see that there is still a lively debate concerning our choice of user interface (UI) toolkit for Flash Player 9. To review, we selected GTK, mostly because the Player 7 codebase we started with already implemented a bunch of stuff with GTK.

Everyone has their own favorite toolkit. I just wanted to write this post to advise people not to get too hung up on this UI issue because Flash keeps its interaction with system UI toolkits to an absolute minimum. In fact, I am authorized to post a screenshot showcasing one of the major uses the Player has for a UI toolkit (click for full context, including Firefox browser window which depicts a small SWF from our vast internal testing suite that isolates Flash’s file upload muscle):

file upload dialog box

EXCLUSIVE!!! First screenshot of Linux Flash Player 9!!!

There is a file upload dialog, a file download dialog, and a few advisory dialogs. That’s basically it. Otherwise, Flash is famous (infamous in some circles) for being the engine upon which UIs are built.

Here is a hypothetical: what if the Flash Player were to detect during runtime whether it should use GTK or KDE/QT facilities? The biggest issue here would be reliably and automatically detecting which kit to use. Is there one standard method to query what desktop environment is running and which the user would prefer? Based on the Global Domination thread, I tend to doubt it.

107 Responses to Minimal Widget

  1. visik7 says:

    kdeinit is always present if there is kde running and the same for gnome-session for gnome.

  2. Paul says:

    Woot! This is so exciting! I can’t wait for the betas.To answer your question, couldn’t you just let the user choose between GTK and KDE during install, or primary launch? It would be much easier to just save a settings file in ~/.flash/ or something. That way there would be no autodetection necessary.

  3. Martin says:

    Well I don’t even see why it would be an issue. GTK can be used by all, and it has proven to work very well. In a perfect world all applications would look the same (use the user’s preferred toolkit). But let’s be realistic, you sometimes have to let the developper use what is best for him as well. Let the developper and user meet half way. As I see it, with the work Adobe is putting in for Linux’ Flash 9 Player, it will be way more polished than I was expecting. Thanks a whole bunch for your work, and thank you for that exclusif screenshot!

  4. Dustin says:

    What would be wrong with just using simple X UI? It would be ugly, but does it really matter? If you do need to use Widgets, I agree with Paul, have the user choose, not the software. GTK is my UI of choice, but I do not use GNOME, so you may run into issues with other users like that. Anyway, great work, I am eagerly awaiting a release, and hoping for an amd64 port too!

  5. kalahari875 says:

    Whatever you do, please, please release packages for the major Linux distributions’ package management systems. This would be a nice package for Canonical’s “commercial” repository.

  6. Sam Morris says:

    There is no good way to do this. :)Grovelling around to determine whether gnome-session or kdeinit is running is unreliable, is annoyingly OS-specific, doesn’t take into account the possiblity of two sessions (one GNOME and the other KDE) running on the same machine and is not reliable in the long term (gnome-session or kdeinit may be renamed in the future).The least hacky way that occurs to me is to work out whether the web browser that hosts the plugin is using GTK or KDE. You could do this by examining the libraries that the browser has mapped, but this breaks once the libraries change their SONAME, or the method that GNU/Linux uses to loading/linking shared libraries changes, or a web browser is created that uses the forthcoming unified Glib/QT main loop.Is it possible to find out the name of the browser from plug-in code? Even the user-agent string would do. It seems easiest to maintian a list of known browsers and whether to use GTK or KDE in each of them, falling back to GTK if the browser is unknown.Surely loading anything C++-based at run time will be impossible anyway? 🙂

  7. kw123 says:

    oh please use gtk.as I posted in another thread:gtk has great community support, not enslaved to one company, great bugzilla and qa community, fast response to upstream bug fixes, it is on every linux/bsd/nix platform already, gtk 2 has beautiful fonts and gtk 2 will match the toolkit already used in firefox the best browser in the world.the gtk 2 api is smartly and carefully written. if you find you stretch gtk then they have 6monthish release cycles for you to contribute to shaping new apis or whatever.it is lame to try and support gtk and qt… dont’ even try.kde users already use gtk2/firefox.

  8. Rob H. says:

    Thanks for the screen capture, as that’s a good omen for the future.

  9. Cláudio Pinheiro says:

    I’m a KDE user and I use Konqueror’s khtml and I find it to be a very good engine, so good Apple chosen it to its browser.KDE’s not being tied to any company. It simply uses Trolltech’s Qt (GPLed) as widget library. If kw123 tries to be coherent he/she shouldn’t use J2SE or OpenOffice.org (as both are tied to Sun) or to ask Adobe (a proprietary software company) to use a “free” library in a closed-source program (I’m waiting kw123 to show me Flash Player’s source code… waiting… waintng…). That said, kw123’s arguments are moot (if he/she is so concerned about free widget APIs he’she shouldn’t be tempted to use Flash Player because of “higher moral stakes”).Pleople should know there are _choices_. Some people prefer to use GNOME, some use KDE. Some programmers prefer C, some C++. Some programmers prefer Gkt+ (C-based) and some prefer Qt (C++-based).If the purpose of the file dialog is just to get a file descriptor, implementing a wrapper to call a Gtk+ file dialog or a KDE’s KFileDialog based on browser’s agent string should not be too difficult (OpenOffice.org transparently choses to open files in my _Kubuntu_ machine using a KFileDialog standard dialog. If OpenOffice.org can, why whouldn’t Flash Player do the same?).Little trick:1. Open a terminal emulator (konsole or rxvt);2. copy and paste the following:kdialog –getopenfilename ./Nice! A perfectly functional KDE’s KFileDialog window! Whitout dynamicly linking to Qt, KDE or whatever! Without library dependencies! Without the need to staticly link to Qt or KDE! Without license conflicts! Just plain old shell! :DEven better trick:kdialog –getopenurl ~/Wow! It opens the same file dialog, but allows me not only to select a file in my local filesystem, but _any_ file in any supported protocol (http, ftp, sftp, fish, smb, you name it)!!! And tit returns a properly encoded url, like file:///home/taupter/Motocross%20Radical.pngAnd if you want to select _more_than_one_ file, justkdialog –multiple –getopenfilename ~/orkdialog –multiple –getopenurl ~/and you’ll se the same nice KFileDialog window and you’ll be able to select multiple files!I don’t know how to do the same with Gtk+, but to implement it with a nice KDE interface is just plain easy.Steps:1. Check browser’s identification string for KHTML (a grep could do it);2. If (1.==true) Check if kdialog exists (“which kdialog” does this);3. if ((1.==true)&&(2.==true)) use kdialog!Please, if browser’s identification string has a “KHTML” in it, just use this little kdialog trick and _lots_ of KDE users around the world will be pleased and feel respected by Adobe!

  10. Brian Beck says:

    I’m sure it’s probably easier to just go with GTK for the UI…But I swear, everyone I know agrees that GTK has *the* worst file chooser dialog in existence. It seems to have been designed to prevent me from selecting the file I want. It pains me whenever I see it.

  11. slougi says:

    You can show file dialogs using command line tools easily. Gnome has zenity, and KDE has kdialog.To get a file dialog with zenity, simply do: zenity –file-selection. You can set your own window title, icon, etc. as well.Similarly, with kdialog simply do kdialog –getopenfilename $HOME.Both tools support several options to customize the look of the dialogs.Note that the two tools return slightly different url forms. zenity supports only local files, and simply gives a path. kdialog will always give a proper url, with file:// prefix for local files. You can also select files on remote sites using a variety of network protocols such as ftp, sftp, etc. that will then be copied to a temporary local file.However, in case of a user running fluxbox or similar the presence of these tools is not guaranteed, so having a regular toolkit file dialog as fail safe is a good idea.

  12. cm says:

    > Is there one standard method to query what desktop environment> is running and which the user would prefer?There will be as soon as the Portland initiative has released their work. In fact, if I understand correctly this project will solve the whole problem for you:http://portland.freedesktop.org/wiki/“Portland intends to generate a common set of Linux Desktop Interfaces and Tools to allow all applications to easily integrate with the free desktop configuration an end user has chosen to work with.”I’d really like it if Adobe supported this. And since the whole point of this initiative is to make the life of software vendors easier I’d expect they would appreciate your feedback and be responsive to it.

  13. Sérgio Gomes says:

    1st of all, choice is always good, and a system that integrates with the user’s desktop is better.2nd, contrary to what some may say, not everyone uses Firefox and GTK+. I do, but not everyone does, Konqueror is a very competent browser by itself (I only use Firefox because of 32-bit plugins on my 64-bit system)3rd, most KDE users I know find the GTK+ file open/save dialog absolutely horrible and unintuitive, so being able to use the KDE dialog would be a godsend (how I hate saving files with Firefox…)Now, I’m sure someone smarter than me will post a really smart way of using the KDE dialog for this purpose. All I can say is if amsn can do it (choose in runtime between a KDE or GTK file open/save dialog) and it’s done in TCL/TK, then it should be pretty easy to do, and I’m guessing you don’t even need to compile against Qt or anything.And every KDE user out there would love you dearly for it :)Finally, a comment:@ kw123, who said “it is lame to try and support gtk and qt… dont’ even try.”What is that supposed to mean? How can supporting two different toolkits be “lame”? I actually find it “lamer” for a program to assume I use something instead of checking whether I do. I’m inclined to classify *your post* as lame. If you like GTK+ that’s fine, it’s not being questioned, but you could at least have the decency to assume there are some people who prefer Qt/KDE and let them have their way if it doesn’t affect you, right?Anyway, here’s to hoping that this thread doesn’t turn into another flamefest and hoping Mike can actually take some useful information from it…

  14. Petr Vanek says:

    geez, nice to see there will be flash9 for L. someday ;)it’s clear that I suggest Qt as a KDE user abd Qt developer but there is no problem with Gtk for sure – except file dialog. But there are some distributors who patches it.and now: the main part of this comment – there is some way how to detect DE running. Opera9 does it. I don’t know how but it asked me about “kde detected – some hotkeys shoud collide” or something like that.

  15. John says:

    Like you say, any kind of dialogue like this will be quite rarely seen by the user…to me it looks fine how it is. Like another commenter said, firefox uses gtk2 anyway so the chances are you’ll have it right with gtk. Like you said before, it’s impossible to please all of the users all the time, but I think this would please most most of the time.

  16. amd-linux says:

    Wow, at Adobe, one needs an authorization to publish such a generic part of a screenshot? How many counsels had to check that before publication? Are those who require authorization for *such* a picture the same guys that are so paranoid with the Flash specs?With regard to such behaviour, me sometimes thinks that fear is ruling the business tactics at Adobe (fortunately NOT the efforts of the developers like you, Mike).I just try to imagine what would be left over from Google if they had the same “cautious” business approach.SCNR.

  17. Arren Lex says:

    Augh. The GTK2 filepicker gives me hives.I suggest picking a GUI toolkit and sticking with it. Adding QT will just be bloat when GTK2 will be perfectky fine. I’m a KDE user myself, but the de facto Linux browser is Firefox and Firefox is GTK2. It makes more sense to have the plugin GTK2 also.

  18. moi1392 says:

    I think the portland project (http://portland.freedesktop.org/wiki/) have some facilities to detect if you’re running a KDE or GNOME of XFCE session.portland is a project that builds common tools (currently shell scripts, later, a programming API) to help third party developpers to easyly target and integrate in ALL desktop environment when building a linux software. It already supports GNOME, KDE and XFCEYou could just ask to their mailing list (http://lists.freedesktop.org/mailman/listinfo/portland) and they quickly reply to you with the right answer.

  19. liquidat says:

    As the first poster already mentioned: there are easy ways to find out which DE is running – take the appropriate dialog at this time.Also, a good advice to do thi can be found here:http://taupter.blogspot.com/And, kw123: As a KDE user I do not use Firefox – and there are reasons why Apple and Nokia choosed to work with the KHTML engine and not with the Firefox engine. Stop writing, start inform yourself a bit.

  20. I would much rather it Just Worked than was full of eye candy. Stick with GTK.Adding native KDE/GNOME integration would be added gloss though.

  21. Anon says:

    you may want to check kde’s kdialog, as shown on a planetkde.org post[1]. Seems particularly useful.I don’t know if Gnome has an equivalent “gdialog”, but if it has you could even avoid linking directly to Gtk — less dependency hell!BTW: I see that Adobe internally is using KDE on its computers. Nice![1] http://taupter.blogspot.com/2006/09/today-i-found-nice-post-on-penguin.html

  22. Jure Repinc says:

    It sure would be great to have an automatic detection of the desktop environment the user is using. And also I think it would be great if there was an option to force open/save dialogs from specific desktop somewhere in settings. I really don’t like GNOME open/save file dialog. It is clumsy and it doesn’t have some nice features that are available in KDE open/save file dialog. For example in KDE dialog I can simply enter a path starting with smb: and it will save/open files directly from Samba shares. And it is similar with fish: (for SSH access) and a lot of other protocols. So yes I definitely hope there will be an option to force KDE file picker no matter what desktop I’m using.

  23. Jure Repinc says:

    As far as I know the type of desktop running can be detected by looking at the DESKTOP_SESSION environment variable. So for KDE 3.5.4 you get something like “kde-3.5”. So you simply parse this variable and if it contans kde then you default to Qt, if it contains gnome or xfce you default to GTK and so on.

  24. Torsten Rahn says:

    If you want to find out whether KDE was started (using startkde), just try to detect whether$KDE_FULL_SESSIONis true. That is the way that your problem is meant to be solved.Looking athttp://lists.freedesktop.org/archives/portland/2006-March/000239.htmlThis seems also to be the way that the xdg-utils package is detecting desktops. xdg-utils is part of the Portland project which deals exactly with your ‘hypothetical’ problem:http://portland.freedesktop.org/wiki/Using command line tools (“xdg-utils”, there’s a first version available) or a common API (“DAPI”, this one is work in progress afaik) it enables ISV’s to use the functionality of the desktop that has been chosen by the user. That way the user decides whether he’ll get a gnome-file-open-dialog or a kde-file-open-dialog. The developer of the application doesn’t have to deal with any of the toolkit-API’s that way.I’d suggest you contact those nice people from the Portland Project (e.g. bastian@intel.com) and I’m sure they will be able to offer a solution that is easy to implement and that will satisfy all users.IIRC correctly, Adobe was one of the companies that have brought Portland into existance, so this is another reason why you might want to make use of it.

  25. Portland is exactly what you are after.

  26. Ross says:

    Pity you couldn’t use Flash for the file dialogs, much better solution (especially if it were flexible enough for people to write replacements).

  27. The portland project provides ways to open such dialogues for the currently running DE. However it is not really in widespread use yet.

  28. lex says:

    if FLASH could be the UI engine, why not use it for the player itself?

  29. Helder says:

    How about making the toolkit an option to the user?Since flash uses so little of the toolkit it shouldn’t be that hard. And I would have a decent file dialog.WARNING: Please note that I’m only kidding about the file dialog I couldn’t care less.

  30. The variable $DESKTOP_SESSION stores the desktop name.. kde, gnome or something else

  31. Andy I says:

    I would say that you should default to GTK, but as someone else mentioned, check for a .flash file in the homedir and allow that to override. I use KDE and I stay clear of GTK apps. I use Konqueror, not Firefox. It would be really nice to have a QT frontend too. But don’t rush to do this, it’s not important, I just want Flash 9 out asap 🙂

  32. Michal says:

    kw123: that’s just pure trolling. Arguing with beautiful toolkit and smart API can’t be a base for any reasonable discusion. Besides some “facts” you mention are simply not true (like all users using firefox).

  33. Bloody says:

    @dustin & @kalahariIt would be way more useful to make big feature requests like that on the wish form. Especially, the amd64 thing. I have already sent a request through the wish form for a 64-bit port; please help with the initiative because that’s where feature requests will be listened to.@kw123I agree that flash should use gtk but I would not go as far as to say that the gtk2 API is carefully designed. I think that gtk needs a good shaking up to prune down all the extraneous features and widgets (and also the deprecated ones) so that we’re left with ONE standard way of doing things (in the core api). Extra widgets should go into some kind of gtk-extra-widgets.so lib or something. Furthermore, I think that the next gtk should include a wrapper aroung gtk 1 & 2 so we don’t have to have multiple versions installed. Ok, enough off-topic ranting.

  34. Luke says:

    Currently there doesn’t seem to be any way to use gtk/kde file selectors selectively.In the future (next major realease of each desktop I guess (?)) maybe the fruits of the “Portland” project will make this a possibility: http://gnomejournal.org/article/43/the-portland-project

  35. D4rky says:

    just use GTK instead of QT. I’m using KDE, but I think that GTK would be better.and don’t waste space for 2x more sourcecode

  36. Zarate says:

    Hi,My technical skills are far, far away to say anything useful, so I will just say thanks a lot for bringing Flash 9 to GNU/Linux, keep the good work.Cheers

  37. jamie says:

    kw123 : how did you get conclusion ?i am an exclusive kde user, i don’t have gtk on my machine. i use konqeuror primarily and opera as secondary browser.but no, i won’t complaint about adobe choice. i just hope it’s statically compiled.btw, there is an aswer for the last question from a kde developer==> http://taupter.blogspot.com/

  38. mjb says:

    couldn’t this be solved through a freedesktop.org specification somehow?It would clearly concern them, because it might be used by other applications aswell.

  39. Maimon Mons says:

    Please *dont* store a preference in ~/.flash/.The problem with this is roaming home directories, and people who use the same home directory in multi-boot systems. (More common with Linux than MS Windows, I would think.)Detecting the running process is the way to go. The question is, what if the individual is using a different desktop manager (one of these slimmer ones).Maybe fallback to generic X?

  40. Anonymous says:

    I think, that people should have a choice. Let they choose what they want, GTK or QT. Simple 🙂

  41. Irve says:

    you might think of defaulting to GTK and having some .flashplayer file in home dir for some QT tweaking in case user really needs to.Development overhead it is, true.

  42. heathenx says:

    ahh, don’t change a thing. use whatever is most prevalent and stable. keep up the great work. we are all patiently waiting. thanks for the screenshot.

  43. Kevin Krammer says:

    The Portland Project’s xdg-utils scripts use this to detect which desktop environment is running:detectDE(){if [ x”$KDE_FULL_SESSION” = x”true” ]; then DE=kde;elif [ x”$GNOME_DESKTOP_SESSION_ID” != x”” ]; then DE=gnome;elif xprop -root _DT_SAVE_MODE | grep ‘ = \”xfce4\”$’ >/dev/null 2>&1 then DE=xfce;fi}

  44. Dominique says:

    I wouldn’t worry about Qt / GTK choice.Most users on Linux use Firefox (based on GTK) and k3b (based on Qt).So they are quiet used to both GUI Toolkits and learn to live with it.

  45. Anders Aagaard says:

    kde users already theme gtk2 so firefox fits in better. Don’t go breaking the KISS rule (keep it simple and stupid), if it works now, that’s good 😉

  46. Louis says:

    As a KDE user who DOES NOT use Firefox, I would love to see the standard KDE dialogs, but the bottom line is this: it doesn’t matter that much because I hardly ever see that dialog anyway. I just want flash to work as expected in my web browser. Thanks for this.

  47. chodo says:

    (most) “kde users already use gtk2/firefox.”Yes, but Firefox is no true gtk2-Application. Compare the look of Firefox with that of a true gtk2-application and you will see the difference. Don’t know, why the firefox-maintainers don’t implement qt/kde support for firefox

  48. David Taylor says:

    I prefer the QT toolkit especially the KDE file dialogue over the gnome GTK one however I understand the QT one to be in transition for QT3 to QT4 with different API’s so what you implement now may not work by release in January when KDE4 is released so it’ll just have to be GTK for the time being.

  49. P. V. says:

    Maybe a dumb question, but is there anyone using Linux who DOESN’T use firefox or a mozilla engine derivative? I use KDE but wouldn’t dream of browsing with anything but firefox (Opera, on occassion, but very rarely).

  50. Josep Febrer says:

    I think that is possible with the FreeDesktop’s Portland project, Google use them for their Linux port of Google Earth.Also in KDE, you can use Kgtk which is a hack to use the KDE file dialogs with GTK and Qt only apps, in fact, I use it with Firefox and other famous GTK apps.But I think, that you should contact with the project Portland team.

  51. Josep Febrer says:

    Also I see from the screenshoot that you were using KDE, can I ask you if your Flash 9 plugin will work with the Konqueror web browser?

  52. KDE user says:

    Arghhh!!! Will be in practice, imposible having a workstation PC without the %/·$·”· GTK libraries!!!!???I hate GTK!!

  53. Erdroh Moshan says:

    Only some upload/open stuff? It is easy to answer: Portland http://portland.freedesktop.org/If you need more to know about the desktop environment, just look at how Portland does it. But for such easy stuff like an open dialog, you can use the xdg-utils.

  54. florian says:

    have a look at the portland project at http://portland.freedesktop.org/wiki/. It is targeted at third party ISVs who would like to support both desktops, kde and gnome, and provides mechanisms to use the filechoosers and similar things for both desktops.Please kw123 stop spreading FUD like that. Qt is released under the gpl, so it is as free as it can be and certainly not enslaved by any company. It’s certainly not lame to try to support both desktops, gnome and kde, and it is just not true, that kde users already use gtk/firefox as konqueror is a perfectly fine alternative.

  55. dré says:

    Take a look @ the Portland project. Although it doesn’t offer file dialogs YET it might be useful in other areas (send email, disable screensaver…).

  56. Anonymous says:

    ignore people whining about quick GUI toolkit it uses, use whichever is easiest for you, it really makes no difference, as little native UI stuff as flash does its like people arguing over what kind of socks to wear.. who cares! gtk works fine on kde and qt works fine on gnome

  57. shawnz says:

    I suggest either having a flash-qt and flash-gtk build, or just using gtk. Why just use gtk? because gtk has an engine that can map calls to qt, making it look seamless on either setup.

  58. Charles B. says:

    I just want to say I use Konqueror exclusively to browse the web and there’s not a single GTK application on my system. That’s right, not a single one.Use whatever you want, but don’t believe for a single moment everyone’s using Firefox because that’s not true. In fact, Firefox sucks in Linux, big time compared to its Windows counterpart.

  59. L. J. Reneau says:

    Surely, coding for KDE integration is a breeze compared to coding GNOME/Gtk. This saved coding time could be used by Adobe developers to better the product instead of spending unnecessary time just trying to make their code work. Also, given that 2.5x more users use KDE over Gnome, it would make sense to support the most used platform, KDE.To recap my points:-easier to code for KDE platform so time could be better spent improving product.-broader audience, KDE is used by 2.5x more users than Gnome.-KDE is free, Gnome is owned by NOVELL

  60. Portland project is exactly what you are looking for – a set of “wrappers” for desktop specific dialogs. It means you don’t have to implement “the guessing engine”If you don’t find Portland, go ahead and use another variation of GTK’s file dialog.Both GTK and QT (4) are appear to be parts of Linux Standard Base, but file dialogs from both suck horribly. I would rather use Windows than GTK’s or QT’s file dialogs. But, KDE’s file dialog is incredibly powerful and STANDARD as opposed to what I see on Gnome land.But if you go for Portland, all of this will not matter. So, just do the right thing…http://portland.freedesktop.org/wiki/

  61. n3ldan says:

    That screenshot was wicked hawt.

  62. GL Biscuit says:

    I think GTK is perfectly acceptable: For people who use GTK, that’s fine. And for people who use QT, they can (and should) set gtk to use the excellent GTK-QT gtk theme engine, which uses QT to render GTK, so that it looks exactly like it QT.

  63. pjoul says:

    There’s probably no need to use one of these two toolkits on demand. KDE lovers have theirs Qt theme which makes Gtk apps look like regular Qt apps. And for now, almost every mainstream distro deals with Gtk more than with Qt.

  64. David R says:

    Now that you bring it up, I have a bone to pick with the windows flash 8+ players. They don’t use a standard file selection dialogs! I can tell, because I cannot resize the file selection window, which is very annoying, especially when I have to browse through a lot of files in such a small space.I’m glad to see that the linux player will actually be BETTER than the windows one in this small regard, in that it’s using the system file selection window (even though the GTK file selectors are pretty lame)

  65. There is a remarkably simple solution to this problem. Just launch a separate process for pop-up dialogs.Here is how I envision it. There will be an executable at /usr/bin/flashdialog that accepts two arguments, the name of the dialog to show and the identifier of its parent window. The Flash plugin will call this executable every time it wants to show a dialog. The flashdialog executable will output the result of the interaction via stdout or an exit code. You can either make the flashdialog executable open source, or you can simply publish the API so that people can reimplement flashdialog using their own toolkit. Some people might simply write a shell script that wraps “kdialog”.Pros:- The Flash player will have fewer library dependencies and thus load faster.- Developers and distribution makers will be able to plug in their own replacements.- You’ll quietly exit the debate over GUI toolkits, saving you time.Cons:- Dialogs might take a few milliseconds longer to pop up. This could be a problem if the delay is longer than 150 ms.

  66. Reimar says:

    In case you just want to find out if the browser uses GTK or QT I guess something like this would work:browser = dlopen(NULL, RTLD_LAZY);if (dlsym(browser, some_qt_symbol))browser_uses_qt()

  67. Bruce says:

    Personally I could care less whether it uses GTK or Qt. I imagine there are much more pressing issues to solve 🙂

  68. Cheetah says:

    I see all these ideas about trying to detect the desktop environment and whatnot, but it seems that the proper level of integration is to use whichever toolkit the running *browser* is using. If I’m not mistaken, in just about any browser, at least part of the plugin is going to run in-process.Therefore, an ingenious hack may be possible: search in /proc/self/maps for some lib*gtk* or lib*qt* reference, which will show up if either one has been dynamically linked.* If only one of the two is found, use it.* If neither is found, pick one to fall back to. This probably should be GTK+, since Mozilla based browsers are the most common, and they use GTK+.* If both are found, either use the first one, which is likely to be whatever the browser itself linked against rather than something a later plugin loaded, or use the fallback strategy.Finally, provide an environment variable to force the toolkit for cases where the magic detection fails, or the user wants to have Qt dialogs from flash even though they’re using Firefox.

  69. James says:

    The GTK file dialog is faster than it used to be, but is still irritatingly slow on sufficiently large directories, and appears to not cache anyting, so that if you save something in a large directory N times, you get to wait excruciatingly long N times. Please reconsider your choice.

  70. Ian Monroe says:

    One thing you have to remember about Linux is that most everyone uses a distro. You could make it a somewhat hidden setting on whether it should be GTK or Qt, and that would be fine. Each distro could set it appropriately.

  71. Ygor Lemos says:

    Well, my bit…Kdialog is lame… don’t use… it is like those pseudo-developers that uses dialog and xdialog on their applications… complete lack of knowledgment…Portland seems to be a cool solution…Also… as the REAL professional applications on Linux do, you must stick with gtk2 and can of course make a qt alternative for interfaces that lacks gtk2.Many people think that firefox is tyed on gtk which is not true. Search the net and you find out many ways to compile firefox with Qt GUI support.Anyways, this is hacky and the binaries provided by mozilla are tyed on gtk2, so about 99% of the people that uses Firefox, currently uses gtk too, so… use gtk as primary option.Kdialog as I said before… is not good for this…Also… you should think on people hat doesn’t like nor use KDE and use gnome, xfce, wmaker, tw, and thousands of other old-school and non-old-school (Enlightnment, etc…) Desktop Environments.As the mainstream GUI Toolkits for Linux on those days surely are GTK and QT, stay with them and use something to identify the support for each of them, (as I said before… GTK must be 99% of the time, present on the machines with Firefox).About the support to other browsers… well… i think KHTML sucks… and I completely dislike Konqueror for a vast series of reasons, but, I don’t intend to make flames here… but I think that when dealing with Konqueror, Qt is a good alternative.Well, as for Opera, I don’t know how the browser plugin schema works… but I think that Opera is tyed on Qt (sorry if I mistake here… as I said, I don’t know Opera architecture…), so if Opera is Qt-based, the GTK-QT solution will work well too!And also… Galleon is 100% gtk… ;)As those 4 browsers represents the great majority of Linux browsers (sorry for the guys that sticks with links… eheheh, maybe we can have some flash on the future with sdl 😉 ), I think that they are ellected to win a compatible Flash9 plugin right?

  72. Arren Lex says:

    @Ygor:”Kdialog is lame… don’t use… “Kdialog is a wonderful utility to get at incredibly useful tools through an amazingly easy interface. Just because you don’t have to beat at C++ code for hours to make something work doesn’t mean it’s “lame”. Just the opposite, I would say it’s a well-designed and brilliant solution. I’ve used kdialog extensively, in shell scripts for example, and I’ve been amazed at how easy it is to add a useable and convenient interface to something so simple without a lot of work. Are you of the opinion that I should have spent two hours coding my own QT filepicker to use in my fifteen-minute ‘selectively awk these files and save them to a new file’ shell script? You can do that if you want.”Also… as the REAL professional applications on Linux do, you must stick with gtk2″QT is not a toy. QT is a powerful UI library which is very easy to code for and has powerful functions. Your “REAL professional applications” usually only use GTK because you have to pay for QT unless you release under the GPL. Furthermore, you are implying that Opera, k3b, konqueror, and KDE itself are not “REAL professional Linux applications”, in which case, please explain to me why they have many users and are, by many, considered the best applications for their jobs for Linux?”Many people think that firefox is tyed on gtk which is not true. Search the net and you find out many ways to compile firefox with Qt GUI support.”You’re right, Firefox is not tied to GTK. You just took an application off your own “REAL professional applications” list. Yes, it’s possible to compile Firefox to use QT. I’ve done it. It’s not useable. There is no QT interface currently in existence sufficient for the use of Firefox. For all intents and purposes Firefox is a GTK-only program on Linux.”Anyways, this is hacky and the binaries provided by mozilla are tyed on gtk2, so about 99% of the people that uses Firefox, currently uses gtk too, so… use gtk as primary option.”Nothing is “hacky”, merely incomplete. Yes, Mozilla ships GTK2-compiled firefox binaries, because that’s essentially the only thing that works. If you’re saying information you posted is worthless right in the very next paragraph, why bother to post it?”Kdialog as I said before… is not good for this…”Thank you for repeating yourself. I assure you it’s just as profound the second time. What is it not good for now, exactly?”Also… you should think on people hat doesn’t like nor use KDE and use gnome, xfce, wmaker, tw, and thousands of other old-school and non-old-school (Enlightnment, etc…) Desktop Environments.”What about them? There are four major GUI toolkits in existence right now: GTK+\GTK2, QT3\4, X, and tcl\tk. The desktop environment has nothing to do with the toolkit. If it did, KDE users couldn’t run GTK apps, and I’m typing this in Firefox right now. You could run Firefox on a horse’s ass if you installed the GTK libraries on it. I answer your question with itself, and I make it rhetorical. The people who use those desktop environments – what about them?”As the mainstream GUI Toolkits for Linux on those days surely are GTK and QT, stay with them and use something to identify the support for each of them, (as I said before… GTK must be 99% of the time, present on the machines with Firefox).”That’s what the post is about! You are responding with “find a green hat” to a post that says “where do I find a green hat?”. If you have advice to offer about HOW to choose or WHICH to choose or WHETHER to choose, feel free to give it.”About the support to other browsers… well… i think KHTML sucks… and I completely dislike Konqueror for a vast series of reasons, but, I don’t intend to make flames here… but I think that when dealing with Konqueror, Qt is a good alternative.”KHTML is a perfectly valid rendering engine which lots of people use. Feel free not to like it, but it does not “suck”, it is merely not what you’re looking for. I, too, dislike Konqueror as a web browser, but only because it doesn’t provide an autoscroll feature the way I’m used to it, and I don’t try to pass this reason off as the grand poobah of insults. If you have reasons why you dislike Konqueror, please list them, because they are valid concerns which could affect Mike’s choice of whether to support it. It would also allow us to help you if your problem has a solution. Otherwise, why get into it? However, your sage advice “QT is a good idea for a QT browser,” is absolutely brilliant. I can’t believe no one thought of that before.”Well, as for Opera, I don’t know how the browser plugin schema works… but I think that Opera is tyed on Qt (sorry if I mistake here… as I said, I don’t know Opera architecture…), so if Opera is Qt-based, the GTK-QT solution will work well too!”Yes, Opera is QT, good guess. And thank you for commenting on something you admit you have no idea about. We are discussing right now whether GTK-QT is a good solution. Care you actually join in rather than dispensing arbitrary “aye” and “nay” statements from above?”And also… Galleon is 100% gtk… ;)”Why, yes, it is. What was the point of that?”As those 4 browsers represents the great majority of Linux browsers (sorry for the guys that sticks with links… eheheh, maybe we can have some flash on the future with sdl 😉 ), I think that they are ellected to win a compatible Flash9 plugin right?”Right. That’s what we’re discussing, by giving pros and cons, as well as possible solutions. We all know that there are both QT and GTK browsers for Linux. If there weren’t, we wouldn’t be having this discussion.Good day.

  73. Andrew Ash says:

    Off the Qt vs GTK argument, I’d like to really thank you for keeping us updated daily for the past few days. It’s very exciting to see what you guys are doing with Flash for Linux, and I can’t wait to see it working on my machine. Good luck, and code well!

  74. Amy Ferriola says:

    I do think an either/or option would be a good choice. Many users use KDE/QT, but not all. I don’t think I know of anyone, however, that doesn’t at least have the GTK installed.Personally, I use xfce4 as my desktop environment. It does have options to run bits of KDE and Gnome in the background, so I’m sure it wouldn’t really be a problem either way.

  75. Chris says:

    “I’m sure it’s probably easier to just go with GTK for the UI…But I swear, everyone I know agrees that GTK has *the* worst file chooser dialog in existence. It seems to have been designed to prevent me from selecting the file I want. It pains me whenever I see it.”Seriously. The GTK file-chooser sucks majorly. Please support the KDE dialog if the user is using KHTML.

  76. Morton says:

    As others have pointed out already Portland is what you’re looking for.Especially given that at least in the US on the linux plattform only 60% are using gtk-based Firefox and 30% are using Qt-based Konqueror+Opera (numbers are from desktoplinux.com). I expect the usage of Firefox to be even lower in Europe where KDE is more popular than Gnome.With Portland, you’d perfectly support 90% of browsers in the US.Your need for a toolkit is obviously mostly restricted to the file-dialog. The Gnome-Filedialog is _the_ thing about Gtk that people have “very different feelings” about as it’s pretty non-standard. If you look at Windows or Mac OS X you might find out that the majority of people are used to a file-dialog that is closer to the one Qt/KDE delivers.So that are two further reasons why contacting the Portland Project is a good idea. Portland enjoys the support of the industry (companies like Intel and Adobe are even involved as far as I know). So if this isn’t an example that would be best suited for Portland, what else would be?

  77. Lukasz Wisniewski says:

    Anyway, I wonder if you’re going to make any use of cairo as now it’s the most important tool for 2D graphics.It’s not about gtk+ or qt it’s all about cairo 😀

  78. Ygor Lemos says:

    @Arren Lex:Well Arren I agree with you in some points, and not in others… like:– “Kdialog is a wonderful utility to get at incredibly useful tools through an amazingly easy interface. Just because you don’t have to beat at C++ code for hours to make something work doesn’t mean it’s “lame”. Just the opposite, I would say it’s a well-designed and brilliant solution.” –Well you must agree here that when you don’t “beat at C++ code for hours” and use binaries to do some kinds of things, like rendering a filedialog widget, you get a great loss of performance and greater CPU/memory use. It is just obvious… But… still, I agree that if you are using KHTML Engine you can stick with KDialog on the Flash Plugin, altought it is no a “global” solution… and the use of QT would be more appropriate in here…– “Are you of the opinion that I should have spent two hours coding my own QT filepicker to use in my fifteen-minute ‘selectively awk these files and save them to a new file’ shell script? You can do that if you want.” –Well, if it would be a application that the whole Linux community would use and will affect markets and business and will have a strong impact on Linux Community, I say… yes… you should spend as many hours you have to improve your application and publish a enterprise-class product (like Flash9 Linux is supposed to be), completely optimized for the environment that it would run. We are not talking about some shellscripts we do on our freetimes to make backups or manage cvs’s, etc… we are talking about a worlwide usage of a very important plugin to the Linux community, which is a matter that I simply don’t have to discuss here, as you know the extreme acceptance of Flash on the market (not that I agree with that… but it the way it is…).Also, you said… “you can do that if you want”… well, I assure to you that all my applications are optimized to the last bit… ;)– “QT is not a toy. QT is a powerful UI library which is very easy to code for and has powerful functions. Your “REAL professional applications” usually only use GTK because you have to pay for QT unless you release under the GPL.” –I am completely aware on what Qt is and what it is not… as I develop code for it since 1999… and believe-me I have piles of Qt bibles around…My “Real Professional Applications” actually use Qt, the paid version, because sometimes you must pay for the right tools and the right licenses… ;)Also we strongly use qtopia the mobile qt version which is paid too :)And sometimes we just can’t release software under GPL, as it is our product… but we open-source everything we can…– “Furthermore, you are implying that Opera, k3b, konqueror, and KDE itself are not “REAL professional Linux applications”, in which case, please explain to me why they have many users and are, by many, considered the best applications for their jobs for Linux?” –You have completely not understanded-me here… I didn’t say that… and looks like you don’t know the architecture of those applications…– “You’re right, Firefox is not tied to GTK. You just took an application off your own “REAL professional applications” list. Yes, it’s possible to compile Firefox to use QT. I’ve done it. It’s not useable. There is no QT interface currently in existence sufficient for the use of Firefox. For all intents and purposes Firefox is a GTK-only program on Linux.” –Again, you didn’t understand-me… Firefox is C++ code, with lots of XUL and developed aiming to run on gtk… it is in my humble opinion, the best browser for all OS’s.Also, sorry if you are uncessfull running FF on Qt, it is possible and I’ve seen it! :)– “There are four major GUI toolkits in existence right now: GTK+\GTK2, QT3\4, X, and tcl\tk” –Yes I know… but take a look on performance… tcl/tk is unusable msot of the times… take a look at amsn, it is a great application but tcl/tk in which it is coded, rothens down the application. There are many performance hazards, the update times are horribly, etc…– “The desktop environment has nothing to do with the toolkit. If it did, KDE users couldn’t run GTK apps, and I’m typing this in Firefox right now. You could run Firefox on a horse’s ass if you installed the GTK libraries on it.” –Hahaha I know that too… but you have to agree that who has Gnome or XFCE, probably has gtk (very, very probably..) and who has KDE has Qt installed… it is just obvious…Im’ not sure if there are gtk packages that could be compiled on horses asses, but is a strong subject of research…– “I answer your question with itself, and I make it rhetorical. The people who use those desktop environments – what about them?” –Well, ask that to mozilla’s crew then… as they have used the gtk filemanager on the browser’s core… :)Using the GUI toolkits to render the widgets is wise, as you can run the toolkits on any Environment, the bugs on then will be centric, you don’t have to bother if kde or gnome or xfce has changed its widgets behaviour and the performance is surely better!– “KHTML is a perfectly valid rendering engine which lots of people use. Feel free not to like it, but it does not “suck”, it is merely not what you’re looking for. I, too, dislike Konqueror as a web browser, but only because it doesn’t provide an autoscroll feature the way I’m used to it, and I don’t try to pass this reason off as the grand poobah of insults. If you have reasons why you dislike Konqueror, please list them, because they are valid concerns which could affect Mike’s choice of whether to support it. It would also allow us to help you if your problem has a solution. Otherwise, why get into it?” –Well this is a little off-topic, but resuming, KHTML simply doesn’t obey lots of W#C recommendations, the CSS drawing is not good and behaviours extremely unwell, the ECMAScript support has thousands of lacks and the object DOM is sometimes just unusable. I think this is sufficient for any web-application developer (which is my expertise area), completely dislike Konqueror, as we dislike Internet Explorer for their major flaws on those and other aspects.– “However, your sage advice “QT is a good idea for a QT browser,” is absolutely brilliant. I can’t believe no one thought of that before.” –Well this is my point of view… it is just simple… tye the plugin to the browser and then choose the widgets from the correct UI Lib… simple and surely better… :)– “Yes, Opera is QT, good guess. And thank you for commenting on something you admit you have no idea about.” –Thanks…– “Why, yes, it is. What was the point of that?” –Just to show that another browser would be on the GTK/Qt schema and that it is (on my opinion) the right way to do it :)– “Right. That’s what we’re discussing, by giving pros and cons, as well as possible solutions. We all know that there are both QT and GTK browsers for Linux. If there weren’t, we wouldn’t be having this discussion.” –Well, exactly, if we all know that, why bother with “fastest but not so good solutions” as KDialog as we have the Qt and GTK widgets to play with and they are vastly used (gtk widgets are used all over firefox), and Mike’s team now have their answer (I think)… get the browser that user is currently running (perhaps throught the very plugin interface you can achieve that), and select Qt or GTK… simply. It is all that I have said (sorry if you don’t understand…), it is simply… and the simply solution (use gtk and qt) is the best in matters of performance, acceptance, flexibility, etc…– “Good day.” –For you too. :)Sorry if I insulted you with my opinion on KHTML, but as I said before, as a webdeveloper, I have my reasons to dislike it, and sorry for anything else… I don’t intend to start any flamebaits here friend :)see ya!

  79. Segin says:

    There’s only one problem with this — There’s 2 GTK file open dialogs, and the one shown in the screenshot rather sucks. Why? Because you’re *forced* to click around to find the file you want. The older GTK open dialog, although it isn’t as user-friendly, allows users to type in a pathname. If you are going to use GTK, at LEAST put in a configuration option as to what dialog to use. I have over 400 files in my $HOME directory, and 100 directories directly there. I don’t want to be scrolling for a while to click on a folder when a few keystokes can save me all the trouble.And please, test this against kgtk. KGTK is a wrapper library that messes with the Linux run-time linker using LD_PRELOAD to load a library that overrides the GTK file open dialog and sends the request to KDE (note that this breaks if you aren’t using KDE, because the open/save dialogs on KDE are client-server, that is, the dialog is owned/managed/etc. by the KDE main server and is called by clients via IPC/named pipes/etc.) To be able to at least use the KDE dialogs would be good because then I could still type in my pathnames. I just don’t like having to click around to find files. If I can play DVDs without using a mouse, why can’t I select a file without using one?

  80. Petar says:

    @SeginUnless you are using Apple’s one-button mouse on your Linux box, you can access the right click menu equipped with two options – show hidden files and enter location, latter being exactly what you’ve been missing – a possibility to enter pathname… And yes, gtk+ is perfectly fine in my book…

  81. Sterling Christensen says:

    Chris & Segin, press Ctrl+L and it’ll let you type a path with tab completion. I like KDE’s better too, but GTK’s isn’t as bad as you say once you know how to use it.Personally, I’d rather have 9 out sooner than have it optionally able to use Qt/KDE, however nice that would be.

  82. DannyB says:

    In the latest version of GTK+, there is an icon to enable the location path entry, and it will remember the state of whether or not you have it selected. First time you see the button, click it, and then you will always have a path entry dialog. If your distro doesn’t have it yet, I’m sure it will before Flash 9 for Linux is released.

  83. @ Segin”The older GTK open dialog, although it isn’t as user-friendly, allows users to type in a pathname.”All you have to do is hit ctrl+L

  84. Arren Lex says:

    @Ygor:I agree with most of your explanations. I’ve tried to use Konqueror and found its rendering and CSS lacking also, as well as some important features missing, and that’s why I don’t like KHTML. But instead of saying that, you said “it sucks,” which annoyed me, because you were dispensing arbitrary judgement without explanation. Be more expressive next time so you contribute meaningfully to the discussion! =)Also, I don’t see why kdialog would be slower than a real widget, could you explain? And, I’d love to see QT firefox. Where did you see it? Screenshots? When I compiled it, it wouldn’t even let me type anything into the search engine bar, it was so buggy.No hard feelings? =)-AL

  85. Arren Lex says:

    @Segin:There’s no field for it, but if you just start typing a path when the GTK file dialog is up, it will take you there. Try it. If you’re in firefox, press ctrl+o and then just start typing /usr. It’ll give you a nice Open Location dialog. Futhermore, if you’re in a directory already, start typing the filename (i.e. if you’re in /usr/bin, start typing ‘firefox’ and it’ll take you to the file.

  86. The Portland project includes tools that you can use to the get the native desktop environment file dialog. You are free to distribute the script yourself. Check it out. Spend your time making a good flash plugin and don’t bother with the desktop junk

  87. TonyB says:

    Doesn’t firefox have XUL stuff you can use to go good with any widget set?

  88. Shish says:

    easier to code for KDE platform so time could be better spent improving product.You’re saying that writing a whole bunch of new KDE code from scratch will take less time than leaving the existing GTK stuff as it is? o_Obroader audience, KDE is used by 2.5x more users than Gnome.Where does this number come from? 75% of the people I know use a minority WM (Enlightenment, Fluxbox, Ratpoison) + GTK apps; 20% are all gnome, 5% all kde (and that guy uses freebsd anyway :P)KDE is free, Gnome is owned by NOVELLI take it you haven’t even glanced at the toolkit histories? Originally KDE was based on the proprietary QT toolkit, and GNOME was completely free. Now, both are completely free. At no point has KDE been more free than GNOME…

  89. Ricardo says:

    You could use the mozilla widgets instead,even eclipse uses them.if the player is going to be in the netscape like browsers then it could fix any Qt gtk discusion.

  90. Cláudio Pinheiro says:

    Some bits:TobyB, Qt, is proprietary, Gtk++ is proprietary. Both have authors and are properly copyrighted (of “copylefted”), and both are Free Software according to the Free Software Foundation, as both widget toolkits are distributed under GNU GPL or GNU LGPL. Moot point.Lukasz Wisniewski: Khtml is ACID2-compliant, whatever it means, but as far as I know it’s some good test to khtml’s compliance to some W3C standards. Safari (Apple’s Mac OS X browser) is based on khtml and both still share code, benefiting from the other’s efforts. Khtml is capable of handling mail.coogle.com without any problems (you just need to change Konqueror’s identification string to “pretend” to be using Firefox and everything runs). I use khtml 100% of time both at home and at work and I only got problems with Hotmail’s page and MS-Project (ActiveX controls. But what else could you expect from Microsoft?). khtml is a very competent rendering engine. Please check if you’re using a recent stable KDE (3.5.4) so you can check it for yourself. Old information (even if it’s only two months old) doesn’t count.All: About kdialog (again), there are no license issues if you use it. (you’re not linking to Qt or KDE libraries at all). kdialog is _not_ interpreted. It is compiled and runs at full speed as any binary application, so no slowdown. It fullfills the needs of the millions of KDE users worldwide and follow the UNIX philosophy about keeping things simple and reusable. There’s nothing wrong about pipes and it is one of the IPC (Inter-Process-Communication) strategies currently in use, and being used for a long time doesn’t mean it’s wrong.That said, I must say I’m a KDE developer. I need to state it so people will be able to detect some bias I may have, but as far I was reading these comments I could identify three distinct groups:Those who don’t care;GNOME/Gtk+ users who want Adobe to stick with Gtk/Gnome and are geared by different motivations;KDE/Qt users who want to have the option to choose between a Gtk-based and a KDE-based file dialog.What’s wrong with choice? If we had to stick to some self-proclamed leader we should be using some form of Microsof O.S. (cause Microsoft is still the market leader, like it or not). Choice is good.Novell owns Ximian and Miguel de Icaza is a Novell employee. Big deal. I know at least tene people who are paid by Novell to code KDE stuff. Ubuntu has Kubuntu. Mandriva has both GNOME and KDE. RedHat supports GNOME. Slackware, Linspire, Xandros, PCLinuxOS, Kurumin, Knoppix and others have KDE as default desktop. Saying Gtk+ file dialog should be the single one available to Flash because of corporate support is just bogus as a Chewbacca defense. Major Linux players support both desktop environments. But some GNOMErs here seem to need to force a no-choice policy favouring Gtk+’s file dialog, and till now I didn’t see a single comment about a KDErs suggesting a KDE-only solution. Why? The thread was open to ask _how_ to realiably choose between the two widget sets, not about the widget set supremacy.So, GNOMErs, please do let us KDErs have a choice when offered. There’s nothing wrong about it, live with it. You love GNOME, right and nice, and some of us (more people than you can realize) love KDE as it is. Live with it too.

  91. Swaroop C H says:

    I haven’t read all the comments above, but my 2 cents : Mike, even though I’m a KDE supporter, it really doesn’t matter to me if the player uses GTK or Qt, as long as it works well. So, rock on! 🙂

  92. Abaddon says:

    Will flash player be staticly linked to the gtk2? I don’t want to install it.(btw. GTK’s fileselector is just sick).–GTK/GNOME – The weakest link!

  93. Anonymous says:

    Again….. finish this discusion, ….. it`s just a religion discusion, to end all problems, use mozillawidgets, even eclipse (MASTER GOD OF EVERYTHING IN THE EARTH PRESENT AND FUTURE) the plugin will be just for ns based browsers, so if the people doesn`t want any gtk, or doesn`t want any qt, at least they will need firefox, and if you want to use flash player with links, fuck off.

  94. Abaddon says:

    “if the people doesn`t want any gtk, or doesn`t want any qt, at least they will need firefox”Nobody needs firefox when there is better browser (Opera of course).

  95. Frederick Reeve says:

    Just a little note. Detecting any running process is a really bad idea. I run a school network and we use LTSP and AFP on firefox. We can have 30 or more desktops running on one machine… some may be gnome some kde some other. A nice config file in the home directory would be nice if you want to give people the choice. sa .aswf or something. Distro’s using one wm can add a default .aswf or whatever file to /etc/skel so all new users get it.

  96. Kuba says:

    Pleaseeee…. make GTK default, but leave an option to change it to Qt… GTK’s file dialog (and it’s the only part of GTK it is going to use) makes a lot of people sick everytime they see it… it is just horrible… 🙁

  97. djurban says:

    First of all the easy thing is when someone uses KDM or GDM the DESKTOP_SESSION environment variable should be set. It has the name of the session so it could be kde, gnome, gnome2, etc.But if someone starts X without display manager that is a little harder, you need to look for some desktop relevant information. Example: kde3 always starts a bunch of kdeinit processes so you could look for them. Or a dcopserver instance. I dont know about GNOME equivalents, maybe gconfd or some orbit daemon.

  98. Jon S. says:

    I am of the KDE world and I use QT a lot. There are some programs that are GTK only and in the screenshot, you show what most KDE users hate about GTK — The file selector. Those bottuns to take you back in the file hierarchy is some of the worst UI possible to a person that truly loves QT. This is where the debate is. It’s about looks.If you look at the QT file selector, you will notice that it is completely different and we QT users are just use to that. Thus, we think that GTK just looks bad. It’s not that GTK is bad or really is bad UI, it’s just a matter of taste. So, having support for both would be a God-send. I think that the easiest way to do this would be to have a selector on install. A person chooses either QT or GTK, and that’s the interface until reinstall. Why make it overly complex? If the person selects GTK, then they will have that on their system whether they use KDE, Gnome, XFCE, Enlightenment … and so on.Cheers and thanks for putting all this work into this plugin. 🙂

  99. I am disappointed that no one has discussed the solution I proposed earlier. I suggested spawning a process for dialogs. The solution matches Unix design philosophy by connecting stuff together using separate processes. It gives everyone all the flexibility they need. Best of all, it *removes bloat* from the plugin.The only possible negative I have thought of is an extra delay. If that’s your concern, shame on you! You’re engaging in premature optimization and associating yourself with the root of all evil! Remember that Unix processes can spawn in sub-millisecond time if they’re optimized. Also remember that operating system dialogs in flash are a quite rare occurrence, so a delay is not important. Even if there is a noticeable delay, the flash plugin can show a busy cursor until the dialog pops up, creating a smooth user experience.

  100. GianMureddu says:

    I think we should be grateful Adobe is taking the time to develop a Linux version of Flash player, and stop whining about which media backend, which toolkit, which this or which that; they’re freaking doing it! They have _NO_OBLIGATION_WHATSOEVER_ to do it, and yet they’re doing it!IMO is just because of pointless discussions like these, that Linux users and FLOSS users in general have a reputation of an “argumentative” nature, and this also shows why developing for these platforms may be seen by some (a lot?) of companies as a mine field! It simply seems to never be enough! When it’s not the UI, it is the libraries, or the architectures or whatever the heck you may think of… It would even seem that just the amount of choices is what can lock us up, and prevent the development of more proprietary software.Linux/FLOSS as any other platform can actually _BENEFIT_ form proprietary software, I even think that both FLOSS and proprietary can coexist rather nicely… If we, the users, allow this to happen. Not all proprietary software is evil and not all FLOSS is messiah.So if your toolkit of choice is not being used, pitty… or if your media backend of choice is not used, sorry… In the end we should be grateful they are even doing this… If you don’t like the idea of a proprietary plugin, don’t use it, as simple as that.

  101. Heli Fernando Jerez Rincon says:

    Use wxWidgets with cairo both are portables and sonner you can merge FP9 Linux, Windows and MC OS X into one development product.

  102. Alexandre Jasmin says:

    You can invoke a method in the browser DOM by using NPN_Invoke() in the plugin API.Just call window.alert() and get something consistent with the browser gui look.But I don’t think there any standard way of displaying a file dialog.

  103. Segin says:

    In response to:

    (btw. GTK’s fileselector is just sick).

    Well, there is ^L, which allows you to type in an absolute location, but that isn’t a solution either. The solution is a KDE-style open/save dialog. It has both features of the GTK+ dialogs, but available at once and they integrate into each other. The way GTK+ does it (and not to mention that the ^L trick isn’t really documented as much as it should be) is rather retarded, and at that, fucking annoying. No one should have to press an unmentioned keystroke, and then deal with ANOTHER dialog box, just to get what they want.

  104. Steogede says:

    GTK or KDE/Qt doesn’t really matter so far as I am concerned.Most people use firefox regardless of whether they are running KDE or GNOME (or something else), so you may as well stick with GTK.If you did implement both, I would say it is probably best to steer clear of autodetection. Just either let the user decide via a config file or let the browser pass a parameter to the player.If you must autodetect, then autodetect the browser rather than the desktop session. After all someone could be running Firefox on KDE or Opera on GNOME or even Konqueror on GNOME.Perhaps you could develop a player with separate backend and frontend, like xine does (perhaps that’s what you were talking about). The user could then install whichever they wanted (GTK, Qt, GNOME, KDE, Motif :-\ ) or select the plugin in they wanted in the browser configuration.

  105. Dark Phoenix says:

    Sorry, but GTK+’s file selector is God-awful, unintuitive, and lags my Firefox like nothing else.

  106. This is ironic, given that GTK would not exist unless some guys had cobbled together a pretty decent image-altering program called GIMP. A few months into the project they started developing their own GUI toolkit because motif was still closed and everything else was unacceptable for one reason or another. (And it was just about time someone made an open source up-to-date GUI toolkit). They called it GTK, the GIMP ToolKit, now often thought of as the GNOME ToolKit, or the GNU ToolKit, which are both acceptable assumptions, in my opinion. So, the point is GTK wouldn’t exist if Adobe had ported Photoshop to Linux, which was already cross-platform (Mac and Windows) anyway. And now Adobe Flash is using it. Awesomely weird.

  107. I just posted that it’s awesomely weird that Adobe Flash is using a toolkit launched 10 years ago by people who desparately wished that Adobe would port Photoshop to Linux.What would be fantastically weird would be if Adobe used that toolkit in the eventual (running theme in this blog’s comments, I’m sure) Photoshop for Linux release. Knock on wood, cross fingers.