MozillaZine

Extensions support in SeaMonkey 2 (Suggestions)

Talk about add-ons and extension development.
Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted September 21st, 2008, 11:43 am

mcsmurf has started a new page on http://developer.mozilla.org/ on Extensions support in SeaMonkey 2. At the moment it's only a stub.

We are looking for suggestions on how to improve this page and also what sort of information you would find useful as an extension developer.

How to to display a button with a menupopup in the urlbar-icons for both Firefox and SeaMonkey 2.0.
Use this:
Code: Select all
   <hbox id="urlbar-icons">
      <image popup="myExt-menu"/>
   </hbox>
    <window id="main-window">
      <menupopup id="myExt-menu">
         <menuitem label="menuitem"/>
         <menuitem label="menuitem"/>
      </menupopup>
   </window>

Instead of:

Code: Select all
                <hbox id="urlbar-icons">
                        <button type="menu">
                                <menupopup>
                                        <menuitem label="menuitem"/>
                                        <menuitem label="menuitem"/>
                                        <menuitem label="menuitem"/>
                                </menupopup>
                        </button>
                </hbox>

Technical Note:
The code that opens the URL history popup just looks for any menupopup, so it goes wrong if you add your own. Ordinary popups are fine of course.

Phil
Last edited by Philip Chee on November 22nd, 2009, 6:02 am, edited 2 times in total.

LoudNoise
New Member

User avatar
 
Posts: 40048
Joined: October 18th, 2007, 1:45 pm
Location: Next door to the west

Post Posted September 21st, 2008, 1:50 pm

Please note. Any support questions will be split off this sticky.
Post wrangler
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."

InvisibleSmiley

User avatar
 
Posts: 69
Joined: November 10th, 2002, 1:19 am

Post Posted October 20th, 2009, 9:33 am

If you compare browser.xul with navigator.xul you'll see that SM has no findbar and also no vbox with id browser-bottombox enclosing it and the statusbar (the id of which is the same as for FF: status-bar). Download Statusbar is an example of an extension which (currently) overlays browser-bottombox so needs tweaking for SM beyond overlaying navigator.xul instead of browser.xul.
SeaMonkey Trunk Tracker: http://smtt.blogspot.com/

Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted October 20th, 2009, 1:02 pm

jhatlak wrote:If you compare browser.xul with navigator.xul you'll see that SM has no findbar and also no vbox with id browser-bottombox enclosing it and the statusbar (the id of which is the same as for FF: status-bar). Download Statusbar is an example of an extension which (currently) overlays browser-bottombox so needs tweaking for SM beyond overlaying navigator.xul instead of browser.xul.

https://developer.mozilla.org/en/Updating_extensions_for_Firefox_3#Step_4.3a_Check_for_relevant_chrome_changes
Or use the following technique to make your overlay work on both Firefox 2 and Firefox 3:
Code: Select all
<window id="main-window">
  <vbox id="browser-bottombox" insertbefore="status-bar">
    <something insertbefore="status-bar" />
  </vbox>
</window>

Phil

Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted October 21st, 2009, 1:48 am

Philip Chee wrote:
Code: Select all
<window id="main-window">
  <vbox id="browser-bottombox" insertbefore="status-bar">
    <something insertbefore="status-bar" />
  </vbox>
</window>


I've added a section for the Status bar/ bottom bar:
https://developer.mozilla.org/En/Extensions_support_in_SeaMonkey_2#The_Statusbar

I've also added a section on differences with Thunderbird 3:
https://developer.mozilla.org/En/Extensions_support_in_SeaMonkey_2#Thunderbird_3

Please keep your suggestions coming!

Phil

Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted November 22nd, 2009, 5:42 am

Here is a tip from tito on how to to display a button with a menupopup in the urlbar-icons for both
Firefox and SeaMonkey 2.0.

Use this:
Code: Select all
   <hbox id="urlbar-icons">
      <image popup="myExt-menu"/>
   </hbox>
    <window id="main-window">
      <menupopup id="myExt-menu">
         <menuitem label="menuitem"/>
         <menuitem label="menuitem"/>
      </menupopup>
   </window>

Instead of:

Code: Select all
                <hbox id="urlbar-icons">
                        <button type="menu">
                                <menupopup>
                                        <menuitem label="menuitem"/>
                                        <menuitem label="menuitem"/>
                                        <menuitem label="menuitem"/>
                                </menupopup>
                        </button>
                </hbox>

Technical Note:
The code that opens the URL history popup just looks for any menupopup, so it goes wrong if you add your own. Ordinary popups are fine of course.

Phil

LoudNoise
New Member

User avatar
 
Posts: 40048
Joined: October 18th, 2007, 1:45 pm
Location: Next door to the west

Post Posted August 10th, 2010, 1:35 pm

videobruce--

Split your post to Seamonkey features. It is here viewtopic.php?f=4&t=1966787
Post wrangler
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 4 guests

cron