Skip to content

Commit

Permalink
Temporary fix for insets bug on Mac - don't add the little open butto…
Browse files Browse the repository at this point in the history
…n on that OS. Also ported over the fix I made in the dev branch for reloading a new playlist. Given that the huge mac bug warrants a re-release, I figured I'd include this as well.
  • Loading branch information
firewyre committed Mar 7, 2011
1 parent abdaf35 commit 2c4a5ae
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
16 changes: 15 additions & 1 deletion dev/listfix/model/Playlist.java
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,21 @@ else if (saveRelative && !tempEntry.isURL())

public void reload(IProgressObserver observer)
{
init(_file, observer);
if (_isNew)
{
_file = new File(HOME_DIR + FS + "Untitled-" + _newListCount + ".m3u8");
_file.deleteOnExit();
_utfFormat = true;
_type = PlaylistType.M3U;
_isModified = false;
_isNew = true;
_entries.clear();
_originalEntries.clear();
}
else
{
init(_file, observer);
}
firePlaylistModified();
}

Expand Down
18 changes: 15 additions & 3 deletions dev/listfix/view/GUIScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@

import listfix.util.ArrayFunctions;
import listfix.util.FileTypeSearch;
import listfix.util.OperatingSystem;

import listfix.view.dialogs.ProgressDialog;
import listfix.view.dialogs.BatchRepairDialog;
Expand Down Expand Up @@ -152,7 +153,11 @@ public GUIScreen()

initPlaylistListener();

addOpenPlaylistTabButton(_uiTabs);
if (!OperatingSystem.isMac())
{
// The default L&F on macs doesn't support tab insets...
addOpenPlaylistTabButton(_uiTabs);
}

if (!WinampHelper.isWinampInstalled())
{
Expand Down Expand Up @@ -2037,9 +2042,16 @@ private void setLookAndFeel(String className)
SwingUtilities.updateComponentTreeUI(jSaveFileChooser);
SwingUtilities.updateComponentTreeUI(playlistTreeRightClickMenu);
SwingUtilities.updateComponentTreeUI(_uiTabs);
if (_tabPaneInsets != null)
try
{
if (_tabPaneInsets != null)
{
setTabAreaInsets(_tabPaneInsets);
}
}
catch (Exception e)
{
setTabAreaInsets(_tabPaneInsets);
// Eat the error and get on with life...
}
}
catch (Exception e)
Expand Down

0 comments on commit 2c4a5ae

Please sign in to comment.