-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, i did this simple patch to add the above functionality i really missed in LyX :-) the patch is made against LyX 1.3.4 with diff -ur command hope it might help
regards P.S. for the compilation process i had to symlink qt_helpers.h in the ui subdir - -- Francesco Lamonica: f DOT lamonica AT tin DOT it PGP Fingerprint: 5870 92BA 8DFF 1ACF DE2E B94D 46EC 5505 7C64 4EF1 Favourite quote: There's no spoon -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFANkDnRuxVBXxkTvERAhOGAKCtZZ9/OdlqhjCTZHGtKkVA/3HOXQCdEpaA f5k0PBWJaz0ela2IjyIQ9fQ= =x3uA -----END PGP SIGNATURE-----
Only in lyx-1.3.4/development: lyx.spec Only in lyx-1.3.4/lib/doc: LaTeXConfig.lyx diff -ur lyx-1.3.4/src/frontends/qt2/QSearchDialog.C lyx-1.3.4-mod/src/frontends/qt2/QSearchDialog.C --- lyx-1.3.4/src/frontends/qt2/QSearchDialog.C Tue Dec 17 21:37:10 2002 +++ lyx-1.3.4-mod/src/frontends/qt2/QSearchDialog.C Fri Feb 20 17:46:59 2004 @@ -71,10 +71,12 @@ findPB->setEnabled(false); replacePB->setEnabled(false); replaceallPB->setEnabled(false); + replacefindPB->setEnabled(false); } else { findPB->setEnabled(true); replacePB->setEnabled(!form_->readOnly()); replaceallPB->setEnabled(!form_->readOnly()); + replacefindPB->setEnabled(!form_->readOnly()); } } @@ -102,6 +104,12 @@ uniqueInsert(replaceCO, replaceCO->currentText()); } + +void QSearchDialog::replacefindClicked() +{ + replaceClicked(); + findClicked(); +} void QSearchDialog::replaceallClicked() { diff -ur lyx-1.3.4/src/frontends/qt2/QSearchDialog.h lyx-1.3.4-mod/src/frontends/qt2/QSearchDialog.h --- lyx-1.3.4/src/frontends/qt2/QSearchDialog.h Sun Oct 20 03:48:28 2002 +++ lyx-1.3.4-mod/src/frontends/qt2/QSearchDialog.h Fri Feb 20 12:18:11 2004 @@ -33,6 +33,7 @@ void findChanged(); void findClicked(); void replaceClicked(); + void replacefindClicked(); void replaceallClicked(); protected: virtual void closeEvent(QCloseEvent * e); diff -ur lyx-1.3.4/src/frontends/qt2/ui/QSearchDialogBase.ui lyx-1.3.4-mod/src/frontends/qt2/ui/QSearchDialogBase.ui --- lyx-1.3.4/src/frontends/qt2/ui/QSearchDialogBase.ui Thu Jan 23 17:23:40 2003 +++ lyx-1.3.4-mod/src/frontends/qt2/ui/QSearchDialogBase.ui Fri Feb 20 17:46:00 2004 @@ -1,311 +1,254 @@ -<!DOCTYPE UI><UI> +<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>QSearchDialogBase</class> -<include location="global">config.h</include> -<include location="local">qt_helpers.h</include> -<widget> - <class>QDialog</class> - <property stdset="1"> - <name>name</name> +<widget class="QDialog"> + <property name="name"> <cstring>QSearchDialogBase</cstring> </property> - <property stdset="1"> - <name>geometry</name> + <property name="geometry"> <rect> <x>0</x> <y>0</y> - <width>379</width> - <height>168</height> + <width>396</width> + <height>192</height> </rect> </property> - <property stdset="1"> - <name>caption</name> + <property name="caption"> <string>Search and replace</string> </property> - <property stdset="1"> - <name>sizeGripEnabled</name> + <property name="sizeGripEnabled"> <bool>true</bool> </property> - <property> - <name>layoutMargin</name> + <property name="layoutMargin" stdset="0"> </property> - <property> - <name>layoutSpacing</name> + <property name="layoutSpacing" stdset="0"> </property> <grid> - <property stdset="1"> - <name>margin</name> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> <number>11</number> </property> - <property stdset="1"> - <name>spacing</name> + <property name="spacing"> <number>6</number> </property> - <widget row="0" column="0" > - <class>QLabel</class> - <property stdset="1"> - <name>name</name> + <widget class="QLabel" row="0" column="0"> + <property name="name"> <cstring>findLA</cstring> </property> - <property stdset="1"> - <name>text</name> + <property name="text"> <string>&Find:</string> </property> - <property> - <name>buddy</name> + <property name="buddy" stdset="0"> <cstring>findCO</cstring> </property> </widget> - <widget row="0" column="1" rowspan="1" colspan="2" > - <class>QComboBox</class> - <property stdset="1"> - <name>name</name> - <cstring>findCO</cstring> + <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>caseCB</cstring> </property> - <property stdset="1"> - <name>sizePolicy</name> - <sizepolicy> - <hsizetype>3</hsizetype> - <vsizetype>0</vsizetype> - </sizepolicy> + <property name="text"> + <string>Case &sensitive</string> </property> - <property stdset="1"> - <name>focusPolicy</name> - <enum>StrongFocus</enum> + </widget> + <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>backwardsCB</cstring> </property> - <property stdset="1"> - <name>editable</name> - <bool>true</bool> + <property name="text"> + <string>Search &backwards</string> </property> - <property stdset="1"> - <name>sizeLimit</name> - <number>10</number> + </widget> + <widget class="QLabel" row="1" column="0" rowspan="2" colspan="1"> + <property name="name"> + <cstring>replaceLA</cstring> </property> - <property stdset="1"> - <name>maxCount</name> - <number>666</number> + <property name="text"> + <string>Replace &with:</string> </property> - <property stdset="1"> - <name>insertionPolicy</name> - <enum>AtTop</enum> + <property name="buddy" stdset="0"> + <cstring>replaceCO</cstring> </property> - <property stdset="1"> - <name>autoCompletion</name> - <bool>false</bool> + </widget> + <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>wordsCB</cstring> </property> - <property stdset="1"> - <name>duplicatesEnabled</name> - <bool>false</bool> + <property name="text"> + <string>Match whole words onl&y</string> </property> </widget> - <widget row="1" column="0" > - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>replaceLA</cstring> + <spacer row="6" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>VSpacer1</cstring> </property> - <property stdset="1"> - <name>text</name> - <string>Replace &with:</string> + <property name="orientation"> + <enum>Vertical</enum> </property> - <property> - <name>buddy</name> - <cstring>replaceCO</cstring> + <property name="sizeType"> + <enum>Expanding</enum> </property> - </widget> - <widget row="1" column="1" rowspan="1" colspan="2" > - <class>QComboBox</class> - <property stdset="1"> - <name>name</name> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QComboBox" row="1" column="1" rowspan="2" colspan="2"> + <property name="name"> <cstring>replaceCO</cstring> </property> - <property stdset="1"> - <name>sizePolicy</name> + <property name="sizePolicy"> <sizepolicy> <hsizetype>3</hsizetype> <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> </sizepolicy> </property> - <property stdset="1"> - <name>editable</name> + <property name="editable"> <bool>true</bool> </property> - <property stdset="1"> - <name>sizeLimit</name> + <property name="sizeLimit"> <number>10</number> </property> - <property stdset="1"> - <name>maxCount</name> + <property name="maxCount"> <number>666</number> </property> - <property stdset="1"> - <name>insertionPolicy</name> + <property name="insertionPolicy"> <enum>AtTop</enum> </property> - <property stdset="1"> - <name>autoCompletion</name> + <property name="autoCompletion"> <bool>false</bool> </property> - <property stdset="1"> - <name>duplicatesEnabled</name> + <property name="duplicatesEnabled"> <bool>false</bool> </property> </widget> - <widget row="2" column="0" rowspan="1" colspan="2" > - <class>QCheckBox</class> - <property stdset="1"> - <name>name</name> - <cstring>caseCB</cstring> + <widget class="QComboBox" row="0" column="1" rowspan="1" colspan="2"> + <property name="name"> + <cstring>findCO</cstring> </property> - <property stdset="1"> - <name>text</name> - <string>Case &sensitive</string> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - </widget> - <widget row="3" column="0" rowspan="2" colspan="2" > - <class>QCheckBox</class> - <property stdset="1"> - <name>name</name> - <cstring>wordsCB</cstring> + <property name="focusPolicy"> + <enum>StrongFocus</enum> </property> - <property stdset="1"> - <name>text</name> - <string>Match whole words onl&y</string> + <property name="editable"> + <bool>true</bool> </property> - </widget> - <spacer row="2" column="2" > - <property> - <name>name</name> - <cstring>HSpacer1</cstring> + <property name="sizeLimit"> + <number>10</number> </property> - <property stdset="1"> - <name>orientation</name> - <enum>Horizontal</enum> + <property name="maxCount"> + <number>666</number> </property> - <property stdset="1"> - <name>sizeType</name> - <enum>Expanding</enum> + <property name="insertionPolicy"> + <enum>AtTop</enum> </property> - <property> - <name>sizeHint</name> - <size> - <width>20</width> - <height>20</height> - </size> + <property name="autoCompletion"> + <bool>false</bool> </property> - </spacer> - <spacer row="6" column="0" rowspan="1" colspan="2" > - <property> - <name>name</name> - <cstring>VSpacer1</cstring> + <property name="duplicatesEnabled"> + <bool>false</bool> </property> - <property stdset="1"> - <name>orientation</name> - <enum>Vertical</enum> + </widget> + <spacer row="3" column="2"> + <property name="name"> + <cstring>HSpacer1</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> </property> - <property stdset="1"> - <name>sizeType</name> + <property name="sizeType"> <enum>Expanding</enum> </property> - <property> - <name>sizeHint</name> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <spacer row="6" column="3" > - <property> - <name>name</name> - <cstring>VSpacer2</cstring> - </property> - <property stdset="1"> - <name>orientation</name> - <enum>Vertical</enum> + <widget class="QPushButton" row="2" column="3" rowspan="2" colspan="1"> + <property name="name"> + <cstring>replaceallPB</cstring> </property> - <property stdset="1"> - <name>sizeType</name> - <enum>Expanding</enum> + <property name="enabled"> + <bool>false</bool> </property> - <property> - <name>sizeHint</name> - <size> - <width>20</width> - <height>20</height> - </size> + <property name="text"> + <string>Replace &All</string> </property> - </spacer> - <widget row="0" column="3" > - <class>QPushButton</class> - <property stdset="1"> - <name>name</name> + </widget> + <widget class="QPushButton" row="0" column="3"> + <property name="name"> <cstring>findPB</cstring> </property> - <property stdset="1"> - <name>enabled</name> + <property name="enabled"> <bool>false</bool> </property> - <property stdset="1"> - <name>text</name> + <property name="text"> <string>Find &Next</string> </property> - <property stdset="1"> - <name>default</name> + <property name="default"> <bool>true</bool> </property> </widget> - <widget row="1" column="3" > - <class>QPushButton</class> - <property stdset="1"> - <name>name</name> + <widget class="QPushButton" row="1" column="3"> + <property name="name"> <cstring>replacePB</cstring> </property> - <property stdset="1"> - <name>enabled</name> + <property name="enabled"> <bool>false</bool> </property> - <property stdset="1"> - <name>text</name> + <property name="text"> <string>&Replace</string> </property> </widget> - <widget row="2" column="3" rowspan="2" colspan="1" > - <class>QPushButton</class> - <property stdset="1"> - <name>name</name> - <cstring>replaceallPB</cstring> + <widget class="QPushButton" row="4" column="3"> + <property name="name"> + <cstring>replacefindPB</cstring> </property> - <property stdset="1"> - <name>enabled</name> + <property name="enabled"> <bool>false</bool> </property> - <property stdset="1"> - <name>text</name> - <string>Replace &All</string> + <property name="text"> + <string>Replace + Fin&d</string> </property> </widget> - <widget row="5" column="0" rowspan="1" colspan="2" > - <class>QCheckBox</class> - <property stdset="1"> - <name>name</name> - <cstring>backwardsCB</cstring> - </property> - <property stdset="1"> - <name>text</name> - <string>Search &backwards</string> - </property> - </widget> - <widget row="4" column="3" rowspan="2" colspan="1" > - <class>QPushButton</class> - <property stdset="1"> - <name>name</name> + <widget class="QPushButton" row="5" column="3"> + <property name="name"> <cstring>closePB</cstring> </property> - <property stdset="1"> - <name>text</name> + <property name="text"> <string>&Close</string> </property> </widget> + <spacer row="6" column="3"> + <property name="name"> + <cstring>VSpacer2</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> </grid> </widget> <connections> @@ -333,10 +276,12 @@ <receiver>QSearchDialogBase</receiver> <slot>findChanged()</slot> </connection> - <slot access="protected">findClicked()</slot> - <slot access="public">findChanged()</slot> - <slot access="protected">replaceClicked()</slot> - <slot access="protected">replaceallClicked()</slot> + <connection> + <sender>replacefindPB</sender> + <signal>clicked()</signal> + <receiver>QSearchDialogBase</receiver> + <slot>replacefindClicked()</slot> + </connection> </connections> <tabstops> <tabstop>findCO</tabstop> @@ -349,4 +294,16 @@ <tabstop>replaceallPB</tabstop> <tabstop>closePB</tabstop> </tabstops> +<includes> + <include location="global" impldecl="in declaration">config.h</include> + <include location="local" impldecl="in declaration">qt_helpers.h</include> +</includes> +<slots> + <slot access="protected">findClicked()</slot> + <slot>findChanged()</slot> + <slot access="protected">replaceClicked()</slot> + <slot access="protected">replaceallClicked()</slot> + <slot access="protected">replacefindClicked()</slot> +</slots> +<layoutdefaults spacing="6" margin="11"/> </UI> Only in lyx-1.3.4-mod/src/frontends/qt2/ui/moc: qt_helpers.h Only in lyx-1.3.4/src: version.C