]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/Toolbar_pimpl.C
use exclicit temp var
[lyx.git] / src / frontends / xforms / Toolbar_pimpl.C
index 0440a290ef6cc697fa81bd133fe1b300fce45188..6bf013398c537dc34623149f3a9dac17b5c5e320 100644 (file)
@@ -130,13 +130,13 @@ int BubblePost(FL_OBJECT *ob, int event,
        FL_OBJECT * bubble_timer = reinterpret_cast<FL_OBJECT *>(ob->u_cdata);
        
        // We do not test for empty help here, since this can never happen
-       if (event == FL_ENTER){
+       if (event == FL_ENTER) {
                fl_set_object_callback(bubble_timer,
                                       C_Toolbar_BubbleTimerCB,
                                       reinterpret_cast<long>(ob));
                fl_set_timer(bubble_timer, 1);
        }
-       else if (event != FL_MOTION){
+       else if (event != FL_MOTION) {
                fl_set_timer(bubble_timer, 0);
                fl_hide_oneliner();
        }
@@ -211,6 +211,11 @@ void Toolbar::Pimpl::update()
                        }
                        else
                                fl_activate_object(p->icon);
+               } else if (p->action == ToolbarDefaults::LAYOUTS && combox) {
+                       if (owner->getLyXFunc()->getStatus(LFUN_LAYOUT).disabled())
+                               combox->deactivate();
+                       else
+                               combox->activate();
                }
        }
 }
@@ -385,7 +390,7 @@ void Toolbar::Pimpl::set(bool doingmain)
        ToolbarList::iterator item = toollist.begin();
        ToolbarList::iterator end = toollist.end();
        for (; item != end; ++item) {
-               switch (item->action){
+               switch (item->action) {
                case ToolbarDefaults::SEPARATOR:
                        xpos += sepspace;
                        break;