Mercurial > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
19043:dddffa2ff413 | 19076:110702c507e3 |
---|---|
255 workspace_view::notice_settings (const QSettings *settings) | 255 workspace_view::notice_settings (const QSettings *settings) |
256 { | 256 { |
257 _model->notice_settings (settings); // update colors of model first | 257 _model->notice_settings (settings); // update colors of model first |
258 | 258 |
259 QString tool_tip; | 259 QString tool_tip; |
260 tool_tip = QString (tr ("View the variables in the active workspace.<br>")); | 260 |
261 tool_tip += QString (tr ("Colors for variable attributes:")); | 261 if (!settings->value ("workspaceview/hide_tool_tips",false).toBool ()) |
262 for (int i = 0; i < resource_manager::storage_class_chars ().length (); i++) | 262 { |
263 { | 263 tool_tip = QString (tr ("View the variables in the active workspace.<br>")); |
264 tool_tip += | 264 tool_tip += QString (tr ("Colors for variable attributes:")); |
265 QString ("<div style=\"background-color:%1;color:#000000\">%2</div>") | 265 for (int i = 0; i < resource_manager::storage_class_chars ().length (); i++) |
266 .arg (_model->storage_class_color (i).name ()) | 266 { |
267 .arg (resource_manager::storage_class_names ().at (i)); | 267 tool_tip += |
268 } | 268 QString ("<div style=\"background-color:%1;color:#000000\">%2</div>") |
269 .arg (_model->storage_class_color (i).name ()) | |
270 .arg (resource_manager::storage_class_names ().at (i)); | |
271 } | |
272 } | |
273 | |
269 setToolTip (tool_tip); | 274 setToolTip (tool_tip); |
275 | |
270 } | 276 } |
271 | 277 |
272 void | 278 void |
273 workspace_view::copyClipboard () | 279 workspace_view::copyClipboard () |
274 { | 280 { |