]> git.lyx.org Git - features.git/commitdiff
Mention style-dependency of of features in the tooltips, part 2
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 6 Feb 2017 12:16:11 +0000 (13:16 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 6 Feb 2017 12:17:38 +0000 (13:17 +0100)
Some amendments to c7126dc4f9770.

src/frontends/qt4/GuiCitation.cpp
src/frontends/qt4/ui/CitationUi.ui

index 28d5dcf63830c0a145b893dadda092bde9b2068a..c121008dc5376abffa6fbe856dc8b9f299ca3410 100644 (file)
@@ -276,24 +276,38 @@ void GuiCitation::updateFormatting(CitationStyle currentStyle)
        selectedLV->horizontalHeader()->setVisible(qualified);
        selectedLV->setColumnHidden(0, !qualified);
        selectedLV->setColumnHidden(2, !qualified);
+       bool const haveSelection = rows > 0;
        if (qualified) {
                textBeforeLA->setText(qt_("General text befo&re:"));
                textAfterLA->setText(qt_("General &text after:"));
                textBeforeED->setToolTip(qt_("Text that precedes the whole reference list. "
-                                            "For text that precedes individual items, double-click on the respective entry above."));
+                                            "For text that precedes individual items, "
+                                            "double-click on the respective entry above."));
                textAfterLA->setToolTip(qt_("General &text after:"));
                textAfterED->setToolTip(qt_("Text that follows the whole reference list. "
-                                            "For text that follows individual items, double-click on the respective entry above."));
+                                            "For text that follows individual items, "
+                                            "double-click on the respective entry above."));
        } else {
                textBeforeLA->setText(qt_("Text befo&re:"));
-               textBeforeED->setToolTip(qt_("Text that precedes the reference (e.g., \"cf.\")"));
+               if (textbefore && haveSelection)
+                       textBeforeED->setToolTip(qt_("Text that precedes the reference (e.g., \"cf.\")"));
+               else
+                       textBeforeED->setToolTip(qt_("Text that precedes the reference (e.g., \"cf.\"), "
+                                                    "if the current citation style supports this."));
                textAfterLA->setText(qt_("&Text after:"));
-               textAfterED->setToolTip(qt_("Text that follows the reference (e.g., pages)"));
+               if (textafter && haveSelection)
+                       textAfterED->setToolTip(qt_("Text that follows the reference (e.g., pages)"));
+               else
+                       textAfterED->setToolTip(qt_("Text that follows the reference (e.g., pages), "
+                                                   "if the current citation style supports this."));
        }
 
-       bool const haveSelection = rows > 0;
-
        forceuppercaseCB->setEnabled(force && haveSelection);
+       if (force && haveSelection)
+               forceuppercaseCB->setToolTip("Force upper case in names (\"Del Piero\", not \"del Piero\").");
+       else
+               forceuppercaseCB->setToolTip("Force upper case in names (\"Del Piero\", not \"del Piero\"), "
+                                            "if the current citation style supports this.");
        starredCB->setEnabled(full && haveSelection);
        textBeforeED->setEnabled(textbefore && haveSelection);
        textBeforeLA->setEnabled(textbefore && haveSelection);
@@ -324,7 +338,11 @@ void GuiCitation::updateFormatting(CitationStyle currentStyle)
        } else {
                // This is the default meaning of the starred commands
                starredCB->setText(qt_("All aut&hors"));
-               starredCB->setToolTip(qt_("Always list all authors (rather than using \"et al.\")"));
+               if (full && haveSelection)
+                       starredCB->setToolTip(qt_("Always list all authors (rather than using \"et al.\")"));
+               else
+                       starredCB->setToolTip(qt_("Always list all authors (rather than using \"et al.\"), "
+                                                 "if the current citation style supports this."));
        }
 }
 
index a5f7941f5a95935c88dc3b730929a28d624fcb4b..23c9535a67305f6ebff9a482d947e200c5b357f0 100644 (file)
             <item>
              <widget class="QLineEdit" name="textAfterED">
               <property name="toolTip">
-               <string>Text that follows the reference (e.g., pages), if the current style supports this.</string>
+               <string>Text that follows the reference (e.g., pages), if the current citation style supports this.</string>
               </property>
              </widget>
             </item>
         <item>
          <widget class="QCheckBox" name="forceuppercaseCB">
           <property name="toolTip">
-           <string>Force upper case in names (&quot;Del Piero&quot;, not &quot;del Piero&quot;), if the current style supports this.</string>
+           <string>Force upper case in names (&quot;Del Piero&quot;, not &quot;del Piero&quot;), if the current citation style supports this.</string>
           </property>
           <property name="text">
            <string>Force upcas&amp;ing</string>
         <item>
          <widget class="QCheckBox" name="starredCB">
           <property name="toolTip">
-           <string>Always list all authors (rather than using &quot;et al.&quot;), if the current style supports this.</string>
+           <string>Always list all authors (rather than using &quot;et al.&quot;), if the current citation style supports this.</string>
           </property>
           <property name="text">
            <string>All aut&amp;hors</string>