diff --git a/src/PluginManager.cpp b/src/PluginManager.cpp index c413c4d29..42491fa9e 100644 --- a/src/PluginManager.cpp +++ b/src/PluginManager.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -682,10 +683,8 @@ void PluginRegistrationDialog::RegenerateEffectsList( int iShowWhat ) // Only need to get the icon width once if (i == 0) { -#if defined(__WXMAC__) - // wxMac doesn't return the ICON rectangle. It returns the - // rectangle for the first column and that even comes back - // with negative numbers sometimes. +#if defined(__WXMAC__) || defined(__WXGTK__) + // wxMac and wxGtk do not return a valid width. // // So, just guess. wxIcon i1(unchecked_xpm); @@ -704,6 +703,14 @@ void PluginRegistrationDialog::RegenerateEffectsList( int iShowWhat ) i++; } +#if defined(__WXGTK__) + // Keep dialog from getting too wide + wxDisplay d(wxDisplay::GetFromWindow(GetParent())); + int w = d.GetGeometry().GetWidth() - 100; + iNameLen = wxMin(iNameLen, w); + iPathLen = wxMin(iPathLen, w - iNameLen); +#endif + mEffects->SortItems(SortCompare, 0); for(i=0;iGetItemCount();i++) {