Mercurial > hg > octave-nkf
diff libgui/src/settings-dialog.ui @ 16407:4d438dffbfac
gui: call external editor when opening a file and custom editor is selected
* file-editor.cc(request_open_file): call custom editor if desired
* settings-dialog.ui: custom editor command with %f and %l for file and line
author | Torsten <ttl@justmail.de> |
---|---|
date | Mon, 01 Apr 2013 21:19:23 +0200 |
parents | 7fa90eb41240 |
children | f62163bed4dc |
line wrap: on
line diff
--- a/libgui/src/settings-dialog.ui +++ b/libgui/src/settings-dialog.ui @@ -222,14 +222,24 @@ </spacer> </item> <item> + <widget class="QCheckBox" name="useCustomFileEditor"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Use custom file editor</string> + </property> + </widget> + </item> + <item> <layout class="QHBoxLayout" name="horizontalLayout"> <item> - <widget class="QCheckBox" name="useCustomFileEditor"> + <widget class="QLabel" name="customEditorLabel"> <property name="enabled"> - <bool>true</bool> + <bool>false</bool> </property> <property name="text"> - <string>Use custom file editor:</string> + <string>Command line (%f=file, %l=line):</string> </property> </widget> </item> @@ -786,5 +796,21 @@ </hint> </hints> </connection> + <connection> + <sender>useCustomFileEditor</sender> + <signal>toggled(bool)</signal> + <receiver>customEditorLabel</receiver> + <slot>setEnabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>349</x> + <y>383</y> + </hint> + <hint type="destinationlabel"> + <x>111</x> + <y>413</y> + </hint> + </hints> + </connection> </connections> </ui>