- Add "Debuggin" labels to Actions menu options

- Add extra temporary debug output
This commit is contained in:
Dan Stillman 2008-09-01 03:08:30 +00:00
parent 4da7a006c3
commit 93a213e9e5
2 changed files with 12 additions and 10 deletions

View File

@ -130,13 +130,14 @@
<menuseparator id="zotero-tb-actions-plugins-separator"/>
<menuitem id="zotero-tb-actions-timeline" label="&zotero.toolbar.timeline.label;" oncommand="Zotero_Timeline_Interface.loadTimeline()"/>
<menuseparator id="zotero-tb-actions-sync-separator"/>
<menuitem label="Clear Server Data" oncommand="Zotero.Sync.Server.clear()"/>
<menuitem label="Reset Server Lock" oncommand="Zotero.Sync.Server.resetServer()"/>
<menuitem label="Reset Client" oncommand="Zotero.Sync.Server.resetClient()"/>
<menuseparator id="zotero-tb-actions-storage-separator"/>
<menuitem label="Reset Storage History" oncommand="Zotero.Sync.Storage.resetAllSyncStates()"/>
<menuitem label="Purge Deleted Storage Files" oncommand="Zotero.Sync.Storage.purgeDeletedStorageFiles(function(results) { Zotero.debug(results); })"/>
<menuitem label="Purge Orphaned Storage Files" oncommand="Zotero.Sync.Storage.purgeOrphanedStorageFiles(function(results) { Zotero.debug(results); })"/>
<menuitem label="Sync Debugging" disabled="true"/>
<menuitem label=" Clear Server Data" oncommand="Zotero.Sync.Server.clear()"/>
<menuitem label=" Reset Server Lock" oncommand="Zotero.Sync.Server.resetServer()"/>
<menuitem label=" Reset Client" oncommand="Zotero.Sync.Server.resetClient()"/>
<menuitem label="Storage Debugging" disabled="true"/>
<menuitem label=" Reset Storage History" oncommand="Zotero.Sync.Storage.resetAllSyncStates()"/>
<menuitem label=" Purge Deleted Storage Files" oncommand="Zotero.Sync.Storage.purgeDeletedStorageFiles(function(results) { Zotero.debug(results); })"/>
<menuitem label=" Purge Orphaned Storage Files" oncommand="Zotero.Sync.Storage.purgeOrphanedStorageFiles(function(results) { Zotero.debug(results); })"/>
<menuseparator id="zotero-tb-actions-separator"/>
<menuitem id="zotero-tb-actions-prefs" label="&zotero.toolbar.preferences.label;"
oncommand="window.openDialog('chrome://zotero/content/preferences/preferences.xul', 'zotero-prefs', 'chrome,titlebar,toolbar,' + Zotero.Prefs.get('browser.preferences.instantApply', true) ? 'dialog=no' : 'modal')"/>

View File

@ -1816,6 +1816,8 @@ Zotero.Sync.Storage = new function () {
* Also updates progress meter
*/
function _resetRequestsIfDone() {
Zotero.debug(_requests);
Zotero.debug(_numRequests);
for (var queue in _requests) {
if (_numRequests[queue].active != 0 || _numRequests[queue].queued != 0) {
return false;
@ -1989,10 +1991,9 @@ Zotero.Sync.Storage.ZipWriterObserver.prototype = {
Zotero.Sync.Storage.compressionTracker.compressed += this._zipWriter.file.fileSize;
Zotero.Sync.Storage.compressionTracker.uncompressed += originalSize;
Zotero.debug("Ratio so far: " + Zotero.Sync.Storage.compressionTracker.ratio);
Zotero.debug("Average compression so far: "
+ Zotero.Sync.Storage.compressionTracker.ratio + "%");
var item = Zotero.Items.get(this._data.itemID);
Zotero.debug("Original sum " + Zotero.Attachments.getTotalFileSize(item));
this._callback(this._data);
}
}