From 9d1e016143d69106b6ff832e8b62e7d13e139818 Mon Sep 17 00:00:00 2001 From: Dima Rogozin Date: Wed, 19 Jan 2000 03:47:23 +0000 Subject: [PATCH] Standard KDE help menu added. Exit->Quit svn path=/trunk/kdebase/konsole/; revision=38703 --- include/main.h | 3 --- src/main.C | 40 ++++++++++++++-------------------------- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/include/main.h b/include/main.h index fb6cc178..585f5de3 100644 --- a/include/main.h +++ b/include/main.h @@ -18,7 +18,6 @@ #include -//#include #include #include @@ -55,8 +54,6 @@ private slots: void size_menu_activated(int item); void pixmap_menu_activated(int item); void drop_menu_activated(int item); - void about(); - void help(); void tecRef(); void newSession(int kind); diff --git a/src/main.C b/src/main.C index 2e215adc..52cd231c 100644 --- a/src/main.C +++ b/src/main.C @@ -163,7 +163,7 @@ TEDemo::TEDemo(const QString& name, QStrList & _args, int login_shell, int histo loadSessionCommands(); m_file->insertSeparator(); - m_file->insertItem( i18n("E&xit"), kapp, SLOT(quit())); + m_file->insertItem( i18n("&Quit"), kapp, SLOT(quit())); // load schema ///////////////////////////////////////////////////////////// @@ -411,11 +411,19 @@ void TEDemo::makeMenu() m_options->insertItem( i18n("&Save Options"), 8); connect(m_options, SIGNAL(activated(int)), SLOT(opt_menu_activated(int))); - QPopupMenu* m_help = new QPopupMenu; - m_help->insertItem( i18n("&About ..."), this, SLOT(about())); - m_help->insertItem( i18n("&User's Manual ..."), this, SLOT(help())); - m_help->insertItem( i18n("&Technical Reference ..."), this, SLOT(tecRef())); - + QString aboutAuthor = i18n("%1 version %2 - an X terminal\n" + "Copyright (c) 1997-1999 by\n" + "Lars Doelle \n" + "\n" + "This program is free software under the\n" + "terms of the GNU General Public License\n" + "and comes WITHOUT ANY WARRANTY.\n" + "See `LICENSE.readmeŽ for details.").arg(PACKAGE).arg(VERSION); + + QPopupMenu* m_help = helpMenu(aboutAuthor, false); + m_help->insertItem( i18n("&Technical Reference ..."), this, SLOT(tecRef()), + 0, -1, 1); + m_drop = new QPopupMenu; m_drop->insertItem( i18n("Paste"), 0); m_drop->insertItem( i18n("cd"), 1); @@ -744,26 +752,6 @@ void TEDemo::changeTitle(int, const QString& s) // --| help |------------------------------------------------------------------ -void TEDemo::about() -//FIXME: make this a little nicer -{ - QString msg = i18n( - "%1 version %2 - an X terminal\n" - "Copyright (c) 1997-1999 by\n" - "Lars Doelle \n" - "\n" - "This program is free software under the\n" - "terms of the GNU General Public License\n" - "and comes WITHOUT ANY WARRANTY.\n" - "See `LICENSE.readmeŽ for details.").arg(PACKAGE).arg(VERSION); - KMessageBox::about( 0, msg); -} - -void TEDemo::help() -{ - kapp->invokeHTMLHelp(PACKAGE "/konsole.html",""); -} - void TEDemo::tecRef() { kapp->invokeHTMLHelp(PACKAGE "/techref.html","");