summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/import_dialog_gtk.h
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-26 23:50:32 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-26 23:50:32 +0000
commit5225e060ae6a708d9bec85c895cb6531083ceb6a (patch)
tree2d60c9ce990019941d10aa88aa23d16645ba52bb /chrome/browser/gtk/import_dialog_gtk.h
parentaa10ce4e8fce2660f8fe9e3b6360e32ba6623375 (diff)
downloadchromium_src-5225e060ae6a708d9bec85c895cb6531083ceb6a.zip
chromium_src-5225e060ae6a708d9bec85c895cb6531083ceb6a.tar.gz
chromium_src-5225e060ae6a708d9bec85c895cb6531083ceb6a.tar.bz2
gtk: Disable the "Import" button on Import Bookmarks dialog if there is no checkbox checked.
BUG=30401 TEST=open Import Bookmarks dialog, uncheck all checkboxes, see if the "Import" button is disabled. Patch from Thiago Farina <thiago.farina@gmail.com> Review URL: http://codereview.chromium.org/1604025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45641 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/import_dialog_gtk.h')
-rw-r--r--chrome/browser/gtk/import_dialog_gtk.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/chrome/browser/gtk/import_dialog_gtk.h b/chrome/browser/gtk/import_dialog_gtk.h
index 1d3f5e5..8b2b220 100644
--- a/chrome/browser/gtk/import_dialog_gtk.h
+++ b/chrome/browser/gtk/import_dialog_gtk.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_GTK_IMPORT_DIALOG_GTK_H_
#define CHROME_BROWSER_GTK_IMPORT_DIALOG_GTK_H_
+#include "app/gtk_signal.h"
#include "chrome/browser/importer/importer.h"
class AccessibleWidgetHelper;
@@ -25,12 +26,18 @@ class ImportDialogGtk : public ImportObserver {
ImportDialogGtk(GtkWindow* parent, Profile* profile, int initial_state);
~ImportDialogGtk();
- static void HandleOnResponseDialog(GtkWidget* widget,
- int response,
- ImportDialogGtk* user_data) {
- user_data->OnDialogResponse(widget, response);
- }
- void OnDialogResponse(GtkWidget* widget, int response);
+ // Handler to respond to OK or Cancel responses from the dialog.
+ CHROMEGTK_CALLBACK_1(ImportDialogGtk, void, OnDialogResponse, int);
+
+ // Handler to respond to widget clicked actions from the dialog.
+ CHROMEGTK_CALLBACK_0(ImportDialogGtk, void, OnDialogWidgetClicked);
+
+ // Enable or disable the dialog buttons depending on the state of the
+ // checkboxes.
+ void UpdateDialogButtons();
+
+ // Create a bitmask from the checkboxes of the dialog.
+ uint16 GetCheckedItems();
// Parent window
GtkWindow* parent_;