-rw-r--r-- | core/apps/embeddedkonsole/TEHistory.cpp | 2 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/TEScreen.cpp | 2 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 4 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/commandeditdialog.cpp | 2 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 31 |
5 files changed, 21 insertions, 20 deletions
diff --git a/core/apps/embeddedkonsole/TEHistory.cpp b/core/apps/embeddedkonsole/TEHistory.cpp index 504cd13..2417af1 100644 --- a/core/apps/embeddedkonsole/TEHistory.cpp +++ b/core/apps/embeddedkonsole/TEHistory.cpp @@ -85,17 +85,17 @@ void HistoryScroll::setSize(int lines, int cells) m_first_line = 0; m_num_lines = 0; m_last_cell = 0; m_start_line = 0; } void HistoryScroll::setScroll(bool on) { - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("History"); // printf("setScroll(%d)\n", on); if (on) { int lines = cfg.readNumEntry("history_lines",300); int avg_line = cfg.readNumEntry("avg_line_length",60); int cells = lines * avg_line; setSize(lines,cells); } else { diff --git a/core/apps/embeddedkonsole/TEScreen.cpp b/core/apps/embeddedkonsole/TEScreen.cpp index 4ebc28e..3dbcec2 100644 --- a/core/apps/embeddedkonsole/TEScreen.cpp +++ b/core/apps/embeddedkonsole/TEScreen.cpp @@ -557,17 +557,17 @@ ca* TEScreen::getCookedImage() } /*! */ void TEScreen::reset() { - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("ScrollBar"); if( !cfg.readBoolEntry("HorzScroll",0) ) setMode(MODE_Wrap ); saveMode(MODE_Wrap ); // wrap at end of margin resetMode(MODE_Origin); saveMode(MODE_Origin); // position refere to [1,1] resetMode(MODE_Insert); saveMode(MODE_Insert); // overstroke setMode(MODE_Cursor); // cursor visible diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index 98c3cdf..2e3e0f5 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp @@ -301,17 +301,17 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) hScrollbar = new QScrollBar(this); hScrollbar->setCursor( arrowCursor ); hScrollbar->setOrientation(QScrollBar::Horizontal); // hScrollbar->setMaximumHeight(16); connect( hScrollbar, SIGNAL(valueChanged(int)), this, SLOT( hScrollChanged(int))); - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("ScrollBar"); switch( cfg.readNumEntry("Position",2)){ case 0: scrollLoc = SCRNONE; break; case 1: scrollLoc = SCRLEFT; break; @@ -1222,17 +1222,17 @@ void TEWidget::clearImage() // Create Image /////////////////////////////////////////////////////// void TEWidget::calcGeometry() { int showhscrollbar = 1; int hwidth = 0; int dcolumns; - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("ScrollBar"); useHorzScroll=cfg.readBoolEntry("HorzScroll",0); if(vcolumns == 0) showhscrollbar = 0; if(showhscrollbar == 1) hwidth = QApplication::style().scrollBarExtent().width(); scrollbar->resize(QApplication::style().scrollBarExtent().width(), contentsRect().height() - hwidth); diff --git a/core/apps/embeddedkonsole/commandeditdialog.cpp b/core/apps/embeddedkonsole/commandeditdialog.cpp index 03cba87..b23db18 100644 --- a/core/apps/embeddedkonsole/commandeditdialog.cpp +++ b/core/apps/embeddedkonsole/commandeditdialog.cpp @@ -97,17 +97,17 @@ connect(ToolButton5,SIGNAL(clicked()),m_PlayListSelection,SLOT(moveSelectedDown( QListViewItem *current = m_SuggestedCommandList->selectedItem(); if ( current ) item->moveItem( current ); m_SuggestedCommandList->setSelected( item, TRUE ); m_SuggestedCommandList->ensureItemVisible( m_SuggestedCommandList->selectedItem() ); - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Commands"); if (cfg.readEntry("Commands Set","FALSE") == "TRUE") { for (int i = 0; i < 100; i++) { QString tmp; tmp = cfg.readEntry( QString::number(i),""); if (!tmp.isEmpty()) m_PlayListSelection->addStringToSelection(tmp); } diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index 46c0203..3289a04 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp @@ -15,16 +15,17 @@ /* ---------------------------------------------------------------------- */ /* */ /* Ported Konsole to Qt/Embedded */ /* */ /* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ /* */ /* -------------------------------------------------------------------------- */ // enhancements added by L.J. Potter <ljp@llornkcor.com> +// enhancements added by Phillip Kuhn //#define QT_QWS_OPIE #include <stdlib.h> #ifdef QT_QWS_OPIE #include <opie2/ocolorpopupmenu.h> #endif @@ -256,17 +257,17 @@ class HistoryList : public QList<HistoryItem> return(-1); return(0); } }; void Konsole::initCommandList() { // qDebug("Konsole::initCommandList"); - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Commands"); // commonCombo->setInsertionPolicy(QComboBox::AtCurrent); commonCombo->clear(); if (cfg.readEntry("ShellHistory","TRUE") == "TRUE") { QString histfilename = QString(getenv("HOME")) + "/.bash_history"; histfilename = cfg.readEntry("ShellHistoryPath",histfilename); @@ -366,17 +367,17 @@ void Konsole::init(const char* _pgm, QStrList & _args) n_render = 0; startUp=0; fromMenu = FALSE; fullscreen = false; setCaption( "Qkonsole" ); setIcon( Resource::loadPixmap( "qkonsole/qkonsole" ) ); - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Font"); QString tmp; // initialize the list of allowed fonts /////////////////////////////////// QString cfgFontName = cfg.readEntry("FontName","Lcfont"); int cfgFontSize = cfg.readNumEntry("FontSize",18); @@ -779,17 +780,17 @@ Konsole::historyDialog() QDialog *d = new QDialog ( this, "histdlg", true ); // d-> setCaption ( tr( "History" )); QBoxLayout *lay = new QVBoxLayout ( d, 4, 4 ); QLabel *l = new QLabel ( tr( "History Lines:" ), d ); lay-> addWidget ( l ); - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("History"); int hist = cfg.readNumEntry("history_lines",300); int avg_line = cfg.readNumEntry("avg_line_length",60); QSpinBox *spin = new QSpinBox ( 1, 100000, 20, d ); spin-> setValue ( hist ); spin-> setWrapping ( true ); spin-> setButtonSymbols ( QSpinBox::PlusMinus ); @@ -922,17 +923,17 @@ void Konsole::setFont(int f) { fontList->setItemChecked(i + 1000, i == familyNum); } for(int i = 0; i < (int)fonts.count(); i++) { fontList->setItemChecked(i, fonts.at(i)->getFamilyNum() == familyNum && fonts.at(i)->getSize() == size); } - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Font"); QString ss = "Session"+ QString::number(tab->currentPageIndex()+1); if (tab->currentPageIndex() == 0) { cfg.writeEntry("FontName", fonts.at(cfont)->getFamily()); cfg.writeEntry("FontSize", fonts.at(cfont)->getSize()); } cfg.writeEntry("FontName"+ss, fonts.at(cfont)->getFamily()); @@ -1167,17 +1168,17 @@ void Konsole::changeTitle(TEWidget* te, QString newTitle ) } void Konsole::newSession() { if(nsessions < 15) { // seems to be something weird about 16 tabs on the Zaurus.... memory? TEWidget* te = new TEWidget(tab); - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Menubar"); // FIXME use more defaults from config file te->useBeep=cfg.readBoolEntry("useBeep",0); // te->setBackgroundMode(PaletteBase); //we want transparent!! cfg.setGroup("Font"); @@ -1406,17 +1407,17 @@ void Konsole::colorMenuIsSelected(int iD) void Konsole::colorMenuSelected(int iD) { // this is NOT pretty, elegant or anything else besides functional // QString temp; // qDebug( temp.sprintf("colormenu %d", iD)); TEWidget* te = getTe(); - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Colors"); ColorEntry m_table[TABLE_COLORS]; const ColorEntry * defaultCt=te->getdefaultColorTable(); int i; // te->color_menu_item = iD; @@ -1590,17 +1591,17 @@ void Konsole::setColors(QColor foreground, QColor background) else m_table[i].color = defaultCt[i].color; } te->setColorTable(m_table); } void Konsole::tabMenuSelected(int id) { - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Tabs"); tabMenu->setItemChecked(tabPos, false); if (id == tm_bottom) { printf("set bottom tab\n"); tab->getTabBar()->show(); tab->setTabPosition(QTabWidget::Bottom); tab->getTabBar()->show(); @@ -1627,17 +1628,17 @@ void Konsole::tabMenuSelected(int id) void Konsole::configMenuSelected(int iD) { // QString temp; // qDebug( temp.sprintf("configmenu %d",iD)); TEWidget* te = getTe(); - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Menubar"); if(iD == cm_wrap) { cfg.setGroup("ScrollBar"); bool b=cfg.readBoolEntry("HorzScroll",0); b=!b; cfg.writeEntry("HorzScroll", b ); cfg.write(); @@ -1661,29 +1662,29 @@ void Konsole::configMenuSelected(int iD) cfg.write(); configMenu->setItemChecked(cm_beep,b); te->useBeep=b; } } void Konsole::changeCommand(const QString &text, int c) { - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Commands"); if(commonCmds[c] != text) { cfg.writeEntry(QString::number(c),text); commonCombo->clearEdit(); commonCombo->setCurrentItem(c); } } void Konsole::setColor(int sess) { - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Colors"); QColor foreground, background; QString ss = QString("Session") + QString::number(sess); foreground.setRgb(cfg.readNumEntry("foregroundRed"+ss, cfg.readNumEntry("foregroundRed",0xff)), cfg.readNumEntry("foregroundGreen"+ss, cfg.readNumEntry("foregroundGreen",0xff)), cfg.readNumEntry("foregroundBlue"+ss, @@ -1697,17 +1698,17 @@ void Konsole::setColor(int sess) setColors(foreground, background); } void Konsole::scrollMenuSelected(int index) { // qDebug( "scrollbar menu %d",index); TEWidget* te = getTe(); - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("ScrollBar"); if(index == sm_none) { te->setScrollbarLocation(0); cfg.writeEntry("Position",0); } else if(index == sm_left) @@ -1744,17 +1745,17 @@ void Konsole::editCommandListMenuSelected(int iD) { // QString temp; // qDebug( temp.sprintf("edit command list %d",iD)); // FIXME: more cleanup needed here TEWidget* te = getTe(); - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Menubar"); if( iD == ec_cmdlist) { if(!secondToolBar->isHidden()) { secondToolBar->hide(); configMenu->changeItem( iD,tr( "Show Command List" )); cfg.writeEntry("Hidden","TRUE"); @@ -1860,17 +1861,17 @@ void Konsole::parseCommandLine() exit(0);//close(); } // end -e switch } startUp++; } void Konsole::changeForegroundColor(const QColor &color) { - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Colors"); int r, g, b; color.rgb(&r,&g,&b); foreground.setRgb(r,g,b); cfg.writeEntry("foreground",color.name()); qDebug("foreground "+color.name()); cfg.write(); @@ -1884,29 +1885,29 @@ void Konsole::changeForegroundColor(const QColor &color) penColorPopupMenu2->exec(); #endif } void Konsole::changeBackgroundColor(const QColor &color) { qDebug("Change background"); - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("Colors"); int r, g, b; color.rgb(&r,&g,&b); background.setRgb(r,g,b); cfg.writeEntry("background",color.name()); qDebug("background "+color.name()); cfg.write(); } void Konsole::doWrap() { - Config cfg("Qkonsole"); + Config cfg( "Konsole" ); cfg.setGroup("ScrollBar"); TEWidget* te = getTe(); if( !cfg.readBoolEntry("HorzScroll",0)) { te->setWrapAt(0); configMenu->setItemChecked( cm_wrap,TRUE); } else |