MozillaZine

Tabbed Browsing Extention - initial settings problem

Talk about add-ons and extension development.
thenightfly42

User avatar
 
Posts: 983
Joined: November 5th, 2002, 8:03 am

Post Posted December 5th, 2002, 9:24 am

I've been having trouble with TBE each time I upgrade my Phoenix build. I delete the old Px directory, delete my profile, run Px, and download TBE. Close, restart Px, and go to Preferences.

When there, I go through the options to set my preferences. I notice that with many checkboxes, it is initially selected, but when I click to deselect, it remains selected. The second click turns it off.

The next time I go into the preferences, the settings are all askew. I go through again and set them the way I want, and they work.

Any suggestions or verifications? I'm on WinXP, and this was verified today with Phoenix 1204 and TBE 1.5.2002120401, although it has happened with earlier builds as well.

SilentJ
 
Posts: 251
Joined: November 8th, 2002, 6:42 am

Post Posted December 5th, 2002, 9:52 am

yes, i've always had this happen to me with tbe and a clean install, i guess its a bug in the ui of tbe itself

-J

leoz

User avatar
 
Posts: 131
Joined: November 4th, 2002, 8:28 pm
Location: Boston, MA, USA

Post Posted December 5th, 2002, 10:27 am

I know this isn't exactly recommended, but I never delete my profile directory - I just overwrite my old Phoenix with new Phoenix files and redownload TBE. Everything works fine.

If I had a bug that I wanted to report, I would of course try it with a clean profile, but it's too much of a hassle to recreate everything for every nightly I want to update to.

So, I haven't had to redo TBE options in forever - and wouldn't know if it has the problem you describe. If it's as reproducible as it sounds, letting Piro know about it might help.

alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted December 5th, 2002, 10:39 am

thenightfly42 wrote:I've been having trouble with TBE each time I upgrade my Phoenix build. I delete the old Px directory, delete my profile, run Px, and download TBE. Close, restart Px, and go to Preferences.

When there, I go through the options to set my preferences. I notice that with many checkboxes, it is initially selected, but when I click to deselect, it remains selected. The second click turns it off.

The next time I go into the preferences, the settings are all askew. I go through again and set them the way I want, and they work.

Any suggestions or verifications? I'm on WinXP, and this was verified today with Phoenix 1204 and TBE 1.5.2002120401, although it has happened with earlier builds as well.


Save all of your TBE settings into user.js (see mine at http://www.geocities.com/alanjstarr/mozilla/ ) and then whenever you upgrade, just copy user.js into the same folder as your prefs.js.

thenightfly42

User avatar
 
Posts: 983
Joined: November 5th, 2002, 8:03 am

Post Posted December 6th, 2002, 11:44 am

Alan, that's an interesting approach. So, does anything in the user.js override any choices in TBE? How does this affect you when TBE gets new options? Also, in general, doesn't this undo the whole "delete your profile when upgrading" instruction? Please correct me if I misunderstood.

leoz

User avatar
 
Posts: 131
Joined: November 4th, 2002, 8:28 pm
Location: Boston, MA, USA

Post Posted December 6th, 2002, 11:51 am

thenightfly42 wrote:Alan, that's an interesting approach. So, does anything in the user.js override any choices in TBE? How does this affect you when TBE gets new options? Also, in general, doesn't this undo the whole "delete your profile when upgrading" instruction? Please correct me if I misunderstood.


user.js sets up preference overrides that get put into prefs.js. If you make your favorite checkbox settings in TBE preferences area, they get translated to a set of preferences - if you take those preferences, stick them in user.js - then they effectively become a new set of defaults. I think that for the preferences you explicitly specify in user.js in that way, you won't be able to overwrite them using the preferences panel. You can change them, but when you close/reopen Phoenix, they will come back to the user.js settings.

It doesn't undo the "delete your profile when upgrading" thing - since it's only a few tbe-related settings for preferences. The reason to delete your profile is so that if previous version is somehow incompatible with this one you don't get problems. But the TBE preferences should be compatible between the two. Of course if TBE gets updated such that the preferences change, you might have to make modifications to the file.

alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted December 6th, 2002, 12:03 pm

thenightfly42 wrote:Alan, that's an interesting approach. So, does anything in the user.js override any choices in TBE? How does this affect you when TBE gets new options? Also, in general, doesn't this undo the whole "delete your profile when upgrading" instruction? Please correct me if I misunderstood.


user.js is copied into prefs.js on browser launch. user.js, userChrome, and userContent can be copied into any Mozilla/Phoenix profile without harm since they are user-created. It's the automatically generated files, like bookmarks, that can get you into trouble. I keep a copy of those three files in a seperate folder.

This will not affect any new settings that Piro adds (unless he fiddles with the values for some of them). Some of the items that I've put into user.js are the same as the defaults. But if you look in about:config, you can't tell. If Piro adds a new option, I can always copy the line from prefs.js to user.js for future use.

laszlo

User avatar
 
Posts: 5198
Joined: November 4th, 2002, 6:13 pm
Location: .de

Post Posted December 6th, 2002, 12:14 pm

leoz wrote:I think that for the preferences you explicitly specify in user.js in that way, you won't be able to overwrite them using the preferences panel. You can change them, but when you close/reopen Phoenix, they will come back to the user.js settings.

Which is a major disadvantage of this approach imho.

alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted December 6th, 2002, 12:17 pm

laszlo wrote:
leoz wrote:I think that for the preferences you explicitly specify in user.js in that way, you won't be able to overwrite them using the preferences panel. You can change them, but when you close/reopen Phoenix, they will come back to the user.js settings.

Which is a major disadvantage of this approach imho.


That's why you figure out what you want, and <i>then</i> add it to user.js. There's no rule saying that you have to put user.js in for this profile. When it comes time to delete your profile to do an upgrade, that's when you implement. Heck, you can delete your user.js as soon as you've loaded the browser once since all your settings are imported for you. user.js is a way to implement a lot of tweaks, repeatedly, in one move. I got tired of going through every checkbox every few days.

laszlo

User avatar
 
Posts: 5198
Joined: November 4th, 2002, 6:13 pm
Location: .de

Post Posted December 6th, 2002, 12:22 pm

alan, I was just thinking about the mass of newbies then coming to this board starting topics like "I changed a setting in TBE but it won't stick. Please help me!!!" :P

alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted December 6th, 2002, 12:24 pm

laszlo wrote:alan, I was just thinking about the mass of newbies then coming to this board starting topics like "I changed a setting in TBE but it won't stick. Please help me!!!" :P


Yeah, but how many newbies will be using user.js? I figure that by the time you get around to customizing via userChrome, userContent, and user.js, you better know what you're doing. Thus I'm having issues with userChrome.css now ( http://www.mozillazine.org/forums/viewtopic.php?t=1876 )

thenightfly42

User avatar
 
Posts: 983
Joined: November 5th, 2002, 8:03 am

Post Posted December 6th, 2002, 1:47 pm

Thanks everyone, this is all very interesting.
alanjstr wrote:user.js is copied into prefs.js on browser launch. user.js, userChrome, and userContent can be copied into any Mozilla/Phoenix profile without harm since they are user-created.

So, if TBE or Phoenix changes it's preferences, and the change is something I want to preserve, could I make the changes through the preferences panel, exit Phoenix, and copy the appropriate lines from prefs.js to user.js? Or will the changes to prefs.js be lost? It sounds like the overwrite is only on startup, so this would work.

laszlo

User avatar
 
Posts: 5198
Joined: November 4th, 2002, 6:13 pm
Location: .de

Post Posted December 6th, 2002, 1:58 pm

thenightfly42 wrote:So, if TBE or Phoenix changes it's preferences, and the change is something I want to preserve, could I make the changes through the preferences panel, exit Phoenix, and copy the appropriate lines from prefs.js to user.js? Or will the changes to prefs.js be lost? It sounds like the overwrite is only on startup, so this would work.

Correct. On startup both files are read and the prefs are merged into memory, with those from user.js having a higher priority. Things you change while Phoenix is running are only changed in memory. On exit (and in certain time intervals or events like closing a window, I believe) the updated prefs are written to prefs.js. One caveat: if you want to manually remove a setting from user.js, you also have to remove it from prefs.js while Phoenix is not running.

alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted December 6th, 2002, 2:11 pm

laszlo wrote:One caveat: if you want to manually remove a setting from user.js, you also have to remove it from prefs.js while Phoenix is not running.


Errr, delete it from user.js, but if it is something you can set via the Prefences Panel, then you don't have to remove it from prefs.js manually. If it is not something that has an interface, then yes, you have to do it manually.

notonymous

User avatar
 
Posts: 151
Joined: November 6th, 2002, 6:57 pm
Location: Beyond the fringe

Post Posted December 7th, 2002, 6:57 pm

With regards to the problem described in the initial posting ... I noticed the same thing when I updated to PX 0.5 and installed TBE v1.5.2002120701 from the developer's site. I had a problem closing tabs with this version (reported elsewhere) and reverted to version 2002112301 (the last version I downloaded); the 2002112301 version doesn't exhibit your problem so I assume it is a recently introduced "feature" ;-)

Cheers ...

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 2 guests