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

Side by Side Diff: app/gtk_util.cc

Issue 1701005: bsd: refactor XDG bits of linux_util into a shared file. (Closed)
Patch Set: Created 10 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/base.gyp » ('j') | base/base.gyp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/gtk_util.h" 5 #include "app/gtk_util.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/env_var.h" 10 #include "base/env_var.h"
11 #include "base/linux_util.h"
12 #include "base/logging.h" 11 #include "base/logging.h"
13 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "base/xdg_util.h"
14 14
15 namespace gtk_util { 15 namespace gtk_util {
16 16
17 void GetWidgetSizeFromResources( 17 void GetWidgetSizeFromResources(
18 GtkWidget* widget, int width_chars, int height_lines, 18 GtkWidget* widget, int width_chars, int height_lines,
19 int* width, int* height) { 19 int* width, int* height) {
20 DCHECK(GTK_WIDGET_REALIZED(widget)) 20 DCHECK(GTK_WIDGET_REALIZED(widget))
21 << " widget must be realized to compute font metrics correctly"; 21 << " widget must be realized to compute font metrics correctly";
22 22
23 double chars = 0; 23 double chars = 0;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void ApplyMessageDialogQuirks(GtkWidget* dialog) { 57 void ApplyMessageDialogQuirks(GtkWidget* dialog) {
58 if (gtk_window_get_modal(GTK_WINDOW(dialog))) { 58 if (gtk_window_get_modal(GTK_WINDOW(dialog))) {
59 // Work around a KDE 3 window manager bug. 59 // Work around a KDE 3 window manager bug.
60 scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create()); 60 scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
61 if (base::DESKTOP_ENVIRONMENT_KDE3 == GetDesktopEnvironment(env.get())) 61 if (base::DESKTOP_ENVIRONMENT_KDE3 == GetDesktopEnvironment(env.get()))
62 gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), FALSE); 62 gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), FALSE);
63 } 63 }
64 } 64 }
65 65
66 } // namespace gtk_util 66 } // namespace gtk_util
OLDNEW
« no previous file with comments | « no previous file | base/base.gyp » ('j') | base/base.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698