summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-07 21:08:46 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-07 21:08:46 +0000
commit43250c7bc9096609ca89af72153c9a6c0a4d53e2 (patch)
tree803eb726e3852991dd50d932938dc1dd20d5eeb6 /chrome/browser/autofill
parent3900683cfc013217805ff828d8276056b10a5251 (diff)
downloadchromium_src-43250c7bc9096609ca89af72153c9a6c0a4d53e2.zip
chromium_src-43250c7bc9096609ca89af72153c9a6c0a4d53e2.tar.gz
chromium_src-43250c7bc9096609ca89af72153c9a6c0a4d53e2.tar.bz2
gtk: Rename OnDialogResponse() to OnResponse() to standardize on a consistent naming scheme.
This allow us to have a single pattern for handling the gtk "response" callback. So now in every gtk dialog on chromium, it looks like this: my_dialog_gtk.h: CHROMEGTK_CALLBACK_1(MyDialogGtk, void, OnResponse, int); my_dialog_gtk.cc: void MyDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { } And to subscribe to this event: g_signal_connect(dialog_, "response", G_CALLBACK(OnResponseThunk), this); BUG=None TEST=None Review URL: http://codereview.chromium.org/6627038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77180 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill')
-rw-r--r--chrome/browser/autofill/autofill_dialog_gtk.cc6
-rw-r--r--chrome/browser/autofill/autofill_editor_gtk.cc13
2 files changed, 9 insertions, 10 deletions
diff --git a/chrome/browser/autofill/autofill_dialog_gtk.cc b/chrome/browser/autofill/autofill_dialog_gtk.cc
index 0195014..6bcf897 100644
--- a/chrome/browser/autofill/autofill_dialog_gtk.cc
+++ b/chrome/browser/autofill/autofill_dialog_gtk.cc
@@ -115,7 +115,7 @@ class AutoFillDialog : public PersonalDataManager::Observer,
// data is available if the response is GTK_RESPONSE_APPLY or GTK_RESPONSE_OK.
// We close the dialog if the response is GTK_RESPONSE_OK or
// GTK_RESPONSE_CANCEL.
- CHROMEG_CALLBACK_1(AutoFillDialog, void, OnResponse, GtkDialog*, gint);
+ CHROMEGTK_CALLBACK_1(AutoFillDialog, void, OnResponse, int);
CHROMEGTK_CALLBACK_0(AutoFillDialog, void, OnAutoFillCheckToggled);
CHROMEG_CALLBACK_2(AutoFillDialog, void, OnRowActivated, GtkTreeView*,
@@ -252,11 +252,11 @@ void AutoFillDialog::OnDestroy(GtkWidget* widget) {
MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
-void AutoFillDialog::OnResponse(GtkDialog* dialog, gint response_id) {
+void AutoFillDialog::OnResponse(GtkWidget* dialog, int response_id) {
if (response_id == GTK_RESPONSE_OK ||
response_id == GTK_RESPONSE_CANCEL ||
response_id == GTK_RESPONSE_DELETE_EVENT) {
- gtk_widget_destroy(GTK_WIDGET(dialog));
+ gtk_widget_destroy(dialog);
}
if (response_id == kAutoFillDialogAboutLink)
diff --git a/chrome/browser/autofill/autofill_editor_gtk.cc b/chrome/browser/autofill/autofill_editor_gtk.cc
index 2043a4e..11f2184f 100644
--- a/chrome/browser/autofill/autofill_editor_gtk.cc
+++ b/chrome/browser/autofill/autofill_editor_gtk.cc
@@ -191,7 +191,7 @@ class AutoFillProfileEditor {
void UpdateOkButton();
CHROMEGTK_CALLBACK_0(AutoFillProfileEditor, void, OnDestroy);
- CHROMEG_CALLBACK_1(AutoFillProfileEditor, void, OnResponse, GtkDialog*, gint);
+ CHROMEGTK_CALLBACK_1(AutoFillProfileEditor, void, OnResponse, int);
CHROMEG_CALLBACK_0(AutoFillProfileEditor, void, OnPhoneChanged, GtkEditable*);
CHROMEG_CALLBACK_0(AutoFillProfileEditor, void, OnFaxChanged, GtkEditable*);
CHROMEG_CALLBACK_0(AutoFillProfileEditor, void, OnFieldChanged, GtkEditable*);
@@ -492,7 +492,7 @@ void AutoFillProfileEditor::OnDestroy(GtkWidget* widget) {
MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
-void AutoFillProfileEditor::OnResponse(GtkDialog* dialog, gint response_id) {
+void AutoFillProfileEditor::OnResponse(GtkWidget* dialog, int response_id) {
if (response_id == GTK_RESPONSE_APPLY || response_id == GTK_RESPONSE_OK)
ApplyEdits();
@@ -500,7 +500,7 @@ void AutoFillProfileEditor::OnResponse(GtkDialog* dialog, gint response_id) {
response_id == GTK_RESPONSE_APPLY ||
response_id == GTK_RESPONSE_CANCEL ||
response_id == GTK_RESPONSE_DELETE_EVENT) {
- gtk_widget_destroy(GTK_WIDGET(dialog));
+ gtk_widget_destroy(dialog);
}
}
@@ -557,8 +557,7 @@ class AutoFillCreditCardEditor {
void UpdateOkButton();
CHROMEGTK_CALLBACK_0(AutoFillCreditCardEditor, void, OnDestroy);
- CHROMEG_CALLBACK_1(AutoFillCreditCardEditor, void, OnResponse, GtkDialog*,
- gint);
+ CHROMEGTK_CALLBACK_1(AutoFillCreditCardEditor, void, OnResponse, int);
CHROMEG_CALLBACK_0(AutoFillCreditCardEditor, void, OnFieldChanged,
GtkEditable*);
CHROMEG_CALLBACK_2(AutoFillCreditCardEditor, void, OnDeleteTextFromNumber,
@@ -804,7 +803,7 @@ void AutoFillCreditCardEditor::OnDestroy(GtkWidget* widget) {
MessageLoop::current()->DeleteSoon(FROM_HERE, this);
}
-void AutoFillCreditCardEditor::OnResponse(GtkDialog* dialog, gint response_id) {
+void AutoFillCreditCardEditor::OnResponse(GtkWidget* dialog, int response_id) {
if (response_id == GTK_RESPONSE_APPLY || response_id == GTK_RESPONSE_OK)
ApplyEdits();
@@ -812,7 +811,7 @@ void AutoFillCreditCardEditor::OnResponse(GtkDialog* dialog, gint response_id) {
response_id == GTK_RESPONSE_APPLY ||
response_id == GTK_RESPONSE_CANCEL ||
response_id == GTK_RESPONSE_DELETE_EVENT) {
- gtk_widget_destroy(GTK_WIDGET(dialog));
+ gtk_widget_destroy(dialog);
}
}