You are welcome :-) > It would be great if you can investigate the panel syncing logic here: > https://github.com/firebug/firebug/blob/master/extension/content/fire... > Perhaps we could improve it so, the order doesn't matter? Please take a loot at this, if it makes sense to improve the API, file a new issue report so, it isn't forgotten here in the noise.
Thanks! Honza On Aug 2, 11:07 pm, Prasanna Bale <[email protected]> wrote: > Thank you Honza for the solution of side panel and the suggestions. I will > implement them and follow your feedback. > > Thank you once again. > Prasanna > > On Thu, Aug 2, 2012 at 7:27 AM, Jan Honza Odvarko <[email protected]> wrote: > > > > > > > > > > > Hi Prasanna, > > > addAndRemoveSidePanels, should first, unregister the panel and then > > registers new one. > > (i.e. onRemoveSidePanel and then onAppendSidePanel); > > > It would be great if you can investigate the panel syncing logic here: > > >https://github.com/firebug/firebug/blob/master/extension/content/fire... > > > Perhaps we could improve it so, the order doesn't matter? > > > addAndRemoveSidePanels : function(flag) { > > FBTrace.sysout("addAndRemoveSidePanels") > > var panelType_rules = Firebug.getPanelType("rulesSidePanel"); > > var panelType_colorContrast = > > Firebug.getPanelType("colorContrastSidePanel"); > > > /* flag == true if it is other than color contrast toolbar > > button*/ > > if (flag) { > > if (panelType_colorContrast) { > > > AINSPECTOR_FB.font_properties_registered = > > panelType_colorContrast; > > > AINSPECTOR_FB.tabPanelUtil.onRemoveSidePanel(panelType_colorContrast); > > } > > > if (panelType_rules) { > > //nothing > > } else { > > FBTrace.sysout("AINSPECTOR_FB.rules_registered: ", > > AINSPECTOR_FB.rules_registered); > > panelType_rules = AINSPECTOR_FB.rules_registered; > > > AINSPECTOR_FB.tabPanelUtil.onAppendSidePanel(panelType_rules); > > > } > > > } else { //if it is only color contrast panel > > > if (panelType_rules) { > > AINSPECTOR_FB.rules_registered = panelType_rules; > > > AINSPECTOR_FB.tabPanelUtil.onRemoveSidePanel(panelType_rules); > > } > > > if (panelType_colorContrast) { > > //nothing > > } else { > > panelType_colorContrast = > > AINSPECTOR_FB.font_properties_registered; > > > AINSPECTOR_FB.tabPanelUtil.onAppendSidePanel(panelType_colorContrast); > > } > > > } > > } > > > Some other notes: > > > 1) The 'raw' argument in highlight method (panel-utils.js) was > > undefined so, I appended the following condition > > if (!row) > > return; > > > So, I was able to see the toolbar with buttons (Images, Controls, …) > > > 2) panel.name is an identifier it should not be translated > > You should only translate the panel title (the title property). > > > 3) The same for parentPanel it’s also an identifier and should not be > > translated. > > > 4) I wouldn’t recommend using DTD for locales, DTD entities are not > > scriptable > > and so you can’t avoid errors if there is a missing translation (DTD > > entity) and e.g. > > fallback to English string. > > > 5) You don’t need an extra $AI_STR, just register your string bundle > > with > > Firebug.registerStringBundle and use Locale.$STR (or FBL.$STR) > > > 6) dependents: should use identifiers of panels not titles. > > > 7) You should consider switching to AMD syntax. > > > Honza > > > -- > > You received this message because you are subscribed to the Google > > Groups "Firebug" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >https://groups.google.com/forum/#!forum/firebug > > -- > - > Prasu -- You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at https://groups.google.com/forum/#!forum/firebug
