NokSync

KaarPoSoft

syncSelection.js_ File Reference


Detailed Description

Functionality for the SyncSelection window.


Functions

void  cancel ()
void  dontSelected (nsIDOMEvent event)
void  execute ()
Selection  getSelected (nsIRDFResource rdfRes)
void  help ()
void  initSyncSelection ()
void  itemview (string selectedType, int selectedIdx, Comparison comparison, nsIRDFResource rdfRes)
void  itemviewNone ()
void  neverSelected (nsIDOMEvent event)
void  notThisPopup (nsIDOMEvent event)
void  oppositeSelected (nsIDOMEvent event)
void  recount (nsIRDFDataSource ds)
void  renameRdfResource (nsIRDFDataSource ds, nsIRDFResource rdfOld, nsIRDFResource rdfNew)
void  serializeForDebug (void ds)
void  synctreeSelect (nsIDOMEvent event)

Variables

XUL::button  buttonopposite
XUL::checkbox  checkboxdont
XUL::checkbox  checkboxnever
Comparison  comparison
nsIRDFDataSource  dsListbox
nsIRDFDataSource  dsTree
Object  errorReturn
XUL::label  itemtoplabel
XUL::label  labelopposite
nsIRDFLiteral  literalPropertiesDontSync
string[]  oppositeType
int  outputStream
nsIRDFResource  predicateListItem
nsIRDFResource  predicateProperties
nsIRDFResource  predicateWhat
nsIPrefBranch  prefBranch
nsIRDFService  rdfService
int  selectedIdx
string  selectedType
stringbundle  stringBundle
XUL::listbox  synclistbox
XUL::tree  synctree
string  where

Function Documentation

void cancel (  ) 

Event handler for "Cancel" button

void dontSelected ( nsIDOMEvent  event  ) 

Event handler for checkbox "Dont synchronize..."

Parameters:
event 

void execute (  ) 

Event handler for "OK" / "Synchronize" button

Selection getSelected ( nsIRDFResource  rdfRes  ) 

Find indices into comparison for the given RDF resource

Parameters:
rdfRes 

void help (  ) 

Event handler for "Help" button

void initSyncSelection (  ) 

Set all global variables needed. Called due to the addEventListener.

void itemview ( string  selectedType,
int  selectedIdx,
Comparison  comparison,
nsIRDFResource  rdfRes  
)

Show the selected item on the right

Parameters:
selectedType 
selectedIdx 
comparison 
rdfRes  The RDF node at the item selected in tree

void itemviewNone (  ) 

Show no selected item on the right

void neverSelected ( nsIDOMEvent  event  ) 

Event handler for checkbox "Never synchronize..."

Parameters:
event 

void notThisPopup ( nsIDOMEvent  event  ) 

Event handler for right click on the left treeview

Parameters:
event 

void oppositeSelected ( nsIDOMEvent  event  ) 

Event handler for button "Update on ... instead"

Parameters:
event 

void recount ( nsIRDFDataSource  ds  ) 

Count number of items selected in the left treeview, and update parent rows accordingly.

Parameters:
ds 

void renameRdfResource ( nsIRDFDataSource  ds,
nsIRDFResource  rdfOld,
nsIRDFResource  rdfNew  
)

Rename all elements with source rdfOld to rdfNew

Parameters:
ds 
rdfOld 
rdfNew 

void serializeForDebug ( void  ds  ) 

for debug

void synctreeSelect ( nsIDOMEvent  event  ) 

Event handler for selection of event on the left

Parameters:
event 


Variable Documentation

XUL::button buttonopposite

Global. The button for selecting "update ... instead" Initialized by synctreeSelect();

XUL::checkbox checkboxdont

Global. The checkbox for selecting "dont synchronize..." Initialized by synctreeSelect();

XUL::checkbox checkboxnever

Global. The checkbox for selecting "never synchronize..." Initialized by synctreeSelect();

Comparison comparison

Global. Result of comparing Thunderbird with NOKIA Passed as window.arguments[0] to initSyncSelection();

nsIRDFDataSource dsListbox

Global. RDF datasource for synclistbox. Initialized by initSyncSelection();

nsIRDFDataSource dsTree

Global. RDF datasource for synctree. Initialized by initSyncSelection();

Object errorReturn

Global. Object with two properties: error and cancel. Those are set to true before returning, if appropriate Initialized by initSyncSelection(); Passed as window.arguments[1] to initSyncSelection();

XUL::label itemtoplabel

Global. The label at the top of the right of the window Initialized by synctreeSelect();

XUL::label labelopposite

Global. The label for selecting "update ... instead" Initialized by synctreeSelect();

nsIRDFLiteral literalPropertiesDontSync

Global. Literal "dontsync". Initialized by initSyncSelection();

string [] oppositeType

Global. Array indicating the opposite of some action. Used for labelling "update ... instead"

int outputStream

for debug

nsIRDFResource predicateListItem

Global. Predicate "#li". Initialized by initSyncSelection();

nsIRDFResource predicateProperties

Global. Predicate "#Properties". Initialized by initSyncSelection();

nsIRDFResource predicateWhat

Global. Predicate "#What". Initialized by initSyncSelection();

nsIPrefBranch prefBranch

The branch of the preference tree, in which NokSync preferences lives. Initialized by initSyncSelection();

nsIRDFService rdfService

Global RDF service Initialized by initSyncSelection();

int selectedIdx

Global. Index (given the type) of the item selected in synctree

string selectedType

Global. Type of the item selected in synctree

stringbundle stringBundle

Global bundle of strings to be used on the GUI. Initialized by initSyncSelection();

XUL::listbox synclistbox

Global. The listbox on the right in the window Initialized by synctreeSelect();

XUL::tree synctree

Global. The tree on the left in the window Initialized by initSyncSelection();

string where

Global prefix string for logging

Doxygen.org   SourceForge.net