Use JB popup for remote field in git pull dialog IDEA-242994

GitOrigin-RevId: 237bdd9ef9a76966293d473a2ff588275eda44cb
This commit is contained in:
Daniil Tsaryov
2020-06-09 23:35:08 +03:00
committed by intellij-monorepo-bot
parent 966c35b2a9
commit ca9d9f0d92
2 changed files with 5 additions and 1 deletions
@@ -116,6 +116,7 @@ pulling.title=Pulling changes from {0}
pull.branch.not.selected.error=The branch to pull from should be selected.
pull.branch.no.matching.error=There is no matching branch.
pull.branch.nothing.to.pull=No branches
pull.branch.no.matching.remotes=No remotes
pull.options.modify=Modify options
pull.option.remove=Remove option
pull.option.ff.only=Merge only if it can be fast-forwarded
@@ -303,9 +303,12 @@ class GitPullDialog(private val project: Project,
}
private fun createRemoteField() = ComboBox<GitRemote>(MutableCollectionComboBoxModel()).apply {
isSwingPopup = false
renderer = SimpleListCellRenderer.create(GitBundle.message("util.remote.renderer.none")) { it.name }
val bw = DarculaUIUtil.BW.get()
ui = FlatComboBoxUI(outerInsets = Insets(bw, 0, bw, 0))
ui = FlatComboBoxUI(
outerInsets = Insets(bw, 0, bw, 0),
popupEmptyText = GitBundle.message("pull.branch.no.matching.remotes"))
item = getCurrentOrDefaultRemote(getRepository())