summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-03 18:22:00 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-03 18:22:00 +0000
commitf3a88811802127f14a28fd0fa0fb8cb4ff0c222d (patch)
treee44e0db883af3bab3c9170eecd26643202798858 /chrome/browser/gtk
parentb614cbb088107996d8e56d30cdecefca9f14d5b6 (diff)
downloadchromium_src-f3a88811802127f14a28fd0fa0fb8cb4ff0c222d.zip
chromium_src-f3a88811802127f14a28fd0fa0fb8cb4ff0c222d.tar.gz
chromium_src-f3a88811802127f14a28fd0fa0fb8cb4ff0c222d.tar.bz2
GTK: Add stock icons to some dialog buttons.
To be clear, this only adds button images from stock images, and doesn't change the text of the buttons. I chose APPLY for dialogs that involve checkboxes. I chose OK for dialogs without checkboxes. also - switched the position of the OK/Cancel buttons on the import lock dialog. - changed the first run dialog CANCEL button to QUIT, because CANCEL is really confusing in that situation (this is a problem on windows as well). I couldn't find any other dialogs that are missing button images, but if you see some call em out. BUG=none TEST=look at all the pretty images. Review URL: http://codereview.chromium.org/160493 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc5
-rw-r--r--chrome/browser/gtk/first_run_dialog.cc8
-rw-r--r--chrome/browser/gtk/import_dialog_gtk.cc4
-rw-r--r--chrome/browser/gtk/import_lock_dialog_gtk.cc11
4 files changed, 17 insertions, 11 deletions
diff --git a/chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc b/chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc
index 4d0451c..07b911d 100644
--- a/chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc
+++ b/chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc
@@ -28,9 +28,10 @@ ClearBrowsingDataDialogGtk::ClearBrowsingDataDialogGtk(GtkWindow* parent,
(GtkDialogFlags) (GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR),
GTK_STOCK_CLOSE,
GTK_RESPONSE_REJECT,
- l10n_util::GetStringUTF8(IDS_CLEAR_BROWSING_DATA_COMMIT).c_str(),
- GTK_RESPONSE_ACCEPT,
NULL);
+ gtk_util::AddButtonToDialog(dialog,
+ l10n_util::GetStringUTF8(IDS_CLEAR_BROWSING_DATA_COMMIT).c_str(),
+ GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT);
GtkWidget* content_area = GTK_DIALOG(dialog)->vbox;
gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing);
diff --git a/chrome/browser/gtk/first_run_dialog.cc b/chrome/browser/gtk/first_run_dialog.cc
index 50f2321..5437a3d 100644
--- a/chrome/browser/gtk/first_run_dialog.cc
+++ b/chrome/browser/gtk/first_run_dialog.cc
@@ -30,11 +30,13 @@ FirstRunDialog::FirstRunDialog(Profile* profile, int& response)
l10n_util::GetStringUTF8(IDS_FIRSTRUN_DLG_TITLE).c_str(),
NULL, // No parent
(GtkDialogFlags) (GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR),
- GTK_STOCK_CANCEL,
+ GTK_STOCK_QUIT,
GTK_RESPONSE_REJECT,
- l10n_util::GetStringUTF8(IDS_FIRSTRUN_DLG_OK).c_str(),
- GTK_RESPONSE_ACCEPT,
NULL);
+ gtk_util::AddButtonToDialog(dialog_,
+ l10n_util::GetStringUTF8(IDS_FIRSTRUN_DLG_OK).c_str(),
+ GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT);
+
gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE);
int width, height;
gtk_util::GetWidgetSizeFromResources(dialog_,
diff --git a/chrome/browser/gtk/import_dialog_gtk.cc b/chrome/browser/gtk/import_dialog_gtk.cc
index 33a12cb..c1cbf35 100644
--- a/chrome/browser/gtk/import_dialog_gtk.cc
+++ b/chrome/browser/gtk/import_dialog_gtk.cc
@@ -39,9 +39,9 @@ ImportDialogGtk::ImportDialogGtk(GtkWindow* parent, Profile* profile) :
// Add import button separately as we might need to disable it, if
// no supported browsers found.
- GtkWidget* import_button = gtk_dialog_add_button(GTK_DIALOG(dialog_),
+ GtkWidget* import_button = gtk_util::AddButtonToDialog(dialog_,
l10n_util::GetStringUTF8(IDS_IMPORT_COMMIT).c_str(),
- GTK_RESPONSE_ACCEPT);
+ GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT);
// TODO(rahulk): find how to set size properly so that the dialog
// box width is at least enough to display full title.
diff --git a/chrome/browser/gtk/import_lock_dialog_gtk.cc b/chrome/browser/gtk/import_lock_dialog_gtk.cc
index 465ccea..748dab3 100644
--- a/chrome/browser/gtk/import_lock_dialog_gtk.cc
+++ b/chrome/browser/gtk/import_lock_dialog_gtk.cc
@@ -24,12 +24,15 @@ ImportLockDialogGtk::ImportLockDialogGtk(GtkWindow* parent,
l10n_util::GetStringUTF8(IDS_IMPORTER_LOCK_TITLE).c_str(),
parent,
(GtkDialogFlags) (GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR),
- l10n_util::GetStringUTF8(IDS_IMPORTER_LOCK_OK).c_str(),
- GTK_RESPONSE_ACCEPT,
- l10n_util::GetStringUTF8(IDS_IMPORTER_LOCK_CANCEL).c_str(),
- GTK_RESPONSE_REJECT,
NULL);
+ gtk_util::AddButtonToDialog(dialog_,
+ l10n_util::GetStringUTF8(IDS_IMPORTER_LOCK_CANCEL).c_str(),
+ GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
+ gtk_util::AddButtonToDialog(dialog_,
+ l10n_util::GetStringUTF8(IDS_IMPORTER_LOCK_OK).c_str(),
+ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT);
+
GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox;
gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing);
GtkWidget* label = gtk_label_new(