Mercurial > octave-nkf
diff libgui/src/workspace-view.cc @ 19076:110702c507e3 gui-release
user setting for hiding the tool tip in the workspace view (part of bug #42306)
* settings-dialog.ui: new checkbox for hiding the tool tip in workspace pane
* settings-dialog.cc (constructor): set new checkbox according to settings;
(write_changed_settings): write checkbox state into settings file
* workspace-view.cc (notice-settings): set an empty tool tip if the user
wants to hide the tool tip
author | Torsten <ttl@justmail.de> |
---|---|
date | Sat, 23 Aug 2014 13:19:12 +0200 |
parents | 2d5d0d86432e |
children | 362071d9bf5b |
line wrap: on
line diff
--- a/libgui/src/workspace-view.cc Thu Aug 14 09:16:16 2014 +0200 +++ b/libgui/src/workspace-view.cc Sat Aug 23 13:19:12 2014 +0200 @@ -257,16 +257,22 @@ _model->notice_settings (settings); // update colors of model first QString tool_tip; - tool_tip = QString (tr ("View the variables in the active workspace.<br>")); - tool_tip += QString (tr ("Colors for variable attributes:")); - for (int i = 0; i < resource_manager::storage_class_chars ().length (); i++) + + if (!settings->value ("workspaceview/hide_tool_tips",false).toBool ()) { - tool_tip += - QString ("<div style=\"background-color:%1;color:#000000\">%2</div>") - .arg (_model->storage_class_color (i).name ()) - .arg (resource_manager::storage_class_names ().at (i)); + tool_tip = QString (tr ("View the variables in the active workspace.<br>")); + tool_tip += QString (tr ("Colors for variable attributes:")); + for (int i = 0; i < resource_manager::storage_class_chars ().length (); i++) + { + tool_tip += + QString ("<div style=\"background-color:%1;color:#000000\">%2</div>") + .arg (_model->storage_class_color (i).name ()) + .arg (resource_manager::storage_class_names ().at (i)); + } } + setToolTip (tool_tip); + } void