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

Side by Side Diff: chrome/browser/gtk/browser_titlebar.cc

Issue 150176: GTK: First draft of using native themes, partially based on evan's CL 118358. (Closed)
Patch Set: And the codereview tool is back. Created 11 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) 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/browser/gtk/browser_titlebar.h" 5 #include "chrome/browser/gtk/browser_titlebar.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 gtk_box_pack_end(GTK_BOX(container_), titlebar_buttons_box_, FALSE, 138 gtk_box_pack_end(GTK_BOX(container_), titlebar_buttons_box_, FALSE,
139 FALSE, 0); 139 FALSE, 0);
140 140
141 gtk_widget_show_all(container_); 141 gtk_widget_show_all(container_);
142 } 142 }
143 143
144 CustomDrawButton* BrowserTitlebar::BuildTitlebarButton(int image, 144 CustomDrawButton* BrowserTitlebar::BuildTitlebarButton(int image,
145 int image_pressed, int image_hot, GtkWidget* box, int tooltip) { 145 int image_pressed, int image_hot, GtkWidget* box, int tooltip) {
146 CustomDrawButton* button = new CustomDrawButton(image, image_pressed, 146 CustomDrawButton* button = new CustomDrawButton(image, image_pressed,
147 image_hot, 0); 147 image_hot, 0, NULL);
148 gtk_widget_add_events(GTK_WIDGET(button->widget()), GDK_POINTER_MOTION_MASK); 148 gtk_widget_add_events(GTK_WIDGET(button->widget()), GDK_POINTER_MOTION_MASK);
149 g_signal_connect(button->widget(), "clicked", G_CALLBACK(OnButtonClicked), 149 g_signal_connect(button->widget(), "clicked", G_CALLBACK(OnButtonClicked),
150 this); 150 this);
151 g_signal_connect(button->widget(), "motion-notify-event", 151 g_signal_connect(button->widget(), "motion-notify-event",
152 G_CALLBACK(OnMouseMoveEvent), browser_window_); 152 G_CALLBACK(OnMouseMoveEvent), browser_window_);
153 std::string localized_tooltip = l10n_util::GetStringUTF8(tooltip); 153 std::string localized_tooltip = l10n_util::GetStringUTF8(tooltip);
154 gtk_widget_set_tooltip_text(button->widget(), 154 gtk_widget_set_tooltip_text(button->widget(),
155 localized_tooltip.c_str()); 155 localized_tooltip.c_str());
156 gtk_box_pack_end(GTK_BOX(box), button->widget(), FALSE, FALSE, 0); 156 gtk_box_pack_end(GTK_BOX(box), button->widget(), FALSE, FALSE, 0);
157 return button; 157 return button;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 PrefService* prefs = browser_window_->browser()->profile()->GetPrefs(); 272 PrefService* prefs = browser_window_->browser()->profile()->GetPrefs();
273 prefs->SetBoolean(prefs::kUseCustomChromeFrame, 273 prefs->SetBoolean(prefs::kUseCustomChromeFrame,
274 !prefs->GetBoolean(prefs::kUseCustomChromeFrame)); 274 !prefs->GetBoolean(prefs::kUseCustomChromeFrame));
275 break; 275 break;
276 } 276 }
277 277
278 default: 278 default:
279 NOTREACHED(); 279 NOTREACHED();
280 } 280 }
281 } 281 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698