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

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_util.cc

Issue 1234223005: Initial gtk3 support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed abort on GtkPrintUnixDialog Created 5 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/ui/libgtk2ui/gtk2_util.h" 5 #include "chrome/browser/ui/libgtk2ui/gtk2_util.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gdk/gdkx.h> 8 #include <gdk/gdkx.h>
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 aura::Window* GetAuraTransientParent(GtkWidget* dialog) { 129 aura::Window* GetAuraTransientParent(GtkWidget* dialog) {
130 return reinterpret_cast<aura::Window*>( 130 return reinterpret_cast<aura::Window*>(
131 g_object_get_data(G_OBJECT(dialog), kAuraTransientParent)); 131 g_object_get_data(G_OBJECT(dialog), kAuraTransientParent));
132 } 132 }
133 133
134 void ClearAuraTransientParent(GtkWidget* dialog) { 134 void ClearAuraTransientParent(GtkWidget* dialog) {
135 g_object_set_data(G_OBJECT(dialog), kAuraTransientParent, NULL); 135 g_object_set_data(G_OBJECT(dialog), kAuraTransientParent, NULL);
136 } 136 }
137 137
138 GtkStateType GetGtkState(ui::NativeTheme::State state) { 138 GtkStateFlags GetGtkState(ui::NativeTheme::State state) {
139 switch (state) { 139 switch (state) {
140 case ui::NativeTheme::kDisabled: return GTK_STATE_INSENSITIVE; 140 case ui::NativeTheme::kDisabled: return GTK_STATE_FLAG_INSENSITIVE;
141 case ui::NativeTheme::kHovered: return GTK_STATE_PRELIGHT; 141 case ui::NativeTheme::kHovered: return GTK_STATE_FLAG_PRELIGHT;
142 case ui::NativeTheme::kNormal: return GTK_STATE_NORMAL; 142 case ui::NativeTheme::kNormal: return GTK_STATE_FLAG_NORMAL;
143 case ui::NativeTheme::kPressed: return GTK_STATE_ACTIVE; 143 case ui::NativeTheme::kPressed: return GTK_STATE_FLAG_ACTIVE;
144 case ui::NativeTheme::kNumStates: NOTREACHED(); 144 case ui::NativeTheme::kNumStates: NOTREACHED();
145 } 145 }
146 return GTK_STATE_NORMAL; 146 return GTK_STATE_FLAG_NORMAL;
147 } 147 }
148 148
149 } // namespace libgtk2ui 149 } // namespace libgtk2ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698