+ m_next = NULL;
+
+ // dummy sorting: add and immediately sort on list according to label
+
+ if(WidgetsPage::ms_widgetPages)
+ {
+ WidgetsPageInfo *node_prev = WidgetsPage::ms_widgetPages;
+ if(wxStrcmp(label,node_prev->GetLabel().c_str())<0)
+ {
+ // add as first
+ m_next = node_prev;
+ WidgetsPage::ms_widgetPages = this;
+ }
+ else
+ {
+ WidgetsPageInfo *node_next;
+ do
+ {
+ node_next = node_prev->GetNext();
+ if(node_next)
+ {
+ // add if between two
+ if(wxStrcmp(label,node_next->GetLabel().c_str())<0)
+ {
+ node_prev->SetNext(this);
+ m_next = node_next;
+ // force to break loop
+ node_next = NULL;
+ }
+ }
+ else
+ {
+ // add as last
+ node_prev->SetNext(this);
+ m_next = node_next;
+ }
+ node_prev = node_next;
+ }while(node_next);
+ }
+ }
+ else
+ {
+ // add when first
+
+ WidgetsPage::ms_widgetPages = this;
+
+ }
+