Mercurial > octave
changeset 26133:84cd950f0f75
fix some tool tips in the documentation browser (bug #54938)
* documentation.cc (construct_tool_bar): fix zoom out tool tip;
(update_history): update tool tips for back and forward by the titles of the
related pages
author | Torsten <mttl@mailbox.org> |
---|---|
date | Sat, 24 Nov 2018 20:52:59 +0100 |
parents | 6f4ca6194983 |
children | 3a38afebf949 |
files | libgui/src/documentation.cc |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/documentation.cc Sat Nov 24 20:12:31 2018 +0100 +++ b/libgui/src/documentation.cc Sat Nov 24 20:52:59 2018 +0100 @@ -378,7 +378,7 @@ tr ("Zoom in"), SLOT (zoom_in (void)), m_doc_browser, m_tool_bar); m_action_zoom_out = add_action (resource_manager::icon ("zoom-out"), - tr ("Zoom in"), SLOT (zoom_out (void)), + tr ("Zoom out"), SLOT (zoom_out (void)), m_doc_browser, m_tool_bar); m_action_zoom_original = add_action (resource_manager::icon ("zoom-original"), tr ("Zoom original"), SLOT (zoom_original (void)), @@ -705,8 +705,12 @@ { // Which menu has to be updated? int prev_next = -1; + QAction *a = m_action_go_prev; if (actions == m_next_pages_actions) - prev_next = 1; + { + prev_next = 1; + a = m_action_go_next; + } // Get maximal count limited by array size int count = qMin (new_count, int (max_history_entries)); @@ -716,6 +720,10 @@ { QString title = m_doc_browser->historyTitle (prev_next*(i+1)); title.remove (QRegExp (" \\(GNU Octave \\(version [^\\)]*\\)\\)$")); + + if (i == 0) + a->setText (title); // set tool tip for prev/next buttons + actions[i]->setText (title); actions[i]->setData (m_doc_browser->historyUrl (prev_next*(i+1))); actions[i]->setEnabled (true);