]> git.lyx.org Git - lyx.git/commitdiff
Various Qt UI tweaks.
authorAngus Leeming <leeming@lyx.org>
Fri, 22 Jul 2005 13:46:03 +0000 (13:46 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 22 Jul 2005 13:46:03 +0000 (13:46 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10345 a592a061-630c-0410-9148-cb99ea01b6c8

18 files changed:
src/frontends/qt2/ChangeLog
src/frontends/qt2/QPrefsDialog.C
src/frontends/qt2/QRef.C
src/frontends/qt2/QRefDialog.C
src/frontends/qt2/ui/QAskForTextDialog.ui
src/frontends/qt2/ui/QBibtexDialogBase.ui
src/frontends/qt2/ui/QBranchDialogBase.ui
src/frontends/qt2/ui/QCharacterDialogBase.ui
src/frontends/qt2/ui/QERTDialogBase.ui
src/frontends/qt2/ui/QGraphicsDialogBase.ui
src/frontends/qt2/ui/QIndexDialogBase.ui
src/frontends/qt2/ui/QNoteDialogBase.ui
src/frontends/qt2/ui/QParagraphDialogBase.ui
src/frontends/qt2/ui/QPrefConvertersModule.ui
src/frontends/qt2/ui/QPrefLanguageModule.ui
src/frontends/qt2/ui/QPrefUIModule.ui
src/frontends/qt2/ui/QRefDialogBase.ui
src/frontends/qt2/ui/QSendtoDialogBase.ui

index eef17293ac0f52aff718029bed0abd8f471bd4a2..5223789dd041bed0202af92392d5ced0213f5cd6 100644 (file)
@@ -1,3 +1,40 @@
+2005-07-22  Angus Leeming  <leeming@lyx.org>
+
+       * QRef.C (update_contents): disable the OK button when the dialog is
+       first shown. The user must first select a reference.
+
+       * QRefDialog.C (changed_adaptor): only enable the OK button when
+       the "Label:" field is not empty.
+       (refHighlighted): set the text in the "Label:" field only when
+       an item is currently selected in the "Available refs" browser. (When
+       th signal connected to this slot is triggered.)
+
+       * QBibtexDialogBase.ui:
+       * QCharacterDialogBase.ui:
+       * QERTDialogBase.ui:
+       * QNoteDialogBase.ui: remove the Alt-C shortcut from the Close button.
+
+       * QAskForTextDialog.ui:
+       * QBibtexDialogBase.ui:
+       * QBranchDialogBase.ui:
+       * QERTDialogBase.ui:
+       * QGraphicsDialogBase.ui:
+       * QIndexDialogBase.ui:
+       * QNoteDialogBase.ui:
+       * QSendtoDialogBase.ui: connect the Alt-O shortcut to the OK button.
+
+       * QBibtexDialogBase.ui: change the shortcut to the "Content" field.
+       * QERTDialogBase.ui:  change the shortcut to the "Open" field.
+       * QGraphicsDialogBase.ui: change the shortcut to the "Origin" field.
+       * QNoteDialogBase.ui: change the shortcut to the "Comment" field.
+       * QParagraphDialogBase.ui:  change the shortcut to the "Longest label"
+       field.
+       * QPrefConvertersModule.ui: change the shortcut to the "From" field.
+       * QPrefLanguageModule.ui: change the shortcut to the "Use babel" field.
+       * QPrefUIModule.ui: change the shortcut to the "Cursor follows
+       scrollbar" field.
+       * QRefDialogBase.ui: change the shortcut to the "Labels in:" field.
+       
 2005-07-20  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * QDocument.C:
index f3283916e9d0ca3016de062dd7be73549daa93e7..aaf7cbca9f5b713fb5ad9daf915418a1e9d32fb5 100644 (file)
@@ -548,7 +548,7 @@ Format const * getFormat(std::string const & prettyname)
 } // namespace anon
 
 
-void QPrefsDialog::switch_copierLB(int nr)
+void QPrefsDialog::switch_copierLB(int)
 {
        std::string const browser_text =
                fromqstr(copiersModule->AllCopiersLB->currentText());
@@ -575,7 +575,7 @@ void QPrefsDialog::switch_copierLB(int nr)
 }
 
 
-void QPrefsDialog::switch_copierCO(int nr)
+void QPrefsDialog::switch_copierCO(int)
 {
        std::string const combo_text =
                fromqstr(copiersModule->copierFormatCO->currentText());
index 984c9d2d2f7cf39494b140c6aa1103f4f76ca596..fc8791cb59b305f24fbf84c89516acca0b7e636a 100644 (file)
@@ -16,6 +16,7 @@
 #include "Qt2BC.h"
 #include "qt_helpers.h"
 
+#include "controllers/ButtonController.h"
 #include "controllers/ControlRef.h"
 
 #include "insets/insetref.h"
@@ -99,6 +100,7 @@ void QRef::update_contents()
                dialog_->bufferCO->setCurrentItem(controller().getBufferNum());
 
        updateRefs();
+       bc().valid(false);
 }
 
 
index 66ecfa8ce282045e9a2e3d7d53b620dd083f0095..619f5c581690a90952f31c095aad0080a6be0579 100644 (file)
@@ -44,7 +44,8 @@ void QRefDialog::show()
 
 void QRefDialog::changed_adaptor()
 {
-       form_->changed();
+       if (!referenceED->text().isEmpty())
+               form_->changed();
 }
 
 
@@ -59,7 +60,13 @@ void QRefDialog::refHighlighted(const QString & sel)
        if (form_->readOnly())
                return;
 
-       referenceED->setText(sel);
+       int const cur_item = refsLB->currentItem();
+       bool const cur_item_selected = cur_item >= 0 ?
+               refsLB->isSelected(cur_item) : false;
+
+       if (cur_item_selected)
+               referenceED->setText(sel);
+
        if (form_->at_ref_)
                form_->gotoRef();
        gotoPB->setEnabled(true);
index 3d8891b30ce182dde1cd580dbdf4bf599355ec03..c57c3765e769b038e6f9df30d54d9de48c0028e6 100644 (file)
@@ -13,7 +13,7 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>273</width>
+            <width>269</width>
             <height>116</height>
         </rect>
     </property>
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>OK</string>
+                        <string>&amp;OK</string>
                     </property>
                     <property stdset="1">
                         <name>default</name>
index a91335fdc4287ff3135745b17c5428c23dc7135a..1acc0d2bc7104ac38ea4bb3b8a6d9d7dbc8c5867 100644 (file)
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>298</width>
+            <width>352</width>
             <height>313</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QBibtexDialogBase</string>
     </property>
     <property stdset="1">
         <name>sizeGripEnabled</name>
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>OK</string>
+                        <string>&amp;OK</string>
                     </property>
                     <property stdset="1">
                         <name>autoDefault</name>
             </property>
             <property stdset="1">
                 <name>text</name>
-                <string>C&amp;ontent:</string>
+                <string>&amp;Content:</string>
             </property>
             <property>
                 <name>buddy</name>
index 90bbeb0385e2282b3cc369cc645f012c4749a89e..1335721ce33af09539b68e903bf0a215aebb1987 100644 (file)
             <x>0</x>
             <y>0</y>
             <width>188</width>
-            <height>99</height>
+            <height>129</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QBranchDialogBase</string>
     </property>
     <property stdset="1">
         <name>sizeGripEnabled</name>
@@ -42,7 +42,7 @@
             </property>
             <property stdset="1">
                 <name>text</name>
-                <string>OK</string>
+                <string>&amp;OK</string>
             </property>
             <property stdset="1">
                 <name>default</name>
index 9d9352f29edbb5f244dea8e2048a8c382d11fd80..0a92d9e942a262251ce3e9613eade9b8256416a2 100644 (file)
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>360</width>
+            <width>356</width>
             <height>305</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QCharacterDialogBase</string>
     </property>
     <property stdset="1">
         <name>sizeGripEnabled</name>
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>&amp;Close</string>
+                        <string>Close</string>
                     </property>
                     <property stdset="1">
                         <name>autoDefault</name>
index 8b5d7bc6d609b07155caf5353204763c7ddcc6b5..a5bd708dea28d1afcd6054c1d39f4a2e4d52e43c 100644 (file)
             <x>0</x>
             <y>0</y>
             <width>197</width>
-            <height>158</height>
+            <height>194</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QERTDialogBase</string>
     </property>
     <property stdset="1">
         <name>sizeGripEnabled</name>
@@ -91,7 +91,7 @@
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>&amp;Open</string>
+                        <string>O&amp;pen</string>
                     </property>
                     <property>
                         <name>toolTip</name>
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>OK</string>
+                        <string>&amp;OK</string>
                     </property>
                     <property stdset="1">
                         <name>default</name>
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>&amp;Close</string>
+                        <string>Close</string>
                     </property>
                     <property stdset="1">
                         <name>default</name>
index 75f569363c57e0b0e77efc52e72612f9a5483b32..470c9e801c57dd744f239a9bce3d26f9783c8c70 100644 (file)
@@ -13,7 +13,7 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>455</width>
+            <width>451</width>
             <height>549</height>
         </rect>
     </property>
@@ -26,7 +26,7 @@
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QGraphicsDialogBase</string>
     </property>
     <property stdset="1">
         <name>sizeGripEnabled</name>
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>OK</string>
+                        <string>&amp;OK</string>
                     </property>
                     <property stdset="1">
                         <name>autoDefault</name>
                                 </property>
                                 <property stdset="1">
                                     <name>text</name>
-                                    <string>&amp;Origin:</string>
+                                    <string>Or&amp;igin:</string>
                                 </property>
                                 <property>
                                     <name>buddy</name>
index fdcd193d22528312880cd03b41d4dee0ba216bed..d2bf7d84bfc27e084ff48a9a66d093a1721f50cd 100644 (file)
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>197</width>
+            <width>203</width>
             <height>82</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QIndexDialogBase</string>
     </property>
     <property stdset="1">
         <name>sizeGripEnabled</name>
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>OK</string>
+                        <string>&amp;OK</string>
                     </property>
                     <property stdset="1">
                         <name>default</name>
index 9609d0c60fd07fdd3cff5ea1439ae80b6cc76369..815a2948bbc48c5c6348c4d68e1348609a71f608 100644 (file)
             <x>0</x>
             <y>0</y>
             <width>188</width>
-            <height>146</height>
+            <height>192</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QNoteDialogBase</string>
     </property>
     <property stdset="1">
         <name>sizeGripEnabled</name>
@@ -42,7 +42,7 @@
             </property>
             <property stdset="1">
                 <name>text</name>
-                <string>OK</string>
+                <string>&amp;OK</string>
             </property>
             <property stdset="1">
                 <name>default</name>
@@ -57,7 +57,7 @@
             </property>
             <property stdset="1">
                 <name>text</name>
-                <string>&amp;Close</string>
+                <string>Close</string>
             </property>
             <property stdset="1">
                 <name>default</name>
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>C&amp;omment</string>
+                        <string>&amp;Comment</string>
                     </property>
                     <property>
                         <name>toolTip</name>
index 9c5f980f0b29e4c7cc524dd69b84aa0234cc7812..6b0fc6de4e437123c524ca7f08b1614592ca3006 100644 (file)
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>400</width>
-            <height>214</height>
+            <width>396</width>
+            <height>254</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QParagraphDialogBase</string>
     </property>
     <property stdset="1">
         <name>sizeGripEnabled</name>
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>Lo&amp;ngest label</string>
+                        <string>&amp;Longest label</string>
                     </property>
                     <property>
                         <name>buddy</name>
index 9fa8fd4a13d88da3ae887fa427e1fdcdd2aa2861..53eb3f0624d971209096dd77ac7a4bd68a5f3feb 100644 (file)
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>458</width>
+            <width>472</width>
             <height>265</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QPrefConvertersModule</string>
     </property>
     <grid>
         <property stdset="1">
                             </property>
                             <property stdset="1">
                                 <name>text</name>
-                                <string>F&amp;rom:</string>
+                                <string>&amp;From:</string>
                             </property>
                             <property>
                                 <name>buddy</name>
index f2482e913054f4c009a3cf822fd99e413d71a060..b3ae15310a8cb0b0aac557b2062fe9b9439a0f22 100644 (file)
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>333</width>
+            <width>360</width>
             <height>323</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QPrefLanguageModule</string>
     </property>
     <grid>
         <property stdset="1">
             </property>
             <property stdset="1">
                 <name>text</name>
-                <string>Use &amp;babel</string>
+                <string>Use b&amp;abel</string>
             </property>
         </widget>
         <spacer row="6"  column="1"  rowspan="2"  colspan="1" >
index f65e7bcb8c8c2c56d30d00ffc6c3015911d48b7a..0fa365f90e5f6e056312d73532874145fca18b4e 100644 (file)
@@ -13,7 +13,7 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>420</width>
+            <width>416</width>
             <height>441</height>
         </rect>
     </property>
@@ -26,7 +26,7 @@
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QPrefUIModule</string>
     </property>
     <vbox>
         <property stdset="1">
                                     </property>
                                     <property stdset="1">
                                         <name>text</name>
-                                        <string>Cursor follo&amp;ws scrollbar</string>
+                                        <string>Cursor follows &amp;scrollbar</string>
                                     </property>
                                 </widget>
                             </vbox>
index 130cdd64766ba42c531e0a5e2f22b829e36cf4d4..53b1184833196f535ccbbf9ffdbf861da5437c5f 100644 (file)
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>355</width>
+            <width>351</width>
             <height>423</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QRefDialogBase</string>
     </property>
     <property stdset="1">
         <name>sizeGripEnabled</name>
             </property>
             <property stdset="1">
                 <name>text</name>
-                <string>L&amp;abels in:</string>
+                <string>La&amp;bels in:</string>
             </property>
             <property>
                 <name>buddy</name>
index b3bd77492b85175fe7f2806c55d1a9a707515ddb..80b3bc990176b2f38280864c2f463f31b1e859a4 100644 (file)
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>276</width>
+            <width>282</width>
             <height>262</height>
         </rect>
     </property>
     <property stdset="1">
         <name>caption</name>
-        <string></string>
+        <string>QSendtoDialogBase</string>
     </property>
     <property stdset="1">
         <name>sizeGripEnabled</name>
@@ -87,7 +87,7 @@
                     </property>
                     <property stdset="1">
                         <name>text</name>
-                        <string>OK</string>
+                        <string>&amp;OK</string>
                     </property>
                     <property stdset="1">
                         <name>autoDefault</name>