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

Side by Side Diff: app/gtk_util.cc

Issue 1606007: Move EnvironmentVariableGetter from base/linux_util.h to base/env_var.h. Labe... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix windows build for good this time? 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/base.gypi » ('j') | 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) 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/linux_util.h" 11 #include "base/linux_util.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/string_util.h" 13 #include "base/string_util.h"
13 14
14 namespace gtk_util { 15 namespace gtk_util {
15 16
16 void GetWidgetSizeFromResources( 17 void GetWidgetSizeFromResources(
17 GtkWidget* widget, int width_chars, int height_lines, 18 GtkWidget* widget, int width_chars, int height_lines,
18 int* width, int* height) { 19 int* width, int* height) {
19 DCHECK(GTK_WIDGET_REALIZED(widget)) 20 DCHECK(GTK_WIDGET_REALIZED(widget))
(...skipping 29 matching lines...) Expand all
49 pango_font_metrics_get_descent(metrics)) * 50 pango_font_metrics_get_descent(metrics)) *
50 height_lines / PANGO_SCALE); 51 height_lines / PANGO_SCALE);
51 } 52 }
52 pango_font_metrics_unref(metrics); 53 pango_font_metrics_unref(metrics);
53 g_object_unref(context); 54 g_object_unref(context);
54 } 55 }
55 56
56 void ApplyMessageDialogQuirks(GtkWidget* dialog) { 57 void ApplyMessageDialogQuirks(GtkWidget* dialog) {
57 if (gtk_window_get_modal(GTK_WINDOW(dialog))) { 58 if (gtk_window_get_modal(GTK_WINDOW(dialog))) {
58 // Work around a KDE 3 window manager bug. 59 // Work around a KDE 3 window manager bug.
59 scoped_ptr<base::EnvironmentVariableGetter> env( 60 scoped_ptr<base::EnvVarGetter> env(base::EnvVarGetter::Create());
60 base::EnvironmentVariableGetter::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.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698