author | llornkcor <llornkcor> | 2002-11-08 13:25:26 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-08 13:25:26 (UTC) |
commit | ada5be67fec81ed8845a6f358bbf7e3b181d417e (patch) (unidiff) | |
tree | 7534fb32838b3323f64328f863d621d959b716fb /core/apps/embeddedkonsole/konsole.cpp | |
parent | 8714e7c5271b80bf61de10f3726bce8b6a85127f (diff) | |
download | opie-ada5be67fec81ed8845a6f358bbf7e3b181d417e.zip opie-ada5be67fec81ed8845a6f358bbf7e3b181d417e.tar.gz opie-ada5be67fec81ed8845a6f358bbf7e3b181d417e.tar.bz2 |
option for beep
Diffstat (limited to 'core/apps/embeddedkonsole/konsole.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 68 |
1 files changed, 40 insertions, 28 deletions
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) | |||
371 | configMenu->insertItem(tr( "ScrollBar" ),scrollMenu); | 371 | configMenu->insertItem(tr( "ScrollBar" ),scrollMenu); |
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); |
376 | // cfg.setGroup("ScrollBar"); | 380 | // cfg.setGroup("ScrollBar"); |
@@ -787,34 +791,34 @@ void Konsole::colorMenuSelected(int iD) | |||
787 | 791 | ||
788 | void Konsole::configMenuSelected(int iD) | 792 | void Konsole::configMenuSelected(int iD) |
789 | { | 793 | { |
790 | // QString temp; | 794 | // QString temp; |
791 | // qDebug( temp.sprintf("configmenu %d",iD)); | 795 | // qDebug( temp.sprintf("configmenu %d",iD)); |
792 | TEWidget* te = getTe(); | 796 | TEWidget* te = getTe(); |
793 | Config cfg("Konsole"); | 797 | Config cfg("Konsole"); |
794 | cfg.setGroup("Menubar"); | 798 | cfg.setGroup("Menubar"); |
795 | if( iD == -4) { | 799 | int i,j; |
796 | cfg.setGroup("Tabs"); | ||
797 | QString tmp=cfg.readEntry("Position","Bottom"); | ||
798 | |||
799 | if(tmp=="Top") { | ||
800 | tab->setTabPosition(QTabWidget::Bottom); | ||
801 | configMenu->changeItem( iD,"Tabs on Top"); | ||
802 | cfg.writeEntry("Position","Bottom"); | ||
803 | } else { | ||
804 | tab->setTabPosition(QTabWidget::Top); | ||
805 | configMenu->changeItem( iD,"Tabs on Bottom"); | ||
806 | cfg.writeEntry("Position","Top"); | ||
807 | } | ||
808 | } | ||
809 | int i; | ||
810 | #ifdef QWS_QT_OPIE | 800 | #ifdef QWS_QT_OPIE |
811 | i=-29; | 801 | i=-29;j=-30; |
812 | #else | 802 | #else |
813 | i=-28; | 803 | i=-28;j=-29; |
814 | #endif | 804 | #endif |
815 | 805 | ||
816 | if( iD == i) { | 806 | if(iD == -4) { |
817 | cfg.setGroup("ScrollBar"); | 807 | cfg.setGroup("Tabs"); |
808 | QString tmp=cfg.readEntry("Position","Bottom"); | ||
809 | |||
810 | if(tmp=="Top") { | ||
811 | tab->setTabPosition(QTabWidget::Bottom); | ||
812 | configMenu->changeItem( iD,"Tabs on Top"); | ||
813 | cfg.writeEntry("Position","Bottom"); | ||
814 | } else { | ||
815 | tab->setTabPosition(QTabWidget::Top); | ||
816 | configMenu->changeItem( iD,"Tabs on Bottom"); | ||
817 | cfg.writeEntry("Position","Top"); | ||
818 | } | ||
819 | } | ||
820 | if(iD == i) { | ||
821 | cfg.setGroup("ScrollBar"); | ||
818 | bool b=cfg.readBoolEntry("HorzScroll",0); | 822 | bool b=cfg.readBoolEntry("HorzScroll",0); |
819 | b=!b; | 823 | b=!b; |
820 | cfg.writeEntry("HorzScroll", b ); | 824 | cfg.writeEntry("HorzScroll", b ); |
@@ -826,7 +830,16 @@ i=-28; | |||
826 | te->setScrollbarLocation(0); | 830 | te->setScrollbarLocation(0); |
827 | } | 831 | } |
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 | ||
832 | void Konsole::changeCommand(const QString &text, int c) | 845 | void Konsole::changeCommand(const QString &text, int c) |
@@ -981,9 +994,9 @@ void Konsole::changeForegroundColor(const QColor &color) { | |||
981 | int r, g, b; | 994 | int r, g, b; |
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 | ||
989 | qDebug("do other dialog"); | 1002 | qDebug("do other dialog"); |
@@ -1004,9 +1017,8 @@ void Konsole::changeBackgroundColor(const QColor &color) { | |||
1004 | int r, g, b; | 1017 | int r, g, b; |
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 | } |
1012 | 1024 | ||
@@ -1025,8 +1037,8 @@ i=-28; | |||
1025 | te->setWrapAt(0); | 1037 | te->setWrapAt(0); |
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 | } |
1032 | } | 1044 | } |