Fixing bug 165299, problem with reloading servers if pref not set.

This commit is contained in:
mikep%oeone.com 2002-09-04 13:47:40 +00:00
parent 9e674cafd3
commit 8aa8b12536
3 changed files with 11 additions and 17 deletions

View File

@ -363,7 +363,7 @@
<box align="center">
<checkbox label="&calendar.unifinder.withalarms.label;" oncommand="unifinderShowEventsWithAlarmsOnly( event )" collapsed="true"/>
<menulist id="event-filter-menulist" persist="selectedItem">
<menupopup id="event-filter-menupopup" oncommand="unifinderShowFutureEventsOnly( event );">
<menupopup id="event-filter-menupopup" oncommand="unifinderDoFilterEvents( event );">
<menuitem id="event-filter-all" label="All Events" value="all" persist="selected"/>
<menuitem id="event-filter-today" label="Today's Events" value="today" persist="selected"/>
<menuitem id="event-filter-week" label="Events This Week" value="week" persist="selected"/>

View File

@ -199,16 +199,8 @@ calendarManager.prototype.getAllCalendars = function()
thisCalendar.path = profileFile.path;
var active;
try {
active = this.CalendarWindow.calendarPreferences.calendarPref.getBoolPref( "server0.active" );
}
catch( e )
{
this.CalendarWindow.calendarPreferences.calendarPref.setBoolPref( "server0.active", true );
active = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "server0.active", true );
active = this.CalendarWindow.calendarPreferences.calendarPref.getBoolPref( "server0.active" );
}
thisCalendar.active = active;
thisCalendar.remote = false;
this.calendars[ this.calendars.length ] = thisCalendar;
@ -216,6 +208,8 @@ calendarManager.prototype.getAllCalendars = function()
//go through the prefs file, calendars are stored in there.
var NumberOfCalendars = this.CalendarWindow.calendarPreferences.arrayOfPrefs.numberofservers;
var RefreshServers = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "servers.reloadonlaunch", false );
//don't count the default server, so this starts at 1
for( var i = 1; i < NumberOfCalendars; i++ )
{
@ -223,13 +217,13 @@ calendarManager.prototype.getAllCalendars = function()
try {
thisCalendar.name = this.CalendarWindow.calendarPreferences.calendarPref.getCharPref( "server"+i+".name" );
thisCalendar.path = this.CalendarWindow.calendarPreferences.calendarPref.getCharPref( "server"+i+".path" );
thisCalendar.active = this.CalendarWindow.calendarPreferences.calendarPref.getBoolPref( "server"+i+".active" );
thisCalendar.remote = this.CalendarWindow.calendarPreferences.calendarPref.getBoolPref( "server"+i+".remote" );
thisCalendar.remotePath = this.CalendarWindow.calendarPreferences.calendarPref.getCharPref( "server"+i+".remotePath" );
thisCalendar.name = getCharPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+i+".name", "" );
thisCalendar.path = getCharPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+i+".path", "" );
thisCalendar.active = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+i+".active", false );
thisCalendar.remote = getBoolPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+i+".remote", false );
thisCalendar.remotePath = getCharPref(this.CalendarWindow.calendarPreferences.calendarPref, "server"+i+".remotePath", "" );
if( this.CalendarWindow.calendarPreferences.calendarPref.getBoolPref( "servers.reloadonlaunch" ) == true
if( RefreshServers == true
&& thisCalendar.remote == true )
this.retrieveAndSaveRemoteCalendar( thisCalendar );

View File

@ -444,7 +444,7 @@ function unifinderShowEventsWithAlarmsOnly()
}
function unifinderShowFutureEventsOnly( event )
function unifinderDoFilterEvents( event )
{
var Today = new Date();
//do this to allow all day events to show up all day long