diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/gtk/first_run_dialog.cc | 10 | ||||
-rw-r--r-- | chrome/browser/gtk/first_run_dialog.h | 17 |
2 files changed, 10 insertions, 17 deletions
diff --git a/chrome/browser/gtk/first_run_dialog.cc b/chrome/browser/gtk/first_run_dialog.cc index 6f3e3d7..ed4dfb9 100644 --- a/chrome/browser/gtk/first_run_dialog.cc +++ b/chrome/browser/gtk/first_run_dialog.cc @@ -39,7 +39,7 @@ bool FirstRunDialog::Show(Profile* profile, // http://code.google.com/p/chromium/issues/detail?id=12552 // Instead, run a loop and extract the response manually. g_signal_connect(first_run->dialog_, "response", - G_CALLBACK(HandleOnResponseDialog), first_run); + G_CALLBACK(OnResponseDialogThunk), first_run); gtk_widget_show_all(first_run->dialog_); MessageLoop::current()->Run(); @@ -95,7 +95,7 @@ FirstRunDialog::FirstRunDialog(Profile* profile, int& response) gtk_util::IndentWidget(learn_more_link), FALSE, FALSE, 0); g_signal_connect(learn_more_link, "clicked", - G_CALLBACK(OnLearnMoreLinkClicked), this); + G_CALLBACK(OnLearnMoreLinkClickedThunk), this); report_crashes_ = gtk_check_button_new(); gtk_container_add(GTK_CONTAINER(report_crashes_), check_label); @@ -140,7 +140,7 @@ FirstRunDialog::FirstRunDialog(Profile* profile, int& response) gtk_box_pack_start(GTK_BOX(content_area), vbox, FALSE, FALSE, 0); } -void FirstRunDialog::OnDialogResponse(GtkWidget* widget, int response) { +void FirstRunDialog::OnResponseDialog(GtkWidget* widget, int response) { bool import_started = false; gtk_widget_hide_all(dialog_); response_ = response; @@ -183,9 +183,7 @@ void FirstRunDialog::OnDialogResponse(GtkWidget* widget, int response) { FirstRunDone(); } -// static -void FirstRunDialog::OnLearnMoreLinkClicked(GtkButton *button, - FirstRunDialog* first_run) { +void FirstRunDialog::OnLearnMoreLinkClicked(GtkButton* button) { platform_util::OpenExternal(GURL( l10n_util::GetStringUTF8(IDS_LEARN_MORE_REPORTING_URL))); } diff --git a/chrome/browser/gtk/first_run_dialog.h b/chrome/browser/gtk/first_run_dialog.h index fb77c87..a2b2a70 100644 --- a/chrome/browser/gtk/first_run_dialog.h +++ b/chrome/browser/gtk/first_run_dialog.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -8,6 +8,7 @@ typedef struct _GtkButton GtkButton; typedef struct _GtkWidget GtkWidget; +#include "app/gtk_signal.h" #include "chrome/browser/first_run.h" #include "chrome/browser/importer/importer.h" @@ -16,7 +17,7 @@ class FirstRunDialog : public ImportObserver { // Displays the first run UI for reporting opt-in, import data etc. static bool Show(Profile* profile, ProcessSingleton* process_singleton); - // Overridden methods from ImportObserver. + // Overridden from ImportObserver: virtual void ImportCanceled() { FirstRunDone(); } @@ -26,16 +27,10 @@ class FirstRunDialog : public ImportObserver { private: FirstRunDialog(Profile* profile, int& response); - ~FirstRunDialog() { } + ~FirstRunDialog() {} - static void HandleOnResponseDialog(GtkWidget* widget, - int response, - FirstRunDialog* user_data) { - user_data->OnDialogResponse(widget, response); - } - void OnDialogResponse(GtkWidget* widget, int response); - static void OnLearnMoreLinkClicked(GtkButton *button, - FirstRunDialog* first_run); + CHROMEGTK_CALLBACK_1(FirstRunDialog, void, OnResponseDialog, int); + CHROMEG_CALLBACK_0(FirstRunDialog, void, OnLearnMoreLinkClicked, GtkButton*); // This method closes the first run window and quits the message loop so that // the Chrome startup can continue. This should be called when all the |