author | harlekin <harlekin> | 2002-06-11 15:09:39 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-06-11 15:09:39 (UTC) |
commit | ee1b955759e12b91a2caf7dfb219a372dadfe65b (patch) (unidiff) | |
tree | 877b6b5e585f92052ac7f376703d4b1c3cc4489c | |
parent | b4c905a143583bb3922d948961d6ce277fda6df4 (diff) | |
download | opie-ee1b955759e12b91a2caf7dfb219a372dadfe65b.zip opie-ee1b955759e12b91a2caf7dfb219a372dadfe65b.tar.gz opie-ee1b955759e12b91a2caf7dfb219a372dadfe65b.tar.bz2 |
now console remembers scrollbar setting on restart
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index 3f6e0b4..b0d28fc 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp | |||
@@ -247,16 +247,16 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
247 | } | 247 | } |
248 | fontChanged(cfont); | 248 | fontChanged(cfont); |
249 | 249 | ||
250 | configMenu = new QPopupMenu( this); | 250 | configMenu = new QPopupMenu( this); |
251 | colorMenu = new QPopupMenu( this); | 251 | colorMenu = new QPopupMenu( this); |
252 | scrollMenu = new QPopupMenu( this); | 252 | scrollMenu = new QPopupMenu( this); |
253 | editCommandListMenu = new QPopupMenu( this); | 253 | editCommandListMenu = new QPopupMenu( this); |
254 | 254 | ||
255 | configMenu->insertItem("Command List",editCommandListMenu); | 255 | configMenu->insertItem("Command List",editCommandListMenu); |
256 | 256 | ||
257 | bool listHidden; | 257 | bool listHidden; |
258 | cfg.setGroup("Menubar"); | 258 | cfg.setGroup("Menubar"); |
259 | if( cfg.readEntry("Hidden","FALSE") == "TRUE") { | 259 | if( cfg.readEntry("Hidden","FALSE") == "TRUE") { |
260 | editCommandListMenu->insertItem( tr( "Show command list" )); | 260 | editCommandListMenu->insertItem( tr( "Show command list" )); |
261 | listHidden=TRUE; | 261 | listHidden=TRUE; |
262 | } else { | 262 | } else { |
@@ -336,13 +336,13 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
336 | editCommandListMenu->setItemEnabled(-22 ,FALSE); | 336 | editCommandListMenu->setItemEnabled(-22 ,FALSE); |
337 | } | 337 | } |
338 | editCommandListMenu->insertItem(tr( "Edit" ) ); | 338 | editCommandListMenu->insertItem(tr( "Edit" ) ); |
339 | 339 | ||
340 | cfg.setGroup("Commands"); | 340 | cfg.setGroup("Commands"); |
341 | commonCombo->setInsertionPolicy(QComboBox::AtCurrent); | 341 | commonCombo->setInsertionPolicy(QComboBox::AtCurrent); |
342 | 342 | ||
343 | initCommandList(); | 343 | initCommandList(); |
344 | // for (int i = 0; commonCmds[i] != NULL; i++) { | 344 | // for (int i = 0; commonCmds[i] != NULL; i++) { |
345 | // commonCombo->insertItem( commonCmds[i], i ); | 345 | // commonCombo->insertItem( commonCmds[i], i ); |
346 | // tmp = cfg.readEntry( QString::number(i),""); | 346 | // tmp = cfg.readEntry( QString::number(i),""); |
347 | // if(tmp != "") | 347 | // if(tmp != "") |
348 | // commonCombo->changeItem( tmp,i ); | 348 | // commonCombo->changeItem( tmp,i ); |
@@ -351,13 +351,13 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
351 | connect( commonCombo, SIGNAL( activated(int) ), this, SLOT( enterCommand(int) )); | 351 | connect( commonCombo, SIGNAL( activated(int) ), this, SLOT( enterCommand(int) )); |
352 | 352 | ||
353 | scrollMenu->insertItem(tr( "None" )); | 353 | scrollMenu->insertItem(tr( "None" )); |
354 | scrollMenu->insertItem(tr( "Left" )); | 354 | scrollMenu->insertItem(tr( "Left" )); |
355 | scrollMenu->insertItem(tr( "Right" )); | 355 | scrollMenu->insertItem(tr( "Right" )); |
356 | configMenu->insertItem(tr( "ScrollBar" ),scrollMenu); | 356 | configMenu->insertItem(tr( "ScrollBar" ),scrollMenu); |
357 | 357 | ||
358 | // create applications ///////////////////////////////////////////////////// | 358 | // create applications ///////////////////////////////////////////////////// |
359 | setCentralWidget(tab); | 359 | setCentralWidget(tab); |
360 | 360 | ||
361 | // load keymaps //////////////////////////////////////////////////////////// | 361 | // load keymaps //////////////////////////////////////////////////////////// |
362 | KeyTrans::loadAll(); | 362 | KeyTrans::loadAll(); |
363 | for (int i = 0; i < KeyTrans::count(); i++) | 363 | for (int i = 0; i < KeyTrans::count(); i++) |
@@ -774,13 +774,13 @@ void Konsole::setColor() | |||
774 | void Konsole::scrollMenuSelected(int index) | 774 | void Konsole::scrollMenuSelected(int index) |
775 | { | 775 | { |
776 | // QString temp; | 776 | // QString temp; |
777 | // qDebug( temp.sprintf("scrollbar menu %d",index)); | 777 | // qDebug( temp.sprintf("scrollbar menu %d",index)); |
778 | TEWidget* te = getTe(); | 778 | TEWidget* te = getTe(); |
779 | Config cfg("Konsole"); | 779 | Config cfg("Konsole"); |
780 | cfg.setGroup("Scrollbar"); | 780 | cfg.setGroup("ScrollBar"); |
781 | switch( index){ | 781 | switch( index){ |
782 | case -24: | 782 | case -24: |
783 | te->setScrollbarLocation(0); | 783 | te->setScrollbarLocation(0); |
784 | cfg.writeEntry("Position",0); | 784 | cfg.writeEntry("Position",0); |
785 | break; | 785 | break; |
786 | case -25: | 786 | case -25: |
@@ -789,13 +789,13 @@ void Konsole::scrollMenuSelected(int index) | |||
789 | break; | 789 | break; |
790 | case -26: | 790 | case -26: |
791 | te->setScrollbarLocation(2); | 791 | te->setScrollbarLocation(2); |
792 | cfg.writeEntry("Position",2); | 792 | cfg.writeEntry("Position",2); |
793 | break; | 793 | break; |
794 | }; | 794 | }; |
795 | 795 | ||
796 | } | 796 | } |
797 | 797 | ||
798 | void Konsole::editCommandListMenuSelected(int iD) | 798 | void Konsole::editCommandListMenuSelected(int iD) |
799 | { | 799 | { |
800 | // QString temp; | 800 | // QString temp; |
801 | // qDebug( temp.sprintf("edit command list %d",iD)); | 801 | // qDebug( temp.sprintf("edit command list %d",iD)); |