summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-12-08 13:39:34 (UTC)
committer llornkcor <llornkcor>2002-12-08 13:39:34 (UTC)
commit76fda4ee71e83d46f31a77b6d433cefdf24b3e73 (patch) (side-by-side diff)
tree7f42eaa5b101bd1433ba39d926c41e9ff1fd1a97
parenta88b210e6895614027c821bb5cedabc9b06117d3 (diff)
downloadopie-76fda4ee71e83d46f31a77b6d433cefdf24b3e73.zip
opie-76fda4ee71e83d46f31a77b6d433cefdf24b3e73.tar.gz
opie-76fda4ee71e83d46f31a77b6d433cefdf24b3e73.tar.bz2
moved font menu to options due to wrapping of the toolbar when using languages other than english that tend to have many characters in words :)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/konsole.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp
index 275a9a8..eda3135 100644
--- a/core/apps/embeddedkonsole/konsole.cpp
+++ b/core/apps/embeddedkonsole/konsole.cpp
@@ -291,32 +291,33 @@ void Konsole::init(const char* _pgm, QStrList & _args)
colorMenu->insertItem(tr( "Green on Yellow"));
colorMenu->insertItem(tr( "Blue on Magenta"));
colorMenu->insertItem(tr( "Magenta on Blue"));
colorMenu->insertItem(tr( "Cyan on White"));
colorMenu->insertItem(tr( "White on Cyan"));
colorMenu->insertItem(tr( "Blue on Black"));
colorMenu->insertItem(tr( "Amber on Black"));
#ifdef QT_QWS_OPIE
colorMenu->insertItem(tr( "Custom"));
#endif
+ configMenu->insertItem( tr("Font"), fontList );
configMenu->insertItem(tr( "Colors") ,colorMenu);
connect( fontList, SIGNAL( activated(int) ), this, SLOT( fontChanged(int) ));
connect( configMenu, SIGNAL( activated(int) ), this, SLOT( configMenuSelected(int) ));
connect( colorMenu, SIGNAL( activated(int) ), this, SLOT( colorMenuIsSelected(int) ));
connect( scrollMenu, SIGNAL(activated(int)),this,SLOT(scrollMenuSelected(int)));
connect(editCommandListMenu,SIGNAL(activated(int)),this,SLOT(editCommandListMenuSelected(int)));
- menuBar->insertItem( tr("Font"), fontList );
+
menuBar->insertItem( tr("Options"), configMenu );
QPEToolBar *toolbar = new QPEToolBar( this );
QAction *a;
// Button Commands
a = new QAction( tr("New"), Resource::loadPixmap( "konsole" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( newSession() ) ); a->addTo( toolbar );
a = new QAction( tr("Enter"), Resource::loadPixmap( "konsole/enter" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( hitEnter() ) ); a->addTo( toolbar );
a = new QAction( tr("Space"), Resource::loadPixmap( "konsole/space" ), QString::null, 0, this, 0 );
@@ -657,27 +658,28 @@ void Konsole::switchSession(QWidget* w) {
}
}
}
void Konsole::colorMenuIsSelected(int iD) {
fromMenu = TRUE;
colorMenuSelected(iD);
}
/// ------------------------------- some new stuff by L.J. Potter
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();
+// QString temp;
+// qDebug( temp.sprintf("colormenu %d", iD));
+
+ TEWidget* te = getTe();
Config cfg("Konsole");
cfg.setGroup("Colors");
// QColor foreground;
// QColor background;
colorMenu->setItemChecked(lastSelectedMenu,FALSE);
ColorEntry m_table[TABLE_COLORS];
const ColorEntry * defaultCt=te->getdefaultColorTable();
/////////// fore back
int i;
if(iD==-9) { // default default
for (i = 0; i < TABLE_COLORS; i++) {
m_table[i].color = defaultCt[i].color;
@@ -790,27 +792,28 @@ void Konsole::colorMenuSelected(int iD)
else
m_table[i].color = defaultCt[i].color;
}
}
lastSelectedMenu = iD;
te->setColorTable(m_table);
update();
}
void Konsole::configMenuSelected(int iD)
{
-// QString temp;
-// qDebug( temp.sprintf("configmenu %d",iD));
- TEWidget* te = getTe();
+// QString temp;
+// qDebug( temp.sprintf("configmenu %d",iD));
+
+ TEWidget* te = getTe();
Config cfg("Konsole");
cfg.setGroup("Menubar");
int i,j;
#ifdef QT_QWS_OPIE
i=-29;j=-30;
#else
i=-28;j=-29;
#endif
if(iD == -4) {
cfg.setGroup("Tabs");
QString tmp=cfg.readEntry("Position","Bottom");
@@ -862,25 +865,26 @@ void Konsole::changeCommand(const QString &text, int c)
}
void Konsole::setColor()
{
Config cfg("Konsole");
cfg.setGroup("Colors");
int scheme = cfg.readNumEntry("Schema",1);
if(scheme != 1) colorMenuSelected( -scheme);
}
void Konsole::scrollMenuSelected(int index)
{
- qDebug( "scrollbar menu %d",index);
+// qDebug( "scrollbar menu %d",index);
+
TEWidget* te = getTe();
Config cfg("Konsole");
cfg.setGroup("ScrollBar");
int i,j,k;
#ifdef QT_QWS_OPIE
i=-25;j=-26;k=-27;
#else
i=-24;j=-25;k=-26;
#endif
if(index == i) {
te->setScrollbarLocation(0);