Mercurial > octave
changeset 21916:3a0c90b59584
Make qt figure window "Help" menu correspond to main window (bug #48223)
* Figure.h (Figure::helpAboutOctave): New method.
(Figure::helpAboutQtHandles): Delete.
* Figure.cc (Figure::createFigureToolBarAndMenuBar): Add "About Octave" to
the help menu. Remove "About Qt" and "About QtHandles" from the help menu.
(Figure::helpAboutOctave): New method. (Figure::helpAboutQtHandles): Delete.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Tue, 14 Jun 2016 14:53:33 +0100 |
parents | b42b28d47f31 |
children | f500cde065f7 |
files | libgui/graphics/Figure.cc libgui/graphics/Figure.h |
diffstat | 2 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/Figure.cc Wed Jun 15 17:34:25 2016 -0700 +++ b/libgui/graphics/Figure.cc Tue Jun 14 14:53:33 2016 +0100 @@ -52,6 +52,7 @@ #include "file-ops.h" #include "unwind-prot.h" #include "utils.h" +#include "version.h" #include "octave-qt-link.h" @@ -60,8 +61,6 @@ namespace QtHandles { -#define ABOUT_TEXT "<b>QtHandles</b> - a Qt-based toolkit for <a href=\"http://www.octave.org\">Octave</a>.<br><br>Copyright (C) 2011-2015 Michael Goffioul" - DECLARE_GENERICEVENTNOTIFY_SENDER(MenuBar, QMenuBar); static bool @@ -335,9 +334,8 @@ QMenu* helpMenu = m_menuBar->addMenu (tr ("&Help")); helpMenu->menuAction ()->setObjectName ("builtinMenu"); - helpMenu->addAction (tr ("&About QtHandles"), this, - SLOT (helpAboutQtHandles (void))); - helpMenu->addAction (tr ("About &Qt"), qApp, SLOT (aboutQt (void))); + helpMenu->addAction (tr ("About Octave"), this, + SLOT (helpAboutOctave (void))); m_menuBar->addReceiver (this); } @@ -776,10 +774,13 @@ } void -Figure::helpAboutQtHandles (void) +Figure::helpAboutOctave (void) { - QMessageBox::about (qWidget<QMainWindow> (), tr ("About QtHandles"), - ABOUT_TEXT); + std::string message + = octave_name_version_copyright_copying_warranty_and_bugs (true); + + QMessageBox::about (qWidget<QMainWindow> (), tr ("About Octave"), + QString::fromStdString (message)); } void
--- a/libgui/graphics/Figure.h Wed Jun 15 17:34:25 2016 -0700 +++ b/libgui/graphics/Figure.h Tue Jun 14 14:53:33 2016 +0100 @@ -121,7 +121,7 @@ void fileSaveFigureAs (void); void fileCloseFigure (void); void editCopy (bool choose_format = false); - void helpAboutQtHandles (void); + void helpAboutOctave (void); void updateMenuBar (void); void updateContainer (void); void toggleAxes (void);