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

Side by Side Diff: chrome/common/platform_util_linux.cc

Issue 425016: Linux: Create app modal dialogs in a different way to work around a KDE 3 win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: with missing files Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/gtk_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/platform_util.h" 5 #include "chrome/common/platform_util.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "chrome/common/gtk_util.h"
12 #include "chrome/common/process_watcher.h" 13 #include "chrome/common/process_watcher.h"
13 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
14 15
15 namespace { 16 namespace {
16 17
17 void XDGOpen(const std::string& path) { 18 void XDGOpen(const std::string& path) {
18 std::vector<std::string> argv; 19 std::vector<std::string> argv;
19 argv.push_back("xdg-open"); 20 argv.push_back("xdg-open");
20 argv.push_back(path); 21 argv.push_back(path);
21 22
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 74
74 bool IsVisible(gfx::NativeView view) { 75 bool IsVisible(gfx::NativeView view) {
75 return GTK_WIDGET_VISIBLE(view); 76 return GTK_WIDGET_VISIBLE(view);
76 } 77 }
77 78
78 void SimpleErrorBox(gfx::NativeWindow parent, 79 void SimpleErrorBox(gfx::NativeWindow parent,
79 const string16& title, 80 const string16& title,
80 const string16& message) { 81 const string16& message) {
81 GtkWidget* dialog = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL, 82 GtkWidget* dialog = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL,
82 GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", UTF16ToUTF8(message).c_str()); 83 GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", UTF16ToUTF8(message).c_str());
84 gtk_util::ApplyMessageDialogQuirks(dialog);
83 gtk_window_set_title(GTK_WINDOW(dialog), UTF16ToUTF8(title).c_str()); 85 gtk_window_set_title(GTK_WINDOW(dialog), UTF16ToUTF8(title).c_str());
84 g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); 86 g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
85 gtk_widget_show_all(dialog); 87 gtk_widget_show_all(dialog);
86 } 88 }
87 89
88 } // namespace platform_util 90 } // namespace platform_util
OLDNEW
« no previous file with comments | « chrome/common/gtk_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698