]> git.lyx.org Git - features.git/commitdiff
Fix sensitivity in GBibtex
authorJohn Spray <spray@lyx.org>
Tue, 7 Feb 2006 22:20:37 +0000 (22:20 +0000)
committerJohn Spray <spray@lyx.org>
Tue, 7 Feb 2006 22:20:37 +0000 (22:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10823 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/gtk/GBibtex.C

index 4617a075e5df25c8b145cb80df11c85fe557b9fb..a96f510e482a974fe29fc0a1dfe8c774bf6a53b0 100644 (file)
@@ -127,6 +127,8 @@ void GBibtex::update()
        else
                toccheck_->set_active(false);
 
+       toccheck_->set_sensitive(!bibtopic);
+
        string btprint(controller().params().getSecOptions());
        int btp = 0;
        if (btprint == "btPrintNotCited")
@@ -182,11 +184,12 @@ void GBibtex::apply()
 
        string const bibstyle = stylecombo_.get_active_text();
        bool const bibtotoc = toccheck_->get_active();
+       bool const bibtopic = controller().usingBibtopic();
 
-       if (bibtotoc && (!bibstyle.empty())) {
+       if (!bibtopic && bibtotoc && (!bibstyle.empty())) {
                // both bibtotoc and style
                controller().params().setOptions("bibtotoc," + bibstyle);
-       } else if (bibtotoc) {
+       } else if (!bibtopic && bibtotoc) {
                // bibtotoc and no style
                controller().params().setOptions("bibtotoc");
        } else {
@@ -214,7 +217,7 @@ void GBibtex::apply()
                break;
        }
 
-       if (!controller().usingBibtopic())
+       if (!bibtopic)
                controller().params().setSecOptions("");
 }