| | |
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | private final String repositoryName;
|
| | |
|
| | | private final RepositoryModel repository;
|
| | |
|
| | | private boolean isCreate;
|
| | |
| | |
|
| | | public EditRepositoryDialog(RepositoryModel aRepository) {
|
| | | super();
|
| | | this.repositoryName = aRepository.name;
|
| | | this.repository = new RepositoryModel();
|
| | | this.repositoryNames = new HashSet<String>();
|
| | | this.isCreate = false;
|
| | |
| | | setTitle(Translation.get("gb.edit") + ": " + aRepository.name);
|
| | | setIconImage(new ImageIcon(getClass().getResource("/gitblt-favicon.png")).getImage());
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | protected JRootPane createRootPane() {
|
| | | KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
|
| | |
| | | fieldsPanel
|
| | | .add(newFieldPanel(Translation.get("gb.showRemoteBranches"), showRemoteBranches));
|
| | | fieldsPanel.add(newFieldPanel(Translation.get("gb.showReadme"), showReadme));
|
| | | fieldsPanel.add(newFieldPanel(Translation.get("gb.skipSizeCalculation"), skipSizeCalculation));
|
| | | fieldsPanel.add(newFieldPanel(Translation.get("gb.skipSizeCalculation"),
|
| | | skipSizeCalculation));
|
| | | fieldsPanel.add(newFieldPanel(Translation.get("gb.isFrozen"), isFrozen));
|
| | |
|
| | | usersPalette = new JPalette<String>();
|
| | |
| | | "Can not create repository ''{0}'' because it already exists.", rname));
|
| | | return false;
|
| | | }
|
| | | } else {
|
| | | // check rename collision
|
| | | if (!repositoryName.equalsIgnoreCase(rname)) {
|
| | | if (repositoryNames.contains(rname.toLowerCase())) {
|
| | | error(MessageFormat.format(
|
| | | "Failed to rename ''{0}'' because ''{1}'' already exists.",
|
| | | repositoryName, rname));
|
| | | return false;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (accessRestriction.getSelectedItem() == null) {
|