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

Side by Side Diff: chrome/browser/ui/gtk/importer/import_progress_dialog_gtk.cc

Issue 6627038: gtk: Rename OnDialogResponse() to OnResponse() to standardize on a consistent naming scheme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 FALSE, FALSE, 0); 125 FALSE, FALSE, 0);
126 gtk_box_pack_start(GTK_BOX(content_area), control_group, FALSE, FALSE, 0); 126 gtk_box_pack_start(GTK_BOX(content_area), control_group, FALSE, FALSE, 0);
127 127
128 g_signal_connect(dialog_, "response", 128 g_signal_connect(dialog_, "response",
129 G_CALLBACK(OnResponseThunk), this); 129 G_CALLBACK(OnResponseThunk), this);
130 gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE); 130 gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE);
131 } 131 }
132 132
133 ImportProgressDialogGtk::~ImportProgressDialogGtk() {} 133 ImportProgressDialogGtk::~ImportProgressDialogGtk() {}
134 134
135 void ImportProgressDialogGtk::OnResponse(GtkWidget* widget, int response) { 135 void ImportProgressDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
136 if (!importing_) { 136 if (!importing_) {
137 CloseDialog(); 137 CloseDialog();
138 return; 138 return;
139 } 139 }
140 140
141 // Only response to the dialog is to close it so we hide immediately. 141 // Only response to the dialog is to close it so we hide immediately.
142 gtk_widget_hide_all(dialog_); 142 gtk_widget_hide_all(dialog_);
143 if (response == GTK_RESPONSE_REJECT) 143 if (response_id == GTK_RESPONSE_REJECT)
144 importer_host_->Cancel(); 144 importer_host_->Cancel();
145 } 145 }
146 146
147 void ImportProgressDialogGtk::ShowDialog() { 147 void ImportProgressDialogGtk::ShowDialog() {
148 gtk_widget_show_all(dialog_); 148 gtk_widget_show_all(dialog_);
149 } 149 }
150 150
151 void ImportProgressDialogGtk::CloseDialog() { 151 void ImportProgressDialogGtk::CloseDialog() {
152 gtk_widget_destroy(dialog_); 152 gtk_widget_destroy(dialog_);
153 dialog_ = NULL; 153 dialog_ = NULL;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 const ProfileInfo& browser_profile, 223 const ProfileInfo& browser_profile,
224 Profile* profile, 224 Profile* profile,
225 bool first_run) { 225 bool first_run) {
226 DCHECK_NE(0, items); 226 DCHECK_NE(0, items);
227 ImportProgressDialogGtk::StartImport( 227 ImportProgressDialogGtk::StartImport(
228 parent, items, importer_host, importer_observer, browser_profile, profile, 228 parent, items, importer_host, importer_observer, browser_profile, profile,
229 first_run); 229 first_run);
230 } 230 }
231 231
232 } // namespace importer 232 } // namespace importer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698