j=dbIgnoredLinkedNotebooks.size();
}
}
}
IgnoreSync ignore = new IgnoreSync(notebooks, ignoredBooks, tags, ignoredTags, linkedNotebooks, ignoredLinkedNotebooks);
ignore.exec();
if (!ignore.okClicked())
return;
waitCursor(true);
// Clear out old notebooks & add the new ones
List<String> oldIgnoreNotebooks = conn.getSyncTable().getIgnoreRecords("NOTEBOOK");
for (int i=0; i<oldIgnoreNotebooks.size(); i++) {
conn.getSyncTable().deleteRecord("IGNORENOTEBOOK-"+oldIgnoreNotebooks.get(i));
}
List<String> newNotebooks = new ArrayList<String>();
for (int i=ignore.getIgnoredBookList().count()-1; i>=0; i--) {
String text = ignore.getIgnoredBookList().takeItem(i).text();
for (int j=0; j<notebooks.size(); j++) {
if (notebooks.get(j).getName().equalsIgnoreCase(text)) {
Notebook n = notebooks.get(j);
conn.getSyncTable().addRecord("IGNORENOTEBOOK-"+n.getGuid(), n.getGuid());
j=notebooks.size();
newNotebooks.add(n.getGuid());
}
}
}
// Clear out old tags & add new ones
List<String> oldIgnoreTags = conn.getSyncTable().getIgnoreRecords("TAG");
for (int i=0; i<oldIgnoreTags.size(); i++) {
conn.getSyncTable().deleteRecord("IGNORETAG-"+oldIgnoreTags.get(i));
}
List<String> newTags = new ArrayList<String>();
for (int i=ignore.getIgnoredTagList().count()-1; i>=0; i--) {
String text = ignore.getIgnoredTagList().takeItem(i).text();
for (int j=0; j<tags.size(); j++) {
if (tags.get(j).getName().equalsIgnoreCase(text)) {
Tag t = tags.get(j);
conn.getSyncTable().addRecord("IGNORETAG-"+t.getGuid(), t.getGuid());
newTags.add(t.getGuid());
j=tags.size();
}
}
}
// Clear out old tags & add new ones
List<String> oldIgnoreLinkedNotebooks = conn.getSyncTable().getIgnoreRecords("LINKEDNOTEBOOK");
for (int i=0; i<oldIgnoreLinkedNotebooks.size(); i++) {
conn.getSyncTable().deleteRecord("IGNORELINKEDNOTEBOOK-"+oldIgnoreLinkedNotebooks.get(i));
}
List<String> newLinked = new ArrayList<String>();
for (int i=ignore.getIgnoredLinkedNotebookList().count()-1; i>=0; i--) {
String text = ignore.getIgnoredLinkedNotebookList().takeItem(i).text();
for (int j=0; j<linkedNotebooks.size(); j++) {
if (linkedNotebooks.get(j).getShareName().equalsIgnoreCase(text)) {
LinkedNotebook t = linkedNotebooks.get(j);
conn.getSyncTable().addRecord("IGNORELINKEDNOTEBOOK-"+t.getGuid(), t.getGuid());
newLinked.add(t.getGuid());