Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Unified Diff: chrome/browser/ui/gtk/dialogs_common.cc

Issue 7885002: Added support for KDE file dialogs. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/dialogs_common.h ('k') | chrome/browser/ui/gtk/dialogs_kde.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/dialogs_common.cc
===================================================================
--- chrome/browser/ui/gtk/dialogs_common.cc (revision 101188)
+++ chrome/browser/ui/gtk/dialogs_common.cc (working copy)
@@ -6,8 +6,10 @@
#include "chrome/browser/ui/gtk/dialogs_common.h"
+#include "base/environment.h"
#include "base/file_util.h"
#include "base/message_loop.h"
+#include "base/nix/xdg_util.h"
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "content/browser/browser_thread.h"
@@ -18,6 +20,13 @@
// static
SelectFileDialog* SelectFileDialog::Create(Listener* listener) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ scoped_ptr<base::Environment> env(base::Environment::Create());
+ base::nix::DesktopEnvironment desktop =
+ base::nix::GetDesktopEnvironment(env.get());
+ if (desktop == base::nix::DESKTOP_ENVIRONMENT_KDE3 ||
+ desktop == base::nix::DESKTOP_ENVIRONMENT_KDE4) {
+ return SelectFileDialogImpl::NewSelectFileDialogImplKDE(listener);
+ }
return SelectFileDialogImpl::NewSelectFileDialogImplGTK(listener);
}
« no previous file with comments | « chrome/browser/ui/gtk/dialogs_common.h ('k') | chrome/browser/ui/gtk/dialogs_kde.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698