QRefDialog improvements

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6711 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2003-04-03 21:27:12 +00:00
parent 0b1da53fd3
commit ee01ede042
5 changed files with 33 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2003-04-03 John Levon <levon@movementarian.org>
* QRefDialog.h:
* QRefDialog.C: set focus on the refs list. Don't
use "Goto" jargon. Add some accelerators. Make return/click
on a reference close the dialog.
2003-04-01 John Levon <levon@movementarian.org>
* QtView.C:

View File

@ -118,17 +118,17 @@ bool QRef::typeAllowed()
void QRef::setGoBack()
{
dialog_->gotoPB->setText(qt_("&Go back"));
dialog_->gotoPB->setText(qt_("&Go Back"));
QToolTip::remove(dialog_->gotoPB);
QToolTip::add(dialog_->gotoPB, qt_("Go back"));
QToolTip::add(dialog_->gotoPB, qt_("Jump back"));
}
void QRef::setGotoRef()
{
dialog_->gotoPB->setText(qt_("&Goto"));
dialog_->gotoPB->setText(qt_("&Go to Reference"));
QToolTip::remove(dialog_->gotoPB);
QToolTip::add(dialog_->gotoPB, qt_("Go to reference"));
QToolTip::add(dialog_->gotoPB, qt_("Jump to reference"));
}

View File

@ -37,6 +37,13 @@ QRefDialog::QRefDialog(QRef * form)
}
void QRefDialog::show()
{
QRefDialogBase::show();
refsLB->setFocus();
}
void QRefDialog::changed_adaptor()
{
form_->changed();
@ -67,7 +74,8 @@ void QRefDialog::refHighlighted(const QString & sel)
void QRefDialog::refSelected(const QString &)
{
form_->gotoRef();
// <enter> or double click, inserts ref and closes dialog
form_->slotOK();
}

View File

@ -22,6 +22,9 @@ class QRefDialog : public QRefDialogBase {
Q_OBJECT
public:
QRefDialog(QRef * form);
virtual void show();
public slots:
void changed_adaptor();
void gotoClicked();
@ -29,6 +32,7 @@ public slots:
void refSelected(QString const &);
void sortToggled(bool);
void updateClicked();
protected:
void closeEvent(QCloseEvent * e);
private:

View File

@ -13,7 +13,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>391</width>
<width>383</width>
<height>395</height>
</rect>
</property>
@ -86,11 +86,11 @@
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Go to reference</string>
<string>&amp;Go to Reference</string>
</property>
<property>
<name>toolTip</name>
<string>Move the document cursor to reference</string>
<string>Jump to the reference</string>
</property>
</widget>
</hbox>
@ -103,7 +103,7 @@
</property>
<property stdset="1">
<name>text</name>
<string>Sort</string>
<string>&amp;Sort</string>
</property>
<property>
<name>toolTip</name>
@ -254,7 +254,11 @@
</property>
<property stdset="1">
<name>text</name>
<string>Available references in selected document:</string>
<string>A&amp;vailable references in the document:</string>
</property>
<property>
<name>buddy</name>
<cstring>refsLB</cstring>
</property>
</widget>
<widget row="2" column="0" rowspan="1" colspan="2" >