mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
vcs: remove dead code
Remove unused notification to switch back to modal commit. Follow-up: 1d9b16af8960e0158599c94b88f201be43328907 GitOrigin-RevId: ab53099183862a24a823f258c7e1f0e354a4ed21
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3ee9a9f75c
commit
127f9c9bf1
@@ -319,9 +319,6 @@ label.at.date.leading=At {0}
|
||||
label.at.date.middle=at {0}
|
||||
button.tooltip.remove.commit.author.date=Remove
|
||||
|
||||
switch.to.commit.dialog.hint.text=To switch back to the Commit dialog, use the menu under the gear icon
|
||||
switch.to.commit.dialog.hint.text.new.ui=To switch back to the Commit dialog, use the menu under the Options icon
|
||||
|
||||
error.executing.commit=Error executing ''{0}'': {1}
|
||||
changes.action.rollback.title={0} Changes
|
||||
changes.action.rollback.custom.title={0} Changes
|
||||
|
||||
@@ -91,32 +91,3 @@ private class CommitToolWindowFactory : VcsToolWindowFactory() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class SwitchToCommitDialogHint(toolWindow: ToolWindowEx, toolbar: ActionToolbar) : ChangesViewContentManagerListener {
|
||||
private val toolwindowGearButton: (ActionToolbar) -> JComponent = { toolbar ->
|
||||
// see com.intellij.openapi.wm.impl.ToolWindowImpl.GearActionGroup / com.intellij.toolWindow.ToolWindowHeader.ShowOptionsAction
|
||||
val gearIcon = if (ExperimentalUI.isNewUI()) AllIcons.Actions.More else AllIcons.General.GearPlain
|
||||
findToolbarActionButton(toolbar) { it.templatePresentation.icon == gearIcon } ?: toolbar.component
|
||||
}
|
||||
|
||||
private val actionToolbarTooltip =
|
||||
ActionToolbarGotItTooltip("changes.view.toolwindow",
|
||||
if (ExperimentalUI.isNewUI()) message("switch.to.commit.dialog.hint.text.new.ui")
|
||||
else message("switch.to.commit.dialog.hint.text"),
|
||||
toolWindow.disposable, toolbar, toolwindowGearButton)
|
||||
|
||||
init {
|
||||
toolWindow.project.messageBus.connect(actionToolbarTooltip.tooltipDisposable).subscribe(ChangesViewContentManagerListener.TOPIC, this)
|
||||
}
|
||||
|
||||
override fun toolWindowMappingChanged() = actionToolbarTooltip.hideHint(true)
|
||||
|
||||
companion object {
|
||||
fun install(project: Project) {
|
||||
val toolWindow = ToolWindowManager.getInstance(project).getToolWindow(COMMIT_TOOLWINDOW_ID) as? ToolWindowEx ?: return
|
||||
val toolbar = toolWindow.decorator.headerToolbar ?: return
|
||||
|
||||
SwitchToCommitDialogHint(toolWindow, toolbar)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user