зеркало из https://github.com/mozilla/pjs.git
Bug 106386 Correct misspellings in source code
patch by unknown@simplemachines.org r=timeless rs=brendan
This commit is contained in:
Родитель
796dbe88e2
Коммит
532329ac75
|
@ -445,7 +445,7 @@ function SelectCellHAlign()
|
|||
{
|
||||
SetCheckbox("CellHAlignCheckbox");
|
||||
// Once user changes the alignment,
|
||||
// we loose their original "CharAt" alignment"
|
||||
// we lose their original "CharAt" alignment"
|
||||
gAlignWasChar = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ class nsIParserFilter : public nsISupports {
|
|||
|
||||
NS_IMETHOD WillAddToken(CToken & token) = 0;
|
||||
|
||||
NS_IMETHOD ProcessTokens( /* dont know what goes here yet */ void ) = 0;
|
||||
NS_IMETHOD ProcessTokens( /* don't know what goes here yet */ void ) = 0;
|
||||
|
||||
NS_IMETHOD Finish() = 0;
|
||||
|
||||
|
|
|
@ -3067,7 +3067,7 @@ CNavDTD::CreateContextStackFor(eHTMLTags aChild)
|
|||
if (eHTMLTag_unknown == theTop) {
|
||||
result = BackwardPropagate(mScratch, eHTMLTag_html, aChild);
|
||||
} else if (theTop != aChild) {
|
||||
// Dont even bother if we're already inside a similar element...
|
||||
// Don't even bother if we're already inside a similar element...
|
||||
result = BackwardPropagate(mScratch, theTop, aChild);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1625,7 +1625,7 @@ nsParser::Parse(const nsAString& aSourceBuffer,
|
|||
CParserContext* pc=0;
|
||||
|
||||
if((!mParserContext) || (mParserContext->mKey!=aKey)) {
|
||||
//only make a new context if we dont have one, OR if we do, but has a different context key...
|
||||
//only make a new context if we don't have one, OR if we do, but has a different context key...
|
||||
|
||||
nsScanner* theScanner = new nsScanner(mUnusedInput,mCharset,mCharsetSource);
|
||||
NS_ENSURE_TRUE(theScanner, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
|
|
@ -83,7 +83,7 @@ nsCParserNode::nsCParserNode(CToken* aToken,
|
|||
|
||||
/**
|
||||
* destructor
|
||||
* NOTE: We intentionally DONT recycle mToken here.
|
||||
* NOTE: We intentionally DON'T recycle mToken here.
|
||||
* It may get cached for use elsewhere
|
||||
* @update gess 3/25/98
|
||||
* @param
|
||||
|
|
|
@ -1272,7 +1272,7 @@ NPP_SetWindow(NPP instance, NPWindow* window)
|
|||
// NPP_NewStream:
|
||||
// Notifies an instance of a new data stream and returns an error value.
|
||||
//
|
||||
// Create a stream peer and stream. If succesful, save
|
||||
// Create a stream peer and stream. If successful, save
|
||||
// the stream peer in NPStream's pdata.
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
|
|
@ -2811,7 +2811,7 @@ nsChromeRegistry::GetProfileRoot(nsACString& aFileURL)
|
|||
const nsAFlatCString& empty = EmptyCString();
|
||||
|
||||
// copy along
|
||||
// It aint an error if these files dont exist
|
||||
// It ain't an error if these files don't exist
|
||||
defaultUserContentFile->CopyToNative(userChromeDir, empty);
|
||||
defaultUserChromeFile->CopyToNative(userChromeDir, empty);
|
||||
}
|
||||
|
|
|
@ -762,7 +762,7 @@ function toggleShowHidden(event) {
|
|||
|
||||
// from the current directory and whatever was entered
|
||||
// in the entry field, try to make a new path. This
|
||||
// uses "/" as the directory seperator, "~" as a shortcut
|
||||
// uses "/" as the directory separator, "~" as a shortcut
|
||||
// for the home directory (but only when seen at the start
|
||||
// of a path), and ".." to denote the parent directory.
|
||||
// returns an array of the files listed,
|
||||
|
|
|
@ -1,281 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Samir Gehani <sgehani@netscape.com>
|
||||
* Brian Ryner <bryner@brianryner.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsWelcomeDlg.h"
|
||||
#include "nsXInstaller.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
const int nsWelcomeDlg::kMsgCount;
|
||||
|
||||
nsWelcomeDlg::nsWelcomeDlg()
|
||||
: mTitle(NULL), mWelcomeMsg(NULL), mPixmap(NULL), mBox(NULL)
|
||||
{
|
||||
memset(mMsgs, 0, sizeof(mMsgs));
|
||||
}
|
||||
|
||||
nsWelcomeDlg::~nsWelcomeDlg()
|
||||
{
|
||||
XI_IF_FREE(mPixmap);
|
||||
for (int i = 0; i < kMsgCount; ++i)
|
||||
XI_IF_FREE(mMsgs[i]);
|
||||
|
||||
XI_IF_FREE(mWelcomeMsg);
|
||||
XI_IF_FREE(mTitle);
|
||||
}
|
||||
|
||||
void
|
||||
nsWelcomeDlg::Back(GtkWidget *aWidget, gpointer aData)
|
||||
{
|
||||
DUMP("Back");
|
||||
if (aData != gCtx->wdlg) return;
|
||||
}
|
||||
|
||||
void
|
||||
nsWelcomeDlg::Next(GtkWidget *aWidget, gpointer aData)
|
||||
{
|
||||
DUMP("Next");
|
||||
if (aData != gCtx->wdlg) return;
|
||||
|
||||
// hide this notebook page
|
||||
gCtx->wdlg->Hide(nsXInstallerDlg::FORWARD_MOVE);
|
||||
|
||||
// disconnect this dlg's nav btn signal handlers
|
||||
gtk_signal_disconnect(GTK_OBJECT(gCtx->back), gCtx->backID);
|
||||
gtk_signal_disconnect(GTK_OBJECT(gCtx->next), gCtx->nextID);
|
||||
|
||||
// show the next dlg
|
||||
gCtx->ldlg->Show(nsXInstallerDlg::FORWARD_MOVE);
|
||||
}
|
||||
|
||||
int
|
||||
nsWelcomeDlg::Parse(nsINIParser *aParser)
|
||||
{
|
||||
int bufsize = 0;
|
||||
char *showDlg = NULL;
|
||||
char msgName[] = "Message0";
|
||||
char *tmp;
|
||||
|
||||
/* optional keys */
|
||||
bufsize = 5;
|
||||
aParser->GetStringAlloc(DLG_WELCOME, SHOW_DLG, &showDlg, &bufsize);
|
||||
if (bufsize != 0 && showDlg) {
|
||||
if (strncmp(showDlg, "TRUE", 4) == 0)
|
||||
mShowDlg = nsXInstallerDlg::SHOW_DIALOG;
|
||||
else if (strncmp(showDlg, "FALSE", 5) == 0)
|
||||
mShowDlg = nsXInstallerDlg::SKIP_DIALOG;
|
||||
}
|
||||
|
||||
bufsize = 0;
|
||||
aParser->GetStringAlloc(DLG_WELCOME, TITLE, &mTitle, &bufsize);
|
||||
if (bufsize == 0)
|
||||
XI_IF_FREE(mTitle);
|
||||
|
||||
bufsize = 0;
|
||||
aParser->GetStringAlloc(DLG_WELCOME, WATERMARK, &mPixmap, &bufsize);
|
||||
if (bufsize == 0)
|
||||
XI_IF_FREE(mPixmap);
|
||||
|
||||
bufsize = 0;
|
||||
aParser->GetStringAlloc(DLG_WELCOME, MSGWELCOME, &tmp, &bufsize);
|
||||
if (bufsize == 0) {
|
||||
XI_IF_FREE(tmp);
|
||||
} else {
|
||||
mWelcomeMsg = g_strdup_printf(tmp, gCtx->opt->mProductName);
|
||||
}
|
||||
|
||||
for (int i = 0; i < kMsgCount; ++i) {
|
||||
bufsize = 0;
|
||||
msgName[7] = (char)(i + 48); // ASCII 48 == 0
|
||||
aParser->GetStringAlloc(DLG_WELCOME, msgName, &tmp, &bufsize);
|
||||
if (bufsize == 0) {
|
||||
XI_IF_FREE(tmp);
|
||||
} else {
|
||||
mMsgs[i] = g_strdup_printf(tmp, gCtx->opt->mProductName);
|
||||
}
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
int
|
||||
nsWelcomeDlg::Show(int aDirection)
|
||||
{
|
||||
int err = 0;
|
||||
int msgLength = 0;
|
||||
char *msgText, *textPos;
|
||||
|
||||
XI_VERIFY(gCtx);
|
||||
XI_VERIFY(gCtx->notebook);
|
||||
|
||||
if (mWidgetsInit == FALSE) {
|
||||
// static widget init
|
||||
|
||||
// Note our page number in the wizard.
|
||||
mPageNum = gtk_notebook_get_current_page(GTK_NOTEBOOK(gCtx->notebook));
|
||||
|
||||
// Set up the window title
|
||||
gtk_window_set_title(GTK_WINDOW(gCtx->window), mTitle);
|
||||
|
||||
mBox = gtk_hbox_new(FALSE, 0);
|
||||
gtk_notebook_append_page(GTK_NOTEBOOK(gCtx->notebook), mBox, NULL);
|
||||
|
||||
GtkWidget *wmbox = gtk_event_box_new();
|
||||
if (mPixmap) {
|
||||
GdkPixbuf *pb = gdk_pixbuf_new_from_file(mPixmap, NULL);
|
||||
if (pb) {
|
||||
GdkPixmap *pm = NULL;
|
||||
gdk_pixbuf_render_pixmap_and_mask(pb, &pm, NULL, 0);
|
||||
if (pm) {
|
||||
GtkStyle *newStyle = gtk_style_copy(gtk_widget_get_style(wmbox));
|
||||
newStyle->bg_pixmap[GTK_STATE_NORMAL] = pm;
|
||||
gtk_widget_set_style(wmbox, newStyle);
|
||||
|
||||
// newStyle now owns the pixmap, so we don't unref it.
|
||||
g_object_unref(newStyle);
|
||||
|
||||
// Make the watermark box the width of the pixmap.
|
||||
gint width, height;
|
||||
gdk_drawable_get_size(pm, &width, &height);
|
||||
gtk_widget_set_size_request(wmbox, width, -1);
|
||||
}
|
||||
|
||||
// We're done with rendering the pixbuf, so we can destroy it.
|
||||
gdk_pixbuf_unref(pb);
|
||||
}
|
||||
}
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(mBox), wmbox, FALSE, FALSE, 0);
|
||||
|
||||
wmbox = gtk_event_box_new();
|
||||
gtk_box_pack_start_defaults(GTK_BOX(mBox), wmbox);
|
||||
|
||||
GtkWidget *inner_hbox = gtk_hbox_new(FALSE, 0);
|
||||
gtk_container_add(GTK_CONTAINER(wmbox), inner_hbox);
|
||||
|
||||
GtkWidget *spacer = gtk_alignment_new(0, 0, 0, 0);
|
||||
gtk_widget_set_size_request(spacer, 5, -1);
|
||||
gtk_box_pack_start(GTK_BOX(inner_hbox), spacer, FALSE, FALSE, 0);
|
||||
|
||||
GtkWidget *vbox = gtk_vbox_new(FALSE, 8);
|
||||
gtk_box_pack_start(GTK_BOX(inner_hbox), vbox, FALSE, FALSE, 0);
|
||||
|
||||
for (int i = 0; i < kMsgCount - 1; ++i)
|
||||
msgLength += strlen(mMsgs[i]);
|
||||
|
||||
#define kSpanBegin "<span weight=\"bold\" size=\"larger\">"
|
||||
#define kSpanEnd "</span>\n\n"
|
||||
|
||||
msgLength += strlen(kSpanBegin) + strlen(mWelcomeMsg) + strlen(kSpanEnd);
|
||||
msgText = (char*) malloc(msgLength + (kMsgCount - 1) * 2 + 1);
|
||||
|
||||
textPos = msgText;
|
||||
|
||||
textPos += sprintf(textPos, kSpanBegin "%s" kSpanEnd, mWelcomeMsg);
|
||||
|
||||
for (int i = 0; i < kMsgCount - 1; ++i)
|
||||
textPos += sprintf(textPos, "%s\n\n", mMsgs[i]);
|
||||
|
||||
GtkWidget *msg = gtk_label_new(NULL);
|
||||
gtk_label_set_markup(GTK_LABEL(msg), msgText);
|
||||
gtk_label_set_line_wrap(GTK_LABEL(msg), TRUE);
|
||||
gtk_misc_set_alignment(GTK_MISC(msg), 0.0, 0.5);
|
||||
|
||||
GdkColor black_col = { 0, 0, 0, 0 };
|
||||
GdkColor white_col = { 0, 65535, 65535, 65535 };
|
||||
|
||||
gtk_widget_modify_text(msg, GTK_STATE_NORMAL, &black_col);
|
||||
gtk_widget_modify_bg(wmbox, GTK_STATE_NORMAL, &white_col);
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(vbox), msg, FALSE, FALSE, 0);
|
||||
gtk_container_child_set(GTK_CONTAINER(vbox), msg, "padding", 5, NULL);
|
||||
|
||||
free(msgText);
|
||||
|
||||
// Now add 100px of padding, and then the last mesage.
|
||||
spacer = gtk_alignment_new(0.0, 0.0, 0.0, 0.0);
|
||||
gtk_widget_set_size_request(spacer, -1, 110);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), spacer, FALSE, FALSE, 0);
|
||||
|
||||
msgText = (char*) malloc(strlen(mMsgs[kMsgCount - 1]) + 2);
|
||||
sprintf(msgText, "%s\n", mMsgs[kMsgCount - 1]);
|
||||
|
||||
msg = gtk_label_new(msgText);
|
||||
gtk_widget_modify_text(msg, GTK_STATE_NORMAL, &black_col);
|
||||
gtk_misc_set_alignment(GTK_MISC(msg), 0.0, 0.5);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), msg, FALSE, FALSE, 0);
|
||||
gtk_container_child_set(GTK_CONTAINER(vbox), msg, "padding", 5, NULL);
|
||||
|
||||
free(msgText);
|
||||
|
||||
mWidgetsInit = TRUE;
|
||||
} else {
|
||||
gtk_notebook_set_page(GTK_NOTEBOOK(gCtx->notebook), mPageNum);
|
||||
}
|
||||
|
||||
// No header image for the welcome dialog
|
||||
gtk_widget_set_usize(gCtx->header, 0, 0);
|
||||
|
||||
gtk_widget_show_all(mBox);
|
||||
|
||||
// signal connect the buttons
|
||||
gCtx->backID = gtk_signal_connect(GTK_OBJECT(gCtx->back), "clicked",
|
||||
GTK_SIGNAL_FUNC(nsWelcomeDlg::Back),
|
||||
gCtx->wdlg);
|
||||
gCtx->nextID = gtk_signal_connect(GTK_OBJECT(gCtx->next), "clicked",
|
||||
GTK_SIGNAL_FUNC(nsWelcomeDlg::Next),
|
||||
gCtx->wdlg);
|
||||
|
||||
gtk_widget_set_sensitive(gCtx->back, FALSE);
|
||||
|
||||
GTK_WIDGET_SET_FLAGS(gCtx->next, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default(gCtx->next);
|
||||
gtk_widget_grab_focus(gCtx->next);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int
|
||||
nsWelcomeDlg::Hide(int aDirection)
|
||||
{
|
||||
// hide all this dlg's widgets
|
||||
gtk_widget_hide(mBox);
|
||||
|
||||
return OK;
|
||||
}
|
|
@ -74,7 +74,7 @@ void ParseDefaultsInfo()
|
|||
int iIndex;
|
||||
DWORD dwIconsVisible;
|
||||
|
||||
// If szAppPath is a null sting, i.e. we cannot find where the app has been installed:
|
||||
// If szAppPath is a null string, i.e. we cannot find where the app has been installed:
|
||||
// - HIDEICONS will still remove the shortcuts but
|
||||
// - SHOWICONS will do nothing because we won't be able to find the shortcuts to display.
|
||||
ParsePath(ugUninstall.szAppPath, szStorageDir, MAX_BUF, PP_PATH_ONLY);
|
||||
|
|
|
@ -251,7 +251,7 @@ int codesighs(Options* inOptions)
|
|||
|
||||
/*
|
||||
** Read the file line by line, regardless of number of fields.
|
||||
** We assume tab seperated value formatting, at least 7 lead values:
|
||||
** We assume tab separated value formatting, at least 7 lead values:
|
||||
** size class scope module segment object symbol ....
|
||||
*/
|
||||
while(0 == retval && NULL != fgets(lineBuffer, sizeof(lineBuffer), inOptions->mInput))
|
||||
|
|
|
@ -403,7 +403,7 @@ int readSymDB(const char* inDBName, SymDB_Container** outDB)
|
|||
trimWhite(lineBuf);
|
||||
|
||||
/*
|
||||
** Each line has four arguments. tab seperated values (tsv).
|
||||
** Each line has four arguments. tab separated values (tsv).
|
||||
** Symbol
|
||||
** Section
|
||||
** Length
|
||||
|
@ -1597,7 +1597,7 @@ static int qsortRVABase(const void* in1, const void* in2)
|
|||
|
||||
static int tsvout(Options* inOptions, unsigned inSize, MSMap_SegmentClass inClass, MSMap_SymbolScope inScope, const char* inModule, const char* inSegment, const char* inObject, const char* inSymbol)
|
||||
/*
|
||||
** Output a line of map information seperated by tabs.
|
||||
** Output a line of map information separated by tabs.
|
||||
** Some items (const char*), if not present, will receive a default value.
|
||||
*/
|
||||
{
|
||||
|
@ -1715,7 +1715,7 @@ void cleanModule(MSMap_Module* inModule)
|
|||
int map2tsv(Options* inOptions)
|
||||
/*
|
||||
** Read all input.
|
||||
** Output tab seperated value data.
|
||||
** Output tab separated value data.
|
||||
*/
|
||||
{
|
||||
int retval = 0;
|
||||
|
|
|
@ -141,7 +141,7 @@ void trimWhite(char* inString)
|
|||
int nm2tsv(Options* inOptions)
|
||||
/*
|
||||
** Read all input.
|
||||
** Output tab seperated value data.
|
||||
** Output tab separated value data.
|
||||
**
|
||||
** We expect our data to be in a particular format.
|
||||
** nm --format=bsd --size-sort --print-file-name --demangle
|
||||
|
|
|
@ -829,7 +829,7 @@ void ConsumeArguments(int argc, char* argv[]) {
|
|||
break;
|
||||
case 's':
|
||||
case 'S':
|
||||
gSloppy=true; // Dont look for member variables
|
||||
gSloppy=true; // Don't look for member variables
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -97,7 +97,7 @@ while(<>)
|
|||
{
|
||||
$uncommFreeCount++;
|
||||
$uncommFreeBytes += $2;
|
||||
# these wont have an overhead
|
||||
# these won't have any overhead
|
||||
# we shouldn't view this as a free as we could shed this and
|
||||
# reduce our VmSize
|
||||
$prevFree = $2;
|
||||
|
|
|
@ -371,9 +371,9 @@ void leaky::generateReportHTML(FILE *fp, int *countArray, int count)
|
|||
for(int cnt=usefulSymbols; --cnt>=0; rankingTable[cnt]=cnt);
|
||||
|
||||
// Drat. I would use ::qsort() but I would need a global variable and my
|
||||
// into-pascal professor threatened to flunk anyone who used globals.
|
||||
// She dammaged me for life :-) (That was 1986. See how much influence
|
||||
// she had. I dont remember her name but I always feel guilty about globals)
|
||||
// intro-pascal professor threatened to flunk anyone who used globals.
|
||||
// She damaged me for life :-) (That was 1986. See how much influence
|
||||
// she had. I don't remember her name but I always feel guilty about globals)
|
||||
|
||||
// Shell Sort. 581130733 is the max 31 bit value of h = 3h+1
|
||||
int mx, i, h;
|
||||
|
@ -389,8 +389,8 @@ void leaky::generateReportHTML(FILE *fp, int *countArray, int count)
|
|||
}
|
||||
}
|
||||
|
||||
// Ok, We are sorted now. Lets go through the table until we get to
|
||||
// functions that were never called. Right now we dont do much inside
|
||||
// Ok, We are sorted now. Let's go through the table until we get to
|
||||
// functions that were never called. Right now we don't do much inside
|
||||
// this loop. Later we can get callers and callees into it like gprof
|
||||
// does
|
||||
fprintf(fp,
|
||||
|
|
|
@ -123,7 +123,7 @@ static int rtcFD = -1;
|
|||
#if defined(linux) || defined(NTO)
|
||||
static void DumpAddressMap()
|
||||
{
|
||||
// Turn off the timer so we dont get interrupts during shutdown
|
||||
// Turn off the timer so we don't get interrupts during shutdown
|
||||
#if defined(linux)
|
||||
if (rtcHz) {
|
||||
enableRTCSignals(false);
|
||||
|
|
|
@ -24,7 +24,7 @@ extern "C" {
|
|||
|
||||
typedef unsigned long u_long;
|
||||
|
||||
// Format of a malloc log entry. This is whats written out to the
|
||||
// Format of a malloc log entry. This is what's written out to the
|
||||
// "malloc-log" file.
|
||||
struct malloc_log_entry {
|
||||
u_long delTime;
|
||||
|
|
|
@ -34,7 +34,7 @@ my-program</tt></blockquote>
|
|||
The debugging malloc library creates two files, <tt>malloc-log</tt> and
|
||||
<tt>malloc-map</tt>.
|
||||
The malloc-log file can be quite large for large programs (e.g. mozilla)
|
||||
so be prepared to have alot of disk space. The malloc-map is tiny.
|
||||
so be prepared to have a lot of disk space. The malloc-map is tiny.
|
||||
<p>Once your program has completed execution you can use leaky to look
|
||||
for memory leaks, or at least use it to dump the log. For memory leaks,
|
||||
you use leaky like this:
|
||||
|
@ -81,7 +81,7 @@ its memory address...</li>
|
|||
<li>
|
||||
On a typical *short* run of mozilla, I'll end up with a malloc-log file
|
||||
of around 5 to 10 megabytes and the resulting converted log file will be
|
||||
10 to 20 times that so be prepared to have alot of disk space. It helps
|
||||
10 to 20 times that so be prepared to have a lot of disk space. It helps
|
||||
a great deal to narrow down your problem space to reduce the log file size...</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ extern "C" {
|
|||
|
||||
typedef unsigned long u_long;
|
||||
|
||||
// Format of a malloc log entry. This is whats written out to the
|
||||
// Format of a malloc log entry. This is what's written out to the
|
||||
// "malloc-log" file.
|
||||
struct malloc_log_entry {
|
||||
u_long type;
|
||||
|
|
|
@ -154,7 +154,7 @@ while ($func = pop @funcs_to_demangle) {
|
|||
|
||||
# print STDERR "Got result $_\n";
|
||||
if (/\s*(\S+)\s*==\s*(.*)$/) {
|
||||
# print STDERR"succesfully demangled $1 to $2\n";
|
||||
# print STDERR"successfully demangled $1 to $2\n";
|
||||
$demangle{$1} = $2;
|
||||
} else {
|
||||
$demangle{$1} = $1;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
# This file is hand crafted.
|
||||
#
|
||||
# Each line contains two module names seperated by whitespace.
|
||||
# Each line contains two module names separated by whitespace.
|
||||
# If both modules are in the needed modules as defined by module-graph.pl,
|
||||
# then the first module will always proceed the second module.
|
||||
# Module order is not changed otherwise.
|
||||
|
|
|
@ -167,7 +167,7 @@ regenerate their corresponding table.</li>
|
|||
|
||||
<li>
|
||||
<b><tt>Uncombine.pl</tt></b> : a script that breaks up a single text file
|
||||
containing all of the timing data for all of the sites into a seperate
|
||||
containing all of the timing data for all of the sites into a separate
|
||||
file for each individual site.</li>
|
||||
|
||||
<li>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# big % differences
|
||||
|
||||
my $percent = 1; # anything over 1% of total is of interest to us
|
||||
my $ignoreDllLoads = 0; # by default dont ignore dll timings
|
||||
my $ignoreDllLoads = 0; # by default don't ignore dll timings
|
||||
|
||||
# Read in log to memory
|
||||
my @lines = <>;
|
||||
|
|
|
@ -1101,7 +1101,7 @@ void RemoveFromStartupFolder() {
|
|||
}
|
||||
}
|
||||
|
||||
if(theFilename) { //dont try if you can't get a reasonable guess to the path in the startup folder.
|
||||
if(theFilename) { //don't try if you can't get a reasonable guess to the path in the startup folder.
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//first, let's try to remove ourselves from the current users's startup folder...
|
||||
|
@ -1385,7 +1385,7 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpszArgs,in
|
|||
}
|
||||
|
||||
|
||||
if(!gUserPath[0]) { //dont override something they provide at the
|
||||
if(!gUserPath[0]) { //don't override something they provide at the
|
||||
if(cp){
|
||||
cp=strchr(cp,'['); //seek to the separator for the pathname (optional)
|
||||
if(cp && *cp) {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#
|
||||
# Predefined Categories
|
||||
# "All" - All allocations [default]
|
||||
# "uncategorized" - All allocations that dont match any category
|
||||
# "uncategorized" - All allocations that don't match any category
|
||||
#
|
||||
#
|
||||
# Suresh Duddi <dp@netscape.com>
|
||||
|
@ -445,4 +445,4 @@ js_
|
|||
# Everything else
|
||||
# ----------------------------------------------------------------------
|
||||
# <uncategorized>
|
||||
# This is a predefined category. Dont create it yourself.
|
||||
# This is a predefined category. Don't create it yourself.
|
||||
|
|
|
@ -246,7 +246,7 @@ NewCategoryNode(const char *catName, STCategoryNode * parent, STGlobals * g)
|
|||
/*
|
||||
** ProcessCategoryLeafRule
|
||||
**
|
||||
** Add this into the tree as a leaf node. It doesnt know who its parent is. For now we make
|
||||
** Add this into the tree as a leaf node. It doesn't know who its parent is. For now we make
|
||||
** root as its parent
|
||||
*/
|
||||
int
|
||||
|
@ -337,7 +337,7 @@ initCategories(STGlobals * g)
|
|||
|
||||
fp = fopen(g->mCommandLineOptions.mCategoryFile, "r");
|
||||
if (!fp) {
|
||||
/* It isnt an error to not have a categories file */
|
||||
/* It isn't an error to not have a categories file */
|
||||
REPORT_INFO("No categories file.");
|
||||
return -1;
|
||||
}
|
||||
|
@ -576,7 +576,7 @@ categorizeAllocation(STOptions * inOptions, STContext * inContext,
|
|||
aAllocation;
|
||||
|
||||
/*
|
||||
** Make sure run's stats are calculated. We dont go update the parents of allocation
|
||||
** Make sure run's stats are calculated. We don't go update the parents of allocation
|
||||
** at this time. That will happen when we focus on this category. This updating of
|
||||
** stats will provide us fast categoryreports.
|
||||
*/
|
||||
|
|
|
@ -586,7 +586,7 @@ pngSink(void *aContext, const char *aBuffer, int aLen)
|
|||
/*
|
||||
** FormatNumber
|
||||
**
|
||||
** Formats a number with thousands separator. Dont free the result. Returns
|
||||
** Formats a number with thousands separator. Don't free the result. Returns
|
||||
** static data.
|
||||
*/
|
||||
char *
|
||||
|
@ -5251,7 +5251,7 @@ contextLookup(STOptions * inOptions)
|
|||
|
||||
unlock = PR_TRUE;
|
||||
/*
|
||||
** Just a category change. We dont need to harvest. Just find the
|
||||
** Just a category change. We don't need to harvest. Just find the
|
||||
** right node and set the cache.mSortedRun. We need to recompute
|
||||
** cost though. But that is cheap.
|
||||
*/
|
||||
|
@ -5790,7 +5790,7 @@ handleClient(void *inArg)
|
|||
*/
|
||||
PR_fprintf(aFD, "HTTP/1.1 200 OK%s", crlf);
|
||||
PR_fprintf(aFD, "Server: %s%s",
|
||||
"$Id: spacetrace.c,v 1.50 2004-04-25 21:07:16 gerv%gerv.net Exp $",
|
||||
"$Id: spacetrace.c,v 1.51 2005-11-25 19:47:26 timeless%mozdev.org Exp $",
|
||||
crlf);
|
||||
PR_fprintf(aFD, "Content-type: ");
|
||||
if (NULL != strstr(start, ".png")) {
|
||||
|
@ -5810,7 +5810,7 @@ handleClient(void *inArg)
|
|||
}
|
||||
PR_fprintf(aFD, crlf);
|
||||
/*
|
||||
** One more to seperate headers from content.
|
||||
** One more to separate headers from content.
|
||||
*/
|
||||
PR_fprintf(aFD, crlf);
|
||||
/*
|
||||
|
|
|
@ -65,7 +65,7 @@ find . -type f -and \( -name \*.cpp -or -name \*.c -or -name \*.h \) > $ALLSOURC
|
|||
export IDMATCHFILE=$MYTMPDIR/idmatches.txt
|
||||
xargs -l grep -Hn $SEARCHING4 < $ALLSOURCEFILES > $IDMATCHFILE
|
||||
|
||||
# Seperate the variable names out of the matches.
|
||||
# Separate the variable names out of the matches.
|
||||
# We have the possibility here of having duplicates with differing names
|
||||
# or of having different CIDs with the same names here, but this is as
|
||||
# good as it gets for now.
|
||||
|
|
|
@ -1393,7 +1393,7 @@ nsExternalAppHandler::~nsExternalAppHandler()
|
|||
|
||||
NS_IMETHODIMP nsExternalAppHandler::SetWebProgressListener(nsIWebProgressListener2 * aWebProgressListener)
|
||||
{
|
||||
// this call back means we've succesfully brought up the
|
||||
// this call back means we've successfully brought up the
|
||||
// progress window so set the appropriate flag, even though
|
||||
// aWebProgressListener might be null
|
||||
|
||||
|
|
|
@ -1,662 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Example 8</title>
|
||||
<style>
|
||||
INPUT#input1 {
|
||||
font-size: large;
|
||||
}
|
||||
INPUT#input2 {
|
||||
font-size: medium;
|
||||
}
|
||||
TEXTAREA#textarea1 {
|
||||
width: 300px;
|
||||
height: 120px;
|
||||
font-size: large;
|
||||
}
|
||||
SELECT#select1 {
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
</style>
|
||||
<meta name="crc" content=230811735>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<H1>Example 8: Forms</H1>
|
||||
|
||||
<BR>
|
||||
<FORM METHOD="GET" ACTION="http://search.yahoo.com/bin/search" NAME="searchform">
|
||||
<div align=center><bold><font size=2>html 4 fieldset/legend</font></bold></div>
|
||||
<INPUT type=image src=raptor.jpg width=50 height=50 name=imageSubmit>
|
||||
<FIELDSET style="background-color: rgb(200, 220, 240); display: inline; border: 2px solid black; margin-left: 10px; padding: 10px;">
|
||||
<LEGEND style="background-color:rgb(180, 200, 220); border: 1px solid gray; padding: 0px;" align=left> Find it <b>Fast</b> </LEGEND>
|
||||
<INPUT type=text value=travel NAME="p" SIZE=15 MAXLENGTH=80 style="margin-right:10px; background-color: rgb(190, 190, 190);">
|
||||
<INPUT type=submit value="GO">
|
||||
<INPUT TYPE="HIDDEN" NAME="a" VALUE="n">
|
||||
</FIELDSET>
|
||||
<BR><BR>
|
||||
<div align=center><bold><font size=2>html 4 button</font></bold></div>
|
||||
<BUTTON type=submit style="background-image: url(bg.jpg)">
|
||||
<font size=4><B>This button contains a table
|
||||
<table border=3><TR border=1><TD>CELL 1</TD><TD>CELL 2<TD></TR>
|
||||
<TR><TD>CELL 3</TD><TD>CELL 4</TD></TR></table>
|
||||
and a background image.
|
||||
<BR>It will also submit the form.
|
||||
</B></font>
|
||||
</BUTTON>
|
||||
<BR>
|
||||
|
||||
</FORM>
|
||||
|
||||
<BR><BR>
|
||||
<FORM METHOD="POST" ACTION="http://www.mcp.com/cgi-bin/post-query" NAME="echo">
|
||||
<div align=center><bold><font size=2>html 4 labels</font></bold></div>
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for=radio1 style="margin-right: 5px;">radio 1 label</label></td>
|
||||
<td><input id=radio1 type=radio name=radio></td></tr>
|
||||
<tr>
|
||||
<td><label for=radio2 style="border: 1px solid blue; margin-right: 5px;">radio 2</label></td>
|
||||
<td><input id=radio2 type=radio name=radio></td></tr></table>
|
||||
<BR>
|
||||
<label><input type=checkbox name=check1 checked>checkbox 1</label>
|
||||
<BR>
|
||||
<label><input type=checkbox name=check2>checkbox 2</label>
|
||||
<BR><BR>
|
||||
<HR>
|
||||
<textarea name=a rows=4 cols=10 value="a textarea">a textarea</textarea>
|
||||
|
||||
<textarea name=a id=textarea1 value="a textarea">another textarea
|
||||
size, font set by css</textarea>
|
||||
a password: <INPUT TYPE="PASSWORD">
|
||||
<BR><BR>
|
||||
<select name=select2 id=select1 size=4 multiple>
|
||||
<option>option 1</option>
|
||||
<option>option 2</option>
|
||||
<option selected>option 3</option>
|
||||
<option>option 4</option>
|
||||
<option>option 5</option>
|
||||
<option>option 6</option>
|
||||
</select>
|
||||
<select name=select1 size=2>
|
||||
<option selected>option 1</option>
|
||||
<option>option 2</option>
|
||||
</select>
|
||||
<select name=select3 size=1>
|
||||
<option selected>option 1</option>
|
||||
<option>option 2</option>
|
||||
</select>
|
||||
<BR><BR>
|
||||
<input type=file size=20 name=file value=myfile> file content not being sent yet
|
||||
<BR>
|
||||
<input type=reset name=reset id=input2 value="RESET">
|
||||
<input type=submit id=input1 name=submit value="SUBMIT">
|
||||
<input type=image src=raptor.jpg width=50 height=50 name=imageSubmit> an image submit.
|
||||
</form>
|
||||
<BR>
|
||||
<HR>
|
||||
Disabled controls, the image submit should not submit the form.
|
||||
<BR>
|
||||
<FORM METHOD="GET" ACTION="http://search.yahoo.com/bin/search" NAME="searchform">
|
||||
<input type=text size=5 disabled> <input type=submit disabled>
|
||||
<INPUT type=image src=raptor.jpg width=50 height=50 name=imageSubmit disabled>
|
||||
<input type=checkbox disabled> <input type=radio disabled>
|
||||
<input type=reset disabled> <input type=file disabled>
|
||||
<BR>
|
||||
<textarea disabled>hello</textarea>  
|
||||
<select disabled>
|
||||
<option>one</option>
|
||||
<option>two</option>
|
||||
</select>
|
||||
</form>
|
||||
<BR>
|
||||
|
||||
<BR>
|
||||
<HR>
|
||||
Readonly controls
|
||||
<BR>
|
||||
<FORM>
|
||||
<input type=text readonly size=5 value=hello readonly> <input type=password value=foo disabled>
|
||||
<textarea readonly>bar</textarea>
|
||||
</form>
|
||||
<BR>
|
||||
|
||||
<HR>
|
||||
Additional tests -
|
||||
<A href=test8dom.html>changes through the DOM</A>,
|
||||
<A href=test8siz.html>sizing</A>,
|
||||
<A href=test8sca.html>scalability</A>,
|
||||
<A href=test8tab.html>tables</A>
|
||||
<BR>
|
||||
<HR>
|
||||
<h1>Select Tests</h1><br>
|
||||
<h2>Sizing Tests</h2>
|
||||
<form>
|
||||
<table border=1 style="background-color: rgb(192,192,192)">
|
||||
<tr>
|
||||
<td><center><b>Three option select no properties</b></center></td>
|
||||
<td><center><b>Three option select size=1</b></center></td>
|
||||
<td><center><b>Three option select size=2</b></center></td>
|
||||
<td><center><b>Three option select size=3</b></center></td>
|
||||
<td><center><b>Three option select size=4</b></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center><select><option>One</option><option>Two</option><option>Three</option></select></center></td>
|
||||
<td><center><select size=1><option>One</option><option>Two</option><option>Three</option></select></center></td>
|
||||
<td><center><select size=2><option>One</option><option>Two</option><option>Three</option></select></center></td>
|
||||
<td><center><select size=3><option>One</option><option>Two</option><option>Three</option></select></center></td>
|
||||
<td><center><select size=4><option>One</option><option>Two</option><option>Three</option></select></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>combobox box with three items in drop down</td>
|
||||
<td>combobox box with three items in drop down</td>
|
||||
<td>list box with three items, two items showing</td>
|
||||
<td>list box with three items, all three items showing</td>
|
||||
<td>list box with three items, all three items showing with one blank line</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
<select>
|
||||
<option>One</option>
|
||||
<option>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1>
|
||||
<option>One</option>
|
||||
<option>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=2>
|
||||
<option>One</option>
|
||||
<option>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=3>
|
||||
<option>One</option>
|
||||
<option>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=4>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Edge Case Tests</h2>
|
||||
<table border=1 style="background-color: rgb(192,192,192)">
|
||||
<tr>
|
||||
<td><center><b>Empty Select size=1</b></center></td>
|
||||
<td><center><b>Empty Select size=4</b></center></td>
|
||||
<td><center><b>Select size=1 - empty option</b></center></td>
|
||||
<td><center><b>Select size=1 - option has a single space</b></center></td>
|
||||
<td><center><b>Select size=1 - option has a return in the middle of it</b></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center><select size=1></select></center></td>
|
||||
<td><center><select size=4></select></center></td>
|
||||
<td><center><select size=1><option></option></select></center></td>
|
||||
<td><center><select size=1><option> </option></select></center></td>
|
||||
<td><center><select size=1><option>One
|
||||
Fish</option></select></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>You should see a combobox with an empty item drop down</td>
|
||||
<td>You should see a list box four items high and empty</td>
|
||||
<td>You should see one empty item in the dropdown</td>
|
||||
<td>You should see one empty item in the dropdown (the item should have single space)</td>
|
||||
<td>You should see one item in the dropdown, on one line</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=4>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1>
|
||||
<option></option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1>
|
||||
<option> </option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1>
|
||||
<option>One
|
||||
Fish</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Style Tests #1</h2>
|
||||
<table border=1 style="background-color: rgb(192,192,192)">
|
||||
<tr>
|
||||
<td><center><b>Select 5px Border (Combobox)</b></center></td>
|
||||
<td><center><b>Select 5px Border 5px Padding (Combobox)</b></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center><select size=1 style="border: outset 5px rgb(192,192,192)"><option>One</option><option>Two</option><option>Three</option></select></center></td>
|
||||
<td><center><select size=1 style="padding: 5px 5px 5px 5px;border: outset 5px rgb(192,192,192)"><option>One</option><option>Two</option><option>Three</option></select></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>You should see a combobox with large border</td>
|
||||
<td>You should see a combobox with large border and padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1 style="border: outset 5px rgb(192,192,192)">
|
||||
<option>One</option>
|
||||
<option>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1 style="padding: 5px 5px 5px 5px;
|
||||
border: outset 5px rgb(192,192,192)">
|
||||
<option>One</option>
|
||||
<option>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Style Tests #2</h2>
|
||||
<table border=1 style="background-color: rgb(192,192,192)">
|
||||
<tr>
|
||||
<td><center><b>Select 5px Border (ListBox)</b></center></td>
|
||||
<td><center><b>Select 5px Border 5px Padding (ListBox)</b></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center><select size=4 style="border: outset 5px rgb(192,192,192)"><option>One</option><option>Two</option><option>Three</option></select></center></td>
|
||||
<td><center><select size=4 style="padding: 5px 5px 5px 5px;border: outset 5px rgb(192,192,192)"><option>One</option><option>Two</option><option>Three</option></select></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>You should see a listbox with large border</td>
|
||||
<td>You should see a listbox with large border and padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=4 style="border: outset 5px rgb(192,192,192)">
|
||||
<option>One</option>
|
||||
<option>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=4 style="padding: 5px 5px 5px 5px;
|
||||
border: outset 5px rgb(192,192,192)">
|
||||
<option>One</option>
|
||||
<option>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Style Tests #3</h2>
|
||||
<table border=1 style="background-color: rgb(192,192,192)">
|
||||
<tr>
|
||||
<td><center><b>Select 5px Border, 5px Padding, 5px Margin (Combobox)</b></center></td>
|
||||
<td><center><b>Select with an a green option (Combobox)</b></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center><select size=1 style="margin: 5px;
|
||||
padding: 5px;
|
||||
border: outset 5px rgb(192,192,192);">
|
||||
<option>One</option><option>Two</option><option>Three</option>
|
||||
</select></center></td>
|
||||
<td><center><select size=1><option style="background-color: green;color:yellow;">One</option><option>Two</option><option>Three</option></select></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>You should see a combobox with large border and padding</td>
|
||||
<td>You should see a combobox with the first item is green with yellow text</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1 style="margin: 5px;
|
||||
padding: 5px;
|
||||
border: outset 5px rgb(192,192,192);">
|
||||
<option>One</option>
|
||||
<option>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1>
|
||||
<option style="background-color: green;color:yellow;">One</option>
|
||||
<option>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Style Tests #4</h2>
|
||||
<table border=1 style="background-color: rgb(192,192,192)">
|
||||
<tr>
|
||||
<td><center><b>Select 5px Border, 5px Padding, 5px Margin (Listbox)</b></center></td>
|
||||
<td><center><b>Select with an a green option (Listbox)</b></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center><select size=4 style="margin: 5px; padding: 5px; border: outset 5px rgb(192,192,192);"><option>One</option><option>Two</option><option>Three</option></select></center></td>
|
||||
<td><center><select size=4><option style="background-color: green;color:yellow;">One</option><option>Two</option><option>Three</option></select></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>You should see a listbox with large border and padding</td>
|
||||
<td>You should see a listbox with the first item is green with yellow text</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1 style="margin: 5px;
|
||||
padding: 5px;
|
||||
border: outset 5px rgb(192,192,192);">
|
||||
<option>One</option>
|
||||
<option>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1>
|
||||
<option style="background-color: green;color:yellow;">One</option>
|
||||
<option>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Style Tests #5</h2>
|
||||
<table border=1 style="background-color: rgb(192,192,192)">
|
||||
<tr>
|
||||
<td><center><b> Option has 1px Border, 1px Padding (Combobox)</b></center></td>
|
||||
<td><center><b> Option has 1px Border, 1px Padding (Listbox)</b></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center>
|
||||
<select size=1>
|
||||
<option>One</option>
|
||||
<option style="border: 1px outset rgb(192,192,192);padding: 1px;">Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</center></td>
|
||||
<td><center>
|
||||
<select size=4>
|
||||
<option>One</option>
|
||||
<option style="border: 1px outset rgb(192,192,192);padding: 1px;">Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>You should see a combobox with the second item having border and padding</td>
|
||||
<td>You should see a combobox with the second item having border and padding</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1>
|
||||
<option>One</option>
|
||||
<option style="border: 1px outset rgb(192,192,192);
|
||||
padding 1px;">Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=4>
|
||||
<option>One</option>
|
||||
<option style="border: 1px outset rgb(192,192,192);
|
||||
padding 1px;">Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Optgroup Test</h2>
|
||||
<table border=1 style="background-color: rgb(192,192,192)">
|
||||
<tr>
|
||||
<td><center><b>Select size=1 with Optgroup (Combobox)</b></center></td>
|
||||
<td><center><b>Select size=4 with Optgroup (Listbox)</b></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center>
|
||||
<select size=1>
|
||||
<optgroup label="China">
|
||||
<option>Keemun</option>
|
||||
<option>Yunnan</option>
|
||||
</optgroup>
|
||||
<optgroup label="India">
|
||||
<option>Assam</option>
|
||||
<option>Darjeeling</option>
|
||||
</optgroup>
|
||||
<optgroup label="Japan">
|
||||
<option>Gyokuro</option>
|
||||
<option>Hoji-cha</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</center></td>
|
||||
<td><center>
|
||||
<select size=4>
|
||||
<optgroup label="China">
|
||||
<option>Keemun</option>
|
||||
<option>Yunnan</option>
|
||||
</optgroup>
|
||||
<optgroup label="India">
|
||||
<option>Assam</option>
|
||||
<option>Darjeeling</option>
|
||||
</optgroup>
|
||||
<optgroup label="Japan">
|
||||
<option>Gyokuro</option>
|
||||
<option>Hoji-cha</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>You should see a Combobox with optgroups, where the optgroups are not selectable</td>
|
||||
<td>You should see a Listbox with optgroups, where the optgroups are not selectable</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1>
|
||||
<optgroup label="China">
|
||||
<option>Keemun</option>
|
||||
<option>Yunnan</option>
|
||||
</optgroup>
|
||||
<optgroup label="India">
|
||||
<option>Assam</option>
|
||||
<option>Darjeeling</option>
|
||||
</optgroup>
|
||||
<optgroup label="Japan">
|
||||
<option>Gyokuro</option>
|
||||
<option>Hoji-cha</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=4>
|
||||
<optgroup label="China">
|
||||
<option>Keemun</option>
|
||||
<option>Yunnan</option>
|
||||
</optgroup>
|
||||
<optgroup label="India">
|
||||
<option>Assam</option>
|
||||
<option>Darjeeling</option>
|
||||
</optgroup>
|
||||
<optgroup label="Japan">
|
||||
<option>Gyokuro</option>
|
||||
<option>Hoji-cha</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Disabled Option Test</h2>
|
||||
<table border=1 style="background-color: rgb(192,192,192)">
|
||||
<tr>
|
||||
<td><center><b>Select size=1 with Disabled option (Combobox)</b></center></td>
|
||||
<td><center><b>Select size=4 with Disabled option (Listbox)</b></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center>
|
||||
<select size=1>
|
||||
<option>One</option>
|
||||
<option disabled>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</center></td>
|
||||
<td><center>
|
||||
<select size=4>
|
||||
<option>One</option>
|
||||
<option disabled>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>You should see a Combobox with optgroups, the second item is non-selectable</td>
|
||||
<td>You should see a Listbox with optgroups, the second item is non-selectable</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1>
|
||||
<option>One</option>
|
||||
<option disabled>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=4>
|
||||
<option>One</option>
|
||||
<option disabled>Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<h2>Option Label Test</h2>
|
||||
<table border=1 style="background-color: rgb(192,192,192)">
|
||||
<tr>
|
||||
<td><center><b>Select size=1 with Option label (Combobox)</b></center></td>
|
||||
<td><center><b>Select size=4 with Option label (Listbox)</b></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center>
|
||||
<select size=1>
|
||||
<option>One</option>
|
||||
<option label="Label">Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</center></td>
|
||||
<td><center>
|
||||
<select size=4>
|
||||
<option>One</option>
|
||||
<option label="Label">Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>You should see a Combobox with optgroups, the second item's label should be "Label" (known bug because the label and contet shouldn't be appended)</td>
|
||||
<td>You should see a Listbox with optgroups, the second item's label should be "Label" (known bug because the label and contet shouldn't be appended)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=1>
|
||||
<option>One</option>
|
||||
<option label="Label">Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
<select size=4>
|
||||
<option>One</option>
|
||||
<option label="Label">Two</option>
|
||||
<option>Three</option>
|
||||
</select>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -30,7 +30,7 @@
|
|||
#
|
||||
# Contributor(s):
|
||||
# Robert Ginda <rginda@netscape.com>, Initial development.
|
||||
# Pavel Hlavnicka <pavel@gingerall.cz>, seperate tocs, param linking.
|
||||
# Pavel Hlavnicka <pavel@gingerall.cz>, separate tocs, param linking.
|
||||
# Petr Cimprich <petr@gingerall.cz>, nested frameset fix, encoded URLs.
|
||||
# Petr Cimprich <petr@gingerall.cz>, Mozilla sidebar generated from TOC
|
||||
#
|
||||
|
|
|
@ -65,7 +65,7 @@ my $NAMESPACE = ""; # "APIDOC";
|
|||
my $TAB = " ";
|
||||
my $indent_pfx = "";
|
||||
|
||||
die ("I said, dont use this script! Don't you read the comments?\n");
|
||||
die ("I said, don't use this script! Don't you read the comments?\n");
|
||||
|
||||
&parse_old_doc ();
|
||||
|
||||
|
|
|
@ -307,7 +307,7 @@ doeditmessage.cgi Perl. Edits one of the email messages that bonsai sends
|
|||
Calls:
|
||||
nobody
|
||||
|
||||
doeditprofile.cgi Perl. Edit peoples contact info. Left-over code from
|
||||
doeditprofile.cgi Perl. Edit people's contact info. Left-over code from
|
||||
before we started getting this info from LDAP.
|
||||
Called by:
|
||||
editprofile.cgi
|
||||
|
@ -345,7 +345,7 @@ editmessage.cgi Perl. Edits one of the email messages that bonsai sends
|
|||
Calls:
|
||||
doeditmessage.cgi
|
||||
|
||||
editprofile.cgi Perl. Edit peoples contact info. Left-over code from
|
||||
editprofile.cgi Perl. Edit people's contact info. Left-over code from
|
||||
before we started getting this info from LDAP.
|
||||
Called by:
|
||||
localprofile.cgi
|
||||
|
|
|
@ -776,7 +776,7 @@ sub _to_array {
|
|||
return ($thing);
|
||||
}
|
||||
|
||||
# Get all of the headers for a mail message, returned as a comma seperated
|
||||
# Get all of the headers for a mail message, returned as a comma separated
|
||||
# string, unless looking for a subject
|
||||
sub _GetMailHeaders {
|
||||
my ($mail_hdrs, $hdr) = @_;
|
||||
|
|
|
@ -1488,7 +1488,7 @@ the page footer, and C<0> otherwise.
|
|||
|
||||
=item C<identity>
|
||||
|
||||
Retruns a string for the identity of the user. This will be of the form
|
||||
Returns a string for the identity of the user. This will be of the form
|
||||
C<name E<lt>emailE<gt>> if the user has specified a name, and C<email>
|
||||
otherwise.
|
||||
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
|
||||
The Bugzilla Mail interface
|
||||
===========================
|
||||
|
||||
(UPDATE 03/14/00 to better reflect reality by SML)
|
||||
|
||||
The Bugzilla Mail interface allows to submit bugs to Bugzilla by email.
|
||||
|
||||
The Mail Interface Contribution consists of three files:
|
||||
README.Mailif - this readme.
|
||||
bug_email.pl - the script
|
||||
bugmail_help.html - a user help html site
|
||||
|
||||
Installation:
|
||||
|
||||
Next is to add a user who receives the bugmails, e. g. bugmail. Create a
|
||||
mail account and a home directory for the user.
|
||||
|
||||
The mailinterface script bug_email.pl needs to get the mail through stdin.
|
||||
I use procmail for that, with the following line in the .procmailrc:
|
||||
|
||||
BUGZILLA_HOME=/usr/local/httpd/htdocs/bugzilla
|
||||
:0 c
|
||||
|(cd $BUGZILLA_HOME/contrib; ./bug_email.pl)
|
||||
|
||||
This defines the Bugzilla directory as the variable BUGZILLA_HOME and passes
|
||||
all incoming mail to the script after cd'ing into the bugzilla home.
|
||||
|
||||
In some cases, it is necessary to alter the headers of incoming email. The
|
||||
additional line to procmail :
|
||||
|
||||
:0 fhw
|
||||
| formail -I "From " -a "From "
|
||||
|
||||
fixes many problems.
|
||||
|
||||
See bugzilla.procmailrc for a sample procmailrc that works for me (SML) and
|
||||
also deals with bugzilla_email_append.pl
|
||||
|
||||
Customation:
|
||||
|
||||
There are some values inside the script which need to be customized for your
|
||||
needs:
|
||||
|
||||
1. In sub-routine Reply (search 'sub Reply':
|
||||
there is the line
|
||||
print MAIL "From: Bugzilla Mailinterface<yourmail\@here.com>\n";
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
Fill in your correct mail here. That will make it easy for people to reply
|
||||
to the mail.
|
||||
|
||||
2. check, if your sendmail resides in /usr/sbin/sendmail, change the path if neccessary.
|
||||
Search the script after 'default' - you find some default-Settings for bug
|
||||
reports, which are used, if the sender did not send a field for it. The defaults
|
||||
should be checked and changed.
|
||||
|
||||
Thats hopefully all, we will come up with any configuration file or something.
|
||||
|
||||
|
||||
If your mail works, your script will insert mails from now on.
|
||||
|
||||
The mailinterface supports two commandline switches:
|
||||
|
||||
There are two command line switches :
|
||||
|
||||
-t: Testmode
|
||||
The mailinterface does not really insert the bug into the database, but
|
||||
writes some debug output to stdout and writes the mail into the file
|
||||
bug_email_test.log in the data-dir.
|
||||
|
||||
-r: restricted mode
|
||||
All lines before the first line with a keyword character are skipped.
|
||||
In not restricted, default mode, these lines are added to the long
|
||||
description of the bug.
|
||||
|
||||
|
||||
02/2000 - Klaas Freitag, SuSE GmbH <freitag@suse.de>
|
||||
03/2000 - Seth M. Landsman <seth@cs.brandeis.edu>
|
||||
bug_email.pl now lives out of bugzilla/contrib
|
||||
added line about formail
|
|
@ -38,7 +38,7 @@
|
|||
#
|
||||
# You need to work with bug_email.pl the MIME::Parser installed.
|
||||
#
|
||||
# $Id: bug_email.pl,v 1.29 2005-08-26 23:11:32 bugreport%peshkin.net Exp $
|
||||
# $Id: bug_email.pl,v 1.30 2005-11-25 19:47:38 timeless%mozdev.org Exp $
|
||||
###############################################################
|
||||
|
||||
# 02/12/2000 (SML)
|
||||
|
@ -193,7 +193,7 @@ sub horLine( )
|
|||
# Check if $Name is in $GroupName
|
||||
|
||||
# This is no more CreateBugs group, so I'm using this routine to just determine if the user is
|
||||
# in the database. Eventually, here should be a seperate routine or renamed, or something (SML)
|
||||
# in the database. Eventually, here should be a separate routine or renamed, or something (SML)
|
||||
sub CheckPermissions {
|
||||
my ($GroupName, $Name) = @_;
|
||||
|
||||
|
@ -451,7 +451,7 @@ sub FetchAllSQLData( )
|
|||
# 0 - Its an error, but bugzilla can process the bug. The user should
|
||||
# handle that as a warning.
|
||||
#
|
||||
# 1 - Its a real bug. Bugzilla cant store the bug. The mail has to be
|
||||
# 1 - It's a real bug. Bugzilla can't store the bug. The mail has to be
|
||||
# resent.
|
||||
#
|
||||
# 2 - Permission error: The user does not have the permission to send
|
||||
|
@ -465,7 +465,7 @@ sub BugMailError($ $ )
|
|||
{
|
||||
my ( $errflag, $text ) = @_;
|
||||
|
||||
# On permission error, dont sent all other Errors back -> just quit !
|
||||
# On permission error, don't sent all other Errors back -> just quit !
|
||||
if( $errflag == 2 ) { # Permission-Error
|
||||
Reply( $SenderShort, $Message_ID, "Bugzilla Error", "Permission denied.\n\n" .
|
||||
"You do not have the permissions to create a new bug. Sorry.\n" );
|
||||
|
@ -677,7 +677,7 @@ sub extractControls( $ )
|
|||
}
|
||||
}
|
||||
|
||||
# thats it.
|
||||
# that's it.
|
||||
return( $backbody );
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ You receive a reply mail with the new bug-ID if your request was ok.
|
|||
If not, you get a mail with
|
||||
some help on the bugmail system and a specific analysis of your request.
|
||||
<P>
|
||||
Please dont refuse to send one or two wrong mails, you will get all the information
|
||||
Please don't refuse to send one or two wrong mails, you will get all the information
|
||||
you need in the replies, and <I>only</I> in the mail replies. The information on this
|
||||
page, concerning available products, versions and so on, is not dynamicly generated and
|
||||
may be old therefore.
|
||||
|
@ -91,23 +91,23 @@ hopefully valid value.
|
|||
<TR>
|
||||
<TD>@rep_platform</TD>
|
||||
<TD>The desired platform</TD>
|
||||
<TD>no.<br>If you dont give a value, this field is set to <I>All</I>.</TD>
|
||||
<TD>no.<br>If you don't give a value, this field is set to <I>All</I>.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>@bug_severity</TD>
|
||||
<TD>The severity of the bug</TD>
|
||||
<TD>no. <br> If you dont give a value, this field is set to
|
||||
<TD>no. <br> If you don't give a value, this field is set to
|
||||
<I>normal</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>@priority</TD>
|
||||
<TD>The priority of the bug</TD>
|
||||
<TD>no.<br>If you dont give a value, this field is set to <I>P3</I></TD>
|
||||
<TD>no.<br>If you don't give a value, this field is set to <I>P3</I></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>@op_sys</TD>
|
||||
<TD>The operating system</TD>
|
||||
<TD>no.<br>If you dont give a value, this field is set to <I>Linux</I>.</TD>
|
||||
<TD>no.<br>If you don't give a value, this field is set to <I>Linux</I>.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>@assigned_to</TD>
|
||||
|
@ -150,7 +150,7 @@ Give string values for the most keys above. Some keywords require special value
|
|||
<ol>
|
||||
<li>E-Mail adresses: If you want to set the qa-contact, specify a email-adress for @qa_contact. The email must be known by bugzilla of course.</li>
|
||||
<li>Listvalues: Most of the values have to be one of a list of valid values. Try by sending
|
||||
a mail and read the reply. Skip fields if you dont get help for them unless you dont know
|
||||
a mail and read the reply. Skip fields if you don't get help for them unless you don't know
|
||||
which values you may choose.</li>
|
||||
<li>free Text: The descriptions may be free text. </li>
|
||||
<li>Special: The field groupset may be specified in different in three different kinds:
|
||||
|
@ -181,7 +181,7 @@ Some of the values must be choosen from a list:<br>
|
|||
<p>
|
||||
|
||||
After you have specified the required keywords and maybe some other value, you may
|
||||
describe your bug. You dont need a keyword for starting your bug description. All
|
||||
describe your bug. You don't need a keyword for starting your bug description. All
|
||||
text which follows the keyword block is handled as long description of the bug.
|
||||
<p>
|
||||
|
||||
|
@ -198,7 +198,7 @@ the attachment in bugzilla.
|
|||
|
||||
<H1><A NAME="examplemail">Example Mail</A></H1>
|
||||
|
||||
See the example of the mail <b>body</b> (Dont forget to specify the short description
|
||||
See the example of the mail <b>body</b> (Don't forget to specify the short description
|
||||
in the mail subject):<hr><pre>
|
||||
|
||||
@product = Bugzilla
|
||||
|
|
|
@ -270,7 +270,7 @@ def load_responsible(fname):
|
|||
rfp.close()
|
||||
|
||||
def split_csl(list):
|
||||
""" Split a comma seperated list """
|
||||
""" Split a comma separated list """
|
||||
newlist = re.split(r"""\s*,\s*""", list)
|
||||
return newlist
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ if (((defined $cgi->param('id') && $cgi->param('product') ne $oldproduct)
|
|||
my %defaults;
|
||||
# We set the defaults to these fields to the old value,
|
||||
# if its a valid option, otherwise we use the default where
|
||||
# thats appropriate
|
||||
# that's appropriate
|
||||
$vars->{'versions'} = $::versions{$prod};
|
||||
if ($vok) {
|
||||
$defaults{'version'} = $cgi->param('version');
|
||||
|
|
|
@ -97,7 +97,7 @@ for my $msg (sort { $a <=> $b } $folder->message_list) {
|
|||
$summary = $summary . $_ while (defined($_ = $IO->getline));
|
||||
$IO->close;
|
||||
if ( $entity->parts(0)->head->mime_type =~ /text\/plain/ ) {
|
||||
# line beginning with -- is a signature seperator. Delete the sig
|
||||
# line beginning with -- is a signature separator. Delete the sig
|
||||
$summary =~ s/^--.*//ms;
|
||||
$summary =~ s/&/&/g;
|
||||
$summary =~ s/</</mg;
|
||||
|
|
|
@ -779,7 +779,7 @@ sub _to_array {
|
|||
return ($thing);
|
||||
}
|
||||
|
||||
# Get all of the headers for a mail message, returned as a comma seperated
|
||||
# Get all of the headers for a mail message, returned as a comma separated
|
||||
# string, unless looking for a subject
|
||||
sub _GetMailHeaders {
|
||||
my ($mail_hdrs, $hdr) = @_;
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
# customizable settings.
|
||||
|
||||
|
||||
# $Revision: 1.52 $
|
||||
# $Date: 2004-08-07 13:12:09 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Revision: 1.53 $
|
||||
# $Date: 2005-11-25 19:47:47 $
|
||||
# $Author: timeless%mozdev.org $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/default_conf/TinderConfig.pm,v $
|
||||
# $Name: $
|
||||
|
||||
|
@ -421,11 +421,11 @@ $P4DB_URL = "http://public.perforce.com/cgi-bin/p4db";
|
|||
$P4PORT = 'perforce.yourcompany.com:1666';
|
||||
|
||||
# If we are using PVCS we need to specify the user who will extract
|
||||
# the data from the Oracle database and a data seperator which will
|
||||
# the data from the Oracle database and a data separator which will
|
||||
# not appear in any dataset.
|
||||
|
||||
$VC_PVCS_USER = 'tinderbox/tinderbox';
|
||||
$VC_PVCS_SEPERATOR = '___///___';
|
||||
$VC_PVCS_SEPARATOR = '___///___';
|
||||
|
||||
# If you your using BT_Generic we need to know how to make HTML
|
||||
# to point to the bug tracking CGI programs.
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
# Contributor(s):
|
||||
|
||||
|
||||
# $Revision: 1.1 $
|
||||
# $Date: 2003-12-23 13:24:29 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Revision: 1.2 $
|
||||
# $Date: 2005-11-25 19:47:47 $
|
||||
# $Author: timeless%mozdev.org $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/lib/PVCSGetData.pm,v $
|
||||
# $Name: $
|
||||
|
||||
|
@ -42,7 +42,7 @@ use Time::Local;
|
|||
|
||||
|
||||
$SQL_USER = $TinderConfig::VC_PVCS_USER || 'tinderbox/tinderbox';
|
||||
$SEP = $TinderConfig::VC_PVCS_SEPERATOR || '___///___';
|
||||
$SEP = $TinderConfig::VC_PVCS_SEPARATOR || '___///___';
|
||||
|
||||
sub time2pvcsFormat {
|
||||
# convert time() format to the format which appears in perforce output
|
||||
|
|
|
@ -40,9 +40,9 @@
|
|||
|
||||
|
||||
|
||||
# $Revision: 1.8 $
|
||||
# $Date: 2003-08-17 01:37:52 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Revision: 1.9 $
|
||||
# $Date: 2005-11-25 19:47:48 $
|
||||
# $Author: timeless%mozdev.org $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/lib/TinderDB/BT_Req.pm,v $
|
||||
# $Name: $
|
||||
|
||||
|
@ -80,7 +80,7 @@ use VCDisplay;
|
|||
|
||||
|
||||
|
||||
$VERSION = ( qw $Revision: 1.8 $ )[1];
|
||||
$VERSION = ( qw $Revision: 1.9 $ )[1];
|
||||
|
||||
@ISA = qw(TinderDB::BasicTxtDB);
|
||||
|
||||
|
@ -347,7 +347,7 @@ sub status_table_row {
|
|||
|
||||
foreach $status (keys %{ $DATABASE{$tree}{$time} }) {
|
||||
|
||||
# do not display bugs whos status_progres is null, these have
|
||||
# do not display bugs whose status_progress is null, these have
|
||||
# been deemed uninteresting.
|
||||
|
||||
($ReqData::STATUS_PROGRESS{$status}) ||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
# as a Dump of the $DATABASE reference.
|
||||
|
||||
|
||||
# $Revision: 1.12 $
|
||||
# $Date: 2003-08-17 01:45:10 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Revision: 1.13 $
|
||||
# $Date: 2005-11-25 19:47:48 $
|
||||
# $Author: timeless%mozdev.org $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/lib/TinderDB/BasicTxtDB.pm,v $
|
||||
# $Name: $
|
||||
|
||||
|
@ -48,7 +48,7 @@ use FileStructure;
|
|||
use Persistence;
|
||||
|
||||
|
||||
$VERSION = ( qw $Revision: 1.12 $ )[1];
|
||||
$VERSION = ( qw $Revision: 1.13 $ )[1];
|
||||
|
||||
|
||||
# To help preserve the database in the event of a serious system
|
||||
|
@ -127,7 +127,7 @@ sub readdir_file_prefix {
|
|||
|
||||
# return the list of all files in $dir which begin with the prefix
|
||||
# $prefix in sorted (ascii' betically) order. This is important since
|
||||
# we often deal with files whos suffix is time().$pid.
|
||||
# we often deal with files whose suffix is time().$pid.
|
||||
|
||||
my ($self, $dir, $prefix) = @_;
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
# the build was and display a link to the build log.
|
||||
|
||||
|
||||
# $Revision: 1.67 $
|
||||
# $Date: 2003-08-17 16:05:42 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Revision: 1.68 $
|
||||
# $Date: 2005-11-25 19:47:48 $
|
||||
# $Author: timeless%mozdev.org $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/lib/TinderDB/Build.pm,v $
|
||||
# $Name: $
|
||||
|
||||
|
@ -87,11 +87,11 @@
|
|||
|
||||
|
||||
# $DATABASE{$tree}{$buildname}{'recent_success'}
|
||||
# If the build is broken it is the first sucessful build following
|
||||
# If the build is broken it is the first successful build following
|
||||
# the minumum of all earliest_failures.
|
||||
|
||||
# $DATABASE{$tree}{$buildname}{'average_buildtime'}
|
||||
# the average time a sucessful build takes(in seconds).
|
||||
# the average time a successful build takes(in seconds).
|
||||
|
||||
# $DATABASE{$tree}{$buildname}{'average_deadtime'}
|
||||
# the average deadtime (in seconds).
|
||||
|
|
|
@ -38,9 +38,9 @@
|
|||
# Contributor(s):
|
||||
|
||||
|
||||
# $Revision: 1.70 $
|
||||
# $Date: 2004-06-08 04:27:13 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Revision: 1.71 $
|
||||
# $Date: 2005-11-25 19:47:48 $
|
||||
# $Author: timeless%mozdev.org $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/lib/TinderDB/VC_Bonsai.pm,v $
|
||||
# $Name: $
|
||||
|
||||
|
@ -105,7 +105,7 @@ use HTMLPopUp;
|
|||
use VCDisplay;
|
||||
|
||||
|
||||
$VERSION = ( qw $Revision: 1.70 $ )[1];
|
||||
$VERSION = ( qw $Revision: 1.71 $ )[1];
|
||||
|
||||
@ISA = qw(TinderDB::BasicTxtDB);
|
||||
|
||||
|
@ -310,9 +310,9 @@ sub apply_db_updates {
|
|||
# Data::Dumper takes a long time and reducing the data that it needs
|
||||
# to process really helps speed things up.
|
||||
|
||||
# If we delete too many duplicates then we loose information when
|
||||
# the database is trimmed. We need to keep some duplicates arround
|
||||
# for debuging and for "redundancy". Only delete duplicates during
|
||||
# If we delete too many duplicates then we lose information when
|
||||
# the database is trimmed. We need to keep some duplicates around
|
||||
# for debugging and for "redundancy". Only delete duplicates during
|
||||
# the last hour. Notice we are still removing 90% of the
|
||||
# duplicates.
|
||||
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
# mozilla/webtools/tinderbox2/Contact file.
|
||||
# Contributor(s):
|
||||
|
||||
# $Revision: 1.35 $
|
||||
# $Date: 2003-08-17 01:37:53 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Revision: 1.36 $
|
||||
# $Date: 2005-11-25 19:47:48 $
|
||||
# $Author: timeless%mozdev.org $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/lib/TinderDB/VC_CVS.pm,v $
|
||||
# $Name: $
|
||||
|
||||
|
@ -137,7 +137,7 @@ use TreeData;
|
|||
use VCDisplay;
|
||||
|
||||
|
||||
$VERSION = ( qw $Revision: 1.35 $ )[1];
|
||||
$VERSION = ( qw $Revision: 1.36 $ )[1];
|
||||
|
||||
@ISA = qw(TinderDB::BasicTxtDB);
|
||||
|
||||
|
@ -432,9 +432,9 @@ sub apply_db_updates {
|
|||
# Data::Dumper takes a long time and reducing the data that it needs
|
||||
# to process really helps speed things up.
|
||||
|
||||
# If we delete too many duplicates then we loose information when
|
||||
# the database is trimmed. We need to keep some duplicates arround
|
||||
# for debuging and for "redundancy". Only delete duplicates during
|
||||
# If we delete too many duplicates then we lose information when
|
||||
# the database is trimmed. We need to keep some duplicates around
|
||||
# for debugging and for "redundancy". Only delete duplicates during
|
||||
# the last hour. Notice we are still removing 90% of the
|
||||
# duplicates.
|
||||
|
||||
|
|
|
@ -63,9 +63,9 @@
|
|||
# Contributor(s):
|
||||
|
||||
|
||||
# $Revision: 1.2 $
|
||||
# $Date: 2003-12-27 21:16:26 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Revision: 1.3 $
|
||||
# $Date: 2005-11-25 19:47:48 $
|
||||
# $Author: timeless%mozdev.org $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/lib/TinderDB/VC_PVCSDimensions.pm,v $
|
||||
# $Name: $
|
||||
|
||||
|
@ -131,7 +131,7 @@ use Utils;
|
|||
use VCDisplay;
|
||||
|
||||
|
||||
$VERSION = ( qw $Revision: 1.2 $ )[1];
|
||||
$VERSION = ( qw $Revision: 1.3 $ )[1];
|
||||
|
||||
@ISA = qw(TinderDB::BasicTxtDB);
|
||||
|
||||
|
@ -394,9 +394,9 @@ sub apply_db_updates {
|
|||
# Data::Dumper takes a long time and reducing the data that it needs
|
||||
# to process really helps speed things up.
|
||||
|
||||
# If we delete too many duplicates then we loose information when
|
||||
# the database is trimmed. We need to keep some duplicates arround
|
||||
# for debuging and for "redundancy". Only delete duplicates during
|
||||
# If we delete too many duplicates then we lose information when
|
||||
# the database is trimmed. We need to keep some duplicates around
|
||||
# for debugging and for "redundancy". Only delete duplicates during
|
||||
# the last hour. Notice we are still removing 90% of the
|
||||
# duplicates.
|
||||
|
||||
|
|
|
@ -75,9 +75,9 @@
|
|||
# Contributor(s):
|
||||
|
||||
|
||||
# $Revision: 1.29 $
|
||||
# $Date: 2004-07-18 17:57:06 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Revision: 1.30 $
|
||||
# $Date: 2005-11-25 19:47:48 $
|
||||
# $Author: timeless%mozdev.org $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/lib/TinderDB/VC_Perforce.pm,v $
|
||||
# $Name: $
|
||||
|
||||
|
@ -156,7 +156,7 @@ use Utils;
|
|||
use VCDisplay;
|
||||
|
||||
|
||||
$VERSION = ( qw $Revision: 1.29 $ )[1];
|
||||
$VERSION = ( qw $Revision: 1.30 $ )[1];
|
||||
|
||||
@ISA = qw(TinderDB::BasicTxtDB);
|
||||
|
||||
|
@ -936,9 +936,9 @@ sub apply_db_updates {
|
|||
# Data::Dumper takes a long time and reducing the data that it needs
|
||||
# to process really helps speed things up.
|
||||
|
||||
# If we delete too many duplicates then we loose information when
|
||||
# the database is trimmed. We need to keep some duplicates arround
|
||||
# for debuging and for "redundancy". Only delete duplicates during
|
||||
# If we delete too many duplicates then we lose information when
|
||||
# the database is trimmed. We need to keep some duplicates around
|
||||
# for debugging and for "redundancy". Only delete duplicates during
|
||||
# the last hour. Notice we are still removing 90% of the
|
||||
# duplicates.
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
# a programmer. Be sure to test the None.pm module as well as the
|
||||
# other VC Modules.
|
||||
|
||||
# $Revision: 1.5 $
|
||||
# $Date: 2003-08-17 00:57:38 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Revision: 1.6 $
|
||||
# $Date: 2005-11-25 19:47:48 $
|
||||
# $Author: timeless%mozdev.org $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/test/vcdisplay.tst,v $
|
||||
# $Name: $
|
||||
#
|
||||
|
@ -104,11 +104,11 @@ sub print_tests {
|
|||
my $url;
|
||||
my $out;
|
||||
|
||||
my $seperator = ("-" x 30)."\n\n\n";
|
||||
my $separator = ("-" x 30)."\n\n\n";
|
||||
|
||||
|
||||
$out .= "Simulation of processmail_build call\n";
|
||||
$out .= $seperator;
|
||||
$out .= $separator;
|
||||
|
||||
%args = (
|
||||
'tree' => 'Project_A',
|
||||
|
@ -136,7 +136,7 @@ sub print_tests {
|
|||
|
||||
|
||||
$out .= "Simulation of VC column call\n";
|
||||
$out .= $seperator;
|
||||
$out .= $separator;
|
||||
|
||||
%args = (
|
||||
'tree' => 'Project_A',
|
||||
|
@ -149,7 +149,7 @@ sub print_tests {
|
|||
$out .= print_test($url, %args);
|
||||
|
||||
$out .= "Simulation of time column call\n";
|
||||
$out .= $seperator;
|
||||
$out .= $separator;
|
||||
|
||||
%args = (
|
||||
'tree' => 'Project_A',
|
||||
|
|
|
@ -64,7 +64,7 @@ DIRS += windows build
|
|||
endif
|
||||
|
||||
#
|
||||
# Dont build the DSO under the 'build' directory as windows does.
|
||||
# Don't build the DSO under the 'build' directory as windows does.
|
||||
#
|
||||
# The DSOs get built in the toolkit dir itself. Do this so that
|
||||
# multiple implementations of widget can be built on the same
|
||||
|
|
|
@ -1151,7 +1151,7 @@ NS_IMETHODIMP nsWidget::InvalidateRegion(const nsIRegion *aRegion, PRBool aIsSyn
|
|||
}
|
||||
}
|
||||
|
||||
// drop the const.. whats the right thing to do here?
|
||||
// drop the const.. what's the right thing to do here?
|
||||
((nsIRegion*)aRegion)->FreeRects(regionRectSet);
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -1273,7 +1273,7 @@ GdkCursor *nsWindow::GtkCreateCursor(nsCursor aCursorType)
|
|||
break;
|
||||
}
|
||||
|
||||
/* if by now we dont have a xcursor, this means we have to make a custom one */
|
||||
/* if by now we don't have a xcursor, this means we have to make a custom one */
|
||||
if (newType != 0xff) {
|
||||
gdk_color_parse("#000000", &fg);
|
||||
gdk_color_parse("#ffffff", &bg);
|
||||
|
|
|
@ -471,7 +471,7 @@ nsClipboard::SelectionGetEvent (GtkWidget *aWidget,
|
|||
else if (aSelectionData->selection == GDK_SELECTION_CLIPBOARD)
|
||||
whichClipboard = kGlobalClipboard;
|
||||
else
|
||||
return; // THAT AINT NO CLIPBOARD I EVER HEARD OF
|
||||
return; // THAT AIN'T NO CLIPBOARD I EVER HEARD OF
|
||||
|
||||
nsCOMPtr<nsITransferable> trans = GetTransferable(whichClipboard);
|
||||
|
||||
|
@ -572,7 +572,7 @@ nsClipboard::SelectionClearEvent (GtkWidget *aWidget,
|
|||
else if (aEvent->selection == GDK_SELECTION_CLIPBOARD)
|
||||
whichClipboard = kGlobalClipboard;
|
||||
else
|
||||
return; // THAT AINT NO CLIPBOARD I EVER HEARD OF
|
||||
return; // THAT AIN'T NO CLIPBOARD I EVER HEARD OF
|
||||
|
||||
EmptyClipboard(whichClipboard);
|
||||
}
|
||||
|
|
|
@ -3574,7 +3574,7 @@ get_gtk_cursor(nsCursor aCursor)
|
|||
break;
|
||||
}
|
||||
|
||||
// if by now we dont have a xcursor, this means we have to make a
|
||||
// if by now we don't have a xcursor, this means we have to make a
|
||||
// custom one
|
||||
if (newType != 0xff) {
|
||||
gdk_color_parse("#000000", &fg);
|
||||
|
|
|
@ -592,7 +592,7 @@ nsFilePicker::PutLocalFile(const nsString& inTitle, const nsString& inDefaultNam
|
|||
else
|
||||
{
|
||||
dialogCreateOptions.optionFlags &= ~kNavAllowStationery; // remove Stationery option
|
||||
creatorToSave = kNavGenericSignature; // This supresses the default format menu items
|
||||
creatorToSave = kNavGenericSignature; // This suppresses the default format menu items
|
||||
SetupFormatMenuItems(&dialogCreateOptions);
|
||||
}
|
||||
|
||||
|
|
|
@ -687,7 +687,7 @@ void nsWindow::RawDrawFunc( PtWidget_t * pWidget, PhTile_t * damage )
|
|||
PtWidgetOffset(pWidget, &offset);
|
||||
/* Build a List of Tiles that might be in front of me.... */
|
||||
PhTile_t *new_damage, *clip_tiles, *intersect;
|
||||
/* Intersect the Damage tile list w/ the clipped out list and see whats left! */
|
||||
/* Intersect the Damage tile list w/ the clipped out list and see what's left! */
|
||||
new_damage = PhRectsToTiles(&damage->rect, 1);
|
||||
PhDeTranslateTiles(new_damage, &offset);
|
||||
clip_tiles = GetWindowClipping( pWidget );
|
||||
|
|
|
@ -5829,7 +5829,7 @@ PRBool nsWindow::DispatchMouseEvent(PRUint32 aEventType, WPARAM wParam, nsPoint*
|
|||
PRBool insideMovementThreshold = (abs(gLastMousePoint.x - mp.x) < (short)::GetSystemMetrics(SM_CXDOUBLECLK)) &&
|
||||
(abs(gLastMousePoint.y - mp.y) < (short)::GetSystemMetrics(SM_CYDOUBLECLK));
|
||||
|
||||
// Supress mouse moves caused by widget creation
|
||||
// Suppress mouse moves caused by widget creation
|
||||
if ((aEventType == NS_MOUSE_MOVE) &&
|
||||
(gLastMouseMovePoint.x == mp.x) &&
|
||||
(gLastMouseMovePoint.y == mp.y))
|
||||
|
|
|
@ -411,7 +411,7 @@ NS_IMETHODIMP nsAppShell::ListenToEventQueue(nsIEventQueue *aQueue,
|
|||
HandleQueueXtProc,
|
||||
(XtPointer)mEventQueue);
|
||||
|
||||
/* This hack would not be neccesary if we would have a hashtable function
|
||||
/* This hack would not be necessary if we would have a hashtable function
|
||||
* which returns success/failure in a separate var ...
|
||||
*/
|
||||
#define NEVER_BE_ZERO_MAGIC (54321)
|
||||
|
@ -869,7 +869,7 @@ nsAppShell::HandleKeyPressEvent(XEvent *event, nsWidget *aWidget)
|
|||
break;
|
||||
}
|
||||
|
||||
// Dont dispatch events for modifier keys pressed ALONE
|
||||
// Don't dispatch events for modifier keys pressed ALONE
|
||||
if (nsKeyCode::KeyCodeIsModifier(event->xkey.keycode))
|
||||
{
|
||||
return;
|
||||
|
@ -942,7 +942,7 @@ nsAppShell::HandleKeyReleaseEvent(XEvent *event, nsWidget *aWidget)
|
|||
break;
|
||||
}
|
||||
|
||||
// Dont dispatch events for modifier keys pressed ALONE
|
||||
// Don't dispatch events for modifier keys pressed ALONE
|
||||
if (nsKeyCode::KeyCodeIsModifier(event->xkey.keycode))
|
||||
{
|
||||
return;
|
||||
|
@ -1214,7 +1214,7 @@ void nsAppShell::HandleDragDropEvent(XEvent *event, nsWidget *aWidget) {
|
|||
nsresult rv;
|
||||
nsCOMPtr<nsIDragService> dragService( do_GetService(kCDragServiceCID, &rv) );
|
||||
|
||||
// FIXME: Dont think the currentlyDragging check is required. KenF
|
||||
// FIXME: Don't think the currentlyDragging check is required. KenF
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsIDragSessionXlib> dragServiceXlib;
|
||||
dragServiceXlib = do_QueryInterface(dragService);
|
||||
|
|
|
@ -363,7 +363,7 @@ nsWidget::StandardWidgetCreate(nsIWidget *aParent,
|
|||
NS_IMETHODIMP nsWidget::Destroy()
|
||||
{
|
||||
|
||||
// Dont reenter.
|
||||
// Don't reenter.
|
||||
if (mIsDestroying)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -724,7 +724,7 @@ NS_IMETHODIMP nsWidget::SetCursor(nsCursor aCursor)
|
|||
if (!mBaseWindow)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
/* don't bother setting if it it isnt mapped, duh */
|
||||
/* don't bother setting if it it isn't mapped, duh */
|
||||
if (!mMapped)
|
||||
return NS_OK;
|
||||
|
||||
|
@ -1464,7 +1464,7 @@ Cursor nsWidget::XlibCreateCursor(nsCursor aCursorType)
|
|||
break;
|
||||
}
|
||||
|
||||
/* if by now we dont have a xcursor, this means we have to make a custom one */
|
||||
/* if by now we don't have a xcursor, this means we have to make a custom one */
|
||||
if (!xcursor) {
|
||||
NS_ASSERTION(newType != 0xff, "Unknown cursor type and no standard cursor");
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ PR_STATIC_CALLBACK(void)
|
|||
factory_ClearEntry(PLDHashTable *aTable, PLDHashEntryHdr *aHdr)
|
||||
{
|
||||
nsFactoryTableEntry* entry = NS_STATIC_CAST(nsFactoryTableEntry*, aHdr);
|
||||
// nsFactoryEntry is arena allocated. So we dont delete it.
|
||||
// nsFactoryEntry is arena allocated. So we don't delete it.
|
||||
// We call the destructor by hand.
|
||||
entry->mFactoryEntry->~nsFactoryEntry();
|
||||
PL_DHashClearEntryStub(aTable, aHdr);
|
||||
|
@ -336,7 +336,7 @@ contractID_ClearEntry(PLDHashTable *aTable, PLDHashEntryHdr *aHdr)
|
|||
if (entry->mFactoryEntry->mTypeIndex == NS_COMPONENT_TYPE_SERVICE_ONLY &&
|
||||
entry->mFactoryEntry->mCid.Equals(kEmptyCID)) {
|
||||
// this object is owned by the hash.
|
||||
// nsFactoryEntry is arena allocated. So we dont delete it.
|
||||
// nsFactoryEntry is arena allocated. So we don't delete it.
|
||||
// We call the destructor by hand.
|
||||
entry->mFactoryEntry->~nsFactoryEntry();
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ nsFactoryEntry::~nsFactoryEntry(void)
|
|||
// Release any service reference
|
||||
mServiceObject = nsnull;
|
||||
|
||||
// nsFactoryEntry is arena allocated. So we dont delete it.
|
||||
// nsFactoryEntry is arena allocated. So we don't delete it.
|
||||
// We call the destructor by hand.
|
||||
if (mParent)
|
||||
mParent->~nsFactoryEntry();
|
||||
|
@ -1783,7 +1783,7 @@ nsComponentManagerImpl::ContractIDToClassID(const char *aContractID, nsCID *aCla
|
|||
* Translates a classID to a {ContractID, Class Name}. Does direct registry
|
||||
* access to do the translation.
|
||||
*
|
||||
* NOTE: Since this isn't heavily used, we arent caching this.
|
||||
* NOTE: Since this isn't heavily used, we aren't caching this.
|
||||
*/
|
||||
nsresult
|
||||
nsComponentManagerImpl::CLSIDToContractID(const nsCID &aClass,
|
||||
|
@ -1858,7 +1858,7 @@ nsComponentManagerImpl::CreateInstance(const nsCID &aClass,
|
|||
// shutdown -- whether it's available or not would depend on the order it
|
||||
// occurs in the list
|
||||
if (gXPCOMShuttingDown) {
|
||||
// When processing shutdown, dont process new GetService() requests
|
||||
// When processing shutdown, don't process new GetService() requests
|
||||
#ifdef SHOW_DENIED_ON_SHUTDOWN
|
||||
nsXPIDLCString cid, iid;
|
||||
cid.Adopt(aClass.ToString());
|
||||
|
@ -1939,7 +1939,7 @@ nsComponentManagerImpl::CreateInstanceByContractID(const char *aContractID,
|
|||
// shutdown -- whether it's available or not would depend on the order it
|
||||
// occurs in the list
|
||||
if (gXPCOMShuttingDown) {
|
||||
// When processing shutdown, dont process new GetService() requests
|
||||
// When processing shutdown, don't process new GetService() requests
|
||||
#ifdef SHOW_DENIED_ON_SHUTDOWN
|
||||
nsXPIDLCString iid;
|
||||
iid.Adopt(aIID.ToString());
|
||||
|
@ -2058,7 +2058,7 @@ nsComponentManagerImpl::GetService(const nsCID& aClass,
|
|||
// shutdown -- whether it's available or not would depend on the order it
|
||||
// occurs in the list
|
||||
if (gXPCOMShuttingDown) {
|
||||
// When processing shutdown, dont process new GetService() requests
|
||||
// When processing shutdown, don't process new GetService() requests
|
||||
#ifdef SHOW_DENIED_ON_SHUTDOWN
|
||||
nsXPIDLCString cid, iid;
|
||||
cid.Adopt(aClass.ToString());
|
||||
|
@ -2242,14 +2242,14 @@ nsComponentManagerImpl::IsServiceInstantiated(const nsCID & aClass,
|
|||
const nsIID& aIID,
|
||||
PRBool *result)
|
||||
{
|
||||
// Now we want to get the service if we already got it. If not, we dont want
|
||||
// Now we want to get the service if we already got it. If not, we don't want
|
||||
// to create an instance of it. mmh!
|
||||
|
||||
// test this first, since there's no point in returning a service during
|
||||
// shutdown -- whether it's available or not would depend on the order it
|
||||
// occurs in the list
|
||||
if (gXPCOMShuttingDown) {
|
||||
// When processing shutdown, dont process new GetService() requests
|
||||
// When processing shutdown, don't process new GetService() requests
|
||||
#ifdef SHOW_DENIED_ON_SHUTDOWN
|
||||
nsXPIDLCString cid, iid;
|
||||
cid.Adopt(aClass.ToString());
|
||||
|
@ -2284,14 +2284,14 @@ NS_IMETHODIMP nsComponentManagerImpl::IsServiceInstantiatedByContractID(const ch
|
|||
const nsIID& aIID,
|
||||
PRBool *result)
|
||||
{
|
||||
// Now we want to get the service if we already got it. If not, we dont want
|
||||
// Now we want to get the service if we already got it. If not, we don't want
|
||||
// to create an instance of it. mmh!
|
||||
|
||||
// test this first, since there's no point in returning a service during
|
||||
// shutdown -- whether it's available or not would depend on the order it
|
||||
// occurs in the list
|
||||
if (gXPCOMShuttingDown) {
|
||||
// When processing shutdown, dont process new GetService() requests
|
||||
// When processing shutdown, don't process new GetService() requests
|
||||
#ifdef SHOW_DENIED_ON_SHUTDOWN
|
||||
nsXPIDLCString iid;
|
||||
iid.Adopt(aIID.ToString());
|
||||
|
@ -2358,7 +2358,7 @@ nsComponentManagerImpl::GetServiceByContractID(const char* aContractID,
|
|||
// shutdown -- whether it's available or not would depend on the order it
|
||||
// occurs in the list
|
||||
if (gXPCOMShuttingDown) {
|
||||
// When processing shutdown, dont process new GetService() requests
|
||||
// When processing shutdown, don't process new GetService() requests
|
||||
#ifdef SHOW_DENIED_ON_SHUTDOWN
|
||||
nsXPIDLCString iid;
|
||||
iid.Adopt(aIID.ToString());
|
||||
|
|
|
@ -107,7 +107,7 @@ interface nsIModule : nsISupports
|
|||
* unloaded. It is very important to ensure that no outstanding
|
||||
* references to the module's code/data exist before returning
|
||||
* PR_TRUE.
|
||||
* Returning PR_FALSE guaratees that the module wont be unloaded.
|
||||
* Returning PR_FALSE guaratees that the module won't be unloaded.
|
||||
*/
|
||||
boolean canUnload(in nsIComponentManager aCompMgr);
|
||||
};
|
||||
|
|
|
@ -166,7 +166,7 @@ nsNativeComponentLoader::GetFactory(const nsIID & aCID,
|
|||
// other CID for which factory creation can pass.
|
||||
// We will just let it be. The effect will be next time we try
|
||||
// creating the object, we will query the dll again. Since the
|
||||
// dll is loaded, this aint a big hit. So for optimized builds
|
||||
// dll is loaded, this ain't a big hit. So for optimized builds
|
||||
// this is ok to limp along.
|
||||
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Factory creation failed");
|
||||
|
||||
|
@ -212,7 +212,7 @@ nsNativeComponentLoader::RegisterComponentsInDir(PRInt32 when,
|
|||
#if 0
|
||||
// Going to many of these checks is a performance hit on the mac.
|
||||
// Since these routines are called relatively infrequently and
|
||||
// we will fail anyway down the line if a directory aint there,
|
||||
// we will fail anyway down the line if a directory ain't there,
|
||||
// we are commenting this check out.
|
||||
|
||||
// Make sure we are dealing with a directory
|
||||
|
@ -328,7 +328,7 @@ nsFreeLibrary(nsDll *dll, nsIServiceManager *serviceMgr, PRInt32 when)
|
|||
|
||||
#ifdef DEBUG_dougt
|
||||
// XXX dlls aren't counting their outstanding instances correctly
|
||||
// XXX hence, dont unload until this gets enforced.
|
||||
// XXX hence, don't unload until this gets enforced.
|
||||
rv = dll->Unload();
|
||||
#endif /* 0 */
|
||||
}
|
||||
|
@ -880,7 +880,7 @@ nsNativeComponentLoader::AutoRegisterComponent(PRInt32 when,
|
|||
{
|
||||
// Create and add the dll to the mDllStore
|
||||
// It is ok to do this even if the creation of nsDll
|
||||
// didnt succeed. That way we wont do this again
|
||||
// didnt succeed. That way we won't do this again
|
||||
// when we encounter the same dll.
|
||||
dll = new nsDll(component, this);
|
||||
if (dll == NULL)
|
||||
|
|
|
@ -1,121 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* Dll
|
||||
*
|
||||
* Programmatic representation of a dll. Stores modifiedTime and size for
|
||||
* easy detection of change in dll.
|
||||
*
|
||||
* dp Suresh <dp@netscape.com>
|
||||
*/
|
||||
|
||||
#ifndef xcDll_h__
|
||||
#define xcDll_h__
|
||||
|
||||
#include "prio.h"
|
||||
#include "prlink.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsString.h"
|
||||
|
||||
class nsNativeComponentLoader;
|
||||
|
||||
#if defined(DEBUG) && !defined(XP_BEOS)
|
||||
#define SHOULD_IMPLEMENT_BREAKAFTERLOAD
|
||||
#endif
|
||||
|
||||
class nsIModule;
|
||||
class nsIServiceManager;
|
||||
|
||||
typedef enum nsDllStatus
|
||||
{
|
||||
DLL_OK = 0,
|
||||
DLL_NO_MEM = 1,
|
||||
DLL_STAT_ERROR = 2,
|
||||
DLL_NOT_FILE = 3,
|
||||
DLL_INVALID_PARAM = 4
|
||||
} nsDllStatus;
|
||||
|
||||
class nsDll
|
||||
{
|
||||
private:
|
||||
nsCOMPtr<nsIFile> m_dllSpec;
|
||||
PRLibrary *m_instance;
|
||||
nsIModule *m_moduleObject;
|
||||
nsNativeComponentLoader *m_loader;
|
||||
PRBool m_markForUnload;
|
||||
|
||||
void Init(nsIFile *dllSpec);
|
||||
|
||||
#ifdef SHOULD_IMPLEMENT_BREAKAFTERLOAD
|
||||
void BreakAfterLoad(const char *nsprPath);
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
nsDll(nsIFile *dllSpec, nsNativeComponentLoader* loader);
|
||||
~nsDll(void);
|
||||
|
||||
// Dll Loading
|
||||
PRBool Load(void);
|
||||
PRBool Unload(void);
|
||||
PRBool IsLoaded(void)
|
||||
{
|
||||
return ((m_instance != 0) ? PR_TRUE : PR_FALSE);
|
||||
}
|
||||
void MarkForUnload(PRBool mark) { m_markForUnload = mark; }
|
||||
PRBool IsMarkedForUnload(void) { return m_markForUnload; }
|
||||
|
||||
// Shutdown the dll. This will call any on unload hook for the dll.
|
||||
// This wont unload the dll. Unload() implicitly calls Shutdown().
|
||||
nsresult Shutdown(void);
|
||||
|
||||
void *FindSymbol(const char *symbol);
|
||||
|
||||
PRBool HasChanged(void);
|
||||
|
||||
void GetDisplayPath(nsACString& string);
|
||||
|
||||
PRLibrary *GetInstance(void) { return (m_instance); }
|
||||
|
||||
// NS_RELEASE() is required to be done on objects returned
|
||||
nsresult GetDllSpec(nsIFile **dllSpec);
|
||||
nsresult GetModule(nsISupports *servMgr, nsIModule **mobj);
|
||||
};
|
||||
|
||||
#endif /* xcDll_h__ */
|
|
@ -185,7 +185,7 @@ nsCOMArrayEnumerator::operator new (size_t size, const nsCOMArray_base& aArray)
|
|||
NS_STATIC_CAST(nsCOMArrayEnumerator*, ::operator new(size));
|
||||
|
||||
// now need to copy over the values, and addref each one
|
||||
// now this might seem like alot of work, but we're actually just
|
||||
// now this might seem like a lot of work, but we're actually just
|
||||
// doing all our AddRef's ahead of time since GetNext() doesn't
|
||||
// need to AddRef() on the way out
|
||||
PRUint32 i;
|
||||
|
|
|
@ -76,7 +76,7 @@ nsObserverList::AddObserver(nsIObserver* anObserver, PRBool ownsWeak)
|
|||
nsCOMPtr<nsISupports> observerRef;
|
||||
if (ownsWeak) {
|
||||
nsCOMPtr<nsISupportsWeakReference> weakRefFactory = do_QueryInterface(anObserver);
|
||||
NS_ASSERTION(weakRefFactory, "AddObserver: trying weak object that doesnt support nsIWeakReference");
|
||||
NS_ASSERTION(weakRefFactory, "AddObserver: trying weak object that doesn't support nsIWeakReference");
|
||||
if ( weakRefFactory )
|
||||
observerRef = getter_AddRefs(NS_STATIC_CAST(nsISupports*, NS_GetWeakReference(weakRefFactory)));
|
||||
} else {
|
||||
|
|
|
@ -179,7 +179,7 @@ nsRecyclingAllocator::Malloc(PRSize bytes, PRBool zeroit)
|
|||
// Add 4 bytes to what we allocate to hold the bucket index
|
||||
PRSize allocBytes = bytes + NS_ALLOCATOR_OVERHEAD_BYTES;
|
||||
|
||||
// We dont have that memory already. Allocate.
|
||||
// We don't have that memory already. Allocate.
|
||||
Block *ptr = (Block *) (zeroit ? calloc(1, allocBytes) : malloc(allocBytes));
|
||||
|
||||
// Deal with no memory situation
|
||||
|
@ -188,7 +188,7 @@ nsRecyclingAllocator::Malloc(PRSize bytes, PRBool zeroit)
|
|||
|
||||
// This is the first allocation we are holding.
|
||||
// Setup timer for releasing memory
|
||||
// If this fails, then we wont have a timer to release unused
|
||||
// If this fails, then we won't have a timer to release unused
|
||||
// memory. We can live with that. Also, the next allocation
|
||||
// will try again to set the timer.
|
||||
if (mRecycleAfter && !mRecycleTimer)
|
||||
|
@ -285,7 +285,7 @@ nsRecyclingAllocator::FreeUnusedBuckets()
|
|||
nsRecyclingAllocator::Block*
|
||||
nsRecyclingAllocator::FindFreeBlock(PRSize bytes)
|
||||
{
|
||||
// We dont enter lock for this check. This is intentional.
|
||||
// We don't enter lock for this check. This is intentional.
|
||||
// Here is my logic: we are checking if (!mFreeList). Doing this check
|
||||
// without locking can lead to unpredictable results. YES. But the effect
|
||||
// of the unpredictedness are ok. here is why:
|
||||
|
@ -298,7 +298,7 @@ nsRecyclingAllocator::FindFreeBlock(PRSize bytes)
|
|||
// FindFreeBlock() will enter lock, while (null) and return null.
|
||||
//
|
||||
// The reason why I chose to not enter lock for this check was that when
|
||||
// the allocator is full, we dont want to impose any more overhead than
|
||||
// the allocator is full, we don't want to impose any more overhead than
|
||||
// we already are for failing over to malloc/free.
|
||||
|
||||
if (!mFreeList)
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
* This allocator is thread safe.
|
||||
*
|
||||
* CAVEATS: As the number of buckets increases, this allocators performance
|
||||
* will drop. As a general guideline, dont use this for more
|
||||
* will drop. As a general guideline, don't use this for more
|
||||
* than NS_MAX_BLOCKS
|
||||
*/
|
||||
|
||||
|
|
|
@ -413,7 +413,7 @@ nsPipe::GetReadSegment(const char *&segment, PRUint32 &segmentLen)
|
|||
void
|
||||
nsPipe::AdvanceReadCursor(PRUint32 bytesRead)
|
||||
{
|
||||
NS_ASSERTION(bytesRead, "dont call if no bytes read");
|
||||
NS_ASSERTION(bytesRead, "don't call if no bytes read");
|
||||
|
||||
nsPipeEvents events;
|
||||
{
|
||||
|
@ -511,7 +511,7 @@ nsPipe::GetWriteSegment(char *&segment, PRUint32 &segmentLen)
|
|||
void
|
||||
nsPipe::AdvanceWriteCursor(PRUint32 bytesWritten)
|
||||
{
|
||||
NS_ASSERTION(bytesWritten, "dont call if no bytes written");
|
||||
NS_ASSERTION(bytesWritten, "don't call if no bytes written");
|
||||
|
||||
nsPipeEvents events;
|
||||
{
|
||||
|
|
|
@ -1,186 +0,0 @@
|
|||
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org Code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIEnumerator.idl"
|
||||
|
||||
interface nsIFile;
|
||||
|
||||
typedef PRUint32 nsRegistryKey;
|
||||
typedef long nsWellKnownRegistry;
|
||||
|
||||
[scriptable,uuid(5D41A440-8E37-11d2-8059-00600811A9C3)]
|
||||
interface nsIRegistry : nsISupports
|
||||
{
|
||||
const long None = 0;
|
||||
const long Users = 1;
|
||||
const long Common = 2;
|
||||
const long CurrentUser = 3;
|
||||
|
||||
const long ApplicationComponentRegistry = 1;
|
||||
const long ApplicationRegistry = 2;
|
||||
|
||||
// Dont use this one. This for internal use only.
|
||||
const long ApplicationCustomRegistry = -1;
|
||||
|
||||
void open(in nsIFile regFile);
|
||||
void openWellKnownRegistry(in nsWellKnownRegistry regid);
|
||||
|
||||
void flush();
|
||||
boolean isOpen();
|
||||
|
||||
nsRegistryKey addKey(in nsRegistryKey baseKey, in wstring keyname);
|
||||
nsRegistryKey getKey(in nsRegistryKey baseKey, in wstring keyname);
|
||||
void removeKey(in nsRegistryKey baseKey, in wstring keyname);
|
||||
|
||||
wstring getString(in nsRegistryKey baseKey, in wstring valname);
|
||||
void setString(in nsRegistryKey baseKey, in wstring valname, in wstring value);
|
||||
|
||||
string getStringUTF8(in nsRegistryKey baseKey, in string path);
|
||||
void setStringUTF8(in nsRegistryKey baseKey, in string path, in string value);
|
||||
|
||||
void getBytesUTF8(in nsRegistryKey baseKey, in string path, out PRUint32 length, [retval, array, size_is(length)] out PRUint8 valueArray);
|
||||
void setBytesUTF8(in nsRegistryKey baseKey, in string path, in PRUint32 length, [array, size_is(length)] in PRUint8 valueArray);
|
||||
PRInt32 getInt(in nsRegistryKey baseKey, in string path);
|
||||
void setInt(in nsRegistryKey baseKey, in string path, in PRInt32 value);
|
||||
PRInt64 getLongLong(in nsRegistryKey baseKey, in string path);
|
||||
void setLongLong(in nsRegistryKey baseKey, in string path, inout PRInt64 value);
|
||||
|
||||
/**
|
||||
* addSubtree() and friends need to be renamed to addKeyUTF8().
|
||||
* If you are using these forms make sure you pass UTF8 data
|
||||
*/
|
||||
nsRegistryKey addSubtree(in nsRegistryKey baseKey, in string path);
|
||||
void removeSubtree(in nsRegistryKey baseKey, in string path);
|
||||
nsRegistryKey getSubtree(in nsRegistryKey baseKey, in string path);
|
||||
|
||||
nsRegistryKey addSubtreeRaw(in nsRegistryKey baseKey, in string path);
|
||||
void removeSubtreeRaw(in nsRegistryKey baseKey, in string path);
|
||||
nsRegistryKey getSubtreeRaw(in nsRegistryKey baseKey, in string path);
|
||||
|
||||
nsIEnumerator enumerateSubtrees(in nsRegistryKey baseKey);
|
||||
nsIEnumerator enumerateAllSubtrees(in nsRegistryKey baseKey);
|
||||
nsIEnumerator enumerateValues(in nsRegistryKey baseKey);
|
||||
|
||||
const unsigned long String = 1;
|
||||
const unsigned long Int32 = 2;
|
||||
const unsigned long Bytes = 3;
|
||||
const unsigned long File = 4;
|
||||
|
||||
unsigned long getValueType(in nsRegistryKey baseKey, in string path);
|
||||
PRUint32 getValueLength(in nsRegistryKey baseKey, in string path);
|
||||
void deleteValue(in nsRegistryKey baseKey, in string path);
|
||||
|
||||
/**
|
||||
* escapeKey() takes arbitrary binary data and converts it into
|
||||
* valid ASCII which can be used as registry key or value names
|
||||
*/
|
||||
void escapeKey([array, size_is(length)] in PRUint8 key, in PRUint32 terminator, inout PRUint32 length, [retval, array, size_is(length)] out PRUint8 escaped);
|
||||
void unescapeKey([array, size_is(length)] in PRUint8 escaped, in PRUint32 terminator, inout PRUint32 length, [retval, array, size_is(length)] out PRUint8 key);
|
||||
|
||||
attribute string currentUserName;
|
||||
|
||||
void pack();
|
||||
};
|
||||
|
||||
[scriptable, uuid(8cecf236-1dd2-11b2-893c-f9848956eaec)]
|
||||
interface nsIRegistryEnumerator : nsIEnumerator
|
||||
{
|
||||
void currentItemInPlaceUTF8(out nsRegistryKey key,
|
||||
[shared, retval] out string item);
|
||||
};
|
||||
|
||||
[scriptable, uuid(D1B54831-AC07-11d2-805E-00600811A9C3)]
|
||||
interface nsIRegistryNode : nsISupports
|
||||
{
|
||||
readonly attribute string nameUTF8;
|
||||
readonly attribute wstring name;
|
||||
readonly attribute nsRegistryKey key;
|
||||
};
|
||||
|
||||
[scriptable,uuid(5316C380-B2F8-11d2-A374-0080C6F80E4B)]
|
||||
interface nsIRegistryValue : nsISupports
|
||||
{
|
||||
readonly attribute wstring name;
|
||||
readonly attribute string nameUTF8;
|
||||
readonly attribute unsigned long type;
|
||||
readonly attribute PRUint32 length;
|
||||
};
|
||||
|
||||
[uuid(3A15FC88-7A61-4Ab4-8E58-31E95fAB3DA8)]
|
||||
/**
|
||||
* It sucks that nsIRegistry has to always allocate and return
|
||||
* strings. nsIRegistryGetter adds in interfaces for non allocating getters
|
||||
* to registry values.
|
||||
*/
|
||||
interface nsIRegistryGetter : nsISupports
|
||||
{
|
||||
/**
|
||||
* Get a string value of attribute valname in widestring or utf8 format
|
||||
*
|
||||
* @return
|
||||
* NS_OK on success.
|
||||
* buf has the string value copied into it. length is NOT changed.
|
||||
* NS_ERROR_REG_BUFFER_TOO_SMALL if not enough buffer space.
|
||||
* length is updated to actual length in chars including
|
||||
* terminating NULL and buf will be unchanged.
|
||||
* NS_ERROR_FAILURE if an unknown error happened. state of buf and
|
||||
* length undefined.
|
||||
* various failure codes otherwise. buf and length wont be updated.
|
||||
*/
|
||||
void getStringUTF8IntoBuffer(in nsRegistryKey baseKey, in string path,
|
||||
inout char buf, inout PRUint32 length);
|
||||
|
||||
/**
|
||||
* Get a a byte array value of attribute valname
|
||||
*
|
||||
* @return
|
||||
* NS_OK on success. buf has the string value copied into it.
|
||||
* length is updated to actual number of bytes copied into buf.
|
||||
* NS_ERROR_REG_BUFFER_TOO_SMALL if not enough buffer space.
|
||||
* length is updated to actual length in PRUint8s including
|
||||
* terminating NULL and buf will be unchanged.
|
||||
* NS_ERROR_FAILURE if an unknown error happened. state of buf and
|
||||
* length undefined.
|
||||
* various other failure codes otherwise. buf and length wont be updated.
|
||||
*/
|
||||
void getBytesUTF8IntoBuffer(in nsRegistryKey baseKey, in string path,
|
||||
inout PRUint8 buf, inout PRUint32 length);
|
||||
};
|
||||
|
||||
%{ C++
|
||||
#include "nsIRegistryUtils.h"
|
||||
%}
|
|
@ -464,7 +464,7 @@ EnsureDefaultRegistryDirectory() {
|
|||
|
||||
/* The default registry on the unix system is $HOME/.mozilla/registry per
|
||||
* vr_findGlobalRegName(). vr_findRegFile() will create the registry file
|
||||
* if it doesn't exist. But it wont create directories.
|
||||
* if it doesn't exist. But it won't create directories.
|
||||
*
|
||||
* Hence we need to create the directory if it doesn't exist already.
|
||||
*
|
||||
|
@ -472,7 +472,7 @@ EnsureDefaultRegistryDirectory() {
|
|||
* ------------------------------------------
|
||||
* The app cannot create the directory in main() as most of the registry
|
||||
* and initialization happens due to use of static variables.
|
||||
* And we dont want to be dependent on the order in which
|
||||
* And we don't want to be dependent on the order in which
|
||||
* these static stuff happen.
|
||||
*
|
||||
* Permission for the $HOME/.mozilla will be Read,Write,Execute
|
||||
|
|
|
@ -53,7 +53,7 @@ interface nsIRegistry : nsISupports
|
|||
const long ApplicationComponentRegistry = 1;
|
||||
const long ApplicationRegistry = 2;
|
||||
|
||||
// Dont use this one. This for internal use only.
|
||||
// Don't use this one. This for internal use only.
|
||||
const long ApplicationCustomRegistry = -1;
|
||||
|
||||
void open(in nsIFile regFile);
|
||||
|
@ -159,7 +159,7 @@ interface nsIRegistryGetter : nsISupports
|
|||
* terminating NULL and buf will be unchanged.
|
||||
* NS_ERROR_FAILURE if an unknown error happened. state of buf and
|
||||
* length undefined.
|
||||
* various failure codes otherwise. buf and length wont be updated.
|
||||
* various failure codes otherwise. buf and length won't be updated.
|
||||
*/
|
||||
void getStringUTF8IntoBuffer(in nsRegistryKey baseKey, in string path,
|
||||
inout char buf, inout PRUint32 length);
|
||||
|
@ -175,7 +175,7 @@ interface nsIRegistryGetter : nsISupports
|
|||
* terminating NULL and buf will be unchanged.
|
||||
* NS_ERROR_FAILURE if an unknown error happened. state of buf and
|
||||
* length undefined.
|
||||
* various other failure codes otherwise. buf and length wont be updated.
|
||||
* various other failure codes otherwise. buf and length won't be updated.
|
||||
*/
|
||||
void getBytesUTF8IntoBuffer(in nsRegistryKey baseKey, in string path,
|
||||
inout PRUint8 buf, inout PRUint32 length);
|
||||
|
|
|
@ -78,7 +78,7 @@ nsProxyEventClass::GetNewOrUsedClass(REFNSIID aIID)
|
|||
nsProxyObjectManager *manager = nsProxyObjectManager::GetInstance();
|
||||
if (manager == nsnull) return nsnull;
|
||||
|
||||
// dont need to lock the map, because this is only called
|
||||
// don't need to lock the map, because this is only called
|
||||
// by nsProxyEventClass::GetNewOrUsed which locks it for us.
|
||||
|
||||
nsHashtable *iidToClassMap = manager->GetIIDToProxyClassMap();
|
||||
|
@ -169,7 +169,7 @@ nsProxyEventClass::nsProxyEventClass(REFNSIID aIID, nsIInterfaceInfo* aInfo)
|
|||
|
||||
nsProxyObjectManager *manager = nsProxyObjectManager::GetInstance();
|
||||
if (manager == nsnull) return;
|
||||
// dont need to lock the map, because this is only called
|
||||
// don't need to lock the map, because this is only called
|
||||
// by GetNewOrUsed which locks it for us.
|
||||
|
||||
nsHashtable *iidToClassMap = manager->GetIIDToProxyClassMap();
|
||||
|
|
|
@ -80,10 +80,10 @@ static NS_METHOD nsSampleRegistrationProc(nsIComponentManager *aCompMgr,
|
|||
{
|
||||
// Do any registration specific activity like adding yourself to a
|
||||
// category. The Generic Module will take care of registering your
|
||||
// component with xpcom. You dont need to do that. Only any component
|
||||
// component with xpcom. You don't need to do that. Only any component
|
||||
// specific additional activity needs to be done here.
|
||||
|
||||
// This functions is optional. If you dont need it, dont add it to the structure.
|
||||
// This functions is optional. If you don't need it, don't add it to the structure.
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -95,10 +95,10 @@ static NS_METHOD nsSampleUnregistrationProc(nsIComponentManager *aCompMgr,
|
|||
{
|
||||
// Undo any component specific registration like adding yourself to a
|
||||
// category here. The Generic Module will take care of unregistering your
|
||||
// component from xpcom. You dont need to do that. Only any component
|
||||
// component from xpcom. You don't need to do that. Only any component
|
||||
// specific additional activity needs to be done here.
|
||||
|
||||
// This functions is optional. If you dont need it, dont add it to the structure.
|
||||
// This functions is optional. If you don't need it, don't add it to the structure.
|
||||
|
||||
// Return value is not used from this function.
|
||||
return NS_OK;
|
||||
|
@ -110,8 +110,8 @@ NS_DECL_CLASSINFO(nsSampleImpl)
|
|||
static const nsModuleComponentInfo components[] =
|
||||
{
|
||||
{ "Sample Component", NS_SAMPLE_CID, NS_SAMPLE_CONTRACTID, nsSampleImplConstructor,
|
||||
nsSampleRegistrationProc /* NULL if you dont need one */,
|
||||
nsSampleUnregistrationProc /* NULL if you dont need one */,
|
||||
nsSampleRegistrationProc /* NULL if you don't need one */,
|
||||
nsSampleUnregistrationProc /* NULL if you don't need one */,
|
||||
NULL /* no factory destructor */,
|
||||
NS_CI_INTERFACE_GETTER_NAME(nsSampleImpl),
|
||||
NULL /* no language helper */,
|
||||
|
|
|
@ -1074,7 +1074,7 @@ int CStringTester::TestDelete(){
|
|||
|
||||
//let's try some whacky string deleting calls
|
||||
{
|
||||
const char* pbuf = "whats up doc?";
|
||||
const char* pbuf = "what's up doc?";
|
||||
|
||||
nsCString s1(pbuf);
|
||||
s1.Cut(3,20); //try deleting more chars than actual length of pbuf
|
||||
|
@ -1085,7 +1085,7 @@ int CStringTester::TestDelete(){
|
|||
NS_ASSERTION(s1==pbuf,"Cut error");
|
||||
|
||||
s1=pbuf;
|
||||
s1.Cut(3,2);
|
||||
s1.Cut(3,3);
|
||||
NS_ASSERTION(s1=="wha up doc?","Cut error");
|
||||
|
||||
}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
#!/bin/sh
|
||||
# S80calendar_fix_permissions_bug_230617
|
||||
#
|
||||
# This script will correct the permission bits for the Mozilla
|
||||
# Calendar (see bug 230617 - "Jan 9 Build will not create new
|
||||
# Calendar, Event, or Task for *first time* installation") for details.
|
||||
|
||||
# Prechecks
|
||||
if [ -z "${MOZ_PIS_USER_DIR}" ] ; then
|
||||
echo "${0}: Internal error: MOZ_PIS_USER_DIR not set."
|
||||
exit 1
|
||||
fi
|
||||
if [ ${MOZ_PIS_API} -lt 2 ] ; then
|
||||
echo "${0}: Internal error: MOZ_PIS_API is ${MOZ_PIS_API}, should be >= 2."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We run in a seperate process so we are allows to use single-letter
|
||||
# shell vars (see mozilla/xpfe/bootstrap/init.d/README)
|
||||
for i in "${HOME}/${MOZ_PIS_USER_DIR}"/*/*.slt/Calendar ; do
|
||||
if [ -d "${i}" ] ; then
|
||||
if [ ! -r "${i}" -o ! -w "${i}" -o ! -x "${i}" ] ; then
|
||||
echo "${0}: Fixing permissions for ${i} ..."
|
||||
chmod u+rwx "${i}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# EOF.
|
|
@ -2334,7 +2334,7 @@ NS_IMETHODIMP
|
|||
nsNativeAppSupportOS2::StartServerMode() {
|
||||
|
||||
if (mShouldShowUI) {
|
||||
// We dont have to anything anymore. The native UI
|
||||
// We don't have to anything anymore. The native UI
|
||||
// will create the window
|
||||
return NS_OK;
|
||||
} else {
|
||||
|
@ -2349,7 +2349,7 @@ nsNativeAppSupportOS2::StartServerMode() {
|
|||
}
|
||||
}
|
||||
|
||||
// Since native UI wont create any window, we create a hidden window
|
||||
// Since native UI won't create any window, we create a hidden window
|
||||
// so thing work alright.
|
||||
|
||||
// Create some of the objects we'll need.
|
||||
|
|
|
@ -2549,7 +2549,7 @@ nsNativeAppSupportWin::StartServerMode() {
|
|||
SetupSysTrayIcon();
|
||||
|
||||
if (mShouldShowUI) {
|
||||
// We dont have to anything anymore. The native UI
|
||||
// We don't have to anything anymore. The native UI
|
||||
// will create the window
|
||||
return NS_OK;
|
||||
} else {
|
||||
|
@ -2564,7 +2564,7 @@ nsNativeAppSupportWin::StartServerMode() {
|
|||
}
|
||||
}
|
||||
|
||||
// Since native UI wont create any window, we create a hidden window
|
||||
// Since native UI won't create any window, we create a hidden window
|
||||
// so thing work alright.
|
||||
|
||||
// Create some of the objects we'll need.
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- ***** BEGIN LICENSE BLOCK *****
|
||||
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
The Original Code is Mozilla Communicator client code, released
|
||||
March 31, 1998.
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Netscape Communications Corporation.
|
||||
Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Ben Goodger <ben@netscape.com>
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
use your version of this file under the terms of the MPL, indicate your
|
||||
decision by deleting the provisions above and replace them with the notice
|
||||
and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the MPL, the GPL or the LGPL.
|
||||
|
||||
***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<overlay id="platformPreferencesOverlay"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<!-- the poor macintosh doesnt support any of the extra goodies that unix and
|
||||
windows do, so this file is blank. (that doesn't mean it's not required,
|
||||
so don't remove it!) -->
|
||||
|
||||
</overlay>
|
||||
|
|
@ -960,7 +960,7 @@ InternetSearchDataSource::Init()
|
|||
|
||||
gEngineListBuilt = PR_FALSE;
|
||||
|
||||
// Register as a profile change obsevrer
|
||||
// Register as a profile change observer
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
do_GetService("@mozilla.org/observer-service;1", &rv);
|
||||
if (observerService) {
|
||||
|
|
|
@ -256,7 +256,7 @@ Title=$ProductName$ Setup - Windows Integration
|
|||
Message0=Check the options you would like Setup to perform.
|
||||
Message1=These settings allow you to set default Internet preferences for browsing and searching. They affect browsers installed on your machine, including Mozilla, Netscape and Microsoft Internet Explorer.
|
||||
|
||||
; Only a maximum of 4 "Windows Integration-Item"s are allowded. Each Item
|
||||
; Only a maximum of 4 "Windows Integration-Item"s are allowed. Each Item
|
||||
; shows up as a checkbox in the Windows Integration dialog.
|
||||
[Windows Integration-Item0]
|
||||
CheckBoxState=FALSE
|
||||
|
|
|
@ -315,7 +315,7 @@ Title=$ProductName$ Setup - Windows Integration
|
|||
Message0=Check the options you would like Setup to perform.
|
||||
Message1=These settings allow you to set default Internet preferences for browsing and searching. They affect browsers installed on your machine, including SeaMonkey, Mozilla, Netscape and Microsoft Internet Explorer.
|
||||
|
||||
; Only a maximum of 4 "Windows Integration-Item"s are allowded. Each Item
|
||||
; Only a maximum of 4 "Windows Integration-Item"s are allowed. Each Item
|
||||
; shows up as a checkbox in the Windows Integration dialog.
|
||||
[Windows Integration-Item0]
|
||||
CheckBoxState=FALSE
|
||||
|
|
|
@ -1,541 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Sean Su <ssu@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "extern.h"
|
||||
#include "extra.h"
|
||||
#include "dialogs.h"
|
||||
#include "ifuncns.h"
|
||||
#include "parser.h"
|
||||
#include "rdi.h"
|
||||
#include "shlobj.h"
|
||||
|
||||
#define MOZ_HWND_BROADCAST_MSG_TIMEOUT 5000
|
||||
#define MOZ_CLIENT_BROWSER_KEY "Software\\Clients\\StartMenuInternet"
|
||||
#define MOZ_CLIENT_MAIL_KEY "Software\\Clients\\Mail"
|
||||
|
||||
void SetDefault()
|
||||
{
|
||||
char szBuf[MAX_BUF];
|
||||
char szRegKey[MAX_BUF];
|
||||
|
||||
GetPrivateProfileString(ugUninstall.szDefaultComponent, "ClientTypeName", "", szBuf, MAX_BUF, szFileIniDefaultsInfo);
|
||||
wsprintf(szRegKey, "SOFTWARE\\Clients\\%s", szBuf);
|
||||
GetPrivateProfileString(ugUninstall.szDefaultComponent, "ClientProductKey", "", szBuf, MAX_BUF, szFileIniDefaultsInfo);
|
||||
|
||||
SetWinReg(HKEY_LOCAL_MACHINE, szRegKey, "", REG_SZ, szBuf, lstrlen(szBuf));
|
||||
}
|
||||
|
||||
void ParseDefaultsInfo()
|
||||
{
|
||||
char szBuf[MAX_BUF];
|
||||
char szIniKey[MAX_BUF];
|
||||
char szStorageDir[MAX_BUF];
|
||||
char szShortcutPath[MAX_BUF];
|
||||
char szStoredShortcutPath[MAX_BUF];
|
||||
char szRegKey[MAX_BUF];
|
||||
char szClientTypeName[MAX_BUF];
|
||||
char szClientProductKey[MAX_BUF];
|
||||
int iIndex;
|
||||
DWORD dwIconsVisible;
|
||||
|
||||
// If szAppPath is a null sting, i.e. we cannot find where the app has been installed:
|
||||
// - HIDEICONS will still remove the shortcuts but
|
||||
// - SHOWICONS will do nothing because we won't be able to find the shortcuts to display.
|
||||
ParsePath(ugUninstall.szAppPath, szStorageDir, MAX_BUF, PP_PATH_ONLY);
|
||||
lstrcat(szStorageDir, "defaults\\shortcuts\\");
|
||||
|
||||
// CLEANUP ISSUE: For all of the SHOWICON and HIDEICONS blocks below, there is a lot of
|
||||
// redundancy:
|
||||
// - Right now I'm just trying to create icons and, if I can't, trying under the PERSONAL
|
||||
// key instead. I would be cleaner to check for restricted access once, and then just
|
||||
// create the appropriate key each time.
|
||||
// - Creating a ShowIcon() and a HideIcon() function would rid us much of the redundency.
|
||||
|
||||
|
||||
// Deal with Desktop Icons
|
||||
iIndex = 0;
|
||||
wsprintf(szIniKey, "DesktopShortcut%d", iIndex);
|
||||
GetPrivateProfileString(ugUninstall.szDefaultComponent, szIniKey, "", szBuf, MAX_BUF, szFileIniDefaultsInfo);
|
||||
while(szBuf[0] != '\0')
|
||||
{
|
||||
strcpy(szShortcutPath, "COMMON_DESKTOP");
|
||||
DecryptVariable(szShortcutPath, MAX_BUF);
|
||||
|
||||
if((ugUninstall.mode == SHOWICONS) && (szStorageDir[0] != '\0'))
|
||||
{
|
||||
wsprintf(szStoredShortcutPath, "%s%s", szStorageDir, szBuf);
|
||||
FileCopy(szStoredShortcutPath, szShortcutPath, 0);
|
||||
if( (!FileExists(szShortcutPath)) && (!(ulOSType & OS_WIN9x)) )
|
||||
{
|
||||
strcpy(szShortcutPath, "PERSONAL_DESKTOP");
|
||||
DecryptVariable(szShortcutPath, MAX_BUF);
|
||||
FileCopy(szStoredShortcutPath, szShortcutPath, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (ugUninstall.mode == HIDEICONS)
|
||||
{
|
||||
AppendBackSlash(szShortcutPath, MAX_BUF);
|
||||
lstrcat(szShortcutPath, szBuf);
|
||||
if( (!FileExists(szShortcutPath)) && (!(ulOSType & OS_WIN9x)) )
|
||||
{
|
||||
strcpy(szShortcutPath, "PERSONAL_DESKTOP");
|
||||
DecryptVariable(szShortcutPath, MAX_BUF);
|
||||
AppendBackSlash(szShortcutPath, MAX_BUF);
|
||||
lstrcat(szShortcutPath, szBuf);
|
||||
}
|
||||
|
||||
FileDelete(szShortcutPath);
|
||||
}
|
||||
|
||||
iIndex++;
|
||||
wsprintf(szIniKey, "DesktopShortcut%d", iIndex);
|
||||
GetPrivateProfileString(ugUninstall.szDefaultComponent, szIniKey, "", szBuf, MAX_BUF, szFileIniDefaultsInfo);
|
||||
}
|
||||
|
||||
// Deal with StartMenu Icons
|
||||
iIndex = 0;
|
||||
wsprintf(szIniKey, "StartMenuShortcut%d", iIndex);
|
||||
GetPrivateProfileString(ugUninstall.szDefaultComponent, szIniKey, "", szBuf, MAX_BUF, szFileIniDefaultsInfo);
|
||||
while(szBuf[0] != '\0')
|
||||
{
|
||||
strcpy(szShortcutPath, "COMMON_STARTMENU");
|
||||
DecryptVariable(szShortcutPath, MAX_BUF);
|
||||
|
||||
if((ugUninstall.mode == SHOWICONS) && (szStorageDir[0] != '\0'))
|
||||
{
|
||||
lstrcpy(szStoredShortcutPath, szStorageDir);
|
||||
lstrcat(szStoredShortcutPath, szBuf);
|
||||
FileCopy(szStoredShortcutPath, szShortcutPath, 0);
|
||||
if( (!FileExists(szShortcutPath)) && (!(ulOSType & OS_WIN9x)) )
|
||||
{
|
||||
strcpy(szShortcutPath, "PERSONAL_STARTMENU");
|
||||
DecryptVariable(szShortcutPath, MAX_BUF);
|
||||
FileCopy(szStoredShortcutPath, szShortcutPath, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (ugUninstall.mode == HIDEICONS)
|
||||
{
|
||||
AppendBackSlash(szShortcutPath, MAX_BUF);
|
||||
lstrcat(szShortcutPath, szBuf);
|
||||
if( (!FileExists(szShortcutPath)) && (!(ulOSType & OS_WIN9x)) )
|
||||
{
|
||||
strcpy(szShortcutPath, "PERSONAL_STARTMENU");
|
||||
DecryptVariable(szShortcutPath, MAX_BUF);
|
||||
AppendBackSlash(szShortcutPath, MAX_BUF);
|
||||
lstrcat(szShortcutPath, szBuf);
|
||||
}
|
||||
|
||||
FileDelete(szShortcutPath);
|
||||
}
|
||||
|
||||
iIndex++;
|
||||
wsprintf(szIniKey, "StartMenuShortcut%d", iIndex);
|
||||
GetPrivateProfileString(ugUninstall.szDefaultComponent, szIniKey, "", szBuf, MAX_BUF, szFileIniDefaultsInfo);
|
||||
}
|
||||
|
||||
// Deal with QuickLaunch Bar Icons
|
||||
iIndex = 0;
|
||||
wsprintf(szIniKey, "QuickLaunchBarShortcut%d", iIndex);
|
||||
GetPrivateProfileString(ugUninstall.szDefaultComponent, szIniKey, "", szBuf, MAX_BUF, szFileIniDefaultsInfo);
|
||||
while(szBuf[0] != '\0')
|
||||
{
|
||||
GetWinReg(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "AppData", szShortcutPath, MAX_BUF);
|
||||
lstrcat(szShortcutPath, "\\Microsoft\\Internet Explorer\\Quick Launch");
|
||||
|
||||
if((ugUninstall.mode == SHOWICONS) && (szStorageDir[0] != '\0'))
|
||||
{
|
||||
wsprintf(szStoredShortcutPath, "%s%s", szStorageDir, szBuf);
|
||||
FileCopy(szStoredShortcutPath, szShortcutPath, 0);
|
||||
if( (!FileExists(szShortcutPath)) && (!(ulOSType & OS_WIN9x)) )
|
||||
{
|
||||
GetWinReg(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\GrpConv\\MapGroups", "Quick Launch", szShortcutPath, MAX_BUF);
|
||||
FileCopy(szStoredShortcutPath, szShortcutPath, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (ugUninstall.mode == HIDEICONS)
|
||||
{
|
||||
AppendBackSlash(szShortcutPath, MAX_BUF);
|
||||
lstrcat(szShortcutPath, szBuf);
|
||||
if( (!FileExists(szShortcutPath)) && (!(ulOSType & OS_WIN9x)) )
|
||||
{
|
||||
GetWinReg(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\GrpConv\\MapGroups", "Quick Launch", szShortcutPath, MAX_BUF);
|
||||
AppendBackSlash(szShortcutPath, MAX_BUF);
|
||||
lstrcat(szShortcutPath, szBuf);
|
||||
}
|
||||
|
||||
FileDelete(szShortcutPath);
|
||||
}
|
||||
|
||||
++iIndex;
|
||||
wsprintf(szIniKey, "QuickLaunchBarShortcut%d", iIndex);
|
||||
GetPrivateProfileString(ugUninstall.szDefaultComponent, szIniKey, "", szBuf, MAX_BUF, szFileIniDefaultsInfo);
|
||||
}
|
||||
|
||||
GetPrivateProfileString(ugUninstall.szDefaultComponent, "ClientTypeName", "", szClientTypeName, MAX_BUF, szFileIniDefaultsInfo);
|
||||
GetPrivateProfileString(ugUninstall.szDefaultComponent, "ClientProductKey", "", szClientProductKey, MAX_BUF, szFileIniDefaultsInfo);
|
||||
wsprintf(szRegKey, "SOFTWARE\\Clients\\%s\\%s\\InstallInfo", szClientTypeName, szClientProductKey);
|
||||
|
||||
if (ugUninstall.mode == SHOWICONS)
|
||||
dwIconsVisible = 1;
|
||||
else
|
||||
dwIconsVisible = 0;
|
||||
|
||||
SetWinRegNumValue(HKEY_LOCAL_MACHINE, szRegKey, "IconsVisible", dwIconsVisible);
|
||||
}
|
||||
|
||||
void ParseAllUninstallLogs()
|
||||
{
|
||||
char szFileInstallLog[MAX_BUF];
|
||||
char szKey[MAX_BUF];
|
||||
sil *silFile;
|
||||
DWORD dwFileFound;
|
||||
DWORD dwRv = 0;
|
||||
|
||||
UndoDesktopIntegration();
|
||||
CleanupMailIntegration();
|
||||
dwFileFound = GetLogFile(ugUninstall.szLogPath, ugUninstall.szLogFilename, szFileInstallLog, sizeof(szFileInstallLog));
|
||||
while(dwFileFound)
|
||||
{
|
||||
if((silFile = InitSilNodes(szFileInstallLog)) != NULL)
|
||||
{
|
||||
FileDelete(szFileInstallLog);
|
||||
dwRv = Uninstall(silFile);
|
||||
DeInitSilNodes(&silFile);
|
||||
if(dwRv == WTD_CANCEL)
|
||||
break;
|
||||
}
|
||||
|
||||
dwFileFound = GetLogFile(ugUninstall.szLogPath, ugUninstall.szLogFilename, szFileInstallLog, sizeof(szFileInstallLog));
|
||||
}
|
||||
|
||||
if(dwRv != WTD_CANCEL)
|
||||
{
|
||||
lstrcpy(szFileInstallLog, ugUninstall.szLogPath);
|
||||
AppendBackSlash(szFileInstallLog, MAX_BUF);
|
||||
lstrcat(szFileInstallLog, ugUninstall.szLogFilename);
|
||||
if(FileExists(szFileInstallLog))
|
||||
{
|
||||
if((silFile = InitSilNodes(szFileInstallLog)) != NULL)
|
||||
{
|
||||
FileDelete(szFileInstallLog);
|
||||
Uninstall(silFile);
|
||||
DeInitSilNodes(&silFile);
|
||||
}
|
||||
}
|
||||
|
||||
/* clean up the uninstall windows registry key */
|
||||
lstrcpy(szKey, "Software\\Microsoft\\Windows\\CurrentVersion\\uninstall\\");
|
||||
lstrcat(szKey, ugUninstall.szUninstallKeyDescription);
|
||||
RegDeleteKey(HKEY_LOCAL_MACHINE, szKey);
|
||||
|
||||
/* update Wininit.ini to remove itself at reboot */
|
||||
RemoveUninstaller(ugUninstall.szUninstallFilename);
|
||||
|
||||
// Calling SHChangeNotify() will update the file association icons
|
||||
// in case they had been reset.
|
||||
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
|
||||
}
|
||||
|
||||
/* Broadcast message only if the windows registry keys exist
|
||||
* in case they were changed during uninstallation. If they
|
||||
* were, then the broadcast will alert the OS to update the appropriate UIs.
|
||||
* This needs to be done regardless if the user canceled the uninstall
|
||||
* process or not.
|
||||
*/
|
||||
if(WinRegKeyExists(HKEY_LOCAL_MACHINE, MOZ_CLIENT_BROWSER_KEY))
|
||||
{
|
||||
SendMessageTimeout(HWND_BROADCAST,
|
||||
WM_SETTINGCHANGE,
|
||||
0,
|
||||
(LPARAM)MOZ_CLIENT_BROWSER_KEY,
|
||||
SMTO_NORMAL|SMTO_ABORTIFHUNG,
|
||||
MOZ_HWND_BROADCAST_MSG_TIMEOUT,
|
||||
NULL);
|
||||
}
|
||||
if(WinRegKeyExists(HKEY_LOCAL_MACHINE, MOZ_CLIENT_MAIL_KEY))
|
||||
{
|
||||
SendMessageTimeout(HWND_BROADCAST,
|
||||
WM_SETTINGCHANGE,
|
||||
0,
|
||||
(LPARAM)MOZ_CLIENT_MAIL_KEY,
|
||||
SMTO_NORMAL|SMTO_ABORTIFHUNG,
|
||||
MOZ_HWND_BROADCAST_MSG_TIMEOUT,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
LRESULT CALLBACK DlgProcUninstall(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
||||
{
|
||||
char szBuf[MAX_BUF];
|
||||
RECT rDlg;
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
SetWindowText(hDlg, diUninstall.szTitle);
|
||||
wsprintf(szBuf, diUninstall.szMessage0, ugUninstall.szDescription);
|
||||
SetDlgItemText(hDlg, IDC_MESSAGE0, szBuf);
|
||||
GetPrivateProfileString("Dialog Uninstall", "Yes", "", szBuf, sizeof(szBuf), szFileIniUninstall);
|
||||
SetDlgItemText(hDlg, IDWIZNEXT, szBuf);
|
||||
GetPrivateProfileString("Dialog Uninstall", "No", "", szBuf, sizeof(szBuf), szFileIniUninstall);
|
||||
SetDlgItemText(hDlg, IDCANCEL, szBuf);
|
||||
SendDlgItemMessage (hDlg, IDC_MESSAGE0, WM_SETFONT, (WPARAM)ugUninstall.definedFont, 0L);
|
||||
SendDlgItemMessage (hDlg, IDWIZNEXT, WM_SETFONT, (WPARAM)ugUninstall.definedFont, 0L);
|
||||
SendDlgItemMessage (hDlg, IDCANCEL, WM_SETFONT, (WPARAM)ugUninstall.definedFont, 0L);
|
||||
|
||||
if(GetClientRect(hDlg, &rDlg))
|
||||
SetWindowPos(hDlg, HWND_TOP, (dwScreenX/2)-(rDlg.right/2), (dwScreenY/2)-(rDlg.bottom/2), 0, 0, SWP_NOSIZE);
|
||||
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case IDWIZNEXT:
|
||||
EnableWindow(GetDlgItem(hDlg, IDWIZNEXT), FALSE);
|
||||
EnableWindow(GetDlgItem(hDlg, IDCANCEL), FALSE);
|
||||
ParseAllUninstallLogs();
|
||||
VerifyAndDeleteInstallationFolder();
|
||||
DestroyWindow(hDlg);
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
case IDCANCEL:
|
||||
DestroyWindow(hDlg);
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK DlgProcWhatToDo(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
||||
{
|
||||
char szBuf[MAX_BUF];
|
||||
RECT rDlg;
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
GetPrivateProfileString("Messages", "DLG_REMOVE_FILE_TITLE", "", szBuf, sizeof(szBuf), szFileIniUninstall);
|
||||
SetWindowText(hDlg, szBuf);
|
||||
|
||||
if((LPSTR)lParam != NULL)
|
||||
SetDlgItemText(hDlg, IDC_STATIC_SHARED_FILENAME, (LPSTR)lParam);
|
||||
|
||||
GetPrivateProfileString("Dialog Uninstall", "Message1", "", szBuf, sizeof(szBuf), szFileIniUninstall);
|
||||
SetDlgItemText(hDlg, IDC_MESSAGE0, szBuf);
|
||||
GetPrivateProfileString("Dialog Uninstall", "Message2", "", szBuf, sizeof(szBuf), szFileIniUninstall);
|
||||
SetDlgItemText(hDlg, IDC_MESSAGE1, szBuf);
|
||||
GetPrivateProfileString("Dialog Uninstall", "FileName", "", szBuf, sizeof(szBuf), szFileIniUninstall);
|
||||
SetDlgItemText(hDlg, IDC_STATIC, szBuf);
|
||||
GetPrivateProfileString("Dialog Uninstall", "No", "", szBuf, sizeof(szBuf), szFileIniUninstall);
|
||||
SetDlgItemText(hDlg, ID_NO, szBuf);
|
||||
GetPrivateProfileString("Dialog Uninstall", "NoToAll", "", szBuf, sizeof(szBuf), szFileIniUninstall);
|
||||
SetDlgItemText(hDlg, ID_NO_TO_ALL, szBuf);
|
||||
GetPrivateProfileString("Dialog Uninstall", "Yes", "", szBuf, sizeof(szBuf), szFileIniUninstall);
|
||||
SetDlgItemText(hDlg, ID_YES, szBuf);
|
||||
GetPrivateProfileString("Dialog Uninstall", "YesToAll", "", szBuf, sizeof(szBuf), szFileIniUninstall);
|
||||
SetDlgItemText(hDlg, ID_YES_TO_ALL, szBuf);
|
||||
|
||||
SendDlgItemMessage (hDlg, IDC_MESSAGE0, WM_SETFONT, (WPARAM)ugUninstall.definedFont, 0L);
|
||||
SendDlgItemMessage (hDlg, IDC_MESSAGE1, WM_SETFONT, (WPARAM)ugUninstall.definedFont, 0L);
|
||||
SendDlgItemMessage (hDlg, IDC_STATIC, WM_SETFONT, (WPARAM)ugUninstall.definedFont, 0L);
|
||||
SendDlgItemMessage (hDlg, IDC_STATIC_SHARED_FILENAME, WM_SETFONT, (WPARAM)ugUninstall.definedFont, 0L);
|
||||
SendDlgItemMessage (hDlg, ID_NO, WM_SETFONT, (WPARAM)ugUninstall.definedFont, 0L);
|
||||
SendDlgItemMessage (hDlg, ID_NO_TO_ALL, WM_SETFONT, (WPARAM)ugUninstall.definedFont, 0L);
|
||||
SendDlgItemMessage (hDlg, ID_YES, WM_SETFONT, (WPARAM)ugUninstall.definedFont, 0L);
|
||||
SendDlgItemMessage (hDlg, ID_YES_TO_ALL, WM_SETFONT, (WPARAM)ugUninstall.definedFont, 0L);
|
||||
|
||||
if(GetClientRect(hDlg, &rDlg))
|
||||
SetWindowPos(hDlg, HWND_TOP, (dwScreenX/2)-(rDlg.right/2), (dwScreenY/2)-(rDlg.bottom/2), 0, 0, SWP_NOSIZE);
|
||||
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case ID_NO:
|
||||
EndDialog(hDlg, WTD_NO);
|
||||
break;
|
||||
|
||||
case ID_NO_TO_ALL:
|
||||
EndDialog(hDlg, WTD_NO_TO_ALL);
|
||||
break;
|
||||
|
||||
case ID_YES:
|
||||
EndDialog(hDlg, WTD_YES);
|
||||
break;
|
||||
|
||||
case ID_YES_TO_ALL:
|
||||
EndDialog(hDlg, WTD_YES_TO_ALL);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK DlgProcMessage(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
||||
{
|
||||
RECT rDlg;
|
||||
HWND hSTMessage = GetDlgItem(hDlg, IDC_MESSAGE); /* handle to the Static Text message window */
|
||||
HDC hdcSTMessage;
|
||||
SIZE sizeString;
|
||||
LOGFONT logFont;
|
||||
HFONT hfontTmp;
|
||||
HFONT hfontOld;
|
||||
int i;
|
||||
|
||||
switch(msg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
SendDlgItemMessage (hDlg, IDC_MESSAGE, WM_SETFONT, (WPARAM)ugUninstall.definedFont, 0L);
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wParam))
|
||||
{
|
||||
case IDC_MESSAGE:
|
||||
hdcSTMessage = GetWindowDC(hSTMessage);
|
||||
|
||||
SystemParametersInfo(SPI_GETICONTITLELOGFONT,
|
||||
sizeof(logFont),
|
||||
(PVOID)&logFont,
|
||||
0);
|
||||
hfontTmp = CreateFontIndirect(&logFont);
|
||||
|
||||
if(hfontTmp)
|
||||
hfontOld = SelectObject(hdcSTMessage, hfontTmp);
|
||||
|
||||
GetTextExtentPoint32(hdcSTMessage, (LPSTR)lParam, lstrlen((LPSTR)lParam), &sizeString);
|
||||
SelectObject(hdcSTMessage, hfontOld);
|
||||
DeleteObject(hfontTmp);
|
||||
ReleaseDC(hSTMessage, hdcSTMessage);
|
||||
|
||||
SetWindowPos(hDlg, HWND_TOP,
|
||||
(dwScreenX/2)-((sizeString.cx + 40)/2), (dwScreenY/2)-((sizeString.cy + 40)/2),
|
||||
sizeString.cx + 40, sizeString.cy + 40,
|
||||
SWP_SHOWWINDOW);
|
||||
|
||||
if(GetClientRect(hDlg, &rDlg))
|
||||
SetWindowPos(hSTMessage,
|
||||
HWND_TOP,
|
||||
rDlg.left,
|
||||
rDlg.top,
|
||||
rDlg.right,
|
||||
rDlg.bottom,
|
||||
SWP_SHOWWINDOW);
|
||||
|
||||
for(i = 0; i < lstrlen((LPSTR)lParam); i++)
|
||||
{
|
||||
if((((LPSTR)lParam)[i] == '\r') || (((LPSTR)lParam)[i] == '\n'))
|
||||
((LPSTR)lParam)[i] = ' ';
|
||||
}
|
||||
|
||||
SetDlgItemText(hDlg, IDC_MESSAGE, (LPSTR)lParam);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
void ProcessWindowsMessages()
|
||||
{
|
||||
MSG msg;
|
||||
|
||||
while(PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
void ShowMessage(LPSTR szMessage, BOOL bShow)
|
||||
{
|
||||
char szBuf[MAX_BUF];
|
||||
|
||||
if(ugUninstall.mode != SILENT)
|
||||
{
|
||||
if((bShow) && (hDlgMessage == NULL))
|
||||
{
|
||||
ZeroMemory(szBuf, sizeof(szBuf));
|
||||
GetPrivateProfileString("Messages", "MB_MESSAGE_STR", "", szBuf, sizeof(szBuf), szFileIniUninstall);
|
||||
hDlgMessage = InstantiateDialog(hWndMain, DLG_MESSAGE, szBuf, DlgProcMessage);
|
||||
SendMessage(hDlgMessage, WM_COMMAND, IDC_MESSAGE, (LPARAM)szMessage);
|
||||
}
|
||||
else if(!bShow && hDlgMessage)
|
||||
{
|
||||
DestroyWindow(hDlgMessage);
|
||||
hDlgMessage = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HWND InstantiateDialog(HWND hParent, DWORD dwDlgID, LPSTR szTitle, WNDPROC wpDlgProc)
|
||||
{
|
||||
char szBuf[MAX_BUF];
|
||||
HWND hDlg = NULL;
|
||||
|
||||
if((hDlg = CreateDialog(hInst, MAKEINTRESOURCE(dwDlgID), hParent, wpDlgProc)) == NULL)
|
||||
{
|
||||
char szEDialogCreate[MAX_BUF];
|
||||
|
||||
if(GetPrivateProfileString("Messages", "ERROR_DIALOG_CREATE", "", szEDialogCreate, sizeof(szEDialogCreate), szFileIniUninstall))
|
||||
{
|
||||
wsprintf(szBuf, szEDialogCreate, szTitle);
|
||||
PrintError(szBuf, ERROR_CODE_SHOW);
|
||||
}
|
||||
|
||||
PostQuitMessage(1);
|
||||
}
|
||||
|
||||
return(hDlg);
|
||||
}
|
Загрузка…
Ссылка в новой задаче