Open Bug 563101 Opened 10 years ago Updated 3 years ago

Make personas (addon) work with SeaMonkey 2

Categories

(Mozilla Labs Graveyard :: Personas Plus, defect)

defect
Not set

Tracking

(Not tracked)

People

(Reporter: mnyromyr, Assigned: mnyromyr)

Details

Attachments

(3 files)

I hacked the personas 1.5.1 addon to work in SeaMonkey2.
This bug is about rolling that into a patch against the http://hg.mozilla.org/labs/personas/ repository and finally getting it into the official addon itself.
Version: unspecified → Trunk
Whee!
Hmm, there is still a personas *add-on*? I thought this has been integrated into main source?

I'd love to have "lightweight themes" work in SeaMonkey 2.1, is this bug working on that as well?
(In reply to comment #2)
> Hmm, there is still a personas *add-on*? I thought this has been integrated
> into main source?

Into FF 3.7, but not into older versions and not into Thunderbird, afaik.

> I'd love to have "lightweight themes" work in SeaMonkey 2.1, is this bug
> working on that as well?

Not really. "Lightweight themes" is not (yet, Mark's working on it, I think) really working in TB, and that's why the personas addon doesn't actually _need_ it anyway.

In fact, the situation with SM and personas is a bit hacky in that SM provides the 
"Lightweight themes" service without being able to use it...
(The personas addon checks for the service and if not found kind of assumes that it's running in TB.)
> Into FF 3.7

FF 3.6

> In fact, the situation with SM and personas is a bit hacky in that SM provides
> the "Lightweight themes" service without being able to use it...

SM 2.0 doesn't contain the file "resource://gre/modules/LightweightThemeManager.jsm", but current trunk (2.1a1pre) does, confusing the addon.

I'll go for SM 2.0.x first and assume that by the time 2.1 will be final we may either have "lightweight themes" support or don't ship said file.
This is a first work-in-progress patch for making SM2 use personas.
It'll mainly lack in styling on non-Linux platforms, any help/comment is welcome!

For those knowing how to use hg a short introduction:
- clone http://hg.mozilla.org/labs/personas/ to $personas
- apply the patch
- run 'make build' in $personas
- run 'install=/path/to/your/sm2/profile make install'
- starting your SM2 with that profile, you'll find a Mozkeh in the lower right statusbar (and a Personas item under Tools)

Only the navigator and messenger main windows are personalizable currently, we probably may want the same for others (FF/TB don't do this with the current addon, dunno about FF >= 3.6). Lightning also doesn't care yet.

This patch will not work with SM trunk, because the Lightweight Theming service is included there, although it's not functional.
Attachment #442999 - Flags: feedback?(philip.chee)
(In reply to comment #4)
> I'll go for SM 2.0.x first and assume that by the time 2.1 will be final we may
> either have "lightweight themes" support or don't ship said file.

Oh, hmm, I don't personally care about the 2.0 situation with this much (nice but that's all), I only really care about the 2.1 situation with lightweight themes - and we really need some SeaMonkey-side work on that in the default theme. I'll file another bug for that.
I filed bug 563261 on the trunk lightweight themes / personas (the latter is still the to-the-outside name) functionality.
> +++ b/client/chrome.manifest.in
> +skin  personas  classic/1.0  @chrome_path@skin/linux/seamonkey/   application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
> +#os=Linux
Remove the commented out line please.

> +    // If SMILE provides a FUEL-compatible extIExtension interface
> +    // in SeaMonkey, return it here.
> +
>      return this.extension = null;

Can't we do this?

     return this.extension = Components.classes["@mozilla.org/smile/application;1"]
          .getService(Components.interfaces.smileIApplication);

> +++ b/client/skin/linux/seamonkey/personas.css
> +/* Show the Personas icon to the Personas Tools menu item.  This is OS-specific
> + * because it doesn't look good on Mac, which also doesn't seem to respect
> + * the -moz-image-region rule, so we only show it on Windows and Linux. */
> +#personas-menu {
> +  list-style-image: url("chrome://personas/content/personas_16x16.png");
> +  -moz-image-region: rect(0, 16px, 16px, 0px);
> +}

But since in the chrome.manifest.in you aren't using any OS flags, you are applying this file to all OS aren't you?
-moz-image-region: works for OSX on trunk. Not sure if this has been backported to 1.9.1. Please check.

> +#main-window[persona] #FindToolbar {
> +  border-top-width: 1px;
> +  border-top-color: transparent;
> +  -moz-border-top-colors: transparent !important;
> +}

We have a FindToolbar?

> +#main-window[persona] #navigator-toolbox toolbarbutton,
> +#main-window[persona] #navigator-toolbox .button-toolbar {

Pity we can't use :-moz-any() for 1.9.1.

You need a separate .css file for windows but I guess that's a separate bug.
I tested this on windows (win7 & win vista). Part of the header doesn't display then. 

Here are the screenshots

http://img153.imageshack.us/img153/2692/smpersonaswin71.png
http://img684.imageshack.us/img684/1856/smpersonaswin72.png

Also when installing on both Windows & Ubuntu I had to restart the browser twice to get personas working. First restart after install didn't display the persona, and the menus. But on second restart on Ubuntu personas worked without any issues. I could also mouse over personas on firefox site and have them seen on the browser.
1. Install personas.xpi.
2. Restart.
3. Look at the error console.

2010-05-05 03:36:08	PersonaService	DEBUG	_notifyPersonaChanged:
{anonymous}([object Object])@file:///C:/Documents%20and%20Settings/philip/Application%20Data/Mozilla/Profiles/TestSR1/extensions/personas@christopher.beard/modules/service.js:653
{anonymous}([object Object])@file:///C:/Documents%20and%20Settings/philip/Application%20Data/Mozilla/Profiles/TestSR1/extensions/personas@christopher.beard/modules/service.js:698
{anonymous}()@file:///C:/Documents%20and%20Settings/philip/Application%20Data/Mozilla/Profiles/TestSR1/extensions/personas@christopher.beard/modules/service.js:182
@file:///C:/Documents%20and%20Settings/philip/Application%20Data/Mozilla/Profiles/TestSR1/extensions/personas@christopher.beard/modules/service.js:1413


 ----------
Error: notificationBox is null
Source file: file:///C:/Documents%20and%20Settings/philip/Application%20Data/Mozilla/Profiles/TestSR1/extensions/personas@christopher.beard/modules/service.js
Line: 770
 ----------
Error: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]
Source file: chrome://personas/content/personas.js
Line: 58

After second restart. No personas related errors and the personas home page opens in a new window.
But as hariniachala said, the toolbox doesn't show the personas background.
In messenger:

Error: notificationBox is null
Source file: file:///C:/Documents%20and%20Settings/philip/Application%20Data/Mozilla/Profiles/TestSR1/extensions/personas@christopher.beard/modules/service.js
Line: 770
Attached file skin/personas.css diff
The skin needs to be forked for windowsXP
After applying the changes in skin/personas.css
Comment on attachment 442999 [details] [diff] [review]
Personas for SM2, v0.1 (WIP)

To summarize:
1. Javascript errors on first run.
2. toolbox doesn't show the personas background.
3. In messenger: Error: notificationBox is null.

FYI the build instructions that work for me are:

1. cd $path-to-personas-hg/client/
2. channel=rel make build && make package
3. Install the XPI.
Attachment #442999 - Flags: feedback?(philip.chee) → feedback-
Product: Mozilla Labs → Mozilla Labs Graveyard
You need to log in before you can comment on or make changes to this bug.