Skip to content

Commit

Permalink
- fixes #741
Browse files Browse the repository at this point in the history
- remove leftover debug message
  • Loading branch information
derreisende77 committed Aug 26, 2024
1 parent b6de80b commit 3f486d4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import mediathek.config.Daten;
import mediathek.config.Konstanten;
import mediathek.gui.PanelVorlage;
import mediathek.gui.dialogEinstellungen.allgemein.PanelEinstellungen;
import mediathek.mainwindow.MediathekGui;
import mediathek.res.GetIcon;
Expand Down Expand Up @@ -30,7 +29,7 @@ public class DialogEinstellungen extends JFrame {
private PanelFilmlisteLaden panelImportFilme;
private PanelBlacklist panelBlacklist;
private PanelDateinamen panelDateinamen;
private PanelVorlage panelPset;
private JPanel panelPset;
private PanelPsetImport panelPsetVorlagen;
private JPanel panelNotifications;
private final JPanel panelLeer = new JPanel();
Expand Down Expand Up @@ -124,7 +123,7 @@ private void initPanels() {
panelImportFilme = new PanelFilmlisteLaden(true);
panelBlacklist = new PanelBlacklist(daten, this, PanelBlacklist.class.getName());
panelDateinamen = new PanelDateinamen(daten, this);
panelPset = new PanelPset(daten, this);
panelPset = new PanelPset(this);
panelPsetVorlagen = new PanelPsetImport(daten, this);

panelNotifications = new PanelNotifications();
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/mediathek/gui/dialogEinstellungen/PanelPset.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import mediathek.config.Daten;
import mediathek.config.MVConfig;
import mediathek.gui.PanelVorlage;
import net.miginfocom.layout.AC;
import net.miginfocom.layout.CC;
import net.miginfocom.layout.LC;
Expand All @@ -11,9 +10,12 @@
import javax.swing.*;
import java.awt.*;

public class PanelPset extends PanelVorlage {
public PanelPset(Daten d, JFrame parentComponent) {
super(d, parentComponent);
public class PanelPset extends JPanel {
private final JFrame parentComponent;

public PanelPset(JFrame parentComponent) {
this.parentComponent = parentComponent;

initComponents();
jCheckBoxAlleEinstellungen.addActionListener(e -> {
MVConfig.add(MVConfig.Configs.SYSTEM_ANSICHT_SET_LANG, Boolean.toString(jCheckBoxAlleEinstellungen.isSelected()));
Expand All @@ -28,6 +30,7 @@ public PanelPset(Daten d, JFrame parentComponent) {
*/
private void setupPSetVisiblePanels() {
jPanelPset.removeAll();
var daten = Daten.getInstance();
if (jCheckBoxAlleEinstellungen.isSelected()) {
jPanelPset.add(new PanelPsetLang(daten, parentComponent, Daten.listePset), BorderLayout.CENTER);
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/mediathek/gui/dialogEinstellungen/PanelPset.jfd
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
JFDML JFormDesigner: "7.0.5.1.409" Java: "11.0.13" encoding: "UTF-8"
JFDML JFormDesigner: "8.2.4.0.393" Java: "21.0.3" encoding: "UTF-8"

new FormModel {
contentType: "form/swing"
root: new FormRoot {
add( new FormContainer( "mediathek.gui.PanelVorlage", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "insets 5,hidemode 3,gap 5 5"
"$columnConstraints": "[grow,fill]"
"$rowConstraints": "[fill][grow,fill]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -868,18 +868,13 @@ private void setNamePruefen() {
//doppelte Gruppennamen suchen
int row = tabellePset.getSelectedRow();
if (row != -1) {
int foundgruppe = 0;
for (DatenPset gruppe : listePset) {
if (jTextFieldSetName.getText().equals(gruppe.getName())) {
++foundgruppe;
}
}
if (foundgruppe > 1) {
if (listePset.stream().filter(set -> set.getName().equals(jTextFieldSetName.getText())).count() > 1) {
jTextFieldSetName.setBackground(Color.ORANGE);
} else {
jTextFieldSetName.setBackground(UIManager.getDefaults().getColor("TextField.background"));
}
}
jTextFieldSetName.requestFocusInWindow();
}

private void eingabe() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public void install(@NotNull JTabbedPane tabbedPane) {

@Handler
private void handleProgramSetChangedEvent(ProgramSetChangedEvent e) {
System.out.println("Handle PSET CHANGE");
SwingUtilities.invokeLater(this::setupButtonLayout);
}

Expand Down

0 comments on commit 3f486d4

Please sign in to comment.