Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Erratic behavior(s) after launch #1181

Merged
merged 2 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,11 @@ private void initializeCustomLookAndFeels() {
* Initialises the list of available look&feels.
*/
private void initializeAvailableLookAndFeels() {
while (!WindowManager.getInstance().isAdditionalLafsLoaded()) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {}
ahadas marked this conversation as resolved.
Show resolved Hide resolved
}
// Loads all available look and feels.
lookAndFeels = UIManager.getInstalledLookAndFeels();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;
import javax.swing.table.TableColumnModel;

Expand Down Expand Up @@ -205,8 +206,16 @@ public Insets getInsets() {

executor.execute(() -> {
// Create menu bar (has to be created after toolbar) - ok, but why?
// PSko - I guess it is related to loading Actions and that icons
// for toolbar action should have icons, but in menu they should not.
// However, still I don't get how setting the icon to null here in MenuToolkit#addMenuItem
// impacts menu icons....... if nullify is commented-out there, then icons all of sudden
ahadas marked this conversation as resolved.
Show resolved Hide resolved
// show in the menu causing this: https://github.com/mucommander/mucommander/issues/1178
MainMenuBar menuBar = new MainMenuBar(this);
getJFrame().setJMenuBar(menuBar);
SwingUtilities.invokeLater(() -> {
getJFrame().setJMenuBar(menuBar);
getJFrame().revalidate();
});
});

// Create the split pane that separates folder panels and allows to resize how much space is allocated to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,4 +426,8 @@ public void configurationChanged(ConfigurationEvent event) {
setLookAndFeel(lnfName);
}
}

public boolean isAdditionalLafsLoaded() {
return additionalLafsLoaded;
}
}
1 change: 1 addition & 0 deletions package/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Localization:

Bug fixes:
- Fix occasional hangs when lauching muCommander
- Fix for erratic behavior(s) after launch (unstable Preferences window, no Menu until switching panels etc)
ahadas marked this conversation as resolved.
Show resolved Hide resolved
- Fixed undesired beep and undesired character when leaving terminal by pressing F12 (random behavior)
- Fixed a bug in Report Bug where too much logs could cause to fallback to a simple bug reporting on GitHub
- Fix for losing keyboard focus in modals when Keyboard Hints turned on
Expand Down