Closed
Bug 216475
Opened 22 years ago
Closed 16 years ago
Need function called "runonce" that guarantees a run only one time.
Categories
(SeaMonkey :: UI Design, enhancement)
SeaMonkey
UI Design
Tracking
(Not tracked)
RESOLVED
EXPIRED
People
(Reporter: netdragon, Assigned: jag+mozilla)
Details
I have a dilemma where I need a particular code to run only one time on startup,
and then never ever ever run again.
I thought of something like this:
if (runonce(UUID)) {
// Some code here
}
Which could have a macro:
STARTRUNONCE(UUID)
// Some code here
END_RUNONCE
that does the same thing.
I don't know if XP APPS is the correct component. The state should be persisted
across installations if possible.
Now, I can live without this for my issue, but there are probably other much
more important cases we'd want code to run only once.
My case:
The reason I need this is because in bug 216187, it would be nice if I could
have code run only once, and guarantee it, and people mentioned ways to do it --
all of which seem like they are not worth it for me to do. The situation is:
Currently, when you associate icons with Mozilla on Win32 systems, the icon for
.ico files is the Mozilla head, and not the icon itself.
Bug 99380 will disable the icon code and reset the icon back to the default (a
thumbnail of itself) and remove the association upon startup, and then 216187
will enable it again, and at the same time fix it so the icon stays as the icons
icon, and not the mozilla head.
The problem occurs if a user jumps from version 1.0 to the one with this fix,
and they never got the fix from bug 99380 to reset the icons and reset the
association. That means the association will still be there, and they will have
to go into preferences and unclick the preference, then go in there again and
click it to clean up the icon so it shows a thumbnail. Running code to change
the icon each time when its associated and the icon is Mozilla.exe,0 is not the
right way to do it since a user might like the dino head. Mozilla would, in that
case, change it back each time and frustrate the user.
Therefore, I wish I could have code to reset it only once. This won't be
possible, and I'm not going to bother dealing with component manager or hidden
prefs, but it would be nice for in the future for something much more important
someone needs to do.
This should be available crossplatform, also.
I have heard there are maybe ways to do with with a lot of work using component
manager, or prefs (though I wouldn't like prefs to be used for this), and that
some parts of the code do this, but it seems that reimplementing the same thing
each time would be a lot harder than doing it once and using the same thing each
time. In fact, the amount of work that would be required to do it any other way
didn't seem worth it to me, so I just made it up to the user to do the job of
something code that could have run one time could do.
Updated•21 years ago
|
Product: Core → Mozilla Application Suite
Comment 1•17 years ago
|
||
MASS-CHANGE:
This bug report is registered in the SeaMonkey product, but has been without a comment since the inception of the SeaMonkey project. This means that it was logged against the old Mozilla suite and we cannot determine that it's still valid for the current SeaMonkey suite. Because of this, we are setting it to an UNCONFIRMED state.
If you can confirm that this report still applies to current SeaMonkey 2.x nightly builds, please set it back to the NEW state along with a comment on how you reproduced it on what Build ID, or if it's an enhancement request, why it's still worth implementing and in what way.
If you can confirm that the report doesn't apply to current SeaMonkey 2.x nightly builds, please set it to the appropriate RESOLVED state (WORKSFORME, INVALID, WONTFIX, or similar).
If no action happens within the next few months, we move this bug report to an EXPIRED state.
Query tag for this change: mass-UNCONFIRM-20090614
Status: NEW → UNCONFIRMED
Comment 2•16 years ago
|
||
MASS-CHANGE:
This bug report is registered in the SeaMonkey product, but still has no comment since the inception of the SeaMonkey project 5 years ago.
Because of this, we're resolving the bug as EXPIRED.
If you still can reproduce the bug on SeaMonkey 2 or otherwise think it's still valid, please REOPEN it and if it is a platform or toolkit issue, move it to the according component.
Query tag for this change: EXPIRED-20100420
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → EXPIRED
You need to log in
before you can comment on or make changes to this bug.
Description
•