- if(get_label(mw_data, label,"Get the name of the tab","Please input tab's name"))
- return (create_tab (mw_data, copy_tab, notebook, label));
- else
- return NULL;
+ if(get_label(mw_data, label,"Get the name of the tab","Please input tab's name")) {
+ LttvPluginTab *ptab;
+
+ ptab = g_object_new(LTTV_TYPE_PLUGIN_TAB, NULL);
+ init_tab (ptab->tab, mw_data, copy_tab, notebook, label);
+ ptab->parent.top_widget = ptab->tab->top_widget;
+ g_object_set_data_full(
+ G_OBJECT(ptab->tab->vbox),
+ "Tab_Plugin",
+ ptab,
+ (GDestroyNotify)tab_destructor);
+ return ptab;
+ }
+ else return NULL;