| OLD | NEW |
| 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 <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 // (up to padding) and don't vertically stretch. | 298 // (up to padding) and don't vertically stretch. |
| 299 titlebar_buttons_box_ = gtk_vbox_new(FALSE, 0); | 299 titlebar_buttons_box_ = gtk_vbox_new(FALSE, 0); |
| 300 GtkWidget* buttons_hbox = gtk_hbox_new(FALSE, kButtonSpacing); | 300 GtkWidget* buttons_hbox = gtk_hbox_new(FALSE, kButtonSpacing); |
| 301 top_padding_ = gtk_fixed_new(); | 301 top_padding_ = gtk_fixed_new(); |
| 302 gtk_widget_set_size_request(top_padding_, -1, kButtonOuterPadding); | 302 gtk_widget_set_size_request(top_padding_, -1, kButtonOuterPadding); |
| 303 gtk_box_pack_start(GTK_BOX(titlebar_buttons_box_), top_padding_, FALSE, FALSE, | 303 gtk_box_pack_start(GTK_BOX(titlebar_buttons_box_), top_padding_, FALSE, FALSE, |
| 304 0); | 304 0); |
| 305 gtk_box_pack_start(GTK_BOX(titlebar_buttons_box_), buttons_hbox, FALSE, | 305 gtk_box_pack_start(GTK_BOX(titlebar_buttons_box_), buttons_hbox, FALSE, |
| 306 FALSE, 0); | 306 FALSE, 0); |
| 307 | 307 |
| 308 if (CommandLine::ForCurrentProcess()->HasSwitch(L"glen")) { | 308 if (CommandLine::ForCurrentProcess()->HasSwitch("glen")) { |
| 309 close_button_.reset(BuildTitlebarButton(IDR_GLEN, IDR_GLEN, IDR_GLEN, | 309 close_button_.reset(BuildTitlebarButton(IDR_GLEN, IDR_GLEN, IDR_GLEN, |
| 310 buttons_hbox, IDS_GLEN)); | 310 buttons_hbox, IDS_GLEN)); |
| 311 } else { | 311 } else { |
| 312 close_button_.reset(BuildTitlebarButton(IDR_CLOSE, IDR_CLOSE_P, IDR_CLOSE_H, | 312 close_button_.reset(BuildTitlebarButton(IDR_CLOSE, IDR_CLOSE_P, IDR_CLOSE_H, |
| 313 buttons_hbox, | 313 buttons_hbox, |
| 314 IDS_XPFRAME_CLOSE_TOOLTIP)); | 314 IDS_XPFRAME_CLOSE_TOOLTIP)); |
| 315 } | 315 } |
| 316 | 316 |
| 317 restore_button_.reset(BuildTitlebarButton(IDR_RESTORE, IDR_RESTORE_P, | 317 restore_button_.reset(BuildTitlebarButton(IDR_RESTORE, IDR_RESTORE_P, |
| 318 IDR_RESTORE_H, buttons_hbox, | 318 IDR_RESTORE_H, buttons_hbox, |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 if (g_throbber_frames) | 696 if (g_throbber_frames) |
| 697 return; | 697 return; |
| 698 | 698 |
| 699 // We load the light version of the throbber since it'll be in the titlebar. | 699 // We load the light version of the throbber since it'll be in the titlebar. |
| 700 g_throbber_frames = new std::vector<GdkPixbuf*>; | 700 g_throbber_frames = new std::vector<GdkPixbuf*>; |
| 701 MakeThrobberFrames(IDR_THROBBER_LIGHT, g_throbber_frames); | 701 MakeThrobberFrames(IDR_THROBBER_LIGHT, g_throbber_frames); |
| 702 | 702 |
| 703 g_throbber_waiting_frames = new std::vector<GdkPixbuf*>; | 703 g_throbber_waiting_frames = new std::vector<GdkPixbuf*>; |
| 704 MakeThrobberFrames(IDR_THROBBER_WAITING_LIGHT, g_throbber_waiting_frames); | 704 MakeThrobberFrames(IDR_THROBBER_WAITING_LIGHT, g_throbber_waiting_frames); |
| 705 } | 705 } |
| OLD | NEW |