1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/image/decoders/icon/qt/gtkqticonsconverter.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,137 @@ 1.4 +/* vim:set ts=2 sw=2 sts=2 cin et: */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); 1.10 + 1.11 + 1.12 +function GtkQtIconsConverter() { }; 1.13 +GtkQtIconsConverter.prototype = { 1.14 + classID: Components.ID("{c0783c34-a831-40c6-8c03-98c9f74cca45}"), 1.15 + QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIGtkQtIconsConverter]), 1.16 + convert: function(icon) { return this._gtk_qt_icons_table[icon]; }, 1.17 + _gtk_qt_icons_table: { 1.18 + 'about': 1.19 + 0, 1.20 + 'add': 1.21 + 0, 1.22 + 'apply': 1.23 + 44, /* QStyle::SP_DialogApplyButton */ 1.24 + 'cancel': 1.25 + 39, /* QStyle::SP_DialogCancelButton */ 1.26 + 'clear': 1.27 + 45, /* QStyle::SP_DialogResetButton */ 1.28 + 'color-picker': 1.29 + 0, 1.30 + 'copy': 1.31 + 0, 1.32 + 'close': 1.33 + 43, /* QStyle::SP_DialogCloseButton */ 1.34 + 'cut': 1.35 + 0, 1.36 + 'delete': 1.37 + 0, 1.38 + 'dialog-error': 1.39 + 0, 1.40 + 'dialog-info': 1.41 + 0, 1.42 + 'dialog-question': 1.43 + 12, /* QStyle::SP_MessageBoxQuestion */ 1.44 + 'dialog-warning': 1.45 + 10, /* QStyle::SP_MessageBoxWarning */ 1.46 + 'directory': 1.47 + 37, /* QStyle::SP_DirIcon */ 1.48 + 'file': 1.49 + 24, /* QStyle::SP_FileIcon */ 1.50 + 'find': 1.51 + 0, 1.52 + 'go-back-ltr': 1.53 + 53, /* QStyle::SP_ArrowBack */ 1.54 + 'go-back-rtl': 1.55 + 53, /* QStyle::SP_ArrowBack */ 1.56 + 'go-back': 1.57 + 53, /* QStyle::SP_ArrowBack */ 1.58 + 'go-forward-ltr': 1.59 + 54, /* QStyle::SP_ArrowForward */ 1.60 + 'go-forward-rtl': 1.61 + 54, /* QStyle::SP_ArrowForward */ 1.62 + 'go-forward': 1.63 + 54, /* QStyle::SP_ArrowForward */ 1.64 + 'go-up': 1.65 + 49, /* QStyle::SP_ArrowUp */ 1.66 + 'goto-first': 1.67 + 0, 1.68 + 'goto-last': 1.69 + 0, 1.70 + 'help': 1.71 + 7, /* QStyle::SP_TitleBarContextHelpButton */ 1.72 + 'home': 1.73 + 55, /* QStyle::SP_DirHomeIcon */ 1.74 + 'info': 1.75 + 9, /* QStyle::SP_MessageBoxInformation */ 1.76 + 'jump-to': 1.77 + 0, 1.78 + 'media-pause': 1.79 + 0, 1.80 + 'media-play': 1.81 + 0, 1.82 + 'network': 1.83 + 20, /* QStyle::SP_DriveNetIcon */ 1.84 + 'no': 1.85 + 48, /* QStyle::SP_DialogNoButton */ 1.86 + 'ok': 1.87 + 38, /* QStyle::SP_DialogOkButton */ 1.88 + 'open': 1.89 + 21, /* QStyle::SP_DirOpenIcon */ 1.90 + 'orientation-landscape': 1.91 + 0, 1.92 + 'orientation-portrait': 1.93 + 0, 1.94 + 'paste': 1.95 + 0, 1.96 + 'preferences': 1.97 + 34, /* QStyle::SP_FileDialogContentsView */ 1.98 + 'print-preview': 1.99 + 0, 1.100 + 'print': 1.101 + 0, 1.102 + 'properties': 1.103 + 0, 1.104 + 'quit': 1.105 + 0, 1.106 + 'redo': 1.107 + 0, 1.108 + 'refresh': 1.109 + 58, /* QStyle::SP_BrowserReload */ 1.110 + 'remove': 1.111 + 0, 1.112 + 'revert-to-saved': 1.113 + 0, 1.114 + 'save-as': 1.115 + 42, /* QStyle::SP_DialogSaveButton */ 1.116 + 'save': 1.117 + 42, /* QStyle::SP_DialogSaveButton */ 1.118 + 'select-all': 1.119 + 0, 1.120 + 'select-font': 1.121 + 0, 1.122 + 'stop': 1.123 + 59, /* QStyle::SP_BrowserStop */ 1.124 + 'undelete': 1.125 + 0, 1.126 + 'undo': 1.127 + 0, 1.128 + 'yes': 1.129 + 47, /* QStyle::SP_DialogYesButton */ 1.130 + 'zoom-100': 1.131 + 0, 1.132 + 'zoom-in': 1.133 + 0, 1.134 + 'zoom-out': 1.135 + 0 1.136 + }, 1.137 +} 1.138 +var components = [GtkQtIconsConverter]; 1.139 +this.NSGetFactory = XPCOMUtils.generateNSGetFactory(components); 1.140 +