image/decoders/icon/qt/gtkqticonsconverter.js

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /* vim:set ts=2 sw=2 sts=2 cin et: */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
michael@0 7
michael@0 8
michael@0 9 function GtkQtIconsConverter() { };
michael@0 10 GtkQtIconsConverter.prototype = {
michael@0 11 classID: Components.ID("{c0783c34-a831-40c6-8c03-98c9f74cca45}"),
michael@0 12 QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIGtkQtIconsConverter]),
michael@0 13 convert: function(icon) { return this._gtk_qt_icons_table[icon]; },
michael@0 14 _gtk_qt_icons_table: {
michael@0 15 'about':
michael@0 16 0,
michael@0 17 'add':
michael@0 18 0,
michael@0 19 'apply':
michael@0 20 44, /* QStyle::SP_DialogApplyButton */
michael@0 21 'cancel':
michael@0 22 39, /* QStyle::SP_DialogCancelButton */
michael@0 23 'clear':
michael@0 24 45, /* QStyle::SP_DialogResetButton */
michael@0 25 'color-picker':
michael@0 26 0,
michael@0 27 'copy':
michael@0 28 0,
michael@0 29 'close':
michael@0 30 43, /* QStyle::SP_DialogCloseButton */
michael@0 31 'cut':
michael@0 32 0,
michael@0 33 'delete':
michael@0 34 0,
michael@0 35 'dialog-error':
michael@0 36 0,
michael@0 37 'dialog-info':
michael@0 38 0,
michael@0 39 'dialog-question':
michael@0 40 12, /* QStyle::SP_MessageBoxQuestion */
michael@0 41 'dialog-warning':
michael@0 42 10, /* QStyle::SP_MessageBoxWarning */
michael@0 43 'directory':
michael@0 44 37, /* QStyle::SP_DirIcon */
michael@0 45 'file':
michael@0 46 24, /* QStyle::SP_FileIcon */
michael@0 47 'find':
michael@0 48 0,
michael@0 49 'go-back-ltr':
michael@0 50 53, /* QStyle::SP_ArrowBack */
michael@0 51 'go-back-rtl':
michael@0 52 53, /* QStyle::SP_ArrowBack */
michael@0 53 'go-back':
michael@0 54 53, /* QStyle::SP_ArrowBack */
michael@0 55 'go-forward-ltr':
michael@0 56 54, /* QStyle::SP_ArrowForward */
michael@0 57 'go-forward-rtl':
michael@0 58 54, /* QStyle::SP_ArrowForward */
michael@0 59 'go-forward':
michael@0 60 54, /* QStyle::SP_ArrowForward */
michael@0 61 'go-up':
michael@0 62 49, /* QStyle::SP_ArrowUp */
michael@0 63 'goto-first':
michael@0 64 0,
michael@0 65 'goto-last':
michael@0 66 0,
michael@0 67 'help':
michael@0 68 7, /* QStyle::SP_TitleBarContextHelpButton */
michael@0 69 'home':
michael@0 70 55, /* QStyle::SP_DirHomeIcon */
michael@0 71 'info':
michael@0 72 9, /* QStyle::SP_MessageBoxInformation */
michael@0 73 'jump-to':
michael@0 74 0,
michael@0 75 'media-pause':
michael@0 76 0,
michael@0 77 'media-play':
michael@0 78 0,
michael@0 79 'network':
michael@0 80 20, /* QStyle::SP_DriveNetIcon */
michael@0 81 'no':
michael@0 82 48, /* QStyle::SP_DialogNoButton */
michael@0 83 'ok':
michael@0 84 38, /* QStyle::SP_DialogOkButton */
michael@0 85 'open':
michael@0 86 21, /* QStyle::SP_DirOpenIcon */
michael@0 87 'orientation-landscape':
michael@0 88 0,
michael@0 89 'orientation-portrait':
michael@0 90 0,
michael@0 91 'paste':
michael@0 92 0,
michael@0 93 'preferences':
michael@0 94 34, /* QStyle::SP_FileDialogContentsView */
michael@0 95 'print-preview':
michael@0 96 0,
michael@0 97 'print':
michael@0 98 0,
michael@0 99 'properties':
michael@0 100 0,
michael@0 101 'quit':
michael@0 102 0,
michael@0 103 'redo':
michael@0 104 0,
michael@0 105 'refresh':
michael@0 106 58, /* QStyle::SP_BrowserReload */
michael@0 107 'remove':
michael@0 108 0,
michael@0 109 'revert-to-saved':
michael@0 110 0,
michael@0 111 'save-as':
michael@0 112 42, /* QStyle::SP_DialogSaveButton */
michael@0 113 'save':
michael@0 114 42, /* QStyle::SP_DialogSaveButton */
michael@0 115 'select-all':
michael@0 116 0,
michael@0 117 'select-font':
michael@0 118 0,
michael@0 119 'stop':
michael@0 120 59, /* QStyle::SP_BrowserStop */
michael@0 121 'undelete':
michael@0 122 0,
michael@0 123 'undo':
michael@0 124 0,
michael@0 125 'yes':
michael@0 126 47, /* QStyle::SP_DialogYesButton */
michael@0 127 'zoom-100':
michael@0 128 0,
michael@0 129 'zoom-in':
michael@0 130 0,
michael@0 131 'zoom-out':
michael@0 132 0
michael@0 133 },
michael@0 134 }
michael@0 135 var components = [GtkQtIconsConverter];
michael@0 136 this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
michael@0 137

mercurial