More consistency for close & close split.

Change-Id: I3d0869d5fc2542ff59434e0d42dae0ce6c7a2391
Reviewed-by: Virva Auvinen <virva.auvinen@nokia.com>
This commit is contained in:
Eike Ziller
2012-02-17 14:00:45 +01:00
parent 6fe6f5cdb1
commit b1ff83013c
6 changed files with 9 additions and 9 deletions

View File

@@ -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

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);