Various Qt UI tweaks.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10345 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2005-07-22 13:46:03 +00:00
parent cd816fed68
commit c3bf4f29f1
18 changed files with 98 additions and 52 deletions

View 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> 2005-07-20 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* QDocument.C: * QDocument.C:

View File

@ -548,7 +548,7 @@ Format const * getFormat(std::string const & prettyname)
} // namespace anon } // namespace anon
void QPrefsDialog::switch_copierLB(int nr) void QPrefsDialog::switch_copierLB(int)
{ {
std::string const browser_text = std::string const browser_text =
fromqstr(copiersModule->AllCopiersLB->currentText()); 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 = std::string const combo_text =
fromqstr(copiersModule->copierFormatCO->currentText()); fromqstr(copiersModule->copierFormatCO->currentText());

View File

@ -16,6 +16,7 @@
#include "Qt2BC.h" #include "Qt2BC.h"
#include "qt_helpers.h" #include "qt_helpers.h"
#include "controllers/ButtonController.h"
#include "controllers/ControlRef.h" #include "controllers/ControlRef.h"
#include "insets/insetref.h" #include "insets/insetref.h"
@ -99,6 +100,7 @@ void QRef::update_contents()
dialog_->bufferCO->setCurrentItem(controller().getBufferNum()); dialog_->bufferCO->setCurrentItem(controller().getBufferNum());
updateRefs(); updateRefs();
bc().valid(false);
} }

View File

@ -44,7 +44,8 @@ void QRefDialog::show()
void QRefDialog::changed_adaptor() 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()) if (form_->readOnly())
return; 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_) if (form_->at_ref_)
form_->gotoRef(); form_->gotoRef();
gotoPB->setEnabled(true); gotoPB->setEnabled(true);

View File

@ -13,7 +13,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>273</width> <width>269</width>
<height>116</height> <height>116</height>
</rect> </rect>
</property> </property>
@ -121,7 +121,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>OK</string> <string>&amp;OK</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>default</name> <name>default</name>

View File

@ -13,13 +13,13 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>298</width> <width>352</width>
<height>313</height> <height>313</height>
</rect> </rect>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QBibtexDialogBase</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>sizeGripEnabled</name> <name>sizeGripEnabled</name>
@ -104,7 +104,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>OK</string> <string>&amp;OK</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>autoDefault</name> <name>autoDefault</name>
@ -338,7 +338,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>C&amp;ontent:</string> <string>&amp;Content:</string>
</property> </property>
<property> <property>
<name>buddy</name> <name>buddy</name>

View File

@ -14,12 +14,12 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>188</width> <width>188</width>
<height>99</height> <height>129</height>
</rect> </rect>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QBranchDialogBase</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>sizeGripEnabled</name> <name>sizeGripEnabled</name>
@ -42,7 +42,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>OK</string> <string>&amp;OK</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>default</name> <name>default</name>

View File

@ -13,13 +13,13 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>360</width> <width>356</width>
<height>305</height> <height>305</height>
</rect> </rect>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QCharacterDialogBase</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>sizeGripEnabled</name> <name>sizeGripEnabled</name>
@ -537,7 +537,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>&amp;Close</string> <string>Close</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>autoDefault</name> <name>autoDefault</name>

View File

@ -14,12 +14,12 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>197</width> <width>197</width>
<height>158</height> <height>194</height>
</rect> </rect>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QERTDialogBase</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>sizeGripEnabled</name> <name>sizeGripEnabled</name>
@ -91,7 +91,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>&amp;Open</string> <string>O&amp;pen</string>
</property> </property>
<property> <property>
<name>toolTip</name> <name>toolTip</name>
@ -144,7 +144,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>OK</string> <string>&amp;OK</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>default</name> <name>default</name>
@ -159,7 +159,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>&amp;Close</string> <string>Close</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>default</name> <name>default</name>

View File

@ -13,7 +13,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>455</width> <width>451</width>
<height>549</height> <height>549</height>
</rect> </rect>
</property> </property>
@ -26,7 +26,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QGraphicsDialogBase</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>sizeGripEnabled</name> <name>sizeGripEnabled</name>
@ -104,7 +104,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>OK</string> <string>&amp;OK</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>autoDefault</name> <name>autoDefault</name>
@ -279,7 +279,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>&amp;Origin:</string> <string>Or&amp;igin:</string>
</property> </property>
<property> <property>
<name>buddy</name> <name>buddy</name>

View File

@ -13,13 +13,13 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>197</width> <width>203</width>
<height>82</height> <height>82</height>
</rect> </rect>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QIndexDialogBase</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>sizeGripEnabled</name> <name>sizeGripEnabled</name>
@ -125,7 +125,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>OK</string> <string>&amp;OK</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>default</name> <name>default</name>

View File

@ -14,12 +14,12 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>188</width> <width>188</width>
<height>146</height> <height>192</height>
</rect> </rect>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QNoteDialogBase</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>sizeGripEnabled</name> <name>sizeGripEnabled</name>
@ -42,7 +42,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>OK</string> <string>&amp;OK</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>default</name> <name>default</name>
@ -57,7 +57,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>&amp;Close</string> <string>Close</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>default</name> <name>default</name>
@ -106,7 +106,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>C&amp;omment</string> <string>&amp;Comment</string>
</property> </property>
<property> <property>
<name>toolTip</name> <name>toolTip</name>

View File

@ -13,13 +13,13 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>396</width>
<height>214</height> <height>254</height>
</rect> </rect>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QParagraphDialogBase</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>sizeGripEnabled</name> <name>sizeGripEnabled</name>
@ -272,7 +272,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>Lo&amp;ngest label</string> <string>&amp;Longest label</string>
</property> </property>
<property> <property>
<name>buddy</name> <name>buddy</name>

View File

@ -13,13 +13,13 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>458</width> <width>472</width>
<height>265</height> <height>265</height>
</rect> </rect>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QPrefConvertersModule</string>
</property> </property>
<grid> <grid>
<property stdset="1"> <property stdset="1">
@ -133,7 +133,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>F&amp;rom:</string> <string>&amp;From:</string>
</property> </property>
<property> <property>
<name>buddy</name> <name>buddy</name>

View File

@ -13,13 +13,13 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>333</width> <width>360</width>
<height>323</height> <height>323</height>
</rect> </rect>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QPrefLanguageModule</string>
</property> </property>
<grid> <grid>
<property stdset="1"> <property stdset="1">
@ -137,7 +137,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>Use &amp;babel</string> <string>Use b&amp;abel</string>
</property> </property>
</widget> </widget>
<spacer row="6" column="1" rowspan="2" colspan="1" > <spacer row="6" column="1" rowspan="2" colspan="1" >

View File

@ -13,7 +13,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>420</width> <width>416</width>
<height>441</height> <height>441</height>
</rect> </rect>
</property> </property>
@ -26,7 +26,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QPrefUIModule</string>
</property> </property>
<vbox> <vbox>
<property stdset="1"> <property stdset="1">
@ -374,7 +374,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>Cursor follo&amp;ws scrollbar</string> <string>Cursor follows &amp;scrollbar</string>
</property> </property>
</widget> </widget>
</vbox> </vbox>

View File

@ -13,13 +13,13 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>355</width> <width>351</width>
<height>423</height> <height>423</height>
</rect> </rect>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QRefDialogBase</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>sizeGripEnabled</name> <name>sizeGripEnabled</name>
@ -361,7 +361,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>L&amp;abels in:</string> <string>La&amp;bels in:</string>
</property> </property>
<property> <property>
<name>buddy</name> <name>buddy</name>

View File

@ -13,13 +13,13 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>276</width> <width>282</width>
<height>262</height> <height>262</height>
</rect> </rect>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>caption</name> <name>caption</name>
<string></string> <string>QSendtoDialogBase</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>sizeGripEnabled</name> <name>sizeGripEnabled</name>
@ -87,7 +87,7 @@
</property> </property>
<property stdset="1"> <property stdset="1">
<name>text</name> <name>text</name>
<string>OK</string> <string>&amp;OK</string>
</property> </property>
<property stdset="1"> <property stdset="1">
<name>autoDefault</name> <name>autoDefault</name>