author | drw <drw> | 2004-04-06 15:52:02 (UTC) |
---|---|---|
committer | drw <drw> | 2004-04-06 15:52:02 (UTC) |
commit | 31a82304d62ab4943c0926c35cce552e2164eaf4 (patch) (unidiff) | |
tree | 9c87a50ef57475a765dc16c26100372026dbdda2 | |
parent | e97648cdac8aba383e69e87c2d60644eb3bcc18d (diff) | |
download | opie-31a82304d62ab4943c0926c35cce552e2164eaf4.zip opie-31a82304d62ab4943c0926c35cce552e2164eaf4.tar.gz opie-31a82304d62ab4943c0926c35cce552e2164eaf4.tar.bz2 |
Do not override menu font size, use font as defined in Appearance settings, and fixed compiler warning
-rw-r--r-- | core/apps/embeddedkonsole/TEWidget.cpp | 4 | ||||
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 9 |
2 files changed, 2 insertions, 11 deletions
diff --git a/core/apps/embeddedkonsole/TEWidget.cpp b/core/apps/embeddedkonsole/TEWidget.cpp index cc88555..93348f4 100644 --- a/core/apps/embeddedkonsole/TEWidget.cpp +++ b/core/apps/embeddedkonsole/TEWidget.cpp | |||
@@ -800,25 +800,25 @@ void TEWidget::mouseMoveEvent(QMouseEvent* ev) | |||
800 | } | 800 | } |
801 | 801 | ||
802 | actSel = 2; // within selection | 802 | actSel = 2; // within selection |
803 | pntSel = here; | 803 | pntSel = here; |
804 | emit extendSelectionSignal( here.x(), here.y() ); | 804 | emit extendSelectionSignal( here.x(), here.y() ); |
805 | } | 805 | } |
806 | 806 | ||
807 | void TEWidget::mouseReleaseEvent(QMouseEvent* ev) | 807 | void TEWidget::mouseReleaseEvent(QMouseEvent* ev) |
808 | { | 808 | { |
809 | //printf("release [%d,%d] %d\n",ev->x()/font_w,ev->y()/font_h,ev->button()); | 809 | //printf("release [%d,%d] %d\n",ev->x()/font_w,ev->y()/font_h,ev->button()); |
810 | if ( ev->button() == LeftButton) | 810 | if ( ev->button() == LeftButton) |
811 | { | 811 | { |
812 | if (QABS(ev->x() - mouse_down_x) < 3 | 812 | if (QABS(ev->x() - mouse_down_x) < 3 |
813 | && QABS(ev->y() - mouse_down_y) < 3 | 813 | && QABS(ev->y() - mouse_down_y) < 3 |
814 | && ev->y() < qApp->desktop()->height()/8) { | 814 | && ev->y() < qApp->desktop()->height()/8) { |
815 | emit setFullScreen(false); | 815 | emit setFullScreen(false); |
816 | } | 816 | } |
817 | 817 | ||
818 | if ( actSel > 1 ) emit endSelectionSignal(preserve_line_breaks); | 818 | if ( actSel > 1 ) emit endSelectionSignal(preserve_line_breaks); |
819 | preserve_line_breaks = TRUE; | 819 | preserve_line_breaks = TRUE; |
820 | actSel = 0; | 820 | actSel = 0; |
821 | 821 | ||
822 | //FIXME: emits a release event even if the mouse is | 822 | //FIXME: emits a release event even if the mouse is |
823 | // outside the range. The procedure used in `mouseMoveEvent' | 823 | // outside the range. The procedure used in `mouseMoveEvent' |
824 | // applies here, too. | 824 | // applies here, too. |
@@ -1380,25 +1380,25 @@ void TEWidget::dropEvent(QDropEvent* event) | |||
1380 | } | 1380 | } |
1381 | else if(QTextDrag::decode(event, dropText)) { | 1381 | else if(QTextDrag::decode(event, dropText)) { |
1382 | // kdDebug() << "Drop:" << dropText.local8Bit() << "\n"; | 1382 | // kdDebug() << "Drop:" << dropText.local8Bit() << "\n"; |
1383 | if (currentSession) { | 1383 | if (currentSession) { |
1384 | currentSession->getEmulation()->sendString(dropText.local8Bit()); | 1384 | currentSession->getEmulation()->sendString(dropText.local8Bit()); |
1385 | } | 1385 | } |
1386 | // Paste it | 1386 | // Paste it |
1387 | } | 1387 | } |
1388 | } | 1388 | } |
1389 | #endif | 1389 | #endif |
1390 | 1390 | ||
1391 | 1391 | ||
1392 | void TEWidget::drop_menu_activated(int item) | 1392 | void TEWidget::drop_menu_activated(int /*item*/) |
1393 | { | 1393 | { |
1394 | #ifndef QT_NO_DRAGANDDROP | 1394 | #ifndef QT_NO_DRAGANDDROP |
1395 | switch (item) | 1395 | switch (item) |
1396 | { | 1396 | { |
1397 | case 0: // paste | 1397 | case 0: // paste |
1398 | currentSession->getEmulation()->sendString(dropText.local8Bit()); | 1398 | currentSession->getEmulation()->sendString(dropText.local8Bit()); |
1399 | // KWM::activate((Window)this->winId()); | 1399 | // KWM::activate((Window)this->winId()); |
1400 | break; | 1400 | break; |
1401 | case 1: // cd ... | 1401 | case 1: // cd ... |
1402 | currentSession->getEmulation()->sendString("cd "); | 1402 | currentSession->getEmulation()->sendString("cd "); |
1403 | struct stat statbuf; | 1403 | struct stat statbuf; |
1404 | if ( ::stat( QFile::encodeName( dropText ), &statbuf ) == 0 ) | 1404 | if ( ::stat( QFile::encodeName( dropText ), &statbuf ) == 0 ) |
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index c5df47f..cbea7bd 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp | |||
@@ -501,33 +501,24 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
501 | 501 | ||
502 | tab = new EKNumTabWidget(this); | 502 | tab = new EKNumTabWidget(this); |
503 | // tab->setMargin(tab->margin()-5); | 503 | // tab->setMargin(tab->margin()-5); |
504 | connect(tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(switchSession(QWidget*))); | 504 | connect(tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(switchSession(QWidget*))); |
505 | 505 | ||
506 | // create terminal toolbar //////////////////////////////////////////////// | 506 | // create terminal toolbar //////////////////////////////////////////////// |
507 | setToolBarsMovable( FALSE ); | 507 | setToolBarsMovable( FALSE ); |
508 | menuToolBar = new QToolBar( this ); | 508 | menuToolBar = new QToolBar( this ); |
509 | menuToolBar->setHorizontalStretchable( TRUE ); | 509 | menuToolBar->setHorizontalStretchable( TRUE ); |
510 | 510 | ||
511 | QMenuBar *menuBar = new QMenuBar( menuToolBar ); | 511 | QMenuBar *menuBar = new QMenuBar( menuToolBar ); |
512 | 512 | ||
513 | bool c7xx = false; | ||
514 | if (qApp->desktop()->width() > 600 || qApp->desktop()->height() > 600) | ||
515 | { | ||
516 | c7xx = true; | ||
517 | } | ||
518 | QFont menuFont; | ||
519 | menuFont.setPointSize(c7xx? 18 : 10); | ||
520 | qApp->setFont(menuFont, true); | ||
521 | |||
522 | setFont(cfont); | 513 | setFont(cfont); |
523 | 514 | ||
524 | configMenu = new QPopupMenu( this); | 515 | configMenu = new QPopupMenu( this); |
525 | colorMenu = new QPopupMenu( this); | 516 | colorMenu = new QPopupMenu( this); |
526 | scrollMenu = new QPopupMenu( this); | 517 | scrollMenu = new QPopupMenu( this); |
527 | editCommandListMenu = new QPopupMenu( this); | 518 | editCommandListMenu = new QPopupMenu( this); |
528 | 519 | ||
529 | configMenu->insertItem(tr("Command List"), editCommandListMenu); | 520 | configMenu->insertItem(tr("Command List"), editCommandListMenu); |
530 | 521 | ||
531 | bool listHidden; | 522 | bool listHidden; |
532 | cfg.setGroup("Menubar"); | 523 | cfg.setGroup("Menubar"); |
533 | if( cfg.readEntry("Hidden","FALSE") == "TRUE") | 524 | if( cfg.readEntry("Hidden","FALSE") == "TRUE") |