summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-11-08 13:25:26 (UTC)
committer llornkcor <llornkcor>2002-11-08 13:25:26 (UTC)
commitada5be67fec81ed8845a6f358bbf7e3b181d417e (patch) (unidiff)
tree7534fb32838b3323f64328f863d621d959b716fb
parent8714e7c5271b80bf61de10f3726bce8b6a85127f (diff)
downloadopie-ada5be67fec81ed8845a6f358bbf7e3b181d417e.zip
opie-ada5be67fec81ed8845a6f358bbf7e3b181d417e.tar.gz
opie-ada5be67fec81ed8845a6f358bbf7e3b181d417e.tar.bz2
option for beep
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/TEWidget.cpp3
-rw-r--r--core/apps/embeddedkonsole/TEWidget.h9
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp38
3 files changed, 29 insertions, 21 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp
index 4c6ea2a..c220e11 100644
--- a/core/apps/embeddedkonsole/TEWidget.cpp
+++ b/core/apps/embeddedkonsole/TEWidget.cpp
@@ -334,4 +334,5 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name)
334 hposition = 0; 334 hposition = 0;
335vcolumns = 0; 335vcolumns = 0;
336 useBeep = true;
336 337
337 setMouseMarks(TRUE); 338 setMouseMarks(TRUE);
@@ -1108,5 +1109,7 @@ void TEWidget::Bell()
1108//#ifdef QT_QWS_SHARP 1109//#ifdef QT_QWS_SHARP
1109//# ifndef QT_NO_COP 1110//# ifndef QT_NO_COP
1111 if(useBeep)
1110 QCopEnvelope( "QPE/TaskBar", "soundAlarm()" ); 1112 QCopEnvelope( "QPE/TaskBar", "soundAlarm()" );
1113
1111//# endif 1114//# endif
1112//#else 1115//#else
diff --git a/core/apps/embeddedkonsole/TEWidget.h b/core/apps/embeddedkonsole/TEWidget.h
index a480d45..5597f27 100644
--- a/core/apps/embeddedkonsole/TEWidget.h
+++ b/core/apps/embeddedkonsole/TEWidget.h
@@ -54,19 +54,12 @@ public:
54 const ColorEntry* getdefaultColorTable() const; 54 const ColorEntry* getdefaultColorTable() const;
55 void setColorTable(const ColorEntry table[]); 55 void setColorTable(const ColorEntry table[]);
56
57 void setScrollbarLocation(int loc); 56 void setScrollbarLocation(int loc);
58 enum { SCRNONE=0, SCRLEFT=1, SCRRIGHT=2 }; 57 enum { SCRNONE=0, SCRLEFT=1, SCRRIGHT=2 };
59
60 void setScroll(int cursor, int lines); 58 void setScroll(int cursor, int lines);
61 void doScroll(int lines); 59 void doScroll(int lines);
62
63 void doHScroll(int lines); 60 void doHScroll(int lines);
64
65
66 void emitSelection(); 61 void emitSelection();
67 void setWrapAt(int columns); 62 void setWrapAt(int columns);
68 63
69public:
70
71 void setImage(const ca* const newimg, int lines, int columns); 64 void setImage(const ca* const newimg, int lines, int columns);
72 65
@@ -80,6 +73,6 @@ public:
80 QSize sizeHint() const; 73 QSize sizeHint() const;
81 74
82public:
83 bool useHorzScroll; 75 bool useHorzScroll;
76 bool useBeep;
84 77
85 void Bell(); 78 void Bell();
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index 5a68c81..ebff05e 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -372,4 +372,8 @@ void Konsole::init(const char* _pgm, QStrList & _args)
372 372
373 configMenu->insertItem(tr( "Wrap" )); 373 configMenu->insertItem(tr( "Wrap" ));
374 int jut = configMenu->insertItem(tr( "Use Beep" ));
375 cfg.setGroup("Menubar");
376 configMenu->setItemChecked(jut, cfg.readBoolEntry("useBeep",0));
377
374 378
375//scrollMenuSelected(-29); 379//scrollMenuSelected(-29);
@@ -793,4 +797,11 @@ void Konsole::configMenuSelected(int iD)
793 Config cfg("Konsole"); 797 Config cfg("Konsole");
794 cfg.setGroup("Menubar"); 798 cfg.setGroup("Menubar");
799 int i,j;
800#ifdef QWS_QT_OPIE
801 i=-29;j=-30;
802#else
803 i=-28;j=-29;
804#endif
805
795 if( iD == -4) { 806 if( iD == -4) {
796 cfg.setGroup("Tabs"); 807 cfg.setGroup("Tabs");
@@ -807,11 +818,4 @@ void Konsole::configMenuSelected(int iD)
807 } 818 }
808 } 819 }
809 int i;
810#ifdef QWS_QT_OPIE
811i=-29;
812#else
813i=-28;
814#endif
815
816 if( iD == i) { 820 if( iD == i) {
817 cfg.setGroup("ScrollBar"); 821 cfg.setGroup("ScrollBar");
@@ -828,4 +832,13 @@ i=-28;
828 te->setScrollbarLocation( cfg.readNumEntry("Position",2)); 832 te->setScrollbarLocation( cfg.readNumEntry("Position",2));
829 } 833 }
834 if(iD == j) {
835 cfg.setGroup("Menubar");
836 bool b=cfg.readBoolEntry("useBeep",0);
837 b=!b;
838 cfg.writeEntry("useBeep", b );
839 cfg.write();
840 configMenu->setItemChecked(j,b);
841 te->useBeep=b;
842 }
830} 843}
831 844
@@ -982,7 +995,7 @@ void Konsole::changeForegroundColor(const QColor &color) {
982 color.rgb(&r,&g,&b); 995 color.rgb(&r,&g,&b);
983 foreground.setRgb(r,g,b); 996 foreground.setRgb(r,g,b);
984// QString colors; 997
985// colors.sprintf("%d,%d,%d"color.red,color.green,color.blue);
986 cfg.writeEntry("foreground",color.name()); 998 cfg.writeEntry("foreground",color.name());
999 qDebug("foreground "+color.name());
987 cfg.write(); 1000 cfg.write();
988 1001
@@ -1005,7 +1018,6 @@ void Konsole::changeBackgroundColor(const QColor &color) {
1005 color.rgb(&r,&g,&b); 1018 color.rgb(&r,&g,&b);
1006 background.setRgb(r,g,b); 1019 background.setRgb(r,g,b);
1007// QString colors;
1008// colors.sprintf("%d,%d,%d"color.red,color.green,color.blue);
1009 cfg.writeEntry("background",color.name()); 1020 cfg.writeEntry("background",color.name());
1021 qDebug("background "+color.name());
1010 cfg.write(); 1022 cfg.write();
1011} 1023}
@@ -1026,6 +1038,6 @@ i=-28;
1026 configMenu->setItemChecked( i,TRUE); 1038 configMenu->setItemChecked( i,TRUE);
1027 } else { 1039 } else {
1028 te->setWrapAt(90); 1040// te->setWrapAt(90);
1029// te->setWrapAt(120); 1041 te->setWrapAt(120);
1030 configMenu->setItemChecked( i,FALSE); 1042 configMenu->setItemChecked( i,FALSE);
1031 } 1043 }