Code

r10950@tres: ted | 2006-02-16 08:36:49 -0800
authorgouldtj <gouldtj@users.sourceforge.net>
Wed, 29 Mar 2006 05:40:07 +0000 (05:40 +0000)
committergouldtj <gouldtj@users.sourceforge.net>
Wed, 29 Mar 2006 05:40:07 +0000 (05:40 +0000)
 Instead of showing the help button or not, let's make it so it is
 sensitive or not.  This will be a better UI.

src/extension/prefdialog.cpp

index ec4ae041f71fe199867af008170cc385be756fa7..fea52d4ec52c3c0848e52b195f50c5b6c3ae33b4 100644 (file)
@@ -23,8 +23,9 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co
 {
     this->get_vbox()->pack_start(*controls, true, true, 5);
 
-    if (_help != NULL)
-        add_button(Gtk::Stock::HELP, Gtk::RESPONSE_HELP);
+    Gtk::Button * help_button = add_button(Gtk::Stock::HELP, Gtk::RESPONSE_HELP);
+    if (_help == NULL)
+        help_button->set_sensitive(false);
     add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
 
     Gtk::Button * ok = add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);