]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gnome/gnomeBC.C
Remove unneeded files, we have switched to use the libglade and there is no
[lyx.git] / src / frontends / gnome / gnomeBC.C
index 76b88e93840be8da786d9193af51fe3a2efa9fea..5d057bfaa8e0f9e4f835311e6591853400749701 100644 (file)
@@ -9,46 +9,27 @@
 #include "gtk--/button.h"
 
 gnomeBC::gnomeBC(string const & cancel, string const & close)
-       : ButtonControllerBase(cancel, close),
-         okay_(0), apply_(0), cancel_(0), undo_all_(0)
+       : GuiBC<Gtk::Button, Gtk::Widget>(cancel, close)
 {}
 
 
-void gnomeBC::setSensitive(Gtk::Button * btn, ButtonPolicy::Button id)
+void gnomeBC::setWidgetEnabled(Gtk::Widget * obj, bool enabled)
 {
-       if (btn) {
-               bool const enabled = bp().buttonStatus(id);
+       if (obj)
+               obj->set_sensitive(enabled);
+}
+
+
+void gnomeBC::setButtonEnabled(Gtk::Button * btn, bool enabled) 
+{
+       if (btn)
                btn->set_sensitive(enabled);
-       }
 }
 
 
-void gnomeBC::refresh()
+void gnomeBC::setButtonLabel(Gtk::Button * obj, string const & label)
 {
-       setSensitive(okay_, ButtonPolicy::OKAY);
-       setSensitive(apply_, ButtonPolicy::APPLY);
-       setSensitive(undo_all_, ButtonPolicy::UNDO_ALL);
-
-#warning Handle the cancel button correctly! (be 20010327)
-#if 0
-       if (cancel_) {
-               bool const enabled = bp().buttonStatus(ButtonPolicy::CANCEL);
-//             if (enabled)
-//                     Change label to cancel_label_
-//             else
-//                     Change label to close_label_
-//Need to adapt it somehow since we use stock Gnome buttons.
-       }
-#endif
-       
-       if (!read_only_.empty()) {
-               bool enable = true;
-               if (bp().isReadOnly()) enable = false;
-               
-               WidgetList::const_iterator end = read_only_.end();
-               for (WidgetList::const_iterator iter = read_only_.begin();
-                    iter != end; ++iter) {
-                       (*iter)->set_sensitive(enable);
-               }
-       }
+#warning Implement me! (be 20010329)
+       // There is no methods set_text!
+       //obj->set_text(label);
 }