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 /core/apps | |
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 | |||
@@ -241,28 +241,28 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
241 | QPEMenuBar *menuBar = new QPEMenuBar( menuToolBar ); | 241 | QPEMenuBar *menuBar = new QPEMenuBar( menuToolBar ); |
242 | 242 | ||
243 | fontList = new QPopupMenu( this ); | 243 | fontList = new QPopupMenu( this ); |
244 | for(uint i = 0; i < fonts.count(); i++) { | 244 | for(uint i = 0; i < fonts.count(); i++) { |
245 | VTFont *fnt = fonts.at(i); | 245 | VTFont *fnt = fonts.at(i); |
246 | fontList->insertItem(fnt->getName(), i); | 246 | fontList->insertItem(fnt->getName(), i); |
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 { |
263 | editCommandListMenu->insertItem( tr( "Hide command list" )); | 263 | editCommandListMenu->insertItem( tr( "Hide command list" )); |
264 | listHidden=FALSE; | 264 | listHidden=FALSE; |
265 | } | 265 | } |
266 | 266 | ||
267 | cfg.setGroup("Tabs"); | 267 | cfg.setGroup("Tabs"); |
268 | tmp=cfg.readEntry("Position","Bottom"); | 268 | tmp=cfg.readEntry("Position","Bottom"); |
@@ -330,40 +330,40 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
330 | commonCombo = new QComboBox( secondToolBar ); | 330 | commonCombo = new QComboBox( secondToolBar ); |
331 | commonCombo->setMaximumWidth(236); | 331 | commonCombo->setMaximumWidth(236); |
332 | 332 | ||
333 | editCommandListMenu->insertItem( tr( "Quick Edit" ) ); | 333 | editCommandListMenu->insertItem( tr( "Quick Edit" ) ); |
334 | if( listHidden) { | 334 | if( listHidden) { |
335 | secondToolBar->hide(); | 335 | secondToolBar->hide(); |
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 ); |
349 | // } | 349 | // } |
350 | 350 | ||
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++) |
364 | { KeyTrans* s = KeyTrans::find(i); | 364 | { KeyTrans* s = KeyTrans::find(i); |
365 | assert( s ); | 365 | assert( s ); |
366 | } | 366 | } |
367 | 367 | ||
368 | se_pgm = _pgm; | 368 | se_pgm = _pgm; |
369 | se_args = _args; | 369 | se_args = _args; |
@@ -768,40 +768,40 @@ void Konsole::setColor() | |||
768 | Config cfg("Konsole"); | 768 | Config cfg("Konsole"); |
769 | cfg.setGroup("Colors"); | 769 | cfg.setGroup("Colors"); |
770 | int scheme = cfg.readNumEntry("Schema",1); | 770 | int scheme = cfg.readNumEntry("Schema",1); |
771 | if(scheme != 1) colorMenuSelected( -scheme); | 771 | if(scheme != 1) colorMenuSelected( -scheme); |
772 | } | 772 | } |
773 | 773 | ||
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: |
787 | te->setScrollbarLocation(1); | 787 | te->setScrollbarLocation(1); |
788 | cfg.writeEntry("Position",1); | 788 | cfg.writeEntry("Position",1); |
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)); |
802 | TEWidget* te = getTe(); | 802 | TEWidget* te = getTe(); |
803 | Config cfg("Konsole"); | 803 | Config cfg("Konsole"); |
804 | cfg.setGroup("Menubar"); | 804 | cfg.setGroup("Menubar"); |
805 | if( iD == -3) { | 805 | if( iD == -3) { |
806 | if(!secondToolBar->isHidden()) { | 806 | if(!secondToolBar->isHidden()) { |
807 | secondToolBar->hide(); | 807 | secondToolBar->hide(); |