summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-02-24 16:38:13 (UTC)
committer mickeyl <mickeyl>2004-02-24 16:38:13 (UTC)
commit576cbdd9af5eabbece53e1622aa3b4a3569276e0 (patch) (unidiff)
tree9ecf01336c72739c77b8c339d63822009885c88d
parentf02547005d26a1f3816f5475116bbdf094a31ccb (diff)
downloadopie-576cbdd9af5eabbece53e1622aa3b4a3569276e0.zip
opie-576cbdd9af5eabbece53e1622aa3b4a3569276e0.tar.gz
opie-576cbdd9af5eabbece53e1622aa3b4a3569276e0.tar.bz2
s/Qkonsole/Konsole/
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/TEHistory.cpp2
-rw-r--r--core/apps/embeddedkonsole/TEScreen.cpp2
-rw-r--r--core/apps/embeddedkonsole/TEWidget.cpp4
-rw-r--r--core/apps/embeddedkonsole/commandeditdialog.cpp2
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp31
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
@@ -87,13 +87,13 @@ void HistoryScroll::setSize(int lines, int cells)
87 m_last_cell = 0; 87 m_last_cell = 0;
88 m_start_line = 0; 88 m_start_line = 0;
89} 89}
90 90
91void HistoryScroll::setScroll(bool on) 91void HistoryScroll::setScroll(bool on)
92{ 92{
93 Config cfg("Qkonsole"); 93 Config cfg( "Konsole" );
94 cfg.setGroup("History"); 94 cfg.setGroup("History");
95 // printf("setScroll(%d)\n", on); 95 // printf("setScroll(%d)\n", on);
96 if (on) { 96 if (on) {
97 int lines = cfg.readNumEntry("history_lines",300); 97 int lines = cfg.readNumEntry("history_lines",300);
98 int avg_line = cfg.readNumEntry("avg_line_length",60); 98 int avg_line = cfg.readNumEntry("avg_line_length",60);
99 int cells = lines * avg_line; 99 int cells = lines * avg_line;
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
@@ -559,13 +559,13 @@ ca* TEScreen::getCookedImage()
559 559
560/*! 560/*!
561*/ 561*/
562 562
563void TEScreen::reset() 563void TEScreen::reset()
564{ 564{
565 Config cfg("Qkonsole"); 565 Config cfg( "Konsole" );
566 cfg.setGroup("ScrollBar"); 566 cfg.setGroup("ScrollBar");
567 if( !cfg.readBoolEntry("HorzScroll",0) ) 567 if( !cfg.readBoolEntry("HorzScroll",0) )
568 setMode(MODE_Wrap ); saveMode(MODE_Wrap ); // wrap at end of margin 568 setMode(MODE_Wrap ); saveMode(MODE_Wrap ); // wrap at end of margin
569 569
570 570
571 resetMode(MODE_Origin); saveMode(MODE_Origin); // position refere to [1,1] 571 resetMode(MODE_Origin); saveMode(MODE_Origin); // position refere to [1,1]
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
@@ -303,13 +303,13 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name)
303 hScrollbar->setCursor( arrowCursor ); 303 hScrollbar->setCursor( arrowCursor );
304 hScrollbar->setOrientation(QScrollBar::Horizontal); 304 hScrollbar->setOrientation(QScrollBar::Horizontal);
305 // hScrollbar->setMaximumHeight(16); 305 // hScrollbar->setMaximumHeight(16);
306 306
307 connect( hScrollbar, SIGNAL(valueChanged(int)), this, SLOT( hScrollChanged(int))); 307 connect( hScrollbar, SIGNAL(valueChanged(int)), this, SLOT( hScrollChanged(int)));
308 308
309 Config cfg("Qkonsole"); 309 Config cfg( "Konsole" );
310 cfg.setGroup("ScrollBar"); 310 cfg.setGroup("ScrollBar");
311 switch( cfg.readNumEntry("Position",2)){ 311 switch( cfg.readNumEntry("Position",2)){
312 case 0: 312 case 0:
313 scrollLoc = SCRNONE; 313 scrollLoc = SCRNONE;
314 break; 314 break;
315 case 1: 315 case 1:
@@ -1224,13 +1224,13 @@ void TEWidget::clearImage()
1224 1224
1225void TEWidget::calcGeometry() 1225void TEWidget::calcGeometry()
1226{ 1226{
1227 int showhscrollbar = 1; 1227 int showhscrollbar = 1;
1228 int hwidth = 0; 1228 int hwidth = 0;
1229 int dcolumns; 1229 int dcolumns;
1230 Config cfg("Qkonsole"); 1230 Config cfg( "Konsole" );
1231 cfg.setGroup("ScrollBar"); 1231 cfg.setGroup("ScrollBar");
1232 useHorzScroll=cfg.readBoolEntry("HorzScroll",0); 1232 useHorzScroll=cfg.readBoolEntry("HorzScroll",0);
1233 1233
1234 if(vcolumns == 0) showhscrollbar = 0; 1234 if(vcolumns == 0) showhscrollbar = 0;
1235 if(showhscrollbar == 1) hwidth = QApplication::style().scrollBarExtent().width(); 1235 if(showhscrollbar == 1) hwidth = QApplication::style().scrollBarExtent().width();
1236 1236
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
@@ -99,13 +99,13 @@ connect(ToolButton5,SIGNAL(clicked()),m_PlayListSelection,SLOT(moveSelectedDown(
99 99
100 QListViewItem *current = m_SuggestedCommandList->selectedItem(); 100 QListViewItem *current = m_SuggestedCommandList->selectedItem();
101 if ( current ) 101 if ( current )
102 item->moveItem( current ); 102 item->moveItem( current );
103 m_SuggestedCommandList->setSelected( item, TRUE ); 103 m_SuggestedCommandList->setSelected( item, TRUE );
104 m_SuggestedCommandList->ensureItemVisible( m_SuggestedCommandList->selectedItem() ); 104 m_SuggestedCommandList->ensureItemVisible( m_SuggestedCommandList->selectedItem() );
105 Config cfg("Qkonsole"); 105 Config cfg( "Konsole" );
106 cfg.setGroup("Commands"); 106 cfg.setGroup("Commands");
107 if (cfg.readEntry("Commands Set","FALSE") == "TRUE") { 107 if (cfg.readEntry("Commands Set","FALSE") == "TRUE") {
108 for (int i = 0; i < 100; i++) { 108 for (int i = 0; i < 100; i++) {
109 QString tmp; 109 QString tmp;
110 tmp = cfg.readEntry( QString::number(i),""); 110 tmp = cfg.readEntry( QString::number(i),"");
111 if (!tmp.isEmpty()) 111 if (!tmp.isEmpty())
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
@@ -17,12 +17,13 @@
17/* Ported Konsole to Qt/Embedded */ 17/* Ported Konsole to Qt/Embedded */
18/* */ 18/* */
19/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */ 19/* Copyright (C) 2000 by John Ryland <jryland@trolltech.com> */
20/* */ 20/* */
21/* -------------------------------------------------------------------------- */ 21/* -------------------------------------------------------------------------- */
22// enhancements added by L.J. Potter <ljp@llornkcor.com> 22// enhancements added by L.J. Potter <ljp@llornkcor.com>
23// enhancements added by Phillip Kuhn
23//#define QT_QWS_OPIE 24//#define QT_QWS_OPIE
24 25
25#include <stdlib.h> 26#include <stdlib.h>
26 27
27#ifdef QT_QWS_OPIE 28#ifdef QT_QWS_OPIE
28#include <opie2/ocolorpopupmenu.h> 29#include <opie2/ocolorpopupmenu.h>
@@ -258,13 +259,13 @@ class HistoryList : public QList<HistoryItem>
258 } 259 }
259}; 260};
260 261
261void Konsole::initCommandList() 262void Konsole::initCommandList()
262{ 263{
263 // qDebug("Konsole::initCommandList"); 264 // qDebug("Konsole::initCommandList");
264 Config cfg("Qkonsole"); 265 Config cfg( "Konsole" );
265 cfg.setGroup("Commands"); 266 cfg.setGroup("Commands");
266 // commonCombo->setInsertionPolicy(QComboBox::AtCurrent); 267 // commonCombo->setInsertionPolicy(QComboBox::AtCurrent);
267 commonCombo->clear(); 268 commonCombo->clear();
268 269
269 if (cfg.readEntry("ShellHistory","TRUE") == "TRUE") 270 if (cfg.readEntry("ShellHistory","TRUE") == "TRUE")
270 { 271 {
@@ -368,13 +369,13 @@ void Konsole::init(const char* _pgm, QStrList & _args)
368 fromMenu = FALSE; 369 fromMenu = FALSE;
369 fullscreen = false; 370 fullscreen = false;
370 371
371 setCaption( "Qkonsole" ); 372 setCaption( "Qkonsole" );
372 setIcon( Resource::loadPixmap( "qkonsole/qkonsole" ) ); 373 setIcon( Resource::loadPixmap( "qkonsole/qkonsole" ) );
373 374
374 Config cfg("Qkonsole"); 375 Config cfg( "Konsole" );
375 cfg.setGroup("Font"); 376 cfg.setGroup("Font");
376 QString tmp; 377 QString tmp;
377 378
378 // initialize the list of allowed fonts /////////////////////////////////// 379 // initialize the list of allowed fonts ///////////////////////////////////
379 380
380 QString cfgFontName = cfg.readEntry("FontName","Lcfont"); 381 QString cfgFontName = cfg.readEntry("FontName","Lcfont");
@@ -781,13 +782,13 @@ Konsole::historyDialog()
781 782
782 QBoxLayout *lay = new QVBoxLayout ( d, 4, 4 ); 783 QBoxLayout *lay = new QVBoxLayout ( d, 4, 4 );
783 784
784 QLabel *l = new QLabel ( tr( "History Lines:" ), d ); 785 QLabel *l = new QLabel ( tr( "History Lines:" ), d );
785 lay-> addWidget ( l ); 786 lay-> addWidget ( l );
786 787
787 Config cfg("Qkonsole"); 788 Config cfg( "Konsole" );
788 cfg.setGroup("History"); 789 cfg.setGroup("History");
789 int hist = cfg.readNumEntry("history_lines",300); 790 int hist = cfg.readNumEntry("history_lines",300);
790 int avg_line = cfg.readNumEntry("avg_line_length",60); 791 int avg_line = cfg.readNumEntry("avg_line_length",60);
791 792
792 QSpinBox *spin = new QSpinBox ( 1, 100000, 20, d ); 793 QSpinBox *spin = new QSpinBox ( 1, 100000, 20, d );
793 spin-> setValue ( hist ); 794 spin-> setValue ( hist );
@@ -924,13 +925,13 @@ void Konsole::setFont(int f)
924 } 925 }
925 for(int i = 0; i < (int)fonts.count(); i++) 926 for(int i = 0; i < (int)fonts.count(); i++)
926 { 927 {
927 fontList->setItemChecked(i, fonts.at(i)->getFamilyNum() == familyNum 928 fontList->setItemChecked(i, fonts.at(i)->getFamilyNum() == familyNum
928 && fonts.at(i)->getSize() == size); 929 && fonts.at(i)->getSize() == size);
929 } 930 }
930 Config cfg("Qkonsole"); 931 Config cfg( "Konsole" );
931 cfg.setGroup("Font"); 932 cfg.setGroup("Font");
932 QString ss = "Session"+ QString::number(tab->currentPageIndex()+1); 933 QString ss = "Session"+ QString::number(tab->currentPageIndex()+1);
933 if (tab->currentPageIndex() == 0) 934 if (tab->currentPageIndex() == 0)
934 { 935 {
935 cfg.writeEntry("FontName", fonts.at(cfont)->getFamily()); 936 cfg.writeEntry("FontName", fonts.at(cfont)->getFamily());
936 cfg.writeEntry("FontSize", fonts.at(cfont)->getSize()); 937 cfg.writeEntry("FontSize", fonts.at(cfont)->getSize());
@@ -1169,13 +1170,13 @@ void Konsole::changeTitle(TEWidget* te, QString newTitle )
1169 1170
1170void Konsole::newSession() 1171void Konsole::newSession()
1171{ 1172{
1172 if(nsessions < 15) 1173 if(nsessions < 15)
1173 { // seems to be something weird about 16 tabs on the Zaurus.... memory? 1174 { // seems to be something weird about 16 tabs on the Zaurus.... memory?
1174 TEWidget* te = new TEWidget(tab); 1175 TEWidget* te = new TEWidget(tab);
1175 Config cfg("Qkonsole"); 1176 Config cfg( "Konsole" );
1176 cfg.setGroup("Menubar"); 1177 cfg.setGroup("Menubar");
1177 1178
1178 // FIXME use more defaults from config file 1179 // FIXME use more defaults from config file
1179 te->useBeep=cfg.readBoolEntry("useBeep",0); 1180 te->useBeep=cfg.readBoolEntry("useBeep",0);
1180 1181
1181 // te->setBackgroundMode(PaletteBase); //we want transparent!! 1182 // te->setBackgroundMode(PaletteBase); //we want transparent!!
@@ -1408,13 +1409,13 @@ void Konsole::colorMenuSelected(int iD)
1408{ 1409{
1409 // this is NOT pretty, elegant or anything else besides functional 1410 // this is NOT pretty, elegant or anything else besides functional
1410 // QString temp; 1411 // QString temp;
1411 // qDebug( temp.sprintf("colormenu %d", iD)); 1412 // qDebug( temp.sprintf("colormenu %d", iD));
1412 1413
1413 TEWidget* te = getTe(); 1414 TEWidget* te = getTe();
1414 Config cfg("Qkonsole"); 1415 Config cfg( "Konsole" );
1415 cfg.setGroup("Colors"); 1416 cfg.setGroup("Colors");
1416 1417
1417 ColorEntry m_table[TABLE_COLORS]; 1418 ColorEntry m_table[TABLE_COLORS];
1418 const ColorEntry * defaultCt=te->getdefaultColorTable(); 1419 const ColorEntry * defaultCt=te->getdefaultColorTable();
1419 1420
1420 int i; 1421 int i;
@@ -1592,13 +1593,13 @@ void Konsole::setColors(QColor foreground, QColor background)
1592 } 1593 }
1593 te->setColorTable(m_table); 1594 te->setColorTable(m_table);
1594} 1595}
1595 1596
1596void Konsole::tabMenuSelected(int id) 1597void Konsole::tabMenuSelected(int id)
1597{ 1598{
1598 Config cfg("Qkonsole"); 1599 Config cfg( "Konsole" );
1599 cfg.setGroup("Tabs"); 1600 cfg.setGroup("Tabs");
1600 tabMenu->setItemChecked(tabPos, false); 1601 tabMenu->setItemChecked(tabPos, false);
1601 if (id == tm_bottom) 1602 if (id == tm_bottom)
1602 { 1603 {
1603 printf("set bottom tab\n"); 1604 printf("set bottom tab\n");
1604 tab->getTabBar()->show(); 1605 tab->getTabBar()->show();
@@ -1629,13 +1630,13 @@ void Konsole::tabMenuSelected(int id)
1629void Konsole::configMenuSelected(int iD) 1630void Konsole::configMenuSelected(int iD)
1630{ 1631{
1631 // QString temp; 1632 // QString temp;
1632 // qDebug( temp.sprintf("configmenu %d",iD)); 1633 // qDebug( temp.sprintf("configmenu %d",iD));
1633 1634
1634 TEWidget* te = getTe(); 1635 TEWidget* te = getTe();
1635 Config cfg("Qkonsole"); 1636 Config cfg( "Konsole" );
1636 cfg.setGroup("Menubar"); 1637 cfg.setGroup("Menubar");
1637 if(iD == cm_wrap) 1638 if(iD == cm_wrap)
1638 { 1639 {
1639 cfg.setGroup("ScrollBar"); 1640 cfg.setGroup("ScrollBar");
1640 bool b=cfg.readBoolEntry("HorzScroll",0); 1641 bool b=cfg.readBoolEntry("HorzScroll",0);
1641 b=!b; 1642 b=!b;
@@ -1663,25 +1664,25 @@ void Konsole::configMenuSelected(int iD)
1663 te->useBeep=b; 1664 te->useBeep=b;
1664 } 1665 }
1665} 1666}
1666 1667
1667void Konsole::changeCommand(const QString &text, int c) 1668void Konsole::changeCommand(const QString &text, int c)
1668{ 1669{
1669 Config cfg("Qkonsole"); 1670 Config cfg( "Konsole" );
1670 cfg.setGroup("Commands"); 1671 cfg.setGroup("Commands");
1671 if(commonCmds[c] != text) 1672 if(commonCmds[c] != text)
1672 { 1673 {
1673 cfg.writeEntry(QString::number(c),text); 1674 cfg.writeEntry(QString::number(c),text);
1674 commonCombo->clearEdit(); 1675 commonCombo->clearEdit();
1675 commonCombo->setCurrentItem(c); 1676 commonCombo->setCurrentItem(c);
1676 } 1677 }
1677} 1678}
1678 1679
1679void Konsole::setColor(int sess) 1680void Konsole::setColor(int sess)
1680{ 1681{
1681 Config cfg("Qkonsole"); 1682 Config cfg( "Konsole" );
1682 cfg.setGroup("Colors"); 1683 cfg.setGroup("Colors");
1683 QColor foreground, background; 1684 QColor foreground, background;
1684 QString ss = QString("Session") + QString::number(sess); 1685 QString ss = QString("Session") + QString::number(sess);
1685 foreground.setRgb(cfg.readNumEntry("foregroundRed"+ss, 1686 foreground.setRgb(cfg.readNumEntry("foregroundRed"+ss,
1686 cfg.readNumEntry("foregroundRed",0xff)), 1687 cfg.readNumEntry("foregroundRed",0xff)),
1687 cfg.readNumEntry("foregroundGreen"+ss, 1688 cfg.readNumEntry("foregroundGreen"+ss,
@@ -1699,13 +1700,13 @@ void Konsole::setColor(int sess)
1699 1700
1700void Konsole::scrollMenuSelected(int index) 1701void Konsole::scrollMenuSelected(int index)
1701{ 1702{
1702 // qDebug( "scrollbar menu %d",index); 1703 // qDebug( "scrollbar menu %d",index);
1703 1704
1704 TEWidget* te = getTe(); 1705 TEWidget* te = getTe();
1705 Config cfg("Qkonsole"); 1706 Config cfg( "Konsole" );
1706 cfg.setGroup("ScrollBar"); 1707 cfg.setGroup("ScrollBar");
1707 1708
1708 if(index == sm_none) 1709 if(index == sm_none)
1709 { 1710 {
1710 te->setScrollbarLocation(0); 1711 te->setScrollbarLocation(0);
1711 cfg.writeEntry("Position",0); 1712 cfg.writeEntry("Position",0);
@@ -1746,13 +1747,13 @@ void Konsole::editCommandListMenuSelected(int iD)
1746 // qDebug( temp.sprintf("edit command list %d",iD)); 1747 // qDebug( temp.sprintf("edit command list %d",iD));
1747 1748
1748 // FIXME: more cleanup needed here 1749 // FIXME: more cleanup needed here
1749 1750
1750 1751
1751 TEWidget* te = getTe(); 1752 TEWidget* te = getTe();
1752 Config cfg("Qkonsole"); 1753 Config cfg( "Konsole" );
1753 cfg.setGroup("Menubar"); 1754 cfg.setGroup("Menubar");
1754 if( iD == ec_cmdlist) 1755 if( iD == ec_cmdlist)
1755 { 1756 {
1756 if(!secondToolBar->isHidden()) 1757 if(!secondToolBar->isHidden())
1757 { 1758 {
1758 secondToolBar->hide(); 1759 secondToolBar->hide();
@@ -1862,13 +1863,13 @@ void Konsole::parseCommandLine()
1862 } 1863 }
1863 startUp++; 1864 startUp++;
1864} 1865}
1865 1866
1866void Konsole::changeForegroundColor(const QColor &color) 1867void Konsole::changeForegroundColor(const QColor &color)
1867{ 1868{
1868 Config cfg("Qkonsole"); 1869 Config cfg( "Konsole" );
1869 cfg.setGroup("Colors"); 1870 cfg.setGroup("Colors");
1870 int r, g, b; 1871 int r, g, b;
1871 color.rgb(&r,&g,&b); 1872 color.rgb(&r,&g,&b);
1872 foreground.setRgb(r,g,b); 1873 foreground.setRgb(r,g,b);
1873 1874
1874 cfg.writeEntry("foreground",color.name()); 1875 cfg.writeEntry("foreground",color.name());
@@ -1886,25 +1887,25 @@ void Konsole::changeForegroundColor(const QColor &color)
1886} 1887}
1887 1888
1888void Konsole::changeBackgroundColor(const QColor &color) 1889void Konsole::changeBackgroundColor(const QColor &color)
1889{ 1890{
1890 1891
1891 qDebug("Change background"); 1892 qDebug("Change background");
1892 Config cfg("Qkonsole"); 1893 Config cfg( "Konsole" );
1893 cfg.setGroup("Colors"); 1894 cfg.setGroup("Colors");
1894 int r, g, b; 1895 int r, g, b;
1895 color.rgb(&r,&g,&b); 1896 color.rgb(&r,&g,&b);
1896 background.setRgb(r,g,b); 1897 background.setRgb(r,g,b);
1897 cfg.writeEntry("background",color.name()); 1898 cfg.writeEntry("background",color.name());
1898 qDebug("background "+color.name()); 1899 qDebug("background "+color.name());
1899 cfg.write(); 1900 cfg.write();
1900} 1901}
1901 1902
1902void Konsole::doWrap() 1903void Konsole::doWrap()
1903{ 1904{
1904 Config cfg("Qkonsole"); 1905 Config cfg( "Konsole" );
1905 cfg.setGroup("ScrollBar"); 1906 cfg.setGroup("ScrollBar");
1906 TEWidget* te = getTe(); 1907 TEWidget* te = getTe();
1907 if( !cfg.readBoolEntry("HorzScroll",0)) 1908 if( !cfg.readBoolEntry("HorzScroll",0))
1908 { 1909 {
1909 te->setWrapAt(0); 1910 te->setWrapAt(0);
1910 configMenu->setItemChecked( cm_wrap,TRUE); 1911 configMenu->setItemChecked( cm_wrap,TRUE);