# HG changeset patch # User Torsten # Date 1408792752 -7200 # Node ID 110702c507e39910fa3e1ee30bf78f35c5c33879 # Parent dddffa2ff4139bc0975ceed2d8c8fcf6a21b5025 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 diff -r dddffa2ff413 -r 110702c507e3 libgui/src/settings-dialog.cc --- a/libgui/src/settings-dialog.cc Thu Aug 14 09:16:16 2014 +0200 +++ b/libgui/src/settings-dialog.cc Sat Aug 23 13:19:12 2014 +0200 @@ -281,8 +281,12 @@ ui->proxyUserName->setText (settings->value ("proxyUserName").toString ()); ui->proxyPassword->setText (settings->value ("proxyPassword").toString ()); - // qorkspace colors + // Workspace + // colors read_workspace_colors (settings); + // hide tool tips + ui->cb_hide_tool_tips->setChecked ( + settings->value ("workspaceview/hide_tool_tips",false).toBool ()); // terminal colors read_terminal_colors (settings); @@ -731,8 +735,13 @@ delete lexer; #endif + // Workspace write_workspace_colors (settings); + // hide tool tips + settings->setValue ("workspaceview/hide_tool_tips", + ui->cb_hide_tool_tips->isChecked ()); + // Terminal write_terminal_colors (settings); // shortcuts diff -r dddffa2ff413 -r 110702c507e3 libgui/src/settings-dialog.ui --- a/libgui/src/settings-dialog.ui Thu Aug 14 09:16:16 2014 +0200 +++ b/libgui/src/settings-dialog.ui Sat Aug 23 13:19:12 2014 +0200 @@ -32,7 +32,7 @@ - 1 + 5 @@ -404,7 +404,7 @@ 0 - -175 + 0 662 580 @@ -1659,8 +1659,11 @@ - - + + + 0 + + true @@ -1682,16 +1685,10 @@ - - - - - 0 - 1 - - - - Qt::Horizontal + + + + Hide tool tip diff -r dddffa2ff413 -r 110702c507e3 libgui/src/workspace-view.cc --- 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.
")); - 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 ("
%2
") - .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.
")); + tool_tip += QString (tr ("Colors for variable attributes:")); + for (int i = 0; i < resource_manager::storage_class_chars ().length (); i++) + { + tool_tip += + QString ("
%2
") + .arg (_model->storage_class_color (i).name ()) + .arg (resource_manager::storage_class_names ().at (i)); + } } + setToolTip (tool_tip); + } void