summaryrefslogtreecommitdiff
path: root/core/apps
Unidiff
Diffstat (limited to 'core/apps') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp5
-rw-r--r--core/apps/textedit/textedit.cpp6
2 files changed, 5 insertions, 6 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index a5adc03..ce8fb6b 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -35,27 +35,28 @@
35#include <qfontdialog.h> 35#include <qfontdialog.h>
36#include <qglobal.h> 36#include <qglobal.h>
37#include <qpainter.h> 37#include <qpainter.h>
38#include <qmenubar.h> 38#include <qmenubar.h>
39#include <qmessagebox.h> 39#include <qmessagebox.h>
40#include <qaction.h> 40#include <qaction.h>
41#include <qapplication.h> 41#include <qapplication.h>
42#include <qfontmetrics.h> 42#include <qfontmetrics.h>
43#include <qcombobox.h> 43#include <qcombobox.h>
44#include <qevent.h> 44#include <qevent.h>
45#include <qtabwidget.h> 45#include <qtabwidget.h>
46#include <qtabbar.h> 46#include <qtabbar.h>
47#include <qpe/config.h>
48#include <qstringlist.h> 47#include <qstringlist.h>
49#include <qpalette.h> 48#include <qpalette.h>
49#include <qpe/config.h>
50#include <qpe/qpeapplication.h>
50 51
51#include <unistd.h> 52#include <unistd.h>
52#include <pwd.h> 53#include <pwd.h>
53#include <sys/types.h> 54#include <sys/types.h>
54//#include <sys/wait.h> 55//#include <sys/wait.h>
55#include <stdio.h> 56#include <stdio.h>
56#include <stdlib.h> 57#include <stdlib.h>
57#include <assert.h> 58#include <assert.h>
58 59
59#include "konsole.h" 60#include "konsole.h"
60#include "keytrans.h" 61#include "keytrans.h"
61#include "commandeditdialog.h" 62#include "commandeditdialog.h"
@@ -1067,25 +1068,25 @@ void Konsole::editCommandListMenuSelected(int iD)
1067 } else { 1068 } else {
1068 commonCombo->setEditable( FALSE ); 1069 commonCombo->setEditable( FALSE );
1069 configMenu->setItemChecked(iD,FALSE); 1070 configMenu->setItemChecked(iD,FALSE);
1070 cfg.writeEntry("EditEnabled","FALSE"); 1071 cfg.writeEntry("EditEnabled","FALSE");
1071 commonCombo->setFocusPolicy(QWidget::NoFocus); 1072 commonCombo->setFocusPolicy(QWidget::NoFocus);
1072 te->setFocus(); 1073 te->setFocus();
1073 } 1074 }
1074 } 1075 }
1075 if(iD == -24) { 1076 if(iD == -24) {
1076 // "edit commands" 1077 // "edit commands"
1077 CommandEditDialog *m = new CommandEditDialog(this); 1078 CommandEditDialog *m = new CommandEditDialog(this);
1078 connect(m,SIGNAL(commandsEdited()),this,SLOT(initCommandList())); 1079 connect(m,SIGNAL(commandsEdited()),this,SLOT(initCommandList()));
1079 m->showMaximized(); 1080 QPEApplication::showDialog( m );
1080 } 1081 }
1081 1082
1082} 1083}
1083 1084
1084// $QPEDIR/bin/qcop QPE/Application/embeddedkonsole 'setDocument(QString)' 'ssh -V' 1085// $QPEDIR/bin/qcop QPE/Application/embeddedkonsole 'setDocument(QString)' 'ssh -V'
1085void Konsole::setDocument( const QString &cmd) { 1086void Konsole::setDocument( const QString &cmd) {
1086 newSession(); 1087 newSession();
1087 TEWidget* te = getTe(); 1088 TEWidget* te = getTe();
1088 if(cmd.find("-e", 0, TRUE) != -1) { 1089 if(cmd.find("-e", 0, TRUE) != -1) {
1089 QString cmd2; 1090 QString cmd2;
1090 cmd2=cmd.right(cmd.length()-3)+" &"; 1091 cmd2=cmd.right(cmd.length()-3)+" &";
1091 system(cmd2.latin1()); 1092 system(cmd2.latin1());
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index be18140..1299fe3 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -933,26 +933,25 @@ bool TextEdit::saveAs() {
933 updateCaption( currentFileName); 933 updateCaption( currentFileName);
934 934
935 FileManager fm; 935 FileManager fm;
936 if ( !fm.saveFile( *doc, rt ) ) { 936 if ( !fm.saveFile( *doc, rt ) ) {
937 return false; 937 return false;
938 } 938 }
939 939
940 if( filePerms ) { 940 if( filePerms ) {
941 filePermissions *filePerm; 941 filePermissions *filePerm;
942 filePerm = new filePermissions(this, 942 filePerm = new filePermissions(this,
943 tr("Permissions"),true, 943 tr("Permissions"),true,
944 0,(const QString &)fileNm); 944 0,(const QString &)fileNm);
945 filePerm->showMaximized(); 945 QPEApplication::execDialog( filePerm );
946 filePerm->exec();
947 946
948 if( filePerm) 947 if( filePerm)
949 delete filePerm; 948 delete filePerm;
950 } 949 }
951// } 950// }
952 editor->setEdited( false); 951 editor->setEdited( false);
953 edited1 = false; 952 edited1 = false;
954 edited = false; 953 edited = false;
955 if(caption().left(1)=="*") 954 if(caption().left(1)=="*")
956 setCaption(caption().right(caption().length()-1)); 955 setCaption(caption().right(caption().length()-1));
957 956
958 return true; 957 return true;
@@ -1007,26 +1006,25 @@ void TextEdit::setDocument(const QString& fileref) {
1007 } 1006 }
1008 updateCaption( currentFileName); 1007 updateCaption( currentFileName);
1009} 1008}
1010 1009
1011void TextEdit::changeFont() { 1010void TextEdit::changeFont() {
1012 QDialog *d = new QDialog ( this, "FontDialog", true ); 1011 QDialog *d = new QDialog ( this, "FontDialog", true );
1013 d-> setCaption ( tr( "Choose font" )); 1012 d-> setCaption ( tr( "Choose font" ));
1014 QBoxLayout *lay = new QVBoxLayout ( d ); 1013 QBoxLayout *lay = new QVBoxLayout ( d );
1015 OFontSelector *ofs = new OFontSelector ( true, d ); 1014 OFontSelector *ofs = new OFontSelector ( true, d );
1016 lay-> addWidget ( ofs ); 1015 lay-> addWidget ( ofs );
1017 ofs-> setSelectedFont ( editor-> font ( )); 1016 ofs-> setSelectedFont ( editor-> font ( ));
1018 1017
1019 d-> showMaximized ( ); 1018 if ( QPEApplication::execDialog( d ) == QDialog::Accepted )
1020 if ( d-> exec ( ) == QDialog::Accepted )
1021 editor-> setFont ( ofs-> selectedFont ( )); 1019 editor-> setFont ( ofs-> selectedFont ( ));
1022 delete d; 1020 delete d;
1023 1021
1024} 1022}
1025 1023
1026void TextEdit::editDelete() { 1024void TextEdit::editDelete() {
1027 switch ( QMessageBox::warning(this,tr("Text Editor"), 1025 switch ( QMessageBox::warning(this,tr("Text Editor"),
1028 tr("Do you really want<BR>to <B>delete</B> " 1026 tr("Do you really want<BR>to <B>delete</B> "
1029 "the current file\nfrom the disk?<BR>This is " 1027 "the current file\nfrom the disk?<BR>This is "
1030 "<B>irreversable!</B>"), 1028 "<B>irreversable!</B>"),
1031 tr("Yes"),tr("No"),0,0,1) ) { 1029 tr("Yes"),tr("No"),0,0,1) ) {
1032 case 0: 1030 case 0: