| OLD | NEW |
| 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/gtk/about_chrome_dialog.h" | 5 #include "chrome/browser/ui/gtk/about_chrome_dialog.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 gdk_cairo_rectangle(cr, &expose->area); | 97 gdk_cairo_rectangle(cr, &expose->area); |
| 98 cairo_fill(cr); | 98 cairo_fill(cr); |
| 99 cairo_destroy(cr); | 99 cairo_destroy(cr); |
| 100 return FALSE; | 100 return FALSE; |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace | 103 } // namespace |
| 104 | 104 |
| 105 void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) { | 105 void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) { |
| 106 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 106 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 107 static GdkPixbuf* background = rb.GetNativeImageNamed(IDR_ABOUT_BACKGROUND); | 107 static GdkPixbuf* background = rb.GetNativeImageNamed( |
| 108 IDR_ABOUT_BACKGROUND).ToGdkPixbuf(); |
| 108 | 109 |
| 109 // Build the dialog. | 110 // Build the dialog. |
| 110 GtkWidget* dialog = gtk_dialog_new_with_buttons( | 111 GtkWidget* dialog = gtk_dialog_new_with_buttons( |
| 111 l10n_util::GetStringUTF8(IDS_ABOUT_CHROME_TITLE).c_str(), | 112 l10n_util::GetStringUTF8(IDS_ABOUT_CHROME_TITLE).c_str(), |
| 112 parent, | 113 parent, |
| 113 GTK_DIALOG_MODAL, | 114 GTK_DIALOG_MODAL, |
| 114 NULL); | 115 NULL); |
| 115 // Pick up the style set in gtk_util.cc:InitRCStyles(). | 116 // Pick up the style set in gtk_util.cc:InitRCStyles(). |
| 116 // The layout of this dialog is special because the logo should be flush | 117 // The layout of this dialog is special because the logo should be flush |
| 117 // with the edges of the window. | 118 // with the edges of the window. |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 ui::kContentAreaBorder, 0, | 276 ui::kContentAreaBorder, 0, |
| 276 ui::kContentAreaBorder, ui::kContentAreaBorder); | 277 ui::kContentAreaBorder, ui::kContentAreaBorder); |
| 277 gtk_container_add(GTK_CONTAINER(alignment), vbox); | 278 gtk_container_add(GTK_CONTAINER(alignment), vbox); |
| 278 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); | 279 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); |
| 279 | 280 |
| 280 g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), NULL); | 281 g_signal_connect(dialog, "response", G_CALLBACK(OnResponse), NULL); |
| 281 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); | 282 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); |
| 282 gtk_widget_show_all(dialog); | 283 gtk_widget_show_all(dialog); |
| 283 gtk_widget_grab_focus(close_button); | 284 gtk_widget_grab_focus(close_button); |
| 284 } | 285 } |
| OLD | NEW |