From kde-core-devel Mon Feb 24 12:36:06 2003 From: Willy De la Court Date: Mon, 24 Feb 2003 12:36:06 +0000 To: kde-core-devel Subject: [PATCH] kopenwith componenchooser X-MARC-Message: https://marc.info/?l=kde-core-devel&m=104609016608547 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_OBiW+5yNbyvn1Tz" --Boundary-00=_OBiW+5yNbyvn1Tz Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Included are two patches the kopenwith patch Changelog kopenwith ------------------------ added hideRunInTerminal so that the openwith called from selecting a terminal app can switch it off ------------------------ i already have permission from David Faure for the above patch and is already commited Changelog for componentchooser ------------------------ Used hideRunInTerminal to disable the checkbox because who wants to run a terminal in a terminal ------------------------ can i commit these i just received my CVS account and don't want to commit patches to other peoples programs without permission. -- Simple things make people happy. Willy De la Court --Boundary-00=_OBiW+5yNbyvn1Tz Content-Type: text/x-diff; charset="us-ascii"; name="kdelibs-kopenwith-hideterminal.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdelibs-kopenwith-hideterminal.patch" Index: kopenwith.cpp =================================================================== RCS file: /opt/kde-cvs/kdelibs/kio/kfile/kopenwith.cpp,v retrieving revision 1.73 diff -u -p -r1.73 kopenwith.cpp --- kopenwith.cpp 12 Feb 2003 22:11:37 -0000 1.73 +++ kopenwith.cpp 13 Feb 2003 01:37:58 -0000 @@ -701,6 +701,12 @@ void KOpenWithDlg::hideNoCloseOnExit() nocloseonexit->hide(); } +void KOpenWithDlg::hideRunInTerminal() +{ + terminal->hide(); + hideNoCloseOnExit(); +} + void KOpenWithDlg::accept() { KHistoryCombo *combo = static_cast( edit->comboBox() ); Index: kopenwith.h =================================================================== RCS file: /opt/kde-cvs/kdelibs/kio/kfile/kopenwith.h,v retrieving revision 1.27 diff -u -p -r1.27 kopenwith.h --- kopenwith.h 12 Feb 2003 00:00:36 -0000 1.27 +++ kopenwith.h 13 Feb 2003 01:22:50 -0000 @@ -103,6 +103,10 @@ public: */ void hideNoCloseOnExit(); /** + * Hide the "Run in &terminal" Checkbox + */ + void hideRunInTerminal(); + /** * @return the chosen service in the application tree * Can be null, if the user typed some text and didn't select a service. */ --Boundary-00=_OBiW+5yNbyvn1Tz Content-Type: text/x-diff; charset="us-ascii"; name="kdebase-componentchooser.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdebase-componentchooser.patch" Index: componentchooser.cpp =================================================================== RCS file: /opt/kde-cvs/kdebase/kcontrol/componentchooser/componentchooser.cpp,v retrieving revision 1.16 diff -u -p -r1.16 componentchooser.cpp --- componentchooser.cpp 12 Feb 2003 17:16:51 -0000 1.16 +++ componentchooser.cpp 13 Feb 2003 11:42:33 -0000 @@ -271,6 +271,8 @@ void CfgTerminalEmulator::selectTerminal { KURL::List urlList; KOpenWithDlg dlg(urlList, i18n("Select preferred terminal application:"), QString::null, this); + // hide "Run in &terminal" here, we don't need it for a Terminal Application + dlg.hideRunInTerminal(); if (dlg.exec() != QDialog::Accepted) return; QString client = dlg.text(); --Boundary-00=_OBiW+5yNbyvn1Tz--