summaryrefslogtreecommitdiffstats
path: root/chrome/browser/input_window_dialog_gtk.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-19 18:31:47 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-19 18:31:47 +0000
commit83334df4bcf8ecf2d829dfeabda7e02cdd287987 (patch)
tree2a34eef1c46b63a8ec0ae6f11eba9e9460942bbb /chrome/browser/input_window_dialog_gtk.cc
parentd758fe54ef98fd399a1e974c9856288811b5bd1e (diff)
downloadchromium_src-83334df4bcf8ecf2d829dfeabda7e02cdd287987.zip
chromium_src-83334df4bcf8ecf2d829dfeabda7e02cdd287987.tar.gz
chromium_src-83334df4bcf8ecf2d829dfeabda7e02cdd287987.tar.bz2
linux: more dialog touchups. I had missed one before.
BUG=11017,12056 Review URL: http://codereview.chromium.org/113587 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16394 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/input_window_dialog_gtk.cc')
-rw-r--r--chrome/browser/input_window_dialog_gtk.cc25
1 files changed, 10 insertions, 15 deletions
diff --git a/chrome/browser/input_window_dialog_gtk.cc b/chrome/browser/input_window_dialog_gtk.cc
index 8ef031e..b6bf5dc 100644
--- a/chrome/browser/input_window_dialog_gtk.cc
+++ b/chrome/browser/input_window_dialog_gtk.cc
@@ -39,12 +39,6 @@ class GtkInputWindowDialog : public InputWindowDialog {
// The underlying gtk dialog window.
GtkWidget* dialog_;
- // The Cancel or Close button
- GtkWidget* close_button_;
-
- // The OK button.
- GtkWidget* ok_button_;
-
// The GtkEntry in this form.
GtkWidget* input_;
@@ -62,17 +56,17 @@ GtkInputWindowDialog::GtkInputWindowDialog(GtkWindow* parent,
window_title.c_str(),
parent,
GTK_DIALOG_MODAL,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
NULL)),
- close_button_(gtk_dialog_add_button(GTK_DIALOG(dialog_),
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_REJECT)),
- ok_button_(gtk_dialog_add_button(GTK_DIALOG(dialog_),
- GTK_STOCK_OK, GTK_RESPONSE_ACCEPT)),
delegate_(delegate) {
gtk_dialog_set_default_response(GTK_DIALOG(dialog_), GTK_RESPONSE_ACCEPT);
+ gtk_dialog_set_has_separator(GTK_DIALOG(dialog_), FALSE);
GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox;
- GtkWidget* hbox = gtk_hbox_new(FALSE, 5);
+ gtk_box_set_spacing(GTK_BOX(content_area), 18);
+
+ GtkWidget* hbox = gtk_hbox_new(FALSE, 6);
GtkWidget* label_widget = gtk_label_new(label.c_str());
gtk_box_pack_start(GTK_BOX(hbox), label_widget, FALSE, FALSE, 0);
@@ -84,7 +78,7 @@ GtkInputWindowDialog::GtkInputWindowDialog(GtkWindow* parent,
gtk_box_pack_start(GTK_BOX(hbox), input_, TRUE, TRUE, 0);
gtk_widget_show_all(hbox);
- gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
+
gtk_box_pack_start(GTK_BOX(content_area), hbox, FALSE, FALSE, 0);
g_signal_connect(dialog_, "response",
@@ -115,8 +109,9 @@ void GtkInputWindowDialog::Close() {
void GtkInputWindowDialog::OnEntryChanged(GtkEditable* entry,
GtkInputWindowDialog* window) {
std::wstring value(UTF8ToWide(gtk_entry_get_text(GTK_ENTRY(entry))));
- gtk_widget_set_sensitive(GTK_WIDGET(window->ok_button_),
- window->delegate_->IsValid(value));
+ gtk_dialog_set_response_sensitive(GTK_DIALOG(window->dialog_),
+ GTK_RESPONSE_ACCEPT,
+ window->delegate_->IsValid(value));
}
// static