private void Rebuild_Plugins_UI()
        {
            pending_rebuild = false;
            list.Clear_Children();
            string search_str = search.text.ToLower();

            // add all the plugins to the sidebar
            foreach (KeyValuePair <string, Plugin_Download_Data> kv in this.plugins)
            {
                Plugin_Download_Data plugin = kv.Value;

                Plugin_Data dat = new Plugin_Data()
                {
                    AUTHOR      = plugin.Author,
                    NAME        = plugin.Name,
                    DESCRIPTION = plugin.Description
                };

                if (search_str.Length > 0)
                {
                    bool match = false;
                    if (plugin.Name.ToLower().IndexOf(search_str) > -1)
                    {
                        match = true;
                    }
                    if (plugin.Author.ToLower().IndexOf(search_str) > -1)
                    {
                        match = true;
                    }

                    if (!match)
                    {
                        continue;
                    }
                }


                Plugin_StoreItem itm = uiControl.Create <Plugin_StoreItem>();
                itm.onClicked += this.Select_Plugin;
                itm.Set_Plugin_Data(dat);
                list.Add(itm.plugin_hash, itm);
            }

            // select one of the plugins
            if (list.Get_Children().Count() > 0)
            {
                if (this.selected_plugin == null)
                {
                    //Select nothing, show instructions instead
                    //Select_Plugin(list.Get_Children()[0]);
                    tabPanel.Select_Tab(INSTRUCTION_TAB_NAME);
                }
                else
                {
                    uiControl found = null;
                    foreach (uiControl c in this.list.Get_Children())
                    {
                        Plugin_StoreItem itm = (Plugin_StoreItem)c;
                        if (itm.plugin_hash == selected_plugin.plugin_hash)
                        {
                            found = c;
                            break;
                        }
                    }

                    if (found != null)
                    {
                        Select_Plugin(found);
                    }
                    else
                    {
                        Select_Plugin(list.Get_Children().First());
                    }
                }
            }
            else
            {
                Select_Plugin(null);
            }
        }