OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/importer/import_progress_dialog_gtk.h" | 5 #include "chrome/browser/ui/gtk/importer/import_progress_dialog_gtk.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // Build the dialog. | 74 // Build the dialog. |
75 dialog_ = gtk_dialog_new_with_buttons( | 75 dialog_ = gtk_dialog_new_with_buttons( |
76 l10n_util::GetStringUTF8(IDS_IMPORT_PROGRESS_TITLE).c_str(), | 76 l10n_util::GetStringUTF8(IDS_IMPORT_PROGRESS_TITLE).c_str(), |
77 parent_, | 77 parent_, |
78 (GtkDialogFlags) (GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR), | 78 (GtkDialogFlags) (GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR), |
79 GTK_STOCK_CANCEL, | 79 GTK_STOCK_CANCEL, |
80 GTK_RESPONSE_REJECT, | 80 GTK_RESPONSE_REJECT, |
81 NULL); | 81 NULL); |
82 importer_host_->set_parent_window(GTK_WINDOW(dialog_)); | 82 importer_host_->set_parent_window(GTK_WINDOW(dialog_)); |
83 | 83 |
84 GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox; | 84 GtkWidget* content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog_)); |
85 gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing); | 85 gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing); |
86 | 86 |
87 GtkWidget* control_group = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); | 87 GtkWidget* control_group = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); |
88 | 88 |
89 GtkWidget* import_info = gtk_label_new( | 89 GtkWidget* import_info = gtk_label_new( |
90 l10n_util::GetStringFUTF8(IDS_IMPORT_PROGRESS_INFO, | 90 l10n_util::GetStringFUTF8(IDS_IMPORT_PROGRESS_INFO, |
91 importer_name).c_str()); | 91 importer_name).c_str()); |
92 gtk_util::SetLabelWidth(import_info, 400); | 92 gtk_util::SetLabelWidth(import_info, 400); |
93 gtk_box_pack_start(GTK_BOX(control_group), import_info, FALSE, FALSE, 0); | 93 gtk_box_pack_start(GTK_BOX(control_group), import_info, FALSE, FALSE, 0); |
94 | 94 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 const SourceProfile& source_profile, | 224 const SourceProfile& source_profile, |
225 Profile* profile, | 225 Profile* profile, |
226 bool first_run) { | 226 bool first_run) { |
227 DCHECK_NE(0, items); | 227 DCHECK_NE(0, items); |
228 ImportProgressDialogGtk::StartImport( | 228 ImportProgressDialogGtk::StartImport( |
229 parent, items, importer_host, importer_observer, source_profile, profile, | 229 parent, items, importer_host, importer_observer, source_profile, profile, |
230 first_run); | 230 first_run); |
231 } | 231 } |
232 | 232 |
233 } // namespace importer | 233 } // namespace importer |
OLD | NEW |