summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/TEWidget.cpp7
-rw-r--r--core/apps/embeddedkonsole/TEWidget.h11
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp68
3 files changed, 47 insertions, 39 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
@@ -332,7 +332,8 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name)
font_a = 1;
word_selection_mode = FALSE;
hposition = 0;
-vcolumns = 0;
+ vcolumns = 0;
+ useBeep = true;
setMouseMarks(TRUE);
setVTFont( QFont("fixed") );
@@ -1107,7 +1108,9 @@ void TEWidget::Bell()
{
//#ifdef QT_QWS_SHARP
//# ifndef QT_NO_COP
- QCopEnvelope( "QPE/TaskBar", "soundAlarm()" );
+ if(useBeep)
+ QCopEnvelope( "QPE/TaskBar", "soundAlarm()" );
+
//# endif
//#else
//# ifndef QT_NO_SOUND
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
@@ -53,20 +53,13 @@ public:
const ColorEntry* getColorTable() const;
const ColorEntry* getdefaultColorTable() const;
void setColorTable(const ColorEntry table[]);
-
void setScrollbarLocation(int loc);
enum { SCRNONE=0, SCRLEFT=1, SCRRIGHT=2 };
-
void setScroll(int cursor, int lines);
void doScroll(int lines);
-
void doHScroll(int lines);
-
-
void emitSelection();
- void setWrapAt(int columns);
-
-public:
+ void setWrapAt(int columns);
void setImage(const ca* const newimg, int lines, int columns);
@@ -79,8 +72,8 @@ public:
QSize sizeHint() const;
-public:
bool useHorzScroll;
+ bool useBeep;
void Bell();
void emitText(QString text);
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
@@ -371,6 +371,10 @@ void Konsole::init(const char* _pgm, QStrList & _args)
configMenu->insertItem(tr( "ScrollBar" ),scrollMenu);
configMenu->insertItem(tr( "Wrap" ));
+ int jut = configMenu->insertItem(tr( "Use Beep" ));
+ cfg.setGroup("Menubar");
+ configMenu->setItemChecked(jut, cfg.readBoolEntry("useBeep",0));
+
//scrollMenuSelected(-29);
// cfg.setGroup("ScrollBar");
@@ -787,34 +791,34 @@ void Konsole::colorMenuSelected(int iD)
void Konsole::configMenuSelected(int iD)
{
-// QString temp;
-// qDebug( temp.sprintf("configmenu %d",iD));
+// QString temp;
+// qDebug( temp.sprintf("configmenu %d",iD));
TEWidget* te = getTe();
Config cfg("Konsole");
cfg.setGroup("Menubar");
- if( iD == -4) {
- cfg.setGroup("Tabs");
- QString tmp=cfg.readEntry("Position","Bottom");
-
- if(tmp=="Top") {
- tab->setTabPosition(QTabWidget::Bottom);
- configMenu->changeItem( iD,"Tabs on Top");
- cfg.writeEntry("Position","Bottom");
- } else {
- tab->setTabPosition(QTabWidget::Top);
- configMenu->changeItem( iD,"Tabs on Bottom");
- cfg.writeEntry("Position","Top");
- }
- }
- int i;
+ int i,j;
#ifdef QWS_QT_OPIE
-i=-29;
+ i=-29;j=-30;
#else
-i=-28;
+ i=-28;j=-29;
#endif
- if( iD == i) {
- cfg.setGroup("ScrollBar");
+ if(iD == -4) {
+ cfg.setGroup("Tabs");
+ QString tmp=cfg.readEntry("Position","Bottom");
+
+ if(tmp=="Top") {
+ tab->setTabPosition(QTabWidget::Bottom);
+ configMenu->changeItem( iD,"Tabs on Top");
+ cfg.writeEntry("Position","Bottom");
+ } else {
+ tab->setTabPosition(QTabWidget::Top);
+ configMenu->changeItem( iD,"Tabs on Bottom");
+ cfg.writeEntry("Position","Top");
+ }
+ }
+ if(iD == i) {
+ cfg.setGroup("ScrollBar");
bool b=cfg.readBoolEntry("HorzScroll",0);
b=!b;
cfg.writeEntry("HorzScroll", b );
@@ -826,7 +830,16 @@ i=-28;
te->setScrollbarLocation(0);
}
te->setScrollbarLocation( cfg.readNumEntry("Position",2));
- }
+ }
+ if(iD == j) {
+ cfg.setGroup("Menubar");
+ bool b=cfg.readBoolEntry("useBeep",0);
+ b=!b;
+ cfg.writeEntry("useBeep", b );
+ cfg.write();
+ configMenu->setItemChecked(j,b);
+ te->useBeep=b;
+ }
}
void Konsole::changeCommand(const QString &text, int c)
@@ -981,9 +994,9 @@ void Konsole::changeForegroundColor(const QColor &color) {
int r, g, b;
color.rgb(&r,&g,&b);
foreground.setRgb(r,g,b);
-// QString colors;
-// colors.sprintf("%d,%d,%d"color.red,color.green,color.blue);
+
cfg.writeEntry("foreground",color.name());
+ qDebug("foreground "+color.name());
cfg.write();
qDebug("do other dialog");
@@ -1004,9 +1017,8 @@ void Konsole::changeBackgroundColor(const QColor &color) {
int r, g, b;
color.rgb(&r,&g,&b);
background.setRgb(r,g,b);
-// QString colors;
-// colors.sprintf("%d,%d,%d"color.red,color.green,color.blue);
cfg.writeEntry("background",color.name());
+ qDebug("background "+color.name());
cfg.write();
}
@@ -1025,8 +1037,8 @@ i=-28;
te->setWrapAt(0);
configMenu->setItemChecked( i,TRUE);
} else {
- te->setWrapAt(90);
-// te->setWrapAt(120);
+// te->setWrapAt(90);
+ te->setWrapAt(120);
configMenu->setItemChecked( i,FALSE);
}
}