Commit b1ff8301 authored by Eike Ziller's avatar Eike Ziller

More consistency for close & close split.

Change-Id: I3d0869d5fc2542ff59434e0d42dae0ce6c7a2391
Reviewed-by: default avatarVirva Auvinen <virva.auvinen@nokia.com>
parent 6fe6f5cd
......@@ -144,7 +144,6 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_closeEditorButton->setAutoRaise(true);
d->m_closeEditorButton->setIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_DOCUMENT)));
d->m_closeEditorButton->setToolTip(tr("Close Document"));
d->m_closeEditorButton->setEnabled(false);
d->m_toolBarPlaceholder->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
......@@ -171,7 +170,6 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_closeSplitButton->setAutoRaise(true);
d->m_closeSplitButton->setIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
d->m_closeSplitButton->setToolTip(tr("Remove Split"));
QHBoxLayout *toplayout = new QHBoxLayout(this);
toplayout->setSpacing(0);
......@@ -210,6 +208,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
connect(am->command(Constants::GO_FORWARD), SIGNAL(keySequenceChanged()),
this, SLOT(updateActionShortcuts()));
updateActionShortcuts();
}
EditorToolBar::~EditorToolBar()
......@@ -367,9 +366,10 @@ void EditorToolBar::setCanGoForward(bool canGoForward)
void EditorToolBar::updateActionShortcuts()
{
ActionManager *am = ICore::actionManager();
d->m_closeEditorButton->setToolTip(am->command(Constants::CLOSE)->stringWithAppendedShortcut(EditorManager::tr("Close")));
d->m_closeEditorButton->setToolTip(am->command(Constants::CLOSE)->stringWithAppendedShortcut(EditorManager::tr("Close Document")));
d->m_goBackAction->setToolTip(am->command(Constants::GO_BACK)->action()->toolTip());
d->m_goForwardAction->setToolTip(am->command(Constants::GO_FORWARD)->action()->toolTip());
d->m_closeSplitButton->setToolTip(am->command(Constants::REMOVE_CURRENT_SPLIT)->stringWithAppendedShortcut(tr("Remove Split")));
}
IEditor *EditorToolBar::currentEditor() const
......
......@@ -88,7 +88,7 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget, int pos
splitAction->setIcon(QIcon(QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)));
splitAction->setToolTip(tr("Split"));
QToolButton *close = new QToolButton();
close->setIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
close->setIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_DOCUMENT)));
close->setToolTip(tr("Close"));
toolBarLayout->addWidget(splitAction);
......
......@@ -140,7 +140,7 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) :
m_minMaxAction->setIcon(m_maximizeIcon);
m_minMaxAction->setText(tr("Maximize Output Pane"));
m_closeButton->setIcon(QIcon(QLatin1String(Constants::ICON_CLOSE)));
m_closeButton->setIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_DOCUMENT)));
connect(m_closeButton, SIGNAL(clicked()), this, SLOT(slotHide()));
QVBoxLayout *mainlayout = new QVBoxLayout;
......
......@@ -83,7 +83,7 @@ SideBarWidget::SideBarWidget(SideBar *sideBar, const QString &id)
QAction *closeAction = new QAction(tr("Close"), m_toolbar);
closeAction->setToolTip(tr("Close"));
closeAction->setIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_TOP)));
closeAction->setIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_DOCUMENT)));
connect(closeAction, SIGNAL(triggered()), this, SIGNAL(closeMe()));
m_toolbar->addAction(closeAction);
......
......@@ -102,7 +102,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
connect(m_ui.findEdit, SIGNAL(editingFinished()), this, SLOT(invokeResetIncrementalSearch()));
m_ui.close->setIcon(QIcon(QLatin1String(Core::Constants::ICON_CLOSE)));
m_ui.close->setIcon(QIcon(QLatin1String(Core::Constants::ICON_CLOSE_DOCUMENT)));
connect(m_ui.close, SIGNAL(clicked()), this, SLOT(hideAndResetFocus()));
m_findCompleter->setModel(m_plugin->findCompletionModel());
......
......@@ -554,7 +554,7 @@ void HelpPlugin::createRightPaneContextViewer()
tr("Previous"), toolBar);
QAction *next = new QAction(QIcon(QLatin1String(IMAGEPATH "next.png")),
tr("Next"), toolBar);
QAction *close = new QAction(QIcon(QLatin1String(Core::Constants::ICON_CLOSE)),
QAction *close = new QAction(QIcon(QLatin1String(Core::Constants::ICON_CLOSE_DOCUMENT)),
QLatin1String(""), toolBar);
connect(close, SIGNAL(triggered()), this, SLOT(slotHideRightPane()));
......@@ -991,7 +991,7 @@ Utils::StyledBar *HelpPlugin::createWidgetToolBar()
SLOT(updateSideBarSource()));
m_closeButton = new QToolButton();
m_closeButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_CLOSE)));
m_closeButton->setIcon(QIcon(QLatin1String(Core::Constants::ICON_CLOSE_DOCUMENT)));
m_closeButton->setToolTip(tr("Close current page"));
connect(m_closeButton, SIGNAL(clicked()), &OpenPagesManager::instance(),
SLOT(closeCurrentPage()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment