*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
wxWindow *p_parent;
vlc_bool_t b_advanced;
+ wxPanel *p_current;
+
wxTreeItemId root_item;
wxTreeItemId plugins_item;
};
{
case CONFIG_CATEGORY:
config_data = new ConfigTreeData;
+ if( p_item->i_value == -1 ) break; // Don't display it
config_data->psz_name = strdup( config_CategoryNameGet(
p_item->i_value ) );
psz_help = config_CategoryHelpGet( p_item->i_value );
break;
case CONFIG_SUBCATEGORY:
+ if( p_item->i_value == -1 ) break; // Don't display it
if( p_item->i_value == SUBCAT_VIDEO_GENERAL ||
p_item->i_value == SUBCAT_AUDIO_GENERAL )
{
}
/* Sort all this mess */
- wxTreeItemIdValue cookie;
+ wxTreeItemIdValue cookie;
size_t i_child_index;
wxTreeItemId capability_item = GetFirstChild( root_item, cookie);
for( i_child_index = 0;
- (capability_item.IsOk() &&
+ (capability_item.IsOk() &&
//(i_child_index < GetChildrenCount( plugins_item, FALSE )));
(i_child_index < GetChildrenCount( root_item, FALSE )));
i_child_index++ )
p_sizer->Add( this, 1, wxEXPAND | wxALL, 0 );
p_sizer->Layout();
+ p_current = NULL;
+
/* Update Tree Ctrl */
#ifndef WIN32 /* Workaround a bug in win32 implementation */
SelectItem( GetFirstChild( root_item, cookie ) );
#else
p_sizer->Remove( config_data->panel );
#endif
+ p_current = NULL;
}
wxTreeItemId category = GetFirstChild( root_item, cookie );
{
ConfigTreeData *config_data = NULL;
- if( event.GetOldItem() )
- config_data = FindModuleConfig( (ConfigTreeData *)GetItemData(
- event.GetOldItem() ) );
- if( config_data && config_data->panel )
+ if( p_current )
{
- config_data->panel->Hide();
+ p_current->Hide();
#if (wxCHECK_VERSION(2,5,0))
- p_sizer->Detach( config_data->panel );
+ p_sizer->Detach( p_current );
#else
- p_sizer->Remove( config_data->panel );
+ p_sizer->Remove( p_current );
#endif
+ p_current = NULL;
}
/* Don't use event.GetItem() because we also send fake events */
config_data->panel->Show();
}
+ p_current = config_data->panel;
+
p_sizer->Add( config_data->panel, 3, wxEXPAND | wxALL, 0 );
p_sizer->Layout();
}
#else
p_sizer->Remove( config_data->panel );
#endif
+ p_current = NULL;
}
if( GetSelection() )