]> git.lyx.org Git - lyx.git/commitdiff
grey-out comboxes when they are disabled; disable toolbar layout combox when forceDef...
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 20 Jan 2002 23:17:17 +0000 (23:17 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 20 Jan 2002 23:17:17 +0000 (23:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3427 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/frontends/xforms/ChangeLog
src/frontends/xforms/Toolbar_pimpl.C
src/frontends/xforms/combox.C
src/lyx_gui.C
src/lyxfunc.C

index b178353f512b75b66ed7e6c9c0ea126c024c3213..ba66194bd0c5b51dcf3df291287d63110b8897bb 100644 (file)
@@ -1,5 +1,10 @@
 2002-01-20  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
 
+       * lyx_gui.C (init): give the toolbar tooltips a normal font.
+
+       * lyxfunc.C (getStatus): handle LFUN_LAYOUT like
+       LFUN_LAYOUT_PARAGRAPHS. 
+
        * tabular.C (GetCellFromInset): new method. Finds an inset in a
        tabular. It is possible to provide a possible cell, which will
        typically be the actcell from the corresponding insettabular
index 69fb2020e3280ed66c613a4de8ebdeedeca159b4..bd3873e5368c9a76ba71f25e979451d6b3158f15 100644 (file)
@@ -1,3 +1,12 @@
+2002-01-20  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
+
+       * Toolbar_pimpl.C (update): disable layout combox when LFUN_LAYOUT
+       is disabled
+
+       * combox.C (activate): 
+       (deactivate): change color of labels to reflect the state of the
+       combox
+
 2002-01-16  Herbert Voss  <voss@lyx.org>
 
        * FormExternal.C (build): activate  apply/ok-button when something
index 0440a290ef6cc697fa81bd133fe1b300fce45188..9d5471d3956fc28692f270ef6b5c90014eefb816 100644 (file)
@@ -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();
                }
        }
 }
index 5edc3f6f03d2726b42927540911787759b915df9..188b5cff716b80992f26489497ffaa5fcb2c233a 100644 (file)
@@ -358,17 +358,31 @@ void Combox::hide(int who)
 
 void Combox::activate()
 {
-       if (browser) fl_activate_object(browser);
-       if (button) fl_activate_object(button);
-       if (label) fl_activate_object(label);
+       if (browser)
+               fl_activate_object(browser);
+       if (button) {
+               fl_activate_object(button);
+               fl_set_object_lcol(button, FL_BLACK);
+       }
+       if (label) {
+               fl_activate_object(label);
+               fl_set_object_lcol(label, FL_BLACK);
+       }
 }
 
 
 void Combox::deactivate()
 {
-       if (browser) fl_deactivate_object(browser);
-       if (button) fl_deactivate_object(button);
-       if (label) fl_deactivate_object(label);
+       if (browser)
+               fl_deactivate_object(browser);
+       if (button) {
+               fl_deactivate_object(button);
+               fl_set_object_lcol(button, FL_INACTIVE);
+       }
+       if (label) {
+               fl_deactivate_object(label);
+               fl_set_object_lcol(label, FL_INACTIVE);
+       }
 }
 
 
index 9bb2bf2b82eb95cb7495defce2e53ea5370e9902..50ebac4742f04aa117abf3ecc2a87a34e46ce975 100644 (file)
@@ -241,6 +241,11 @@ void LyXGUI::init()
        fl_setpup_fontsize(FL_NORMAL_SIZE);
        fl_setpup_color(FL_MCOL, FL_BLACK);
        fl_set_goodies_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);
+#if FL_REVISION < 89 
+       fl_set_oneliner_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);
+#else
+       fl_set_tooltip_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);
+#endif
 
         // all lyxrc settings has to be done here as lyxrc has not yet
         // been read when the GUI is created (Jug)
index 26d83c051cf590a641832a5623589a265fa05bd4..5ca26ab25748ad788cd2e22aa87d8b57d28eb4ae 100644 (file)
@@ -420,6 +420,7 @@ FuncStatus LyXFunc::getStatus(kb_action action,
                            && !tli->getFirstLockingInsetOfType(Inset::TABULAR_CODE));
                break;
 
+       case LFUN_LAYOUT:
        case LFUN_LAYOUT_PARAGRAPH: {
                Inset * inset = TEXT(false)->cursor.par()->inInset();
                disable = inset && inset->forceDefaultParagraphs(inset);