Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ximi1970:Mozilla:Add-ons:Staging:Test3
gnome-shell-extension-appindicator
_service:obs_scm:gnome-shell-extension-appindic...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:gnome-shell-extension-appindicator-v57+git5.03a7412.obscpio of Package gnome-shell-extension-appindicator
07070100000000000081A400000000000000000000000165CC2919000001EE000000000000000000000000000000000000004200000000gnome-shell-extension-appindicator-v57+git5.03a7412/.eslintrc.ymlignorePatterns: - _build/** extends: - ./lint/eslintrc-gjs.yml - ./lint/eslintrc-shell.yml overrides: - files: ./*.js globals: global: readonly _: readonly C_: readonly N_: readonly ngettext: readonly rules: prefer-const: error prefer-destructuring: warn guard-for-in: error max-len: - error - code: 110 ignoreUrls: true ignoreTemplateLiterals: true parserOptions: sourceType: module 07070100000001000041ED00000000000000000000000365CC291900000000000000000000000000000000000000000000003C00000000gnome-shell-extension-appindicator-v57+git5.03a7412/.github07070100000002000041ED00000000000000000000000265CC291900000000000000000000000000000000000000000000004600000000gnome-shell-extension-appindicator-v57+git5.03a7412/.github/workflows07070100000003000081A400000000000000000000000165CC291900000107000000000000000000000000000000000000005200000000gnome-shell-extension-appindicator-v57+git5.03a7412/.github/workflows/eslint.yamlname: ESLint on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install modules run: sudo npm install eslint -g - name: Run ESLint run: eslint . -f tap --ext .js,.jsx,.ts,.tsx 07070100000004000081A400000000000000000000000165CC291900000025000000000000000000000000000000000000003F00000000gnome-shell-extension-appindicator-v57+git5.03a7412/.gitignorebuild schemas/gschemas.compiled *.mo 07070100000005000081A400000000000000000000000165CC291900000343000000000000000000000000000000000000003F00000000gnome-shell-extension-appindicator-v57+git5.03a7412/AUTHORS.mdThis extension is based on [patches made by Giovanni Campagna](https://bugzilla.gnome.org/show_bug.cgi?id=652122). Authors ordered by first contribution: * Jonas Kümmerlin <rgcjonas@gmail.com> * Damián Nohales <damiannohales@gmail.com> * Dincer Kavraal <dkavraal@gmail.com> * Thomas Schaberreiter <thomassc@ee.oulu.fi> * Hugo Josefson <hugo@josefson.org> * ozamorowski <ozamorowski@gmail.com> * Anthony Ruhier <anthony.ruhier@gmail.com> * Emilien Devos <unixfox@users.noreply.github.com> * Jan Niklas Hasse <jhasse@bixense.com> * Romeo Calota <kicsyromy@gmail.com> * JasonLG1979 <jasonlevigray3@gmail.com> * Martin Wallin <guzzard@gmail.com> * Andrea Azzarone <andrea.azzarone@canonical.com> * Marco Trevisan (Treviño) <mail@3v1n0.net> <!-- created with: git log --reverse --pretty="%an <%ae>%n%cn <%ce>" | awk '!seen[$0]++' --> 07070100000006000081A400000000000000000000000165CC2919000046AC000000000000000000000000000000000000003C00000000gnome-shell-extension-appindicator-v57+git5.03a7412/LICENSE GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. 07070100000007000081A400000000000000000000000165CC291900000F2F000000000000000000000000000000000000003E00000000gnome-shell-extension-appindicator-v57+git5.03a7412/README.md# AppIndicator/KStatusNotifierItem support for GNOME Shell This extension integrates Ubuntu AppIndicators and KStatusNotifierItems (KDE's blessed successor of the systray) into GNOME Shell. Including support for legacy tray icons. [<img alt="" height="100" src="https://raw.githubusercontent.com/andyholmes/gnome-shell-extensions-badge/master/get-it-on-ego.svg?sanitize=true">](https://extensions.gnome.org/extension/615/appindicator-support/) ## Features * Show indicator icons in the panel. * Reveal indicator menus upon click. * Double clicking an icon will activate the application window (if implemented by the indicator). * Legacy tray icons * Middle mouse click an icon to send a 'SecondaryActivate' event to the application. Support needs to be implemented in the application. [Info 1](https://bugs.launchpad.net/unity/+bug/812933), [Info 2](https://developer.ubuntu.com/api/devel/ubuntu-13.10/c/AppIndicator3-0.1.html). ## Missing features * Tooltips: Not implemented in `libappindicator` nor in Unity and I've yet to see any indicator using it for anything relevant (KDE ones maybe?). Also, the GNOME designers decided not to have tooltips in the shell and I'd like to honor that decision. ## Known issues * ClassicMenu Indicator takes ages to load and has been reported to freeze the shell forever. This is probably caused by the insane amount of embedded PNG icons. Try at your own risk. ## Installation Normal users are recommended to get the extension from [extensions.gnome.org](https://extensions.gnome.org/extension/615/appindicator-support/). Alternatively, you can check out a version from git, compile the language files, and symlink `~/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com` to your clone: ```bash git clone https://github.com/ubuntu/gnome-shell-extension-appindicator.git meson gnome-shell-extension-appindicator /tmp/g-s-appindicators-build ninja -C /tmp/g-s-appindicators-build install gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com ``` Under X11, you may need to restart GNOME Shell (<kbd>Alt</kbd>+<kbd>F2</kbd>, <kbd>r</kbd>, <kbd>⏎</kbd>) after that. Under Wayland you need to logout and login again. ### Applications dependencies Many applications support indicators via [libappindicator](https://launchpad.net/libappindicator), (that is quite often dynamically loaded, as it happens in Electron apps), so without having this library installed in your system no icon will be shown. ## Guidelines for bug reports Unfortunately, this extension is not completely bug free and will probably never be. In order to successfully resolve remaining issues, you need to provide some data: * Your distribution, Shell version and extension version (something like "latest git" or "latest from extensions.gnome.org" is sufficient). * The indicator that caused the bug (if applicable). * Instructions how to reproduce it. **This is the single most important point**. Bugs which [cannot be reproduced](http://xkcd.com/583/) cannot be fixed. Bug reports which do not provide the necessary information may be closed as "invalid" without prior notice. ## Release process This section serves as reminder for the current maintainer and as instruction set for an eventual sucessor. * The maintainer decides when to release a new version. * Versions are tagged (and signed). Version numbers sould be kept in sync with the versions submitted to `extensions.gnome.org`. This implies that version numbers are integers which will be incremented with each release. * The maintainer will tag a new version, update the meson version and generate a zip file using `ninja -C <build-dir> zip-file`. * The zip file will be tested to ensure that nothing was missed when packaging it. * Only if it passed, it is uploaded to `extensions.gnome.org` and the tag is pushed. This release process has been in place since v41. 07070100000008000081A400000000000000000000000165CC29190000D326000000000000000000000000000000000000004400000000gnome-shell-extension-appindicator-v57+git5.03a7412/appIndicator.js// This file is part of the AppIndicator/KStatusNotifierItem GNOME Shell extension // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import Clutter from 'gi://Clutter'; import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; import GdkPixbuf from 'gi://GdkPixbuf'; import Gio from 'gi://Gio'; import St from 'gi://St'; import * as Params from 'resource:///org/gnome/shell/misc/params.js'; import * as Signals from 'resource:///org/gnome/shell/misc/signals.js'; import * as IconCache from './iconCache.js'; import * as Util from './util.js'; import * as Interfaces from './interfaces.js'; import * as PixmapsUtils from './pixmapsUtils.js'; import * as PromiseUtils from './promiseUtils.js'; import * as SettingsManager from './settingsManager.js'; import {DBusProxy} from './dbusProxy.js'; Gio._promisify(Gio.File.prototype, 'read_async'); Gio._promisify(GdkPixbuf.Pixbuf, 'get_file_info_async'); Gio._promisify(GdkPixbuf.Pixbuf, 'new_from_stream_at_scale_async', 'new_from_stream_finish'); Gio._promisify(St.IconInfo.prototype, 'load_symbolic_async'); const MAX_UPDATE_FREQUENCY = 30; // In ms const FALLBACK_ICON_NAME = 'image-loading-symbolic'; const PIXMAPS_FORMAT = imports.gi.Cogl.PixelFormat.ARGB_8888; export const SNICategory = Object.freeze({ APPLICATION: 'ApplicationStatus', COMMUNICATIONS: 'Communications', SYSTEM: 'SystemServices', HARDWARE: 'Hardware', }); export const SNIStatus = Object.freeze({ PASSIVE: 'Passive', ACTIVE: 'Active', NEEDS_ATTENTION: 'NeedsAttention', }); const SNIconType = Object.freeze({ NORMAL: 0, ATTENTION: 1, OVERLAY: 2, toPropertyName: (iconType, params = {isPixbuf: false}) => { let propertyName = 'Icon'; if (iconType === SNIconType.OVERLAY) propertyName = 'OverlayIcon'; else if (iconType === SNIconType.ATTENTION) propertyName = 'AttentionIcon'; return `${propertyName}${params.isPixbuf ? 'Pixmap' : 'Name'}`; }, }); export const AppIndicatorProxy = GObject.registerClass( class AppIndicatorProxy extends DBusProxy { static get interfaceInfo() { if (!this._interfaceInfo) { this._interfaceInfo = Gio.DBusInterfaceInfo.new_for_xml( Interfaces.StatusNotifierItem); } return this._interfaceInfo; } static get OPTIONAL_PROPERTIES() { return [ 'XAyatanaLabel', 'XAyatanaLabelGuide', 'XAyatanaOrderingIndex', 'IconAccessibleDesc', 'AttentionAccessibleDesc', ]; } static get TUPLE_TYPE() { if (!this._tupleType) this._tupleType = new GLib.VariantType('()'); return this._tupleType; } static destroy() { delete this._interfaceInfo; delete this._tupleType; } _init(busName, objectPath) { const {interfaceInfo} = AppIndicatorProxy; super._init(busName, objectPath, interfaceInfo, Gio.DBusProxyFlags.GET_INVALIDATED_PROPERTIES); this.set_cached_property('Status', new GLib.Variant('s', SNIStatus.PASSIVE)); this._accumulatedProperties = new Set(); this._cancellables = new Map(); this._changedProperties = Object.create(null); } async initAsync(cancellable) { await super.initAsync(cancellable); this._setupProxyPropertyList(); } destroy() { const cachedProperties = this.get_cached_property_names(); if (cachedProperties) { cachedProperties.forEach(propertyName => this.set_cached_property(propertyName, null)); } super.destroy(); } _onNameOwnerChanged() { this._resetNeededProperties(); if (!this.gNameOwner) this._cancelRefreshProperties(); else this._setupProxyPropertyList(); } _setupProxyPropertyList() { this._propertiesList = (this.get_cached_property_names() || []).filter(p => this.gInterfaceInfo.properties.some(pInfo => pInfo.name === p)); if (this._propertiesList.length) { AppIndicatorProxy.OPTIONAL_PROPERTIES.forEach( p => this._addExtraProperty(p)); } } _addExtraProperty(name) { if (this._propertiesList.includes(name)) return; if (!(name in this)) { Object.defineProperty(this, name, { configurable: false, enumerable: true, get: () => { const v = this.get_cached_property(name); return v ? v.deep_unpack() : null; }, }); } this._propertiesList.push(name); } _signalToPropertyName(signal) { if (signal.startsWith('New')) return signal.substr(3); else if (signal.startsWith('XAyatanaNew')) return `XAyatana${signal.substr(11)}`; return null; } // The Author of the spec didn't like the PropertiesChanged signal, so he invented his own async _refreshOwnProperties(prop) { await Promise.all( [prop, `${prop}Name`, `${prop}Pixmap`, `${prop}AccessibleDesc`].filter(p => this._propertiesList.includes(p)).map(async p => { try { await this.refreshProperty(p, { skipEqualityCheck: p.endsWith('Pixmap'), }); } catch (e) { if (!AppIndicatorProxy.OPTIONAL_PROPERTIES.includes(p) || !e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_PROPERTY)) logError(e); } })); } _onSignal(...args) { this._onSignalAsync(...args).catch(e => { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); }); } async _onSignalAsync(_sender, signal, params) { const property = this._signalToPropertyName(signal); if (!property) return; if (this.status === SNIStatus.PASSIVE && ![...AppIndicator.NEEDED_PROPERTIES, 'Status'].includes(property)) { this._accumulatedProperties.add(property); return; } if (!params.get_type().equal(AppIndicatorProxy.TUPLE_TYPE)) { // If the property includes arguments, we can just queue the signal emission const [value] = params.unpack(); try { await this._queuePropertyUpdate(property, value); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) throw e; } if (!this._accumulatedProperties.size) return; } else { this._accumulatedProperties.add(property); } if (this._signalsAccumulator) return; this._signalsAccumulator = new PromiseUtils.TimeoutPromise( MAX_UPDATE_FREQUENCY, GLib.PRIORITY_DEFAULT_IDLE, this._cancellable); try { await this._signalsAccumulator; const refreshPropertiesPromises = [...this._accumulatedProperties].map(p => this._refreshOwnProperties(p)); this._accumulatedProperties.clear(); await Promise.all(refreshPropertiesPromises); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) throw e; } finally { delete this._signalsAccumulator; } } _resetNeededProperties() { AppIndicator.NEEDED_PROPERTIES.forEach(p => this.set_cached_property(p, null)); } async refreshAllProperties() { const cancellableName = 'org.freedesktop.DBus.Properties.GetAll'; const cancellable = this._cancelRefreshProperties({ propertyName: cancellableName, addNew: true, }); try { const [valuesVariant] = (await this.getProperties( cancellable)).deep_unpack(); this._cancellables.delete(cancellableName); await Promise.all( Object.entries(valuesVariant).map(([propertyName, valueVariant]) => this._queuePropertyUpdate(propertyName, valueVariant, { skipEqualityCheck: true, cancellable, }))); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) { // the property may not even exist, silently ignore it Util.Logger.debug(`While refreshing all properties: ${e}`); this.get_cached_property_names().forEach(propertyName => this.set_cached_property(propertyName, null)); this._cancellables.delete(cancellableName); throw e; } } } async refreshProperty(propertyName, params) { params = Params.parse(params, { skipEqualityCheck: false, }); const cancellable = this._cancelRefreshProperties({ propertyName, addNew: true, }); try { const [valueVariant] = (await this.getProperty( propertyName, cancellable)).deep_unpack(); this._cancellables.delete(propertyName); await this._queuePropertyUpdate(propertyName, valueVariant, Object.assign(params, {cancellable})); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) { // the property may not even exist, silently ignore it Util.Logger.debug(`While refreshing property ${propertyName}: ${e}`); this.set_cached_property(propertyName, null); this._cancellables.delete(propertyName); delete this._changedProperties[propertyName]; throw e; } } } async _queuePropertyUpdate(propertyName, value, params) { params = Params.parse(params, { skipEqualityCheck: false, cancellable: null, }); if (!params.skipEqualityCheck) { const cachedProperty = this.get_cached_property(propertyName); if (value && cachedProperty && value.equal(this.get_cached_property(propertyName))) return; } this.set_cached_property(propertyName, value); // synthesize a batched property changed event this._changedProperties[propertyName] = value; if (!this._propertiesEmitTimeout || !this._propertiesEmitTimeout.pending()) { if (!params.cancellable) { params.cancellable = this._cancelRefreshProperties({ propertyName, addNew: true, }); } this._propertiesEmitTimeout = new PromiseUtils.TimeoutPromise( MAX_UPDATE_FREQUENCY * 2, GLib.PRIORITY_DEFAULT_IDLE, params.cancellable); await this._propertiesEmitTimeout; if (Object.keys(this._changedProperties).length) { this.emit('g-properties-changed', GLib.Variant.new('a{sv}', this._changedProperties), []); this._changedProperties = Object.create(null); } } } _cancelRefreshProperties(params) { params = Params.parse(params, { propertyName: undefined, addNew: false, }); if (!this._cancellables.size && !params.addNew) return null; if (params.propertyName !== undefined) { let cancellable = this._cancellables.get(params.propertyName); if (cancellable) { cancellable.cancel(); if (!params.addNew) this._cancellables.delete(params.propertyName); } if (params.addNew) { cancellable = new Util.CancellableChild(this._cancellable); this._cancellables.set(params.propertyName, cancellable); return cancellable; } } else { this._cancellables.forEach(c => c.cancel()); this._cancellables.clear(); this._changedProperties = Object.create(null); } return null; } }); /** * the AppIndicator class serves as a generic container for indicator information and functions common * for every displaying implementation (IndicatorMessageSource and IndicatorStatusIcon) */ export class AppIndicator extends Signals.EventEmitter { static get NEEDED_PROPERTIES() { return ['Id', 'Menu']; } constructor(service, busName, object) { super(); this.isReady = false; this.busName = busName; this._uniqueId = Util.indicatorId(service, busName, object); this._cancellable = new Gio.Cancellable(); this._proxy = new AppIndicatorProxy(busName, object); this._invalidatedPixmapsIcons = new Set(); this._setupProxy().catch(logError); Util.connectSmart(this._proxy, 'g-properties-changed', this, this._onPropertiesChanged); Util.connectSmart(this._proxy, 'notify::g-name-owner', this, this._nameOwnerChanged); if (this.uniqueId === service) { this._nameWatcher = new Util.NameWatcher(service); Util.connectSmart(this._nameWatcher, 'changed', this, this._nameOwnerChanged); } } async _setupProxy() { const cancellable = this._cancellable; try { await this._proxy.initAsync(cancellable); this._checkIfReady(); await this._checkNeededProperties(); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) { logError(e, `While initalizing proxy for ${this._uniqueId}`); this.destroy(); } } try { this._commandLine = await Util.getProcessName(this.busName, cancellable, GLib.PRIORITY_LOW); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) { Util.Logger.debug( `${this.uniqueId}, failed getting command line: ${e.message}`); } } } _checkIfReady() { const wasReady = this.isReady; let isReady = false; if (this.hasNameOwner && this.id && this.menuPath) isReady = true; this.isReady = isReady; if (this.isReady && !wasReady) { if (this._delayCheck) { this._delayCheck.cancel(); delete this._delayCheck; } this.emit('ready'); return true; } return false; } async _checkNeededProperties() { if (this.id && this.menuPath) return true; const MAX_RETRIES = 3; const cancellable = this._cancellable; for (let checks = 0; checks < MAX_RETRIES; ++checks) { this._delayCheck = new PromiseUtils.TimeoutSecondsPromise(1, GLib.PRIORITY_DEFAULT_IDLE, cancellable); // eslint-disable-next-line no-await-in-loop await this._delayCheck; try { // eslint-disable-next-line no-await-in-loop await Promise.all(AppIndicator.NEEDED_PROPERTIES.map(p => this._proxy.refreshProperty(p))); } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) throw e; if (checks < MAX_RETRIES - 1) continue; throw e; } if (this.id && this.menuPath) break; } return this.id && this.menuPath; } async _nameOwnerChanged() { if (!this.hasNameOwner) { this._checkIfReady(); } else { try { await this._checkNeededProperties(); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) { Util.Logger.warn(`${this.uniqueId}, Impossible to get basic properties: ${e}`); this.checkAlive(); } } } this.emit('name-owner-changed'); } // public property getters get title() { return this._proxy.Title; } get id() { return this._proxy.Id; } get uniqueId() { return this._uniqueId; } get status() { return this._proxy.Status; } get label() { return this._proxy.XAyatanaLabel || null; } get accessibleName() { const accessibleDesc = this.status === SNIStatus.NEEDS_ATTENTION ? this._proxy.AccessibleDesc : this._proxy.IconAccessibleDesc; return accessibleDesc || this.title; } get menuPath() { if (this._proxy.Menu === '/NO_DBUSMENU') return null; return this._proxy.Menu; } get attentionIcon() { return { theme: this._proxy.IconThemePath, name: this._proxy.AttentionIconName, pixmap: this._getPixmapProperty(SNIconType.ATTENTION), }; } get icon() { return { theme: this._proxy.IconThemePath, name: this._proxy.IconName, pixmap: this._getPixmapProperty(SNIconType.NORMAL), }; } get overlayIcon() { return { theme: this._proxy.IconThemePath, name: this._proxy.OverlayIconName, pixmap: this._getPixmapProperty(SNIconType.OVERLAY), }; } get hasOverlayIcon() { const {name, pixmap} = this.overlayIcon; return name || (pixmap && pixmap.n_children()); } get hasNameOwner() { if (this._nameWatcher && !this._nameWatcher.nameOnBus) return false; return !!this._proxy.g_name_owner; } get cancellable() { return this._cancellable; } async checkAlive() { // Some applications (hey electron!) just remove the indicator object // from bus after hiding it, without closing its bus name, so we are // not able to understand whe they're gone. // Thus we just kill it when an expected well-known method is failing. if (this.status !== SNIStatus.PASSIVE && this._checkIfReady()) { if (this._checkAliveTimeout) { this._checkAliveTimeout.cancel(); delete this._checkAliveTimeout; } return; } if (this._checkAliveTimeout) return; try { const cancellable = this._cancellable; this._checkAliveTimeout = new PromiseUtils.TimeoutSecondsPromise(10, GLib.PRIORITY_DEFAULT_IDLE, cancellable); Util.Logger.debug(`${this.uniqueId}: may not respond, checking...`); await this._checkAliveTimeout; // We should call the Ping method instead but in some containers // such as snaps that's not accessible, so let's just use our own await this._proxy.getProperty('Status', cancellable); } catch (e) { if (e.matches(Gio.DBusError, Gio.DBusError.NAME_HAS_NO_OWNER) || e.matches(Gio.DBusError, Gio.DBusError.SERVICE_UNKNOWN) || e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_OBJECT) || e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_INTERFACE) || e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_METHOD) || e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_PROPERTY)) { Util.Logger.warn(`${this.uniqueId}: not on bus anymore, removing it`); this.destroy(); return; } if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); } finally { delete this._checkAliveTimeout; } } _onPropertiesChanged(_proxy, changed, _invalidated) { const props = Object.keys(changed.unpack()); const signalsToEmit = new Set(); const checkIfReadyChanged = () => { if (checkIfReadyChanged.value === undefined) checkIfReadyChanged.value = this._checkIfReady(); return checkIfReadyChanged.value; }; props.forEach(property => { // some property changes require updates on our part, // a few need to be passed down to the displaying code if (property === 'Id') checkIfReadyChanged(); // all these can mean that the icon has to be changed if (property.startsWith('Icon') || property.startsWith('AttentionIcon')) signalsToEmit.add('icon'); // same for overlays if (property.startsWith('OverlayIcon')) signalsToEmit.add('overlay-icon'); // this may make all of our icons invalid if (property === 'IconThemePath') { signalsToEmit.add('icon'); signalsToEmit.add('overlay-icon'); } // the label will be handled elsewhere if (property === 'XAyatanaLabel') signalsToEmit.add('label'); if (property === 'Menu') { if (!checkIfReadyChanged() && this.isReady) signalsToEmit.add('menu'); } if (property === 'IconAccessibleDesc' || property === 'AttentionAccessibleDesc' || property === 'Title') signalsToEmit.add('accessible-name'); // status updates may cause the indicator to be hidden if (property === 'Status') { signalsToEmit.add('icon'); signalsToEmit.add('overlay-icon'); signalsToEmit.add('status'); signalsToEmit.add('accessible-name'); } }); signalsToEmit.forEach(s => this.emit(s)); } reset() { this.emit('reset'); } destroy() { this.emit('destroy'); this.disconnectAll(); this._proxy.destroy(); this._cancellable.cancel(); this._invalidatedPixmapsIcons.clear(); if (this._nameWatcher) this._nameWatcher.destroy(); delete this._cancellable; delete this._proxy; delete this._nameWatcher; } _getPixmapProperty(iconType) { const propertyName = SNIconType.toPropertyName(iconType, {isPixbuf: true}); const pixmap = this._proxy.get_cached_property(propertyName); const wasInvalidated = this._invalidatedPixmapsIcons.delete(iconType); if (!pixmap && wasInvalidated) { this._proxy.refreshProperty(propertyName, { skipEqualityCheck: true, }).catch(e => { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); }); } return pixmap; } invalidatePixmapProperty(iconType) { this._invalidatedPixmapsIcons.add(iconType); this._proxy.set_cached_property( SNIconType.toPropertyName(iconType, {isPixbuf: true}), null); } _getActivationToken(timestamp) { const launchContext = global.create_app_launch_context(timestamp, -1); const fakeAppInfo = Gio.AppInfo.create_from_commandline( this._commandLine || 'true', this.id, Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION); return [launchContext, launchContext.get_startup_notify_id(fakeAppInfo, [])]; } async provideActivationToken(timestamp) { if (this._hasProvideXdgActivationToken === false) return; const [launchContext, activationToken] = this._getActivationToken(timestamp); try { await this._proxy.ProvideXdgActivationTokenAsync(activationToken, this._cancellable); this._hasProvideXdgActivationToken = true; } catch (e) { launchContext.launch_failed(activationToken); if (e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_METHOD)) this._hasProvideXdgActivationToken = false; else Util.Logger.warn(`${this.id}, failed to provide activation token: ${e.message}`); } } async open(x, y, timestamp) { const cancellable = this._cancellable; // we can't use WindowID because we're not able to get the x11 window id from a MetaWindow // nor can we call any X11 functions. Luckily, the Activate method usually works fine. // parameters are "an hint to the item where to show eventual windows" [sic] // ... and don't seem to have any effect. try { await this.provideActivationToken(timestamp); await this._proxy.ActivateAsync(x, y, cancellable); this.supportsActivation = true; } catch (e) { if (e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_METHOD)) { this.supportsActivation = false; Util.Logger.warn(`${this.id}, does not support activation: ${e.message}`); return; } if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) Util.Logger.critical(`${this.id}, failed to activate: ${e.message}`); } } async secondaryActivate(timestamp, x, y) { const cancellable = this._cancellable; try { await this.provideActivationToken(timestamp); if (this._hasAyatanaSecondaryActivate !== false) { try { await this._proxy.XAyatanaSecondaryActivateAsync(timestamp, cancellable); this._hasAyatanaSecondaryActivate = true; } catch (e) { if (e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_METHOD)) this._hasAyatanaSecondaryActivate = false; else throw e; } } if (!this._hasAyatanaSecondaryActivate) await this._proxy.SecondaryActivateAsync(x, y, cancellable); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) Util.Logger.critical(`${this.id}, failed to secondary activate: ${e.message}`); } } async scroll(dx, dy) { const cancellable = this._cancellable; try { const actions = []; if (dx !== 0) { actions.push(this._proxy.ScrollAsync(Math.floor(dx), 'horizontal', cancellable)); } if (dy !== 0) { actions.push(this._proxy.ScrollAsync(Math.floor(dy), 'vertical', cancellable)); } await Promise.all(actions); } catch (e) { Util.Logger.critical(`${this.id}, failed to scroll: ${e.message}`); } } } const StTextureCacheSkippingFileIcon = GObject.registerClass({ Implements: [Gio.Icon], }, class StTextureCacheSkippingFileIconImpl extends Gio.EmblemedIcon { _init(params) { // FIXME: We can't just inherit from Gio.FileIcon for some reason super._init({gicon: new Gio.FileIcon(params)}); } vfunc_to_tokens() { // Disables the to_tokens() vfunc so that the icon to_string() // method won't work and thus can't be kept forever around by // StTextureCache, see the awesome debugging session in this thread: // https://twitter.com/mild_sunrise/status/1458739604098621443 // upstream bug is at: // https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4944 return [false, [], 0]; } }); export const IconActor = GObject.registerClass( class AppIndicatorsIconActor extends St.Icon { static get DEFAULT_STYLE() { return 'padding: 0'; } static get USER_WRITABLE_PATHS() { if (!this._userWritablePaths) { this._userWritablePaths = [ GLib.get_user_cache_dir(), GLib.get_user_data_dir(), GLib.get_user_config_dir(), GLib.get_user_runtime_dir(), GLib.get_home_dir(), GLib.get_tmp_dir(), ]; this._userWritablePaths.push(Object.values(GLib.UserDirectory).slice( 0, -1).map(dirId => GLib.get_user_special_dir(dirId))); } return this._userWritablePaths; } _init(indicator, iconSize) { super._init({ reactive: true, style_class: 'system-status-icon', fallbackIconName: FALLBACK_ICON_NAME, }); this.name = this.constructor.name; this.add_style_class_name('appindicator-icon'); this.add_style_class_name('status-notifier-icon'); this.set_style(AppIndicatorsIconActor.DEFAULT_STYLE); const themeContext = St.ThemeContext.get_for_stage(global.stage); this.height = iconSize * themeContext.scale_factor; this._indicator = indicator; this._customIcons = new Map(); this._iconSize = iconSize; this._iconCache = new IconCache.IconCache(); this._cancellable = new Gio.Cancellable(); this._loadingIcons = Object.create(null); Object.values(SNIconType).forEach(t => (this._loadingIcons[t] = new Map())); Util.connectSmart(this._indicator, 'icon', this, () => { if (this.is_mapped()) this._updateIcon(); }); Util.connectSmart(this._indicator, 'overlay-icon', this, () => { if (this.is_mapped()) this._updateIcon(); }); Util.connectSmart(this._indicator, 'reset', this, () => this._invalidateIconWhenFullyReady()); const settings = SettingsManager.getDefaultGSettings(); Util.connectSmart(settings, 'changed::icon-size', this, () => this._updateWhenFullyReady()); Util.connectSmart(settings, 'changed::custom-icons', this, () => { this._updateCustomIcons(); this._invalidateIconWhenFullyReady(); }); if (GObject.signal_lookup('resource-scale-changed', this)) this.connect('resource-scale-changed', () => this._invalidateIcon()); else this.connect('notify::resource-scale', () => this._invalidateIcon()); Util.connectSmart(themeContext, 'notify::scale-factor', this, tc => { this._updateIconSize(); this.height = this._iconSize * tc.scale_factor; this.width = -1; this._invalidateIcon(); }); Util.connectSmart(Util.getDefaultTheme(), 'changed', this, () => this._invalidateIconWhenFullyReady()); this.connect('notify::mapped', () => { if (!this.is_mapped()) this._updateWhenFullyReady(); }); this._updateWhenFullyReady(); this.connect('destroy', () => { this._iconCache.destroy(); this._cancellable.cancel(); this._cancellable = null; this._indicator = null; this._loadingIcons = null; this._iconTheme = null; }); } get debugId() { return this._indicator ? this._indicator.id : this.toString(); } async _waitForFullyReady() { const waitConditions = []; if (!this.is_mapped()) { waitConditions.push(new PromiseUtils.SignalConnectionPromise( this, 'notify::mapped', this._cancellable)); } if (!this._indicator.isReady) { waitConditions.push(new PromiseUtils.SignalConnectionPromise( this._indicator, 'ready', this._cancellable)); } if (!waitConditions.length) return true; await Promise.all(waitConditions); return this._waitForFullyReady(); } async _updateWhenFullyReady() { if (this._waitingReady) return; try { this._waitingReady = true; await this._waitForFullyReady(); this._updateIconSize(); this._updateIconClass(); this._updateCustomIcons(); this._invalidateIcon(); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); } finally { delete this._waitingReady; } } _updateIconClass() { if (!this._indicator) return; this.add_style_class_name( `appindicator-icon-${this._indicator.id.toLowerCase().replace(/_|\s/g, '-')}`); } _cancelLoadingByType(iconType) { this._loadingIcons[iconType].forEach(c => c.cancel()); this._loadingIcons[iconType].clear(); } _ensureNoIconIsLoading(iconType, id) { if (this._loadingIcons[iconType].has(id)) { Util.Logger.debug(`${this.debugId}, Icon ${id} Is still loading, ignoring the request`); throw new GLib.Error(Gio.IOErrorEnum, Gio.IOErrorEnum.PENDING, 'Already in progress'); } else if (this._loadingIcons[iconType].size > 0) { throw new GLib.Error(Gio.IOErrorEnum, Gio.IOErrorEnum.EXISTS, 'Another icon is already loading'); } } _getIconLoadingCancellable(iconType, loadingId) { try { this._ensureNoIconIsLoading(iconType, loadingId); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.EXISTS)) throw e; this._cancelLoadingByType(iconType); } const cancellable = new Util.CancellableChild(this._cancellable); this._loadingIcons[iconType].set(loadingId, cancellable); return cancellable; } _cleanupIconLoadingCancellable(iconType, loadingId) { if (this._loadingIcons) this._loadingIcons[iconType].delete(loadingId); } _getResourceScale() { // Remove this when we remove support for versions earlier than 3.38 const resourceScale = this.get_resource_scale(); if (Array.isArray(resourceScale)) return resourceScale[0] ? resourceScale[1] : 1.0; return resourceScale; } // Will look the icon up in the cache, if it's found // it will return it. Otherwise, it will create it and cache it. async _cacheOrCreateIconByName(iconType, iconSize, iconScaling, iconName, themePath) { const id = `${iconType}:${iconName}@${iconSize * iconScaling}:${themePath || ''}`; let gicon = this._iconCache.get(id); if (gicon) return gicon; const iconData = this._getIconData(iconName, themePath, iconSize, iconScaling); const loadingId = iconData.file ? iconData.file.get_path() : id; const cancellable = await this._getIconLoadingCancellable(iconType, id); try { gicon = await this._createIconByIconData(iconData, iconSize, iconScaling, cancellable); } finally { this._cleanupIconLoadingCancellable(iconType, loadingId); } if (gicon) gicon = this._iconCache.add(id, gicon); return gicon; } _getIconLookupFlags(themeNode) { let lookupFlags = 0; if (!themeNode) return lookupFlags; const lookupFlagsEnum = St.IconLookupFlags; const iconStyle = themeNode.get_icon_style(); if (iconStyle === St.IconStyle.REGULAR) lookupFlags |= lookupFlagsEnum.FORCE_REGULAR; else if (iconStyle === St.IconStyle.SYMBOLIC) lookupFlags |= lookupFlagsEnum.FORCE_SYMBOLIC; if (Clutter.get_default_text_direction() === Clutter.TextDirection.RTL) lookupFlags |= lookupFlagsEnum.DIR_RTL; else lookupFlags |= lookupFlagsEnum.DIR_LTR; return lookupFlags; } async _createIconByIconData(iconData, iconSize, iconScaling, cancellable) { const {file, name} = iconData; if (!file && !name) { if (this._createIconIdle) { throw new GLib.Error(Gio.IOErrorEnum, Gio.IOErrorEnum.PENDING, 'Already in progress'); } try { this._createIconIdle = new PromiseUtils.IdlePromise(GLib.PRIORITY_DEFAULT_IDLE, cancellable); await this._createIconIdle; } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); throw e; } finally { delete this._createIconIdle; } return this.gicon; } else if (this._createIconIdle) { this._createIconIdle.cancel(); delete this._createIconIdle; } if (name) return new Gio.ThemedIcon({name}); if (!file) throw new Error('Neither file or name are set'); if (!this._isFileInWritableArea(file)) return new Gio.FileIcon({file}); try { const [format, width, height] = await GdkPixbuf.Pixbuf.get_file_info_async( file.get_path(), cancellable); if (!format) { Util.Logger.critical(`${this.debugId}, Invalid image format: ${file.get_path()}`); return null; } if (width >= height * 1.5) { /* Hello indicator-multiload! */ await this._loadCustomImage(file, width, height, iconSize, iconScaling, cancellable); return null; } else { /* We'll wrap the icon so that it won't be cached forever by the shell */ return new StTextureCacheSkippingFileIcon({file}); } } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) { Util.Logger.warn( `${this.debugId}, Impossible to read image info from ` + `path '${file ? file.get_path() : null}' or name '${name}': ${e}`); } throw e; } } async _loadCustomImage(file, width, height, iconSize, iconScaling, cancellable) { const textureCache = St.TextureCache.get_default(); const customImage = textureCache.load_file_async(file, -1, height, 1, iconScaling); const setCustomImageActor = imageActor => { const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage); const {content} = imageActor; imageActor.content = null; imageActor.destroy(); this._setImageContent(content, width * scaleFactor, height * scaleFactor); }; if (customImage.content) { setCustomImageActor(customImage); return; } const imageContentPromise = new PromiseUtils.SignalConnectionPromise( customImage, 'notify::content', cancellable); const waitPromise = new PromiseUtils.TimeoutSecondsPromise( 1, GLib.PRIORITY_DEFAULT, cancellable); const racingPromises = [imageContentPromise, waitPromise]; try { await Promise.race(racingPromises); if (!waitPromise.resolved()) setCustomImageActor(customImage); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) throw e; } finally { racingPromises.forEach(p => p.cancel()); } } _isFileInWritableArea(file) { // No need to use IO here, we can just do some assumptions // print('Writable paths', IconActor.USER_WRITABLE_PATHS) const path = file.get_path(); return IconActor.USER_WRITABLE_PATHS.some(writablePath => path.startsWith(writablePath)); } _createIconTheme(searchPath = []) { const iconTheme = new St.IconTheme(); iconTheme.set_search_path(searchPath); return iconTheme; } _getIconData(name, themePath, size, scale) { const emptyIconData = {iconInfo: null, file: null, name: null}; if (!name) { delete this._iconTheme; return emptyIconData; } // HACK: icon is a path name. This is not specified by the API, // but at least indicator-sensors uses it. if (name[0] === '/') { delete this._iconTheme; const file = Gio.File.new_for_path(name); return {file, iconInfo: null, name: null}; } if (name.includes('.')) { const splits = name.split('.'); if (['svg', 'png'].includes(splits[splits.length - 1])) name = splits.slice(0, -1).join(''); } if (themePath && Util.getDefaultTheme().get_search_path().includes(themePath)) themePath = null; if (themePath) { // If a theme path is provided, we need to lookup the icon ourself // as St won't be able to do it unless we mess with default theme // that is something we prefer not to do, as it would imply lots of // St.TextureCache cleanups. const newSearchPath = [themePath]; if (!this._iconTheme) { this._iconTheme = this._createIconTheme(newSearchPath); } else { const currentSearchPath = this._iconTheme.get_search_path(); if (!currentSearchPath.includes(newSearchPath)) this._iconTheme.set_search_path(newSearchPath); } // try to look up the icon in the icon theme const iconInfo = this._iconTheme.lookup_icon_for_scale(`${name}`, size, scale, this._getIconLookupFlags(this.get_theme_node()) | St.IconLookupFlags.GENERIC_FALLBACK); if (iconInfo) { return { iconInfo, file: Gio.File.new_for_path(iconInfo.get_filename()), name: null, }; } const logger = this.gicon ? Util.Logger.debug : Util.Logger.warn; logger(`${this.debugId}, Impossible to lookup icon ` + `for '${name}' in ${themePath}`); return emptyIconData; } delete this._iconTheme; return {name, iconInfo: null, file: null}; } _setImageContent(content, width, height) { this.set({ content, width, height, contentGravity: Clutter.ContentGravity.RESIZE_ASPECT, fallbackIconName: null, }); } async _createIconFromPixmap(iconType, iconSize, iconScaling, scaleFactor, pixmapsVariant) { const {pixmapVariant, width, height, rowStride} = PixmapsUtils.getBestPixmap(pixmapsVariant, iconSize * iconScaling); const id = `__PIXMAP_ICON_${width}x${height}`; const imageContent = new St.ImageContent({ preferredWidth: width, preferredHeight: height, }); imageContent.set_bytes(pixmapVariant.get_data_as_bytes(), PIXMAPS_FORMAT, width, height, rowStride); if (iconType !== SNIconType.OVERLAY && !this._indicator.hasOverlayIcon) { const scaledSize = iconSize * scaleFactor; this._setImageContent(imageContent, scaledSize, scaledSize); return null; } const cancellable = this._getIconLoadingCancellable(iconType, id); try { // FIXME: async API results in a gray icon for some reason const [inputStream] = imageContent.load(iconSize, cancellable); return await GdkPixbuf.Pixbuf.new_from_stream_at_scale_async( inputStream, -1, iconSize * iconScaling, true, cancellable); } catch (e) { // the image data was probably bogus. We don't really know why, but it _does_ happen. if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) Util.Logger.warn(`${this.debugId}, Impossible to create image from data: ${e}`); throw e; } finally { this._cleanupIconLoadingCancellable(iconType, id); } } // The icon cache Active flag will be set to true if the used gicon matches // the cached one (as in some cases it may be equal, but not the same object). // So when it's not need anymore we make sure to check the active state // and set it to false so that it can be picked up by the garbage collector. _setGicon(iconType, gicon) { if (iconType !== SNIconType.OVERLAY) { if (gicon) { if (this.gicon === gicon || (this.gicon && this.gicon.get_icon() === gicon)) return; if (gicon instanceof Gio.EmblemedIcon) this.gicon = gicon; else this.gicon = new Gio.EmblemedIcon({gicon}); this._iconCache.updateActive(SNIconType.NORMAL, gicon, this.gicon.get_icon() === gicon); } else { this.gicon = null; } } else if (gicon) { this._emblem = new Gio.Emblem({icon: gicon}); this._iconCache.updateActive(iconType, gicon, true); } else { this._emblem = null; } if (this.gicon) { if (!this.gicon.get_emblems().some(e => e.equal(this._emblem))) { this.gicon.clear_emblems(); if (this._emblem) this.gicon.add_emblem(this._emblem); } } } async _updateIconByType(iconType, iconSize) { let icon; switch (iconType) { case SNIconType.ATTENTION: icon = this._indicator.attentionIcon; break; case SNIconType.NORMAL: ({icon} = this._indicator); break; case SNIconType.OVERLAY: icon = this._indicator.overlayIcon; break; } const {theme, name, pixmap} = icon; const commonArgs = [theme, iconType, iconSize]; if (this._customIcons.size) { let customIcon = this._customIcons.get(iconType); if (!await this._createAndSetIcon(customIcon, null, ...commonArgs)) { if (iconType !== SNIconType.OVERLAY) { customIcon = this._customIcons.get(SNIconType.NORMAL); await this._createAndSetIcon(customIcon, null, ...commonArgs); } } } else { await this._createAndSetIcon(name, pixmap, ...commonArgs); } } async _createAndSetIcon(name, pixmap, theme, iconType, iconSize) { let gicon = null; try { gicon = await this._createIcon(name, pixmap, theme, iconType, iconSize); } catch (e) { if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED) || e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.PENDING)) return null; if (iconType === SNIconType.OVERLAY) { logError(e, `${this.debugId} unable to update icon emblem`); } else { this.fallbackIconName = FALLBACK_ICON_NAME; logError(e, `${this.debugId} unable to update icon`); } } try { this._setGicon(iconType, gicon); if (pixmap && this.gicon) { // The pixmap has been saved, we can free the variants memory this._indicator.invalidatePixmapProperty(iconType); } return gicon; } catch (e) { logError(e, 'Setting GIcon failed'); return null; } } // updates the base icon async _createIcon(name, pixmap, theme, iconType, iconSize) { const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage); const resourceScale = this._getResourceScale(); const iconScaling = Math.ceil(resourceScale * scaleFactor); // From now on we consider them the same thing, as one replaces the other if (iconType === SNIconType.ATTENTION) iconType = SNIconType.NORMAL; if (name) { const gicon = await this._cacheOrCreateIconByName( iconType, iconSize, iconScaling, name, theme); if (gicon) return gicon; } if (pixmap && pixmap.n_children()) { return this._createIconFromPixmap(iconType, iconSize, iconScaling, scaleFactor, pixmap); } return null; } // updates the base icon async _updateIcon() { if (this._indicator.status === SNIStatus.PASSIVE) return; if (this.gicon instanceof Gio.EmblemedIcon) { const {gicon} = this.gicon; this._iconCache.updateActive(SNIconType.NORMAL, gicon, false); } // we might need to use the AttentionIcon*, which have precedence over the normal icons const iconType = this._indicator.status === SNIStatus.NEEDS_ATTENTION ? SNIconType.ATTENTION : SNIconType.NORMAL; try { await this._updateIconByType(iconType, this._iconSize); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED) && !e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.PENDING)) logError(e, `${this.debugId}: Updating icon type ${iconType} failed`); } } async _updateOverlayIcon() { if (this._indicator.status === SNIStatus.PASSIVE) return; if (this._emblem) { const {icon} = this._emblem; this._iconCache.updateActive(SNIconType.OVERLAY, icon, false); } // KDE hardcodes the overlay icon size to 10px (normal icon size 16px) // we approximate that ratio for other sizes, too. // our algorithms will always pick a smaller one instead of stretching it. const iconSize = Math.floor(this._iconSize / 1.6); try { await this._updateIconByType(SNIconType.OVERLAY, iconSize); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED) && !e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.PENDING)) logError(e, `${this.debugId}: Updating overlay icon failed`); } } async _invalidateIconWhenFullyReady() { if (this._waitingInvalidation) return; try { this._waitingInvalidation = true; await this._waitForFullyReady(); this._invalidateIcon(); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); } finally { delete this._waitingInvalidation; } } // called when the icon theme changes _invalidateIcon() { this._iconCache.clear(); this._cancellable.cancel(); this._cancellable = new Gio.Cancellable(); Object.values(SNIconType).forEach(iconType => this._loadingIcons[iconType].clear()); this._updateIcon().catch(e => logError(e)); this._updateOverlayIcon().catch(e => logError(e)); } _updateIconSize() { const settings = SettingsManager.getDefaultGSettings(); const sizeValue = settings.get_int('icon-size'); if (sizeValue > 0) { if (!this._defaultIconSize) this._defaultIconSize = this._iconSize; this._iconSize = sizeValue; } else if (this._defaultIconSize) { this._iconSize = this._defaultIconSize; delete this._defaultIconSize; } const themeIconSize = Math.round( this.get_theme_node().get_length('icon-size')); let iconStyle = AppIndicatorsIconActor.DEFAULT_STYLE; if (themeIconSize > 0) { const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage); if (themeIconSize / scaleFactor !== this._iconSize) { iconStyle = `${AppIndicatorsIconActor.DEFAULT_STYLE};` + 'icon-size: 0'; } } this.set_style(iconStyle); this.set_icon_size(this._iconSize); } _updateCustomIcons() { const settings = SettingsManager.getDefaultGSettings(); this._customIcons.clear(); settings.get_value('custom-icons').deep_unpack().forEach(customIcons => { const [indicatorId, normalIcon, attentionIcon] = customIcons; if (this._indicator.id === indicatorId) { this._customIcons.set(SNIconType.NORMAL, normalIcon); this._customIcons.set(SNIconType.ATTENTION, attentionIcon); } }); } }); 07070100000009000081A400000000000000000000000165CC291900007E4F000000000000000000000000000000000000004000000000gnome-shell-extension-appindicator-v57+git5.03a7412/dbusMenu.js// This file is part of the AppIndicator/KStatusNotifierItem GNOME Shell extension // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import Clutter from 'gi://Clutter'; import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; import GdkPixbuf from 'gi://GdkPixbuf'; import Gio from 'gi://Gio'; import St from 'gi://St'; import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; import * as Signals from 'resource:///org/gnome/shell/misc/signals.js'; import * as DBusInterfaces from './interfaces.js'; import * as PromiseUtils from './promiseUtils.js'; import * as Util from './util.js'; import {DBusProxy} from './dbusProxy.js'; Gio._promisify(GdkPixbuf.Pixbuf, 'new_from_stream_async'); // //////////////////////////////////////////////////////////////////////// // PART ONE: "ViewModel" backend implementation. // Both code and design are inspired by libdbusmenu // //////////////////////////////////////////////////////////////////////// /** * Saves menu property values and handles type checking and defaults */ export class PropertyStore { constructor(initialProperties) { this._props = new Map(); if (initialProperties) { for (const [prop, value] of Object.entries(initialProperties)) this.set(prop, value); } } set(name, value) { if (name in PropertyStore.MandatedTypes && value && !value.is_of_type(PropertyStore.MandatedTypes[name])) Util.Logger.warn(`Cannot set property ${name}: type mismatch!`); else if (value) this._props.set(name, value); else this._props.delete(name); } get(name) { const prop = this._props.get(name); if (prop) return prop; else if (name in PropertyStore.DefaultValues) return PropertyStore.DefaultValues[name]; else return null; } } // we list all the properties we know and use here, so we won' have to deal with unexpected type mismatches PropertyStore.MandatedTypes = { 'visible': GLib.VariantType.new('b'), 'enabled': GLib.VariantType.new('b'), 'label': GLib.VariantType.new('s'), 'type': GLib.VariantType.new('s'), 'children-display': GLib.VariantType.new('s'), 'icon-name': GLib.VariantType.new('s'), 'icon-data': GLib.VariantType.new('ay'), 'toggle-type': GLib.VariantType.new('s'), 'toggle-state': GLib.VariantType.new('i'), }; PropertyStore.DefaultValues = { 'visible': GLib.Variant.new_boolean(true), 'enabled': GLib.Variant.new_boolean(true), 'label': GLib.Variant.new_string(''), 'type': GLib.Variant.new_string('standard'), // elements not in here must return null }; /** * Represents a single menu item */ export class DbusMenuItem extends Signals.EventEmitter { // will steal the properties object constructor(client, id, properties, childrenIds) { super(); this._client = client; this._id = id; this._propStore = new PropertyStore(properties); this._children_ids = childrenIds; } propertyGet(propName) { const prop = this.propertyGetVariant(propName); return prop ? prop.get_string()[0] : null; } propertyGetVariant(propName) { return this._propStore.get(propName); } propertyGetBool(propName) { const prop = this.propertyGetVariant(propName); return prop ? prop.get_boolean() : false; } propertyGetInt(propName) { const prop = this.propertyGetVariant(propName); return prop ? prop.get_int32() : 0; } propertySet(prop, value) { this._propStore.set(prop, value); this.emit('property-changed', prop, this.propertyGetVariant(prop)); } getChildrenIds() { return this._children_ids.concat(); // clone it! } addChild(pos, childId) { this._children_ids.splice(pos, 0, childId); this.emit('child-added', this._client.getItem(childId), pos); } removeChild(childId) { // find it let pos = -1; for (let i = 0; i < this._children_ids.length; ++i) { if (this._children_ids[i] === childId) { pos = i; break; } } if (pos < 0) { Util.Logger.critical("Trying to remove child which doesn't exist"); } else { this._children_ids.splice(pos, 1); this.emit('child-removed', this._client.getItem(childId)); } } moveChild(childId, newPos) { // find the old position let oldPos = -1; for (let i = 0; i < this._children_ids.length; ++i) { if (this._children_ids[i] === childId) { oldPos = i; break; } } if (oldPos < 0) { Util.Logger.critical("tried to move child which wasn't in the list"); return; } if (oldPos !== newPos) { this._children_ids.splice(oldPos, 1); this._children_ids.splice(newPos, 0, childId); this.emit('child-moved', oldPos, newPos, this._client.getItem(childId)); } } getChildren() { return this._children_ids.map(el => this._client.getItem(el)); } handleEvent(event, data, timestamp) { if (!data) data = GLib.Variant.new_int32(0); this._client.sendEvent(this._id, event, data, timestamp); } getId() { return this._id; } sendAboutToShow() { this._client.sendAboutToShow(this._id); } } /** * The client does the heavy lifting of actually reading layouts and distributing events */ export const DBusClient = GObject.registerClass({ Signals: {'ready-changed': {}}, }, class AppIndicatorsDBusClient extends DBusProxy { static get interfaceInfo() { if (!this._interfaceInfo) { this._interfaceInfo = Gio.DBusInterfaceInfo.new_for_xml( DBusInterfaces.DBusMenu); } return this._interfaceInfo; } static get baseItems() { if (!this._baseItems) { this._baseItems = { 'children-display': GLib.Variant.new_string('submenu'), }; } return this._baseItems; } static destroy() { delete this._interfaceInfo; } _init(busName, objectPath) { const {interfaceInfo} = AppIndicatorsDBusClient; super._init(busName, objectPath, interfaceInfo, Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES); this._items = new Map(); this._items.set(0, new DbusMenuItem(this, 0, DBusClient.baseItems, [])); this._flagItemsUpdateRequired = false; // will be set to true if a layout update is needed once active this._flagLayoutUpdateRequired = false; // property requests are queued this._propertiesRequestedFor = new Set(/* ids */); this._layoutUpdated = false; this._active = false; } async initAsync(cancellable) { await super.initAsync(cancellable); this._requestLayoutUpdate(); } _onNameOwnerChanged() { if (this.isReady) this._requestLayoutUpdate(); } get isReady() { return this._layoutUpdated && !!this.gNameOwner; } get cancellable() { return this._cancellable; } getRoot() { return this._items.get(0); } _requestLayoutUpdate() { const cancellable = new Util.CancellableChild(this._cancellable); this._beginLayoutUpdate(cancellable); } async _requestProperties(propertyId, cancellable) { this._propertiesRequestedFor.add(propertyId); if (this._propertiesRequest && this._propertiesRequest.pending()) return; // if we don't have any requests queued, we'll need to add one this._propertiesRequest = new PromiseUtils.IdlePromise( GLib.PRIORITY_DEFAULT_IDLE, cancellable); await this._propertiesRequest; const requestedProperties = Array.from(this._propertiesRequestedFor); this._propertiesRequestedFor.clear(); const [result] = await this.GetGroupPropertiesAsync(requestedProperties, [], cancellable); result.forEach(([id, properties]) => { const item = this._items.get(id); if (!item) return; for (const [prop, value] of Object.entries(properties)) item.propertySet(prop, value); }); } // Traverses the list of cached menu items and removes everyone that is not in the list // so we don't keep alive unused items _gcItems() { const tag = new Date().getTime(); const toTraverse = [0]; while (toTraverse.length > 0) { const item = this.getItem(toTraverse.shift()); item._dbusClientGcTag = tag; Array.prototype.push.apply(toTraverse, item.getChildrenIds()); } this._items.forEach((i, id) => { if (i._dbusClientGcTag !== tag) this._items.delete(id); }); } // the original implementation will only request partial layouts if somehow possible // we try to save us from multiple kinds of race conditions by always requesting a full layout _beginLayoutUpdate(cancellable) { this._layoutUpdateUpdateAsync(cancellable).catch(e => { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); }); } // the original implementation will only request partial layouts if somehow possible // we try to save us from multiple kinds of race conditions by always requesting a full layout async _layoutUpdateUpdateAsync(cancellable) { // we only read the type property, because if the type changes after reading all properties, // the view would have to replace the item completely which we try to avoid if (this._layoutUpdateCancellable) this._layoutUpdateCancellable.cancel(); this._layoutUpdateCancellable = cancellable; try { const [revision_, root] = await this.GetLayoutAsync(0, -1, ['type', 'children-display'], cancellable); this._updateLayoutState(true); this._doLayoutUpdate(root, cancellable); this._gcItems(); this._flagLayoutUpdateRequired = false; this._flagItemsUpdateRequired = false; } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) this._updateLayoutState(false); throw e; } finally { if (this._layoutUpdateCancellable === cancellable) this._layoutUpdateCancellable = null; } } _updateLayoutState(state) { const wasReady = this.isReady; this._layoutUpdated = state; if (this.isReady !== wasReady) this.emit('ready-changed'); } _doLayoutUpdate(item, cancellable) { const [id, properties, children] = item; const childrenUnpacked = children.map(c => c.deep_unpack()); const childrenIds = childrenUnpacked.map(([c]) => c); // make sure all our children exist childrenUnpacked.forEach(c => this._doLayoutUpdate(c, cancellable)); // make sure we exist const menuItem = this._items.get(id); if (menuItem) { // we do, update our properties if necessary for (const [prop, value] of Object.entries(properties)) menuItem.propertySet(prop, value); // make sure our children are all at the right place, and exist const oldChildrenIds = menuItem.getChildrenIds(); for (let i = 0; i < childrenIds.length; ++i) { // try to recycle an old child let oldChild = -1; for (let j = 0; j < oldChildrenIds.length; ++j) { if (oldChildrenIds[j] === childrenIds[i]) { [oldChild] = oldChildrenIds.splice(j, 1); break; } } if (oldChild < 0) { // no old child found, so create a new one! menuItem.addChild(i, childrenIds[i]); } else { // old child found, reuse it! menuItem.moveChild(childrenIds[i], i); } } // remove any old children that weren't reused oldChildrenIds.forEach(c => menuItem.removeChild(c)); if (!this._flagItemsUpdateRequired) return id; } // we don't, so let's create us let newMenuItem = menuItem; if (!newMenuItem) { newMenuItem = new DbusMenuItem(this, id, properties, childrenIds); this._items.set(id, newMenuItem); } this._requestProperties(id, cancellable).catch(e => { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) Util.Logger.warn(`Could not get menu properties menu proxy: ${e}`); }); return id; } async _doPropertiesUpdateAsync(cancellable) { if (this._propertiesUpdateCancellable) this._propertiesUpdateCancellable.cancel(); this._propertiesUpdateCancellable = cancellable; try { const requests = []; this._items.forEach((_, id) => requests.push(this._requestProperties(id, cancellable))); await Promise.all(requests); } finally { if (this._propertiesUpdateCancellable === cancellable) this._propertiesUpdateCancellable = null; } } _doPropertiesUpdate() { const cancellable = new Util.CancellableChild(this._cancellable); this._doPropertiesUpdateAsync(cancellable).catch(e => { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) Util.Logger.warn(`Could not get menu properties menu proxy: ${e}`); }); } set active(active) { const wasActive = this._active; this._active = active; if (active && wasActive !== active) { if (this._flagLayoutUpdateRequired) { this._requestLayoutUpdate(); } else if (this._flagItemsUpdateRequired) { this._doPropertiesUpdate(); this._flagItemsUpdateRequired = false; } } } _onSignal(_sender, signal, params) { if (signal === 'LayoutUpdated') { if (!this._active) { this._flagLayoutUpdateRequired = true; return; } this._requestLayoutUpdate(); } else if (signal === 'ItemsPropertiesUpdated') { if (!this._active) { this._flagItemsUpdateRequired = true; return; } this._onPropertiesUpdated(params.deep_unpack()); } } getItem(id) { const item = this._items.get(id); if (!item) Util.Logger.warn(`trying to retrieve item for non-existing id ${id} !?`); return item || null; } // we don't need to cache and burst-send that since it will not happen that frequently async sendAboutToShow(id) { /* Some indicators (you, dropbox!) don't use the right signature * and don't return a boolean, so we need to support both cases */ try { const ret = await this.gConnection.call(this.gName, this.gObjectPath, this.gInterfaceName, 'AboutToShow', new GLib.Variant('(i)', [id]), null, Gio.DBusCallFlags.NONE, -1, this._cancellable); if ((ret.is_of_type(new GLib.VariantType('(b)')) && ret.get_child_value(0).get_boolean()) || ret.is_of_type(new GLib.VariantType('()'))) this._requestLayoutUpdate(); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); } } sendEvent(id, event, params, timestamp) { if (!this.gNameOwner) return; this.EventAsync(id, event, params, timestamp, this._cancellable).catch(e => { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); }); } _onPropertiesUpdated([changed, removed]) { changed.forEach(([id, props]) => { const item = this._items.get(id); if (!item) return; for (const [prop, value] of Object.entries(props)) item.propertySet(prop, value); }); removed.forEach(([id, propNames]) => { const item = this._items.get(id); if (!item) return; propNames.forEach(propName => item.propertySet(propName, null)); }); } }); // //////////////////////////////////////////////////////////////////////// // PART TWO: "View" frontend implementation. // //////////////////////////////////////////////////////////////////////// // https://bugzilla.gnome.org/show_bug.cgi?id=731514 // GNOME 3.10 and 3.12 can't open a nested submenu. // Patches have been written, but it's not clear when (if?) they will be applied. // We also don't know whether they will be backported to 3.10, so we will work around // it in the meantime. Offending versions can be clearly identified: const NEED_NESTED_SUBMENU_FIX = '_setOpenedSubMenu' in PopupMenu.PopupMenu.prototype; /** * Creates new wrapper menu items and injects methods for managing them at runtime. * * Many functions in this object will be bound to the created item and executed as event * handlers, so any `this` will refer to a menu item create in createItem */ const MenuItemFactory = { createItem(client, dbusItem) { // first, decide whether it's a submenu or not let shellItem; if (dbusItem.propertyGet('children-display') === 'submenu') shellItem = new PopupMenu.PopupSubMenuMenuItem('FIXME'); else if (dbusItem.propertyGet('type') === 'separator') shellItem = new PopupMenu.PopupSeparatorMenuItem(''); else shellItem = new PopupMenu.PopupMenuItem('FIXME'); shellItem._dbusItem = dbusItem; shellItem._dbusClient = client; if (shellItem instanceof PopupMenu.PopupMenuItem) { shellItem._icon = new St.Icon({ style_class: 'popup-menu-icon', xAlign: Clutter.ActorAlign.END, }); shellItem.add_child(shellItem._icon); shellItem.label.x_expand = true; } // initialize our state MenuItemFactory._updateLabel.call(shellItem); MenuItemFactory._updateOrnament.call(shellItem); MenuItemFactory._updateImage.call(shellItem); MenuItemFactory._updateVisible.call(shellItem); MenuItemFactory._updateSensitive.call(shellItem); // initially create children if (shellItem instanceof PopupMenu.PopupSubMenuMenuItem) { dbusItem.getChildren().forEach(c => shellItem.menu.addMenuItem(MenuItemFactory.createItem(client, c))); } // now, connect various events Util.connectSmart(dbusItem, 'property-changed', shellItem, MenuItemFactory._onPropertyChanged); Util.connectSmart(dbusItem, 'child-added', shellItem, MenuItemFactory._onChildAdded); Util.connectSmart(dbusItem, 'child-removed', shellItem, MenuItemFactory._onChildRemoved); Util.connectSmart(dbusItem, 'child-moved', shellItem, MenuItemFactory._onChildMoved); Util.connectSmart(shellItem, 'activate', shellItem, MenuItemFactory._onActivate); shellItem.connect('destroy', () => { shellItem._dbusItem = null; shellItem._dbusClient = null; shellItem._icon = null; }); if (shellItem.menu) { Util.connectSmart(shellItem.menu, 'open-state-changed', shellItem, MenuItemFactory._onOpenStateChanged); } return shellItem; }, _onOpenStateChanged(menu, open) { if (open) { if (NEED_NESTED_SUBMENU_FIX) { // close our own submenus if (menu._openedSubMenu) menu._openedSubMenu.close(false); // register ourselves and close sibling submenus if (menu._parent._openedSubMenu && menu._parent._openedSubMenu !== menu) menu._parent._openedSubMenu.close(true); menu._parent._openedSubMenu = menu; } this._dbusItem.handleEvent('opened', null, 0); this._dbusItem.sendAboutToShow(); } else { if (NEED_NESTED_SUBMENU_FIX) { // close our own submenus if (menu._openedSubMenu) menu._openedSubMenu.close(false); } this._dbusItem.handleEvent('closed', null, 0); } }, _onActivate(_item, event) { const timestamp = event.get_time(); if (timestamp && this._dbusClient.indicator) this._dbusClient.indicator.provideActivationToken(timestamp); this._dbusItem.handleEvent('clicked', GLib.Variant.new('i', 0), timestamp); }, _onPropertyChanged(dbusItem, prop, _value) { if (prop === 'toggle-type' || prop === 'toggle-state') MenuItemFactory._updateOrnament.call(this); else if (prop === 'label') MenuItemFactory._updateLabel.call(this); else if (prop === 'enabled') MenuItemFactory._updateSensitive.call(this); else if (prop === 'visible') MenuItemFactory._updateVisible.call(this); else if (prop === 'icon-name' || prop === 'icon-data') MenuItemFactory._updateImage.call(this); else if (prop === 'type' || prop === 'children-display') MenuItemFactory._replaceSelf.call(this); else Util.Logger.debug(`Unhandled property change: ${prop}`); }, _onChildAdded(dbusItem, child, position) { if (!(this instanceof PopupMenu.PopupSubMenuMenuItem)) { Util.Logger.warn('Tried to add a child to non-submenu item. Better recreate it as whole'); MenuItemFactory._replaceSelf.call(this); } else { this.menu.addMenuItem(MenuItemFactory.createItem(this._dbusClient, child), position); } }, _onChildRemoved(dbusItem, child) { if (!(this instanceof PopupMenu.PopupSubMenuMenuItem)) { Util.Logger.warn('Tried to remove a child from non-submenu item. Better recreate it as whole'); MenuItemFactory._replaceSelf.call(this); } else { // find it! this.menu._getMenuItems().forEach(item => { if (item._dbusItem === child) item.destroy(); }); } }, _onChildMoved(dbusItem, child, oldpos, newpos) { if (!(this instanceof PopupMenu.PopupSubMenuMenuItem)) { Util.Logger.warn('Tried to move a child in non-submenu item. Better recreate it as whole'); MenuItemFactory._replaceSelf.call(this); } else { MenuUtils.moveItemInMenu(this.menu, child, newpos); } }, _updateLabel() { const label = this._dbusItem.propertyGet('label').replace(/_([^_])/, '$1'); if (this.label) // especially on GS3.8, the separator item might not even have a hidden label this.label.set_text(label); }, _updateOrnament() { if (!this.setOrnament) return; // separators and alike might not have gotten the polyfill if (this._dbusItem.propertyGet('toggle-type') === 'checkmark' && this._dbusItem.propertyGetInt('toggle-state')) this.setOrnament(PopupMenu.Ornament.CHECK); else if (this._dbusItem.propertyGet('toggle-type') === 'radio' && this._dbusItem.propertyGetInt('toggle-state')) this.setOrnament(PopupMenu.Ornament.DOT); else this.setOrnament(PopupMenu.Ornament.NONE); }, async _updateImage() { if (!this._icon) return; // might be missing on submenus / separators const iconName = this._dbusItem.propertyGet('icon-name'); const iconData = this._dbusItem.propertyGetVariant('icon-data'); if (iconName) { this._icon.icon_name = iconName; } else if (iconData) { try { const inputStream = Gio.MemoryInputStream.new_from_bytes( iconData.get_data_as_bytes()); this._icon.gicon = await GdkPixbuf.Pixbuf.new_from_stream_async( inputStream, this._dbusClient.cancellable); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); } } }, _updateVisible() { this.visible = this._dbusItem.propertyGetBool('visible'); }, _updateSensitive() { this.setSensitive(this._dbusItem.propertyGetBool('enabled')); }, _replaceSelf(newSelf) { // create our new self if needed if (!newSelf) newSelf = MenuItemFactory.createItem(this._dbusClient, this._dbusItem); // first, we need to find our old position let pos = -1; const family = this._parent._getMenuItems(); for (let i = 0; i < family.length; ++i) { if (family[i] === this) pos = i; } if (pos < 0) throw new Error("DBusMenu: can't replace non existing menu item"); // add our new self while we're still alive this._parent.addMenuItem(newSelf, pos); // now destroy our old self this.destroy(); }, }; /** * Utility functions not necessarily belonging into the item factory */ const MenuUtils = { moveItemInMenu(menu, dbusItem, newpos) { // HACK: we're really getting into the internals of the PopupMenu implementation // First, find our wrapper. Children tend to lie. We do not trust the old positioning. const family = menu._getMenuItems(); for (let i = 0; i < family.length; ++i) { if (family[i]._dbusItem === dbusItem) { // now, remove it menu.box.remove_child(family[i]); // and add it again somewhere else if (newpos < family.length && family[newpos] !== family[i]) menu.box.insert_child_below(family[i], family[newpos]); else menu.box.add(family[i]); // skip the rest return; } } }, }; /** * Processes DBus events, creates the menu items and handles the actions * * Something like a mini-god-object */ export class Client extends Signals.EventEmitter { constructor(busName, path, indicator) { super(); this._busName = busName; this._busPath = path; this._client = new DBusClient(busName, path); this._rootMenu = null; // the shell menu this._rootItem = null; // the DbusMenuItem for the root this.indicator = indicator; this.cancellable = new Util.CancellableChild(this.indicator.cancellable); this._client.initAsync(this.cancellable).catch(e => { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); }); Util.connectSmart(this._client, 'ready-changed', this, () => this.emit('ready-changed')); } get isReady() { return this._client.isReady; } // this will attach the client to an already existing menu that will be used as the root menu. // it will also connect the client to be automatically destroyed when the menu dies. attachToMenu(menu) { this._rootMenu = menu; this._rootItem = this._client.getRoot(); this._itemsBeingAdded = new Set(); // cleanup: remove existing children (just in case) this._rootMenu.removeAll(); if (NEED_NESTED_SUBMENU_FIX) menu._setOpenedSubMenu = this._setOpenedSubmenu.bind(this); // connect handlers Util.connectSmart(menu, 'open-state-changed', this, this._onMenuOpened); Util.connectSmart(menu, 'destroy', this, this.destroy); Util.connectSmart(this._rootItem, 'child-added', this, this._onRootChildAdded); Util.connectSmart(this._rootItem, 'child-removed', this, this._onRootChildRemoved); Util.connectSmart(this._rootItem, 'child-moved', this, this._onRootChildMoved); // Dropbox requires us to call AboutToShow(0) first this._rootItem.sendAboutToShow(); // fill the menu for the first time const children = this._rootItem.getChildren(); children.forEach(child => this._onRootChildAdded(this._rootItem, child)); } _setOpenedSubmenu(submenu) { if (!submenu) return; if (submenu._parent !== this._rootMenu) return; if (submenu === this._openedSubMenu) return; if (this._openedSubMenu && this._openedSubMenu.isOpen) this._openedSubMenu.close(true); this._openedSubMenu = submenu; } _onRootChildAdded(dbusItem, child, position) { // Menu additions can be expensive, so let's do it in different chunks const basePriority = this.isOpen ? GLib.PRIORITY_DEFAULT : GLib.PRIORITY_LOW; const idlePromise = new PromiseUtils.IdlePromise( basePriority + this._itemsBeingAdded.size, this.cancellable); this._itemsBeingAdded.add(child); idlePromise.then(() => { if (!this._itemsBeingAdded.has(child)) return; this._rootMenu.addMenuItem( MenuItemFactory.createItem(this, child), position); }).catch(e => { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); }).finally(() => this._itemsBeingAdded.delete(child)); } _onRootChildRemoved(dbusItem, child) { // children like to play hide and seek // but we know how to find it for sure! const item = this._rootMenu._getMenuItems().find(it => it._dbusItem === child); if (item) item.destroy(); else this._itemsBeingAdded.delete(child); } _onRootChildMoved(dbusItem, child, oldpos, newpos) { MenuUtils.moveItemInMenu(this._rootMenu, dbusItem, newpos); } _onMenuOpened(menu, state) { if (!this._rootItem) return; this._client.active = state; if (state) { if (this._openedSubMenu && this._openedSubMenu.isOpen) this._openedSubMenu.close(); this._rootItem.handleEvent('opened', null, 0); this._rootItem.sendAboutToShow(); } else { this._rootItem.handleEvent('closed', null, 0); } } destroy() { this.emit('destroy'); if (this._client) this._client.destroy(); this._client = null; this._rootItem = null; this._rootMenu = null; this.indicator = null; this._itemsBeingAdded = null; } } 0707010000000A000081A400000000000000000000000165CC291900000C7D000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/dbusProxy.jsimport Gio from 'gi://Gio'; import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; import {CancellableChild, Logger} from './util.js'; Gio._promisify(Gio.DBusProxy.prototype, 'init_async'); export const DBusProxy = GObject.registerClass({ Signals: {'destroy': {}}, }, class DBusProxy extends Gio.DBusProxy { static get TUPLE_VARIANT_TYPE() { if (!this._tupleVariantType) this._tupleVariantType = new GLib.VariantType('(v)'); return this._tupleVariantType; } static destroy() { delete this._tupleType; } _init(busName, objectPath, interfaceInfo, flags = Gio.DBusProxyFlags.NONE) { if (interfaceInfo.signals.length) Logger.warn('Avoid exposing signals to gjs!'); super._init({ gConnection: Gio.DBus.session, gInterfaceName: interfaceInfo.name, gInterfaceInfo: interfaceInfo, gName: busName, gObjectPath: objectPath, gFlags: flags, }); this._signalIds = []; if (!(flags & Gio.DBusProxyFlags.DO_NOT_CONNECT_SIGNALS)) { this._signalIds.push(this.connect('g-signal', (_proxy, ...args) => this._onSignal(...args))); } this._signalIds.push(this.connect('notify::g-name-owner', () => this._onNameOwnerChanged())); } async initAsync(cancellable) { cancellable = new CancellableChild(cancellable); await this.init_async(GLib.PRIORITY_DEFAULT, cancellable); this._cancellable = cancellable; this.gInterfaceInfo.methods.map(m => m.name).forEach(method => this._ensureAsyncMethod(method)); } destroy() { this.emit('destroy'); this._signalIds.forEach(id => this.disconnect(id)); if (this._cancellable) this._cancellable.cancel(); } // This can be removed when we will have GNOME 43 as minimum version _ensureAsyncMethod(method) { if (this[`${method}Async`]) return; if (!this[`${method}Remote`]) throw new Error(`Missing remote method '${method}'`); this[`${method}Async`] = function (...args) { return new Promise((resolve, reject) => { this[`${method}Remote`](...args, (ret, e) => { if (e) reject(e); else resolve(ret); }); }); }; } _onSignal() { } getProperty(propertyName, cancellable) { return this.gConnection.call(this.gName, this.gObjectPath, 'org.freedesktop.DBus.Properties', 'Get', GLib.Variant.new('(ss)', [this.gInterfaceName, propertyName]), DBusProxy.TUPLE_VARIANT_TYPE, Gio.DBusCallFlags.NONE, -1, cancellable); } getProperties(cancellable) { return this.gConnection.call(this.gName, this.gObjectPath, 'org.freedesktop.DBus.Properties', 'GetAll', GLib.Variant.new('(s)', [this.gInterfaceName]), GLib.VariantType.new('(a{sv})'), Gio.DBusCallFlags.NONE, -1, cancellable); } }); 0707010000000B000081A400000000000000000000000165CC291900000E1B000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/extension.js// This file is part of the AppIndicator/KStatusNotifierItem GNOME Shell extension // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import * as Extension from 'resource:///org/gnome/shell/extensions/extension.js'; import * as StatusNotifierWatcher from './statusNotifierWatcher.js'; import * as Interfaces from './interfaces.js'; import * as TrayIconsManager from './trayIconsManager.js'; import * as Util from './util.js'; import {SettingsManager} from './settingsManager.js'; export default class DashToDockExtension extends Extension.Extension { constructor(...args) { super(...args); Util.Logger.init(this); Interfaces.initialize(this); this._isEnabled = false; this._statusNotifierWatcher = null; this._watchDog = new Util.NameWatcher(StatusNotifierWatcher.WATCHER_BUS_NAME); this._watchDog.connect('vanished', () => this._maybeEnableAfterNameAvailable()); // HACK: we want to leave the watchdog alive when disabling the extension, // but if we are being reloaded, we destroy it since it could be considered // a leak and spams our log, too. /* eslint-disable no-undef */ if (typeof global['--appindicator-extension-on-reload'] === 'function') global['--appindicator-extension-on-reload'](); global['--appindicator-extension-on-reload'] = () => { Util.Logger.debug('Reload detected, destroying old watchdog'); this._watchDog.destroy(); this._watchDog = null; }; /* eslint-enable no-undef */ } enable() { this._isEnabled = true; SettingsManager.initialize(this); Util.tryCleanupOldIndicators(); this._maybeEnableAfterNameAvailable(); TrayIconsManager.TrayIconsManager.initialize(); } disable() { this._isEnabled = false; TrayIconsManager.TrayIconsManager.destroy(); if (this._statusNotifierWatcher !== null) { this._statusNotifierWatcher.destroy(); this._statusNotifierWatcher = null; } SettingsManager.destroy(); } // FIXME: when entering/leaving the lock screen, the extension might be // enabled/disabled rapidly. // This will create very bad side effects in case we were not done unowning // the name while trying to own it again. Since g_bus_unown_name doesn't // fire any callback when it's done, we need to monitor the bus manually // to find out when the name vanished so we can reclaim it again. _maybeEnableAfterNameAvailable() { // by the time we get called whe might not be enabled if (!this._isEnabled || this._statusNotifierWatcher) return; if (this._watchDog.nameAcquired && this._watchDog.nameOnBus) return; this._statusNotifierWatcher = new StatusNotifierWatcher.StatusNotifierWatcher( this._watchDog); } } 0707010000000C000081A400000000000000000000000165CC291900001675000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/iconCache.js// This file is part of the AppIndicator/KStatusNotifierItem GNOME Shell extension // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import GLib from 'gi://GLib'; import Gio from 'gi://Gio'; import * as PromiseUtils from './promiseUtils.js'; import * as Util from './util.js'; // The icon cache caches icon objects in case they're reused shortly aftwerwards. // This is necessary for some indicators like skype which rapidly switch between serveral icons. // Without caching, the garbage collection would never be able to handle the amount of new icon data. // If the lifetime of an icon is over, the cache will destroy the icon. (!) // The presence of active icons will extend the lifetime. const GC_INTERVAL = 100; // seconds const LIFETIME_TIMESPAN = 120; // seconds // how to use: see IconCache.add, IconCache.get export class IconCache { constructor() { this._cache = new Map(); this._activeIcons = Object.create(null); this._lifetime = new Map(); // we don't want to attach lifetime to the object } add(id, icon) { if (!(icon instanceof Gio.Icon)) { Util.Logger.critical('IconCache: Only Gio.Icons are supported'); return null; } if (!id) { Util.Logger.critical('IconCache: Invalid ID provided'); return null; } const oldIcon = this._cache.get(id); if (!oldIcon || !oldIcon.equals(icon)) { Util.Logger.debug(`IconCache: adding ${id}: ${icon}`); this._cache.set(id, icon); } else { icon = oldIcon; } this._renewLifetime(id); this._checkGC(); return icon; } updateActive(iconType, gicon, isActive) { if (!gicon) return; const previousActive = this._activeIcons[iconType]; if (isActive && [...this._cache.values()].some(icon => icon === gicon)) this._activeIcons[iconType] = gicon; else if (previousActive === gicon) delete this._activeIcons[iconType]; else return; if (previousActive) { this._cache.forEach((icon, id) => { if (icon === previousActive) this._renewLifetime(id); }); } } _remove(id) { Util.Logger.debug(`IconCache: removing ${id}`); this._cache.delete(id); this._lifetime.delete(id); } _renewLifetime(id) { this._lifetime.set(id, new Date().getTime() + LIFETIME_TIMESPAN * 1000); } forceDestroy(id) { const gicon = this._cache.has(id); if (gicon) { Object.keys(this._activeIcons).forEach(iconType => this.updateActive(iconType, gicon, false)); this._remove(id); this._checkGC(); } } // marks all the icons as removable, if something doesn't claim them before weakClear() { this._activeIcons = Object.create(null); this._checkGC(); } // removes everything from the cache clear() { this._activeIcons = Object.create(null); this._cache.forEach((_icon, id) => this._remove(id)); this._checkGC(); } // returns an object from the cache, or null if it can't be found. get(id) { const icon = this._cache.get(id); if (icon) { Util.Logger.debug(`IconCache: retrieving ${id}: ${icon}`); this._renewLifetime(id); return icon; } return null; } async _checkGC() { const cacheIsEmpty = this._cache.size === 0; if (!cacheIsEmpty && !this._gcTimeout) { Util.Logger.debug('IconCache: garbage collector started'); let anyUnusedInCache = false; this._gcTimeout = new PromiseUtils.TimeoutSecondsPromise(GC_INTERVAL, GLib.PRIORITY_LOW); try { await this._gcTimeout; anyUnusedInCache = this._gc(); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e, 'IconCache: garbage collector'); } finally { delete this._gcTimeout; } if (anyUnusedInCache) this._checkGC(); } else if (cacheIsEmpty && this._gcTimeout) { Util.Logger.debug('IconCache: garbage collector stopped'); this._gcTimeout.cancel(); } } _gc() { const time = new Date().getTime(); let anyUnused = false; this._cache.forEach((icon, id) => { if (Object.values(this._activeIcons).includes(icon)) { Util.Logger.debug(`IconCache: ${id} is in use.`); } else if (this._lifetime.get(id) < time) { this._remove(id); } else { anyUnused = true; Util.Logger.debug(`IconCache: ${id} survived this round.`); } }); return anyUnused; } destroy() { this.clear(); } } 0707010000000D000041ED00000000000000000000000265CC291900000000000000000000000000000000000000000000004800000000gnome-shell-extension-appindicator-v57+git5.03a7412/indicator-test-tool0707010000000E000081ED00000000000000000000000165CC291900000B3D000000000000000000000000000000000000005000000000gnome-shell-extension-appindicator-v57+git5.03a7412/indicator-test-tool/ksni.py#!/usr/bin/env python2 # -*- coding: utf-8 -*- import sys from PyQt4 import Qt from PyQt4.QtCore import QObject, QString from PyKDE4.kdeui import KStatusNotifierItem, KMenu App = Qt.QApplication(sys.argv) class Notifier(QObject): def __init__(self, parent=None): QObject.__init__(self, parent) self.tray = KStatusNotifierItem("ksni-test-tool", self) self.tray.setCategory(KStatusNotifierItem.Communications) self.tray.setIconByName(QString("/usr/share/icons/oxygen/16x16/categories/applications-internet.png")) self.tray.setAttentionIconByName(QString("accessories-text-editor")) self.tray.setStatus(KStatusNotifierItem.Active) self.tray.setToolTipIconByName(QString("/usr/share/icons/oxygen/16x16/categories/applications-internet.png")) self.menu = KMenu("KSNI Test Tool") self.menu.addAction("Hello", self.onHelloClicked) self.menu.addAction("Change Status", self.toggleStatus) self.menu.addAction("Hide for some seconds", self.hideForAWhile) self.menu.addAction("Switch to pixmap icon", self.usePixmap) self.menu.addSeparator() self.menu.addAction("Set overlay pixmap", self.setOverlayPixmap) self.menu.addAction("Set overlay icon name", self.setOverlayName) self.menu.addAction("Remove overlay icon", self.removeOverlay) self.tray.setContextMenu(self.menu) self.tray.activateRequested.connect(self.onActivated) self.tray.scrollRequested.connect(self.onScroll) def onActivated(self, show, point): print "Activate() called, show="+str(show)+", point="+str(point) def onScroll(self, delta, orientation): print "Scroll() called, delta="+str(delta)+", orientation="+str(orientation) def onHelloClicked(self): print "Hello World!" def toggleStatus(self): if (self.tray.status() == KStatusNotifierItem.Active): self.tray.setStatus(KStatusNotifierItem.NeedsAttention) else: self.tray.setStatus(KStatusNotifierItem.Active) def hideForAWhile(self): self.tray.setStatus(KStatusNotifierItem.Passive) Qt.QTimer.singleShot(2000, self.toggleStatus) def usePixmap(self): self.tray.setIconByName(QString("")) self.tray.setIconByPixmap(Qt.QIcon.fromTheme("accessories-calculator")) def setOverlayPixmap(self): self.tray.setOverlayIconByName(QString("")) self.tray.setOverlayIconByPixmap(Qt.QIcon.fromTheme("dialog-information")) def setOverlayName(self): self.tray.setOverlayIconByPixmap(Qt.QIcon()) self.tray.setOverlayIconByName(QString("dialog-error")) def removeOverlay(self): self.tray.setOverlayIconByName(QString("")) self.tray.setOverlayIconByPixmap(Qt.QIcon()) if __name__ == '__main__': notifer = Notifier() App.exec_() 0707010000000F000081ED00000000000000000000000165CC291900002C42000000000000000000000000000000000000005400000000gnome-shell-extension-appindicator-v57+git5.03a7412/indicator-test-tool/testTool.js#!/usr/bin/gjs /* * This creates an appindicator which contains all common menu items * * Requires libappindicator3 introspection data */ import Gtk from 'gi://Gtk?version=3.0'; import AppIndicator from 'gi://AppIndicator3'; import GLib from 'gi://GLib'; import Gio from 'gi://Gio'; const DEFAULT_ICON = 'start-here'; const ATTENTION_ICON = 'starred'; const iconsPool = [ 'emoji-recent-symbolic', 'emoji-flags-symbolic', 'emoji-objects-symbolic', 'emoji-nature-symbolic', 'emoji-body-symbolic', 'emoji-activities-symbolic', 'emoji-people-symbolic', 'emoji-travel-symbolic', 'emoji-symbols-symbolic', 'emoji-food-symbolic', ]; const ScrollType = { UP: 0, DOWN: 1, }; (() => { const temporaryFiles = []; var app = new Gtk.Application({ application_id: null, }); var window = null; app.connect('activate', () => { window.present(); }); app.connect('startup', () => { window = new Gtk.ApplicationWindow({ title: 'test', application: app, }); let getRandomIcon = () => iconsPool[Math.floor(Math.random() * (iconsPool.length - 1))]; let setRandomIconPath = () => { let iconName = getRandomIcon(); let iconInfo = Gtk.IconTheme.get_default().lookup_icon(iconName, 16, Gtk.IconLookupFlags.GENERIC_FALLBACK); let iconFile = Gio.File.new_for_path(iconInfo.get_filename()); let [, extension] = iconFile.get_basename().split('.'); let newName = `${Math.floor(Math.random() * 100)}${iconName}.${extension}`; let newFile = Gio.File.new_for_path( `${GLib.dir_make_tmp('indicator-test-XXXXXX')}/${newName}`); temporaryFiles.push(newFile, newFile.get_parent()); iconFile.copy(newFile, Gio.FileCopyFlags.OVERWRITE, null, null); indicator.set_icon_theme_path(newFile.get_parent().get_path()); indicator.set_icon(newFile.get_basename().split('.').slice(0, -1).join('')); }; var menu = new Gtk.Menu(); var item = Gtk.MenuItem.new_with_label('A standard item'); menu.append(item); item = Gtk.MenuItem.new_with_label('Foo'); const fooItem = item; let fooId = item.connect('activate', () => { GLib.timeout_add(GLib.PRIORITY_DEFAULT, 500, () => { print('Changing item label', fooItem.get_label()); fooItem.set_label('Destroy me now...'); fooItem.connect('activate', () => { print('Removed item labeled', fooItem.get_label()); fooItem.destroy(); }); fooItem.disconnect(fooId); const barItem = Gtk.MenuItem.new_with_label('Bar'); menu.insert(barItem, 2); barItem.show(); return GLib.SOURCE_REMOVE; }); }); menu.append(item); item = Gtk.ImageMenuItem.new_with_label('Calculator'); item.image = Gtk.Image.new_from_icon_name('gnome-calculator', Gtk.IconSize.MENU); menu.append(item); item = Gtk.CheckMenuItem.new_with_label('Check me!'); const checkItem = item; item.connect('activate', () => { GLib.timeout_add(GLib.PRIORITY_DEFAULT, 500, () => { print('changed item label', checkItem.get_label()); checkItem.set_label(`Checked at ${new Date().getTime()}`); return GLib.SOURCE_REMOVE; }); }); menu.append(item); item = Gtk.MenuItem.new_with_label('Blub'); let sub = new Gtk.Menu(); item.set_submenu(sub); menu.append(item); item = Gtk.MenuItem.new_with_label('Blubdablub'); sub.append(item); item = new Gtk.SeparatorMenuItem(); menu.append(item); item = Gtk.MenuItem.new_with_label('Foo'); menu.append(item); let submenu = new Gtk.Menu(); item.set_submenu(submenu); item = Gtk.MenuItem.new_with_label('Hello'); submenu.append(item); item = Gtk.MenuItem.new_with_label('Nested'); submenu.append(item); let submenu1 = new Gtk.Menu(); item.set_submenu(submenu1); item = Gtk.MenuItem.new_with_label('Another nested'); submenu.append(item); let submenu2 = new Gtk.Menu(); item.set_submenu(submenu2); item = Gtk.MenuItem.new_with_label('Some other item'); submenu1.append(item); item = Gtk.MenuItem.new_with_label('abcdefg'); submenu2.append(item); item = new Gtk.SeparatorMenuItem(); menu.append(item); var group = []; for (let i = 0; i < 5; ++i) { item = Gtk.RadioMenuItem.new_with_label(group, `Example Radio ${i}`); group = Gtk.RadioMenuItem.prototype.get_group.apply(item);// .get_group(); if (i === 1) item.set_active(true); menu.append(item); } item = new Gtk.SeparatorMenuItem(); menu.append(item); item = Gtk.MenuItem.new_with_label('Set Label'); item.connect('activate', () => { indicator.set_label(`${new Date().getTime()}`, 'Blub'); }); menu.append(item); item = Gtk.MenuItem.new_with_label('Unset Label'); item.connect('activate', () => { indicator.set_label('', ''); }); menu.append(item); item = Gtk.MenuItem.new_with_label('Autodestroy Label'); item.connect('activate', () => { let i = 30; GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 1, () => { indicator.set_label(i > 0 ? `Label timeout ${i--}` : '', ''); return i >= 0; }); }); menu.append(item); item = Gtk.MenuItem.new_with_label('Set Random icon'); item.connect('activate', () => indicator.set_icon(getRandomIcon())); menu.append(item); item = Gtk.MenuItem.new_with_label('Set Random custom theme icon'); item.connect('activate', setRandomIconPath); menu.append(item); item = Gtk.CheckMenuItem.new_with_label('Toggle Label and Icon'); item.connect('activate', it => { if (it.get_active()) { indicator.set_label(`${new Date().getTime()}`, 'Blub'); item.connect('activate', () => indicator.set_icon(getRandomIcon())); } else { indicator.set_label('', ''); indicator.set_icon(DEFAULT_ICON); } }); menu.append(item); let toggleBrandingItem = item; item = Gtk.CheckMenuItem.new_with_label('Toggle Attention'); let toggleAttentionId = item.connect('activate', () => { indicator.set_status(indicator.get_status() !== AppIndicator.IndicatorStatus.ATTENTION ? AppIndicator.IndicatorStatus.ATTENTION : AppIndicator.IndicatorStatus.ACTIVE); }); menu.append(item); let toggleAttentionItem = item; item = new Gtk.SeparatorMenuItem(); menu.append(item); /* Double separaptors test */ item = new Gtk.SeparatorMenuItem(); menu.append(item); /* Simulate similar behavior of #226 and #236 */ item = Gtk.CheckMenuItem.new_with_label('Crazy icons updates'); item.connect('activate', it => { if (it.get_active()) { item._timeoutID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 16, () => { setRandomIconPath(); indicator.set_label(`${new Date().getSeconds()}`, ''); return GLib.SOURCE_CONTINUE; }); } else { GLib.source_remove(item._timeoutID); delete item._timeoutID; } }); menu.append(item); item = Gtk.MenuItem.new_with_label('Hide for some time'); item.connect('activate', () => { indicator.set_status(AppIndicator.IndicatorStatus.PASSIVE); GLib.timeout_add(0, 5000, () => { indicator.set_status(AppIndicator.IndicatorStatus.ACTIVE); return false; }); }); menu.append(item); item = Gtk.MenuItem.new_with_label('Close in 5 seconds'); item.connect('activate', () => { GLib.timeout_add(0, 5000, () => { app.quit(); return false; }); }); menu.append(item); menu.show_all(); var indicator = AppIndicator.Indicator.new('Hello', 'indicator-test', AppIndicator.IndicatorCategory.APPLICATION_STATUS); indicator.set_status(AppIndicator.IndicatorStatus.ACTIVE); indicator.set_icon(DEFAULT_ICON); indicator.set_attention_icon(ATTENTION_ICON); indicator.set_menu(menu); indicator.set_secondary_activate_target(toggleBrandingItem); indicator.connect('connection-changed', (_indicator, connected) => { print(`Signal "connection-changed" emitted. Connected: ${connected}`); }); indicator.connect('new-attention-icon', () => { print('Signal "new-attention-icon" emitted.'); }); indicator.connect('new-icon', () => { let icon = '<none>'; if (indicator.get_status() === AppIndicator.IndicatorStatus.ATTENTION) icon = indicator.get_attention_icon(); else if (indicator.get_status() === AppIndicator.IndicatorStatus.ACTIVE) icon = indicator.get_icon(); print(`Signal "new-icon" emitted. Icon: ${icon}`); }); indicator.connect('new-icon-theme-path', (_indicator, path) => { print(`Signal "new-icon-theme-path" emitted. Path: ${path}`); }); indicator.connect('new-label', (_indicator, label, guide) => { print(`Signal "new-label" emitted. Label: ${label}, Guide: ${guide}`); }); indicator.connect('new-status', (_indicator, status) => { print(`Signal "new-status" emitted. Status: ${status}`); toggleAttentionItem.block_signal_handler(toggleAttentionId); toggleAttentionItem.set_active(status === 'NeedsAttention'); toggleAttentionItem.unblock_signal_handler(toggleAttentionId); }); indicator.connect('scroll-event', (_indicator, steps, direction) => { print(`Signal "scroll-event" emitted. Steps: ${steps}, Direction: ${direction}`); let currentIndex = iconsPool.indexOf(indicator.get_icon()); let iconIndex; if (direction === ScrollType.UP) iconIndex = (currentIndex + 1) % iconsPool.length; else iconIndex = (currentIndex <= 0 ? iconsPool.length : currentIndex) - 1; indicator.set_icon(iconsPool[iconIndex]); }); }); app.connect('shutdown', () => temporaryFiles.forEach(file => file.delete(null))); GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, /* SIGTERM */ 2, () => { app.quit(); return GLib.SOURCE_CONTINUE; }); app.run(ARGV); })(); 07070100000010000081A400000000000000000000000165CC291900005089000000000000000000000000000000000000004B00000000gnome-shell-extension-appindicator-v57+git5.03a7412/indicatorStatusIcon.js// This file is part of the AppIndicator/KStatusNotifierItem GNOME Shell extension // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import Clutter from 'gi://Clutter'; import Gio from 'gi://Gio'; import GObject from 'gi://GObject'; import St from 'gi://St'; import * as AppDisplay from 'resource:///org/gnome/shell/ui/appDisplay.js'; import * as Main from 'resource:///org/gnome/shell/ui/main.js'; import * as Panel from 'resource:///org/gnome/shell/ui/panel.js'; import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js'; import * as AppIndicator from './appIndicator.js'; import * as PromiseUtils from './promiseUtils.js'; import * as SettingsManager from './settingsManager.js'; import * as Util from './util.js'; import * as DBusMenu from './dbusMenu.js'; const DEFAULT_ICON_SIZE = Panel.PANEL_ICON_SIZE || 16; export function addIconToPanel(statusIcon) { if (!(statusIcon instanceof BaseStatusIcon)) throw TypeError(`Unexpected icon type: ${statusIcon}`); const settings = SettingsManager.getDefaultGSettings(); const indicatorId = `appindicator-${statusIcon.uniqueId}`; const currentIcon = Main.panel.statusArea[indicatorId]; if (currentIcon) { if (currentIcon !== statusIcon) currentIcon.destroy(); Main.panel.statusArea[indicatorId] = null; } Main.panel.addToStatusArea(indicatorId, statusIcon, 1, settings.get_string('tray-pos')); Util.connectSmart(settings, 'changed::tray-pos', statusIcon, () => addIconToPanel(statusIcon)); } export function getTrayIcons() { return Object.values(Main.panel.statusArea).filter( i => i instanceof IndicatorStatusTrayIcon); } export function getAppIndicatorIcons() { return Object.values(Main.panel.statusArea).filter( i => i instanceof IndicatorStatusIcon); } export const BaseStatusIcon = GObject.registerClass( class IndicatorBaseStatusIcon extends PanelMenu.Button { _init(menuAlignment, nameText, iconActor, dontCreateMenu) { super._init(menuAlignment, nameText, dontCreateMenu); const settings = SettingsManager.getDefaultGSettings(); Util.connectSmart(settings, 'changed::icon-opacity', this, this._updateOpacity); this.connect('notify::hover', () => this._onHoverChanged()); if (!super._onDestroy) this.connect('destroy', () => this._onDestroy()); this._box = new St.BoxLayout({style_class: 'panel-status-indicators-box'}); this.add_child(this._box); this._setIconActor(iconActor); this._showIfReady(); } _setIconActor(icon) { if (!(icon instanceof Clutter.Actor)) throw new Error(`${icon} is not a valid actor`); if (this._icon && this._icon !== icon) this._icon.destroy(); this._icon = icon; this._updateEffects(); this._monitorIconEffects(); if (this._icon) { this._box.add_child(this._icon); const id = this._icon.connect('destroy', () => { this._icon.disconnect(id); this._icon = null; this._monitorIconEffects(); }); } } _onDestroy() { if (this._icon) this._icon.destroy(); if (super._onDestroy) super._onDestroy(); } isReady() { throw new GObject.NotImplementedError('isReady() in %s'.format(this.constructor.name)); } get icon() { return this._icon; } get uniqueId() { throw new GObject.NotImplementedError('uniqueId in %s'.format(this.constructor.name)); } _showIfReady() { this.visible = this.isReady(); } _onHoverChanged() { if (this.hover) { this.opacity = 255; if (this._icon) this._icon.remove_effect_by_name('desaturate'); } else { this._updateEffects(); } } _updateOpacity() { const settings = SettingsManager.getDefaultGSettings(); const userValue = settings.get_user_value('icon-opacity'); if (userValue) this.opacity = userValue.unpack(); else this.opacity = 255; } _updateEffects() { this._updateOpacity(); if (this._icon) { this._updateSaturation(); this._updateBrightnessContrast(); } } _monitorIconEffects() { const settings = SettingsManager.getDefaultGSettings(); const monitoring = !!this._iconSaturationIds; if (!this._icon && monitoring) { Util.disconnectSmart(settings, this, this._iconSaturationIds); delete this._iconSaturationIds; Util.disconnectSmart(settings, this, this._iconBrightnessIds); delete this._iconBrightnessIds; Util.disconnectSmart(settings, this, this._iconContrastIds); delete this._iconContrastIds; } else if (this._icon && !monitoring) { this._iconSaturationIds = Util.connectSmart(settings, 'changed::icon-saturation', this, this._updateSaturation); this._iconBrightnessIds = Util.connectSmart(settings, 'changed::icon-brightness', this, this._updateBrightnessContrast); this._iconContrastIds = Util.connectSmart(settings, 'changed::icon-contrast', this, this._updateBrightnessContrast); } } _updateSaturation() { const settings = SettingsManager.getDefaultGSettings(); const desaturationValue = settings.get_double('icon-saturation'); let desaturateEffect = this._icon.get_effect('desaturate'); if (desaturationValue > 0) { if (!desaturateEffect) { desaturateEffect = new Clutter.DesaturateEffect(); this._icon.add_effect_with_name('desaturate', desaturateEffect); } desaturateEffect.set_factor(desaturationValue); } else if (desaturateEffect) { this._icon.remove_effect(desaturateEffect); } } _updateBrightnessContrast() { const settings = SettingsManager.getDefaultGSettings(); const brightnessValue = settings.get_double('icon-brightness'); const contrastValue = settings.get_double('icon-contrast'); let brightnessContrastEffect = this._icon.get_effect('brightness-contrast'); if (brightnessValue !== 0 | contrastValue !== 0) { if (!brightnessContrastEffect) { brightnessContrastEffect = new Clutter.BrightnessContrastEffect(); this._icon.add_effect_with_name('brightness-contrast', brightnessContrastEffect); } brightnessContrastEffect.set_brightness(brightnessValue); brightnessContrastEffect.set_contrast(contrastValue); } else if (brightnessContrastEffect) { this._icon.remove_effect(brightnessContrastEffect); } } }); /* * IndicatorStatusIcon implements an icon in the system status area */ export const IndicatorStatusIcon = GObject.registerClass( class IndicatorStatusIcon extends BaseStatusIcon { _init(indicator) { super._init(0.5, indicator.accessibleName, new AppIndicator.IconActor(indicator, DEFAULT_ICON_SIZE)); this._indicator = indicator; this._lastClickTime = -1; this._lastClickX = -1; this._lastClickY = -1; this._box.add_style_class_name('appindicator-box'); Util.connectSmart(this._indicator, 'ready', this, this._showIfReady); Util.connectSmart(this._indicator, 'menu', this, this._updateMenu); Util.connectSmart(this._indicator, 'label', this, this._updateLabel); Util.connectSmart(this._indicator, 'status', this, this._updateStatus); Util.connectSmart(this._indicator, 'reset', this, () => { this._updateStatus(); this._updateLabel(); }); Util.connectSmart(this._indicator, 'accessible-name', this, () => this.set_accessible_name(this._indicator.accessibleName)); Util.connectSmart(this._indicator, 'destroy', this, () => this.destroy()); this.connect('notify::visible', () => this._updateMenu()); this._showIfReady(); } _onDestroy() { if (this._menuClient) { this._menuClient.disconnect(this._menuReadyId); this._menuClient.destroy(); this._menuClient = null; } super._onDestroy(); } get uniqueId() { return this._indicator.uniqueId; } isReady() { return this._indicator && this._indicator.isReady; } _updateLabel() { const {label} = this._indicator; if (label) { if (!this._label || !this._labelBin) { this._labelBin = new St.Bin({ yAlign: Clutter.ActorAlign.CENTER, }); this._label = new St.Label(); this._labelBin.add_actor(this._label); this._box.add_actor(this._labelBin); } this._label.set_text(label); if (!this._box.contains(this._labelBin)) this._box.add_actor(this._labelBin); // FIXME: why is it suddenly necessary? } else if (this._label) { this._labelBin.destroy_all_children(); this._box.remove_actor(this._labelBin); this._labelBin.destroy(); delete this._labelBin; delete this._label; } } _updateStatus() { const wasVisible = this.visible; this.visible = this._indicator.status !== AppIndicator.SNIStatus.PASSIVE; if (this.visible !== wasVisible) this._indicator.checkAlive().catch(logError); } _updateMenu() { if (this._menuClient) { this._menuClient.disconnect(this._menuReadyId); this._menuClient.destroy(); this._menuClient = null; this.menu.removeAll(); } if (this.visible && this._indicator.menuPath) { this._menuClient = new DBusMenu.Client(this._indicator.busName, this._indicator.menuPath, this._indicator); if (this._menuClient.isReady) this._menuClient.attachToMenu(this.menu); this._menuReadyId = this._menuClient.connect('ready-changed', () => { if (this._menuClient.isReady) this._menuClient.attachToMenu(this.menu); else this._updateMenu(); }); } } _showIfReady() { if (!this.isReady()) return; this._updateLabel(); this._updateStatus(); this._updateMenu(); } _updateClickCount(event) { const [x, y] = event.get_coords(); const time = event.get_time(); const {doubleClickDistance, doubleClickTime} = Clutter.Settings.get_default(); if (time > (this._lastClickTime + doubleClickTime) || (Math.abs(x - this._lastClickX) > doubleClickDistance) || (Math.abs(y - this._lastClickY) > doubleClickDistance)) this._clickCount = 0; this._lastClickTime = time; this._lastClickX = x; this._lastClickY = y; this._clickCount = (this._clickCount % 2) + 1; return this._clickCount; } _maybeHandleDoubleClick(event) { if (this._indicator.supportsActivation === false) return Clutter.EVENT_PROPAGATE; if (event.get_button() !== Clutter.BUTTON_PRIMARY) return Clutter.EVENT_PROPAGATE; if (this._updateClickCount(event) === 2) { this._indicator.open(...event.get_coords(), event.get_time()); return Clutter.EVENT_STOP; } return Clutter.EVENT_PROPAGATE; } async _waitForDoubleClick() { const {doubleClickTime} = Clutter.Settings.get_default(); this._waitDoubleClickPromise = new PromiseUtils.TimeoutPromise( doubleClickTime); try { await this._waitDoubleClickPromise; this.menu.toggle(); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) throw e; } finally { delete this._waitDoubleClickPromise; } } vfunc_event(event) { if (this.menu.numMenuItems && event.type() === Clutter.EventType.TOUCH_BEGIN) this.menu.toggle(); return Clutter.EVENT_PROPAGATE; } vfunc_button_press_event(event) { if (this._waitDoubleClickPromise) this._waitDoubleClickPromise.cancel(); // if middle mouse button clicked send SecondaryActivate dbus event and do not show appindicator menu if (event.get_button() === Clutter.BUTTON_MIDDLE) { if (Main.panel.menuManager.activeMenu) Main.panel.menuManager._closeMenu(true, Main.panel.menuManager.activeMenu); this._indicator.secondaryActivate(event.get_time(), ...event.get_coords()); return Clutter.EVENT_STOP; } if (event.get_button() === Clutter.BUTTON_SECONDARY) { this.menu.toggle(); return Clutter.EVENT_PROPAGATE; } const doubleClickHandled = this._maybeHandleDoubleClick(event); if (doubleClickHandled === Clutter.EVENT_PROPAGATE && event.get_button() === Clutter.BUTTON_PRIMARY && this.menu.numMenuItems) { if (this._indicator.supportsActivation !== false) this._waitForDoubleClick().catch(logError); else this.menu.toggle(); } return Clutter.EVENT_PROPAGATE; } vfunc_button_release_event(event) { if (!this._indicator.supportsActivation) return this._maybeHandleDoubleClick(event); return Clutter.EVENT_PROPAGATE; } vfunc_scroll_event(event) { // Since Clutter 1.10, clutter will always send a smooth scrolling event // with explicit deltas, no matter what input device is used // In fact, for every scroll there will be a smooth and non-smooth scroll // event, and we can choose which one we interpret. if (event.get_scroll_direction() === Clutter.ScrollDirection.SMOOTH) { const [dx, dy] = event.get_scroll_delta(); this._indicator.scroll(dx, dy); return Clutter.EVENT_STOP; } return Clutter.EVENT_PROPAGATE; } }); export const IndicatorStatusTrayIcon = GObject.registerClass( class IndicatorTrayIcon extends BaseStatusIcon { _init(icon) { super._init(0.5, icon.wm_class, icon, {dontCreateMenu: true}); Util.Logger.debug(`Adding legacy tray icon ${this.uniqueId}`); this._box.add_style_class_name('appindicator-trayicons-box'); this.add_style_class_name('appindicator-icon'); this.add_style_class_name('tray-icon'); this.connect('button-press-event', (_actor, _event) => { this.add_style_pseudo_class('active'); return Clutter.EVENT_PROPAGATE; }); this.connect('button-release-event', (_actor, event) => { this._icon.click(event); this.remove_style_pseudo_class('active'); return Clutter.EVENT_PROPAGATE; }); this.connect('key-press-event', (_actor, event) => { this.add_style_pseudo_class('active'); this._icon.click(event); return Clutter.EVENT_PROPAGATE; }); this.connect('key-release-event', (_actor, event) => { this._icon.click(event); this.remove_style_pseudo_class('active'); return Clutter.EVENT_PROPAGATE; }); Util.connectSmart(this._icon, 'destroy', this, () => { icon.clear_effects(); this.destroy(); }); const settings = SettingsManager.getDefaultGSettings(); Util.connectSmart(settings, 'changed::icon-size', this, this._updateIconSize); const themeContext = St.ThemeContext.get_for_stage(global.stage); Util.connectSmart(themeContext, 'notify::scale-factor', this, () => this._updateIconSize()); this._updateIconSize(); } _onDestroy() { Util.Logger.debug(`Destroying legacy tray icon ${this.uniqueId}`); if (this._waitDoubleClickPromise) this._waitDoubleClickPromise.cancel(); super._onDestroy(); } isReady() { return !!this._icon; } get uniqueId() { return `legacy:${this._icon.wm_class}:${this._icon.pid}`; } vfunc_navigate_focus(from, direction) { this.grab_key_focus(); return super.vfunc_navigate_focus(from, direction); } _getSimulatedButtonEvent(touchEvent) { const event = Clutter.Event.new(Clutter.EventType.BUTTON_RELEASE); event.set_button(1); event.set_time(touchEvent.get_time()); event.set_flags(touchEvent.get_flags()); event.set_stage(global.stage); event.set_source(touchEvent.get_source()); event.set_coords(...touchEvent.get_coords()); event.set_state(touchEvent.get_state()); return event; } vfunc_touch_event(event) { // Under X11 we rely on emulated pointer events if (!imports.gi.Meta.is_wayland_compositor()) return Clutter.EVENT_PROPAGATE; const slot = event.get_event_sequence().get_slot(); if (!this._touchPressSlot && event.get_type() === Clutter.EventType.TOUCH_BEGIN) { this.add_style_pseudo_class('active'); this._touchButtonEvent = this._getSimulatedButtonEvent(event); this._touchPressSlot = slot; this._touchDelayPromise = new PromiseUtils.TimeoutPromise( AppDisplay.MENU_POPUP_TIMEOUT); this._touchDelayPromise.then(() => { delete this._touchDelayPromise; delete this._touchPressSlot; this._touchButtonEvent.set_button(3); this._icon.click(this._touchButtonEvent); this.remove_style_pseudo_class('active'); }); } else if (event.get_type() === Clutter.EventType.TOUCH_END && this._touchPressSlot === slot) { delete this._touchPressSlot; delete this._touchButtonEvent; if (this._touchDelayPromise) { this._touchDelayPromise.cancel(); delete this._touchDelayPromise; } this._icon.click(this._getSimulatedButtonEvent(event)); this.remove_style_pseudo_class('active'); } else if (event.get_type() === Clutter.EventType.TOUCH_UPDATE && this._touchPressSlot === slot) { this.add_style_pseudo_class('active'); this._touchButtonEvent = this._getSimulatedButtonEvent(event); } return Clutter.EVENT_PROPAGATE; } vfunc_leave_event(event) { this.remove_style_pseudo_class('active'); if (this._touchDelayPromise) { this._touchDelayPromise.cancel(); delete this._touchDelayPromise; } return super.vfunc_leave_event(event); } _updateIconSize() { const settings = SettingsManager.getDefaultGSettings(); const {scaleFactor} = St.ThemeContext.get_for_stage(global.stage); let iconSize = settings.get_int('icon-size'); if (iconSize <= 0) iconSize = DEFAULT_ICON_SIZE; this.height = -1; this._icon.set({ width: iconSize * scaleFactor, height: iconSize * scaleFactor, xAlign: Clutter.ActorAlign.CENTER, yAlign: Clutter.ActorAlign.CENTER, }); } }); 07070100000011000041ED00000000000000000000000265CC291900000000000000000000000000000000000000000000004300000000gnome-shell-extension-appindicator-v57+git5.03a7412/interfaces-xml07070100000012000081A400000000000000000000000165CC29190000099F000000000000000000000000000000000000005000000000gnome-shell-extension-appindicator-v57+git5.03a7412/interfaces-xml/DBusMenu.xml<interface name="com.canonical.dbusmenu"> <!-- Properties --> <property name="Version" type="u" access="read" /> <property name="TextDirection" type="s" access="read" /> <property name="Status" type="s" access="read" /> <property name="IconThemePath" type="as" access="read" /> <!-- Functions --> <method name="GetLayout"> <arg type="i" name="parentId" direction="in" /> <arg type="i" name="recursionDepth" direction="in" /> <arg type="as" name="propertyNames" direction="in" /> <arg type="u" name="revision" direction="out" /> <arg type="(ia{sv}av)" name="layout" direction="out" /> </method> <method name="GetGroupProperties"> <arg type="ai" name="ids" direction="in" /> <arg type="as" name="propertyNames" direction="in" /> <arg type="a(ia{sv})" name="properties" direction="out" /> </method> <method name="GetProperty"> <arg type="i" name="id" direction="in" /> <arg type="s" name="name" direction="in" /> <arg type="v" name="value" direction="out" /> </method> <method name="Event"> <arg type="i" name="id" direction="in" /> <arg type="s" name="eventId" direction="in" /> <arg type="v" name="data" direction="in" /> <arg type="u" name="timestamp" direction="in" /> </method> <method name="EventGroup"> <arg type="a(isvu)" name="events" direction="in" /> <arg type="ai" name="idErrors" direction="out" /> </method> <method name="AboutToShow"> <arg type="i" name="id" direction="in" /> <arg type="b" name="needUpdate" direction="out" /> </method> <method name="AboutToShowGroup"> <arg type="ai" name="ids" direction="in" /> <arg type="ai" name="updatesNeeded" direction="out" /> <arg type="ai" name="idErrors" direction="out" /> </method> <!-- Signals <signal name="ItemsPropertiesUpdated"> <arg type="a(ia{sv})" name="updatedProps" direction="out" /> <arg type="a(ias)" name="removedProps" direction="out" /> </signal> <signal name="LayoutUpdated"> <arg type="u" name="revision" direction="out" /> <arg type="i" name="parent" direction="out" /> </signal> <signal name="ItemActivationRequested"> <arg type="i" name="id" direction="out" /> <arg type="u" name="timestamp" direction="out" /> </signal> --> </interface> 07070100000013000081A400000000000000000000000165CC291900001067000000000000000000000000000000000000005A00000000gnome-shell-extension-appindicator-v57+git5.03a7412/interfaces-xml/StatusNotifierItem.xml<!-- Based on: https://invent.kde.org/frameworks/knotifications/-/blob/master/src/org.kde.StatusNotifierItem.xml --> <interface name="org.kde.StatusNotifierItem"> <property name="Category" type="s" access="read"/> <property name="Id" type="s" access="read"/> <property name="Title" type="s" access="read"/> <property name="Status" type="s" access="read"/> <property name="WindowId" type="i" access="read"/> <!-- An additional path to add to the theme search path to find the icons specified above. --> <property name="IconThemePath" type="s" access="read"/> <property name="Menu" type="o" access="read"/> <property name="ItemIsMenu" type="b" access="read"/> <!-- main icon --> <!-- names are preferred over pixmaps --> <property name="IconName" type="s" access="read"/> <!--struct containing width, height and image data--> <property name="IconPixmap" type="a(iiay)" access="read"> <annotation name="org.qtproject.QtDBus.QtTypeName" value="KDbusImageVector"/> </property> <property name="OverlayIconName" type="s" access="read"/> <property name="OverlayIconPixmap" type="a(iiay)" access="read"> <annotation name="org.qtproject.QtDBus.QtTypeName" value="KDbusImageVector"/> </property> <!-- Requesting attention icon --> <property name="AttentionIconName" type="s" access="read"/> <!--same definition as image--> <property name="AttentionIconPixmap" type="a(iiay)" access="read"> <annotation name="org.qtproject.QtDBus.QtTypeName" value="KDbusImageVector"/> </property> <property name="AttentionMovieName" type="s" access="read"/> <!-- tooltip data --> <!--(iiay) is an image--> <!-- We disable this as we don't support tooltip, so no need to go through it <property name="ToolTip" type="(sa(iiay)ss)" access="read"> <annotation name="org.qtproject.QtDBus.QtTypeName" value="KDbusToolTipStruct"/> </property> --> <!-- interaction: the systemtray wants the application to do something --> <method name="ContextMenu"> <!-- we're passing the coordinates of the icon, so the app knows where to put the popup window --> <arg name="x" type="i" direction="in"/> <arg name="y" type="i" direction="in"/> </method> <method name="Activate"> <arg name="x" type="i" direction="in"/> <arg name="y" type="i" direction="in"/> </method> <method name="ProvideXdgActivationToken"> <arg name="token" type="s" direction="in"/> </method> <method name="SecondaryActivate"> <arg name="x" type="i" direction="in"/> <arg name="y" type="i" direction="in"/> </method> <method name="XAyatanaSecondaryActivate"> <arg name="timestamp" type="u" direction="in"/> </method> <method name="Scroll"> <arg name="delta" type="i" direction="in"/> <arg name="orientation" type="s" direction="in"/> </method> <!-- Signals: the client wants to change something in the status <signal name="NewTitle"> </signal> <signal name="NewIcon"> </signal> <signal name="NewAttentionIcon"> </signal> <signal name="NewOverlayIcon"> </signal> --> <!-- We disable this as we don't support tooltip, so no need to go through it <signal name="NewToolTip"> </signal> --> <!-- <signal name="NewStatus"> <arg name="status" type="s"/> </signal> --> <!-- The following items are not supported by specs, but widely used <signal name="NewIconThemePath"> <arg type="s" name="icon_theme_path" direction="out" /> </signal> <signal name="NewMenu"></signal> --> <!-- ayatana labels --> <!-- These are commented out because GDBusProxy would otherwise require them, but they are not available for KDE indicators --> <!--<signal name="XAyatanaNewLabel"> <arg type="s" name="label" direction="out" /> <arg type="s" name="guide" direction="out" /> </signal> <property name="XAyatanaLabel" type="s" access="read" /> <property name="XAyatanaLabelGuide" type="s" access="read" />--> </interface> 07070100000014000081A400000000000000000000000165CC2919000003DF000000000000000000000000000000000000005D00000000gnome-shell-extension-appindicator-v57+git5.03a7412/interfaces-xml/StatusNotifierWatcher.xml<interface name="org.kde.StatusNotifierWatcher"> <!-- methods --> <method name="RegisterStatusNotifierItem"> <arg name="service" type="s" direction="in"/> </method> <method name="RegisterStatusNotifierHost"> <arg name="service" type="s" direction="in"/> </method> <!-- properties --> <property name="RegisteredStatusNotifierItems" type="as" access="read"> <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QStringList"/> </property> <property name="IsStatusNotifierHostRegistered" type="b" access="read"/> <property name="ProtocolVersion" type="i" access="read"/> <!-- signals --> <signal name="StatusNotifierItemRegistered"> <arg type="s"/> </signal> <signal name="StatusNotifierItemUnregistered"> <arg type="s"/> </signal> <signal name="StatusNotifierHostRegistered"> </signal> <signal name="StatusNotifierHostUnregistered"> </signal> </interface> 07070100000015000081A400000000000000000000000165CC29190000090F000000000000000000000000000000000000004200000000gnome-shell-extension-appindicator-v57+git5.03a7412/interfaces.js// This file is part of the AppIndicator/KStatusNotifierItem GNOME Shell extension // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. export let StatusNotifierItem = null; export let StatusNotifierWatcher = null; export let DBusMenu = null; // loads a xml file into an in-memory string function loadInterfaceXml(extension, filename) { const interfacesDir = extension.dir.get_child('interfaces-xml'); const file = interfacesDir.get_child(filename); const [result, contents] = imports.gi.GLib.file_get_contents(file.get_path()); if (result) { // HACK: The "" + trick is important as hell because file_get_contents returns // an object (WTF?) but Gio.makeProxyWrapper requires `typeof() === "string"` // Otherwise, it will try to check `instanceof XML` and fail miserably because there // is no `XML` on very recent SpiderMonkey releases (or, if SpiderMonkey is old enough, // will spit out a TypeError soon). let nodeContents = contents; if (contents instanceof Uint8Array) nodeContents = imports.byteArray.toString(contents); return `<node>${nodeContents}</node>`; } else { throw new Error(`AppIndicatorSupport: Could not load file: ${filename}`); } } export function initialize(extension) { StatusNotifierItem = loadInterfaceXml(extension, 'StatusNotifierItem.xml'); StatusNotifierWatcher = loadInterfaceXml(extension, 'StatusNotifierWatcher.xml'); DBusMenu = loadInterfaceXml(extension, 'DBusMenu.xml'); } export function destroy() { StatusNotifierItem = null; StatusNotifierWatcher = null; DBusMenu = null; } 07070100000016000041ED00000000000000000000000265CC291900000000000000000000000000000000000000000000003900000000gnome-shell-extension-appindicator-v57+git5.03a7412/lint07070100000017000081A400000000000000000000000165CC291900001883000000000000000000000000000000000000004A00000000gnome-shell-extension-appindicator-v57+git5.03a7412/lint/eslintrc-gjs.yml--- # SPDX-License-Identifier: MIT OR LGPL-2.0-or-later # SPDX-FileCopyrightText: 2018 Claudio André <claudioandre.br@gmail.com> env: es2021: true extends: 'eslint:recommended' rules: array-bracket-newline: - error - consistent array-bracket-spacing: - error - never array-callback-return: error arrow-parens: - error - as-needed arrow-spacing: error block-scoped-var: error block-spacing: error brace-style: error # Waiting for this to have matured a bit in eslint # camelcase: # - error # - properties: never # allow: [^vfunc_, ^on_, _instance_init] comma-dangle: - error - arrays: always-multiline objects: always-multiline functions: never comma-spacing: - error - before: false after: true comma-style: - error - last computed-property-spacing: error curly: - error - multi-or-nest - consistent dot-location: - error - property eol-last: error eqeqeq: error func-call-spacing: error func-name-matching: error func-style: - error - declaration - allowArrowFunctions: true indent: - error - 4 - ignoredNodes: # Allow not indenting the body of GObject.registerClass, since in the # future it's intended to be a decorator - 'CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child' # Allow dedenting chained member expressions MemberExpression: 'off' key-spacing: - error - beforeColon: false afterColon: true keyword-spacing: - error - before: true after: true linebreak-style: - error - unix lines-between-class-members: - error - always - exceptAfterSingleLine: true max-nested-callbacks: error max-statements-per-line: error new-parens: error no-array-constructor: error no-await-in-loop: error no-caller: error no-constant-condition: - error - checkLoops: false no-div-regex: error no-empty: - error - allowEmptyCatch: true no-extra-bind: error no-extra-parens: - error - all - conditionalAssign: false nestedBinaryExpressions: false returnAssign: false no-implicit-coercion: - error - allow: - '!!' no-invalid-this: error no-iterator: error no-label-var: error no-lonely-if: error no-loop-func: error no-nested-ternary: error no-new-object: error no-new-wrappers: error no-octal-escape: error no-proto: error no-prototype-builtins: 'off' no-restricted-globals: [error, window] no-restricted-properties: - error - object: Lang property: copyProperties message: Use Object.assign() - object: Lang property: bind message: Use arrow notation or Function.prototype.bind() - object: Lang property: Class message: Use ES6 classes no-restricted-syntax: - error - selector: >- MethodDefinition[key.name="_init"] > FunctionExpression[params.length=1] > BlockStatement[body.length=1] CallExpression[arguments.length=1][callee.object.type="Super"][callee.property.name="_init"] > Identifier:first-child message: _init() that only calls super._init() is unnecessary - selector: >- MethodDefinition[key.name="_init"] > FunctionExpression[params.length=0] > BlockStatement[body.length=1] CallExpression[arguments.length=0][callee.object.type="Super"][callee.property.name="_init"] message: _init() that only calls super._init() is unnecessary - selector: BinaryExpression[operator="instanceof"][right.name="Array"] message: Use Array.isArray() no-return-assign: error no-return-await: error no-self-compare: error no-shadow: error no-shadow-restricted-names: error no-spaced-func: error no-tabs: error no-template-curly-in-string: error no-throw-literal: error no-trailing-spaces: error no-undef-init: error no-unneeded-ternary: error no-unused-expressions: error no-unused-vars: - error # Vars use a suffix _ instead of a prefix because of file-scope private vars - varsIgnorePattern: (^unused|_$) argsIgnorePattern: ^(unused|_) no-useless-call: error no-useless-computed-key: error no-useless-concat: error no-useless-constructor: error no-useless-rename: error no-useless-return: error no-whitespace-before-property: error no-with: error nonblock-statement-body-position: - error - below object-curly-newline: - error - consistent: true multiline: true object-curly-spacing: error object-shorthand: error operator-assignment: error operator-linebreak: error padded-blocks: - error - never # These may be a bit controversial, we can try them out and enable them later # prefer-const: error # prefer-destructuring: error prefer-numeric-literals: error prefer-promise-reject-errors: error prefer-rest-params: error prefer-spread: error prefer-template: error quotes: - error - single - avoidEscape: true require-await: error rest-spread-spacing: error semi: - error - always semi-spacing: - error - before: false after: true semi-style: error space-before-blocks: error space-before-function-paren: - error - named: never # for `function ()` and `async () =>`, preserve space around keywords anonymous: always asyncArrow: always space-in-parens: error space-infix-ops: - error - int32Hint: false space-unary-ops: error spaced-comment: error switch-colon-spacing: error symbol-description: error template-curly-spacing: error template-tag-spacing: error unicode-bom: error wrap-iife: - error - inside yield-star-spacing: error yoda: error globals: ARGV: readonly Debugger: readonly GIRepositoryGType: readonly globalThis: readonly imports: readonly Intl: readonly log: readonly logError: readonly print: readonly printerr: readonly window: readonly TextEncoder: readonly TextDecoder: readonly console: readonly setTimeout: readonly setInterval: readonly clearTimeout: readonly clearInterval: readonly parserOptions: ecmaVersion: 2022 07070100000018000081A400000000000000000000000165CC291900000169000000000000000000000000000000000000004D00000000gnome-shell-extension-appindicator-v57+git5.03a7412/lint/eslintrc-legacy.ymlrules: eqeqeq: off indent: - error - 4 - ignoredNodes: - 'CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child' CallExpression: arguments: first ArrayExpression: first ObjectExpression: first MemberExpression: off prefer-template: off quotes: off 07070100000019000081A400000000000000000000000165CC291900000277000000000000000000000000000000000000004C00000000gnome-shell-extension-appindicator-v57+git5.03a7412/lint/eslintrc-shell.ymlrules: camelcase: - error - properties: never allow: [^vfunc_, ^on_] consistent-return: error eqeqeq: - error - smart key-spacing: - error - mode: minimum beforeColon: false afterColon: true prefer-arrow-callback: error overrides: - files: - js/** - tests/shell/** excludedFiles: - js/portalHelper/* - js/extensions/* globals: global: readonly _: readonly C_: readonly N_: readonly ngettext: readonly - files: subprojects/extensions-app/js/** globals: _: readonly C_: readonly N_: readonly 0707010000001A000041ED00000000000000000000000265CC291900000000000000000000000000000000000000000000003B00000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale0707010000001B000081A400000000000000000000000165CC291900000BDF000000000000000000000000000000000000005500000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/AppIndicatorExtension.pot# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the AppIndicatorExtension package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: AppIndicatorExtension\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-03-07 02:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: prefs.js:59 msgid "Enable Legacy Tray Icons support" msgstr "" #: prefs.js:91 msgid "Opacity (min: 0, max: 255)" msgstr "" #: prefs.js:120 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "" #: prefs.js:148 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "" #: prefs.js:176 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "" #: prefs.js:204 msgid "Icon size (min: 0, max: 96)" msgstr "" #: prefs.js:232 msgid "Tray horizontal alignment" msgstr "" #: prefs.js:237 msgid "Center" msgstr "" #: prefs.js:238 msgid "Left" msgstr "" #: prefs.js:239 msgid "Right" msgstr "" #: prefs.js:286 msgid "Indicator ID" msgstr "" #: prefs.js:287 msgid "Icon Name" msgstr "" #: prefs.js:288 msgid "Attention Icon Name" msgstr "" #: prefs.js:363 msgid "Preferences" msgstr "" #: prefs.js:365 msgid "Custom Icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Enable legacy tray icons support" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Saturation" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Brightness" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Contrast" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Opacity" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:25 msgid "Icon size" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon size in pixel" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:30 msgid "Icon spacing" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Icon spacing within the tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:35 msgid "Position in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:40 msgid "Order in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Set where the Icon tray should appear among other trays" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:45 msgid "Custom icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:46 msgid "Replace any icons with custom icons from themes" msgstr "" 0707010000001C000081A400000000000000000000000165CC291900000042000000000000000000000000000000000000004300000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/LINGUAScs de fr hu it ja ko nl oc pl pt_BR ru sk sr@latin sr ta tr zh_CN 0707010000001D000081A400000000000000000000000165CC291900000046000000000000000000000000000000000000004700000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/POTFILES.inprefs.js schemas/org.gnome.shell.extensions.appindicator.gschema.xml 0707010000001E000081A400000000000000000000000165CC291900000DD0000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/cs.po# Czech translation of gnome-shell-extension-appindicator. # Copyright (C) 2022 # This file is distributed under the same license as the AppIndicatorExtension package. # Daniel Rusek <mail@asciiwolf.com>, 2022. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2022-04-09 00:16+0200\n" "Last-Translator: Daniel Rusek <mail@asciiwolf.com>\n" "Language-Team: \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n" "X-Generator: Poedit 3.0.1\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "Krytí (min: 0, max: 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Odbarvení (min: 0.0, max: 1.0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Jas (min: -1.0, max: 1.0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Kontrast (min: -1.0, max: 1.0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "Velikost ikon (min: 0, max: 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "Vodorovné zarovnání lišty" #: prefs.js:212 msgid "Center" msgstr "Ve středu" #: prefs.js:213 msgid "Left" msgstr "Vlevo" #: prefs.js:214 msgid "Right" msgstr "Vpravo" #: prefs.js:259 msgid "Indicator ID" msgstr "ID" #: prefs.js:260 msgid "Icon Name" msgstr "Název ikony" #: prefs.js:261 msgid "Attention Icon Name" msgstr "Název ikony s upozorněním" #: prefs.js:336 msgid "Preferences" msgstr "Předvolby" #: prefs.js:338 msgid "Custom Icons" msgstr "Vlastní ikony" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "Sytost" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "Jas" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "Kontrast" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "Krytí" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "Velikost ikony" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 msgid "Icon size in pixel" msgstr "Velikost ikony v pixelech" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "Rozestupy mezi ikonami" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "Rozestupy mezi ikonami na liště" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "Umístění na liště" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "Nastavte, kde na Gnome liště se má lišta ikon zobrazovat" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "Pořadí na liště" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "Nastavte, kde mezi ostatními lištami se má lišta ikon zobrazovat" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "Vlastní ikony" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "Nahradit libovolné ikony vlastními ikonami z motivů" 0707010000001F000081A400000000000000000000000165CC291900000CA5000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/de.po# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2017-08-20 12:22+0200\n" "Last-Translator: Jonatan Hatakeyama Zeidler <jonatan_zeidler@gmx.de>\n" "Language-Team: \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.0.1\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "Deckkraft (min: 0, max: 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Entsättigung (min: 0.0, max: 1.0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Helligkeit (min: -1.0, max: 1.0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Kontrast (min: -1.0, max: 1.0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "Symbolgröße (min: 0, max: 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "Horizontale Anordnung auf Leiste" #: prefs.js:212 msgid "Center" msgstr "Mitte" #: prefs.js:213 msgid "Left" msgstr "Links" #: prefs.js:214 msgid "Right" msgstr "Rechts" #: prefs.js:259 msgid "Indicator ID" msgstr "" #: prefs.js:260 msgid "Icon Name" msgstr "" #: prefs.js:261 msgid "Attention Icon Name" msgstr "" #: prefs.js:336 msgid "Preferences" msgstr "" #: prefs.js:338 msgid "Custom Icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 #, fuzzy msgid "Icon size in pixel" msgstr "Symbolgröße (min: 0, max: 96)" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "" #~ msgid "Spacing between icons (min: 0, max: 20)" #~ msgstr "Symbolabstand (min: 0, max: 20)" #~ msgid "Tray offset" #~ msgstr "Positionsversatz" 07070100000020000081A400000000000000000000000165CC291900000F00000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/fr.po# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2022-05-26 22:59+0200\n" "Last-Translator: roxfr <roxfr@outlook.fr>\n" "Language-Team: Jimmy Scionti <jimmy.scionti@gmail.com>\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.0.1\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "Opacité (min : 0 ; max : 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Désaturation (min : 0,0 ; max : 1,0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Luminosité (min : -1,0 ; max : 1,0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Contraste (min : -1,0 ; max : 1,0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "Taille des icônes (min : 0 ; max : 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "Alignement horizontal de la boîte" #: prefs.js:212 msgid "Center" msgstr "Centre" #: prefs.js:213 msgid "Left" msgstr "Gauche" #: prefs.js:214 msgid "Right" msgstr "Droite" #: prefs.js:259 msgid "Indicator ID" msgstr "ID de l'indicateur" #: prefs.js:260 msgid "Icon Name" msgstr "Nom de l'icône" #: prefs.js:261 msgid "Attention Icon Name" msgstr "Nom de l'icône Attention" #: prefs.js:336 msgid "Preferences" msgstr "Préférences" #: prefs.js:338 msgid "Custom Icons" msgstr "Icônes personnalisées" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "Saturation" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "Luminosité" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "Contraste" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "Opacité" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "Taille des icônes" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 msgid "Icon size in pixel" msgstr "Taille des icônes en pixels" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "Espacement des icônes" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "Espacement des icônes dans la barre" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "Position dans la barre" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "Définir où la barre d'icônes doit apparaître dans la barre d'état de Gnome" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "Commande dans la barre" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "Définir où la barre d'icônes doit apparaître parmi les autres barres" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "Icônes personnalisées" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "Remplacer toutes les icônes par des icônes personnalisées à partir des thèmes" #~ msgid "Spacing between icons (min: 0, max: 20)" #~ msgstr "Espacement entre les icônes (min : 0 ; max : 20)" #~ msgid "Tray offset" #~ msgstr "Décalage de la boîte" 07070100000021000081A400000000000000000000000165CC29190000100F000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/hu.po# Hungarian translation for AppIndicator GNOME Shell Extension. # Copyright (C) 2022, 2023 Free Software Foundation, Inc. # This file is distributed under the same license as the gnome-shell-extension-appindicator package. # # Balázs Úr <ur.balazs at fsf dot hu>, 2022, 2023. msgid "" msgstr "" "Project-Id-Version: master\n" "Report-Msgid-Bugs-To: https://github.com/ubuntu/gnome-shell-extension-appindicator/issues\n" "POT-Creation-Date: 2023-03-07 02:36+0100\n" "PO-Revision-Date: 2023-09-22 08:57+0200\n" "Last-Translator: Balázs Úr <ur.balazs at fsf dot hu>\n" "Language-Team: Hungarian\n" "Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 23.04.3\n" #: prefs.js:59 msgid "Enable Legacy Tray Icons support" msgstr "Örökölt tálcaikonok támogatásának engedélyezése" #: prefs.js:91 msgid "Opacity (min: 0, max: 255)" msgstr "Átlátszatlanság (legkisebb: 0, legnagyobb: 255)" #: prefs.js:120 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Telítetlenség (legkisebb: 0.0, legnagyobb: 1.0)" #: prefs.js:148 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Fényerő (legkisebb: -1.0, legnagyobb: 1.0)" #: prefs.js:176 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Kontraszt (legkisebb: -1.0, legnagyobb: 1.0)" #: prefs.js:204 msgid "Icon size (min: 0, max: 96)" msgstr "Ikonméret (legkisebb: 0, legnagyobb: 96)" #: prefs.js:232 msgid "Tray horizontal alignment" msgstr "Tálca vízszintes elrendezése" #: prefs.js:237 msgid "Center" msgstr "Középre" #: prefs.js:238 msgid "Left" msgstr "Balra" #: prefs.js:239 msgid "Right" msgstr "Jobbra" #: prefs.js:286 msgid "Indicator ID" msgstr "Jelző azonosítója" #: prefs.js:287 msgid "Icon Name" msgstr "Ikon neve" #: prefs.js:288 msgid "Attention Icon Name" msgstr "Figyelem ikon neve" #: prefs.js:363 msgid "Preferences" msgstr "Beállítások" #: prefs.js:365 msgid "Custom Icons" msgstr "Egyéni ikonok" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Enable legacy tray icons support" msgstr "Örökölt tálcaikonok támogatásának engedélyezése" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Saturation" msgstr "Telítettség" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Brightness" msgstr "Fényerő" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Contrast" msgstr "Kontraszt" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Opacity" msgstr "Átlátszatlanság" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:25 msgid "Icon size" msgstr "Ikonméret" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon size in pixel" msgstr "Ikonméret képpontban" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:30 msgid "Icon spacing" msgstr "Ikon térköze" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Icon spacing within the tray" msgstr "Ikon térköze a tálcán belül" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:35 msgid "Position in tray" msgstr "Elhelyezkedés a tálcán" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "Annak beállítása, hogy az ikontálca hol jelenjen meg a GNOME tálcán" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:40 msgid "Order in tray" msgstr "Sorrend a tálcán" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Set where the Icon tray should appear among other trays" msgstr "" "Annak beállítása, hogy az ikontálca hol jelenjen meg az egyéb tálcák között" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:45 msgid "Custom icons" msgstr "Egyéni ikonok" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:46 msgid "Replace any icons with custom icons from themes" msgstr "Bármely ikon cseréje a témákból származó egyéni ikonokkal" 07070100000022000081A400000000000000000000000165CC291900000D17000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/it.po# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2017-08-27 22:05+0200\n" "Last-Translator: Jimmy Scionti <jimmy.scionti@gmail.com>\n" "Language-Team: Jimmy Scionti <jimmy.scionti@gmail.com>\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.7.1\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "Opacità (min: 0, max: 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Desaturazione (min: 0.0, max: 1.0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Luminosità (min: -1.0, max: 1.0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Contrasto (min: -1.0, max: 1.0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "Dimensione Icona (min: 0, max: 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "Allineamento orizzontale della system tray" #: prefs.js:212 msgid "Center" msgstr "Centro" #: prefs.js:213 msgid "Left" msgstr "Sinistra" #: prefs.js:214 msgid "Right" msgstr "Destra" #: prefs.js:259 msgid "Indicator ID" msgstr "" #: prefs.js:260 msgid "Icon Name" msgstr "" #: prefs.js:261 msgid "Attention Icon Name" msgstr "" #: prefs.js:336 msgid "Preferences" msgstr "" #: prefs.js:338 msgid "Custom Icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 #, fuzzy msgid "Icon size in pixel" msgstr "Dimensione Icona (min: 0, max: 96)" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "" #~ msgid "Spacing between icons (min: 0, max: 20)" #~ msgstr "Spazio tra le icone (min: 0, max: 20)" #~ msgid "Tray offset" #~ msgstr "Posizione della system tray" 07070100000023000081A400000000000000000000000165CC291900000CDF000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/ja.po# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2017-09-17 22:19+0200\n" "Last-Translator: \n" "Language-Team: Jimmy Scionti <jimmy.scionti@gmail.com>\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.0.3\n" "Plural-Forms: nplurals=1; plural=0;\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "不透明度(min: 0, max: 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "彩度低下(min: 0.0, max: 1.0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "明度(min: -1.0, max: 1.0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "コントラスト(min: -1.0, max: 1.0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "アイコンサイズ(min: 0, max: 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "トレーポジション" #: prefs.js:212 msgid "Center" msgstr "中央" #: prefs.js:213 msgid "Left" msgstr "左" #: prefs.js:214 msgid "Right" msgstr "右" #: prefs.js:259 msgid "Indicator ID" msgstr "" #: prefs.js:260 msgid "Icon Name" msgstr "" #: prefs.js:261 msgid "Attention Icon Name" msgstr "" #: prefs.js:336 msgid "Preferences" msgstr "" #: prefs.js:338 msgid "Custom Icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 #, fuzzy msgid "Icon size in pixel" msgstr "アイコンサイズ(min: 0, max: 96)" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "" #~ msgid "Spacing between icons (min: 0, max: 20)" #~ msgstr "アイコン間のスペース(min: 0, max: 20)" #~ msgid "Tray offset" #~ msgstr "トレーオフセット" 07070100000024000081A400000000000000000000000165CC291900000E61000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/ko.po# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the AppIndicatorExtension package. # Junghee Lee <daemul72@gmail.com>, 2022. # msgid "" msgstr "" "Project-Id-Version: AppIndicatorExtension\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2022-04-22 17:45+0900\n" "Last-Translator: 이정희 <daemul72@gmail.com>\n" "Language-Team: 이정희 <daemul72@gmail.com>\n" "Language: ko\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Poedit 3.0.1\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "불투명도 (최소: 0, 최대: 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "채도 감소 (최소: 0.0, 최대: 1.0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "명도 (최소: -1.0, 최대: 1.0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "대비 (최소: -1.0, 최대: 1.0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "아이콘 크기 (최소: 0, 최대: 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "트레이 수평 정렬" #: prefs.js:212 msgid "Center" msgstr "중앙" #: prefs.js:213 msgid "Left" msgstr "왼쪽" #: prefs.js:214 msgid "Right" msgstr "오른쪽" #: prefs.js:259 msgid "Indicator ID" msgstr "표시기 ID" #: prefs.js:260 msgid "Icon Name" msgstr "아이콘 이름" #: prefs.js:261 msgid "Attention Icon Name" msgstr "주의 아이콘 이름" #: prefs.js:336 msgid "Preferences" msgstr "기본 설정" #: prefs.js:338 msgid "Custom Icons" msgstr "사용자 지정 아이콘" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "채도" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "명도" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "대비" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "불투명도" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "아이콘 크기" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 msgid "Icon size in pixel" msgstr "아이콘 크기 (픽셀)" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "아이콘 간격" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "트레이 내 아이콘 간격" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "트레이의 위치" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "그놈 트레이에서 아이콘 트레이가 나타날 위치 지정하기" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "트레이에서 지시하기" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "아이콘 트레이가 다른 트레이 중에서 표시되어야 하는 위치 지정하기" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "사용자 지정 아이콘" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "모든 아이콘을 테마의 사용자 지정 아이콘으로 바꾸기" 07070100000025000081A400000000000000000000000165CC2919000000A6000000000000000000000000000000000000004700000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/meson.buildgettext_domain = run_command(jq, '-r', '."gettext-domain"', metadata).stdout().strip() i18n.gettext(gettext_domain, preset: 'glib', install_dir: locale_dir) 07070100000026000081A400000000000000000000000165CC291900000CED000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/nl.po# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Heimen Stoffels <vistausss@outlook.com>, 2019. msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2019-09-16 18:21+0200\n" "Last-Translator: Heimen Stoffels <vistausss@outlook.com>\n" "Language-Team: Dutch <kde-i18n-doc@kde.org>\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 19.11.70\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "Doorzichtigheid (min: 0, max: 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Verzadiging (min: 0.0, max: 1.0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Helderheid (min: -1.0, max: 1.0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Contrast (min: -1.0, max: 1.0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "Pictogramgrootte (min: 0, max: 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "Horizontale systeemvakindeling" #: prefs.js:212 msgid "Center" msgstr "Gecentreerd" #: prefs.js:213 msgid "Left" msgstr "Links" #: prefs.js:214 msgid "Right" msgstr "Rechts" #: prefs.js:259 msgid "Indicator ID" msgstr "" #: prefs.js:260 msgid "Icon Name" msgstr "" #: prefs.js:261 msgid "Attention Icon Name" msgstr "" #: prefs.js:336 msgid "Preferences" msgstr "" #: prefs.js:338 msgid "Custom Icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 #, fuzzy msgid "Icon size in pixel" msgstr "Pictogramgrootte (min: 0, max: 96)" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "" #~ msgid "Spacing between icons (min: 0, max: 20)" #~ msgstr "Afstand tussen pictogrammen (min: 0, max: 20)" #~ msgid "Tray offset" #~ msgstr "Positie" 07070100000027000081A400000000000000000000000165CC291900000E36000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/oc.po# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the AppIndicatorExtension package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # msgid "" msgstr "" "Project-Id-Version: AppIndicatorExtension\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2022-03-31 20:14+0200\n" "Last-Translator: Quentin PAGÈS\n" "Language-Team: \n" "Language: oc\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.0.1\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "Opacitat (min : 0, max : 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Desaturacion (min : 0.0, max : 1.0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Luminositat (min : -1.0, max : 1.0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Contraste (min: -1.0, max : 1.0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "Talha d’icòna (min : 0, max : 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "Alinhament orizontal del tirador" #: prefs.js:212 msgid "Center" msgstr "Centre" #: prefs.js:213 msgid "Left" msgstr "Esquèrra" #: prefs.js:214 msgid "Right" msgstr "Drecha" #: prefs.js:259 msgid "Indicator ID" msgstr "ID indicador" #: prefs.js:260 msgid "Icon Name" msgstr "Nom de l'icòna" #: prefs.js:261 msgid "Attention Icon Name" msgstr "Nom de l’icòna d’atencion" #: prefs.js:336 msgid "Preferences" msgstr "Preferéncias" #: prefs.js:338 msgid "Custom Icons" msgstr "Icònas personalizadas" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "Saturacion" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "Luminositat" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "Contraste" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "Opacitat" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "Talha de las icònas" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 msgid "Icon size in pixel" msgstr "Talha de las icònas en pixèl" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "Espaçament de las icònas" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "Espaçament de las icònas dedins lo tirador" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "Posicion pel tirador" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "Indica se l’icòna del tirador deu aparéisser pel panèl Gnome" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "Òrdre dins lo tirador" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "Definís se l’icòna del tirador deu aparéisser demest los autres panèls" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "Icònas personalizadas" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "Remplaçar quina icòna que siá per una icòna personalizada dels tèmas" 07070100000028000081A400000000000000000000000165CC291900000F04000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/pl.po# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the AppIndicatorExtension package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # msgid "" msgstr "" "Project-Id-Version: AppIndicatorExtension\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-03-07 02:36+0100\n" "PO-Revision-Date: 2023-04-22 21:08+0200\n" "Last-Translator: Maciej Karpinski <kontakt@karpinski.tech>\n" "Language-Team: \n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 " "|| n%100>14) ? 1 : 2);\n" "X-Generator: Poedit 3.1.1\n" #: prefs.js:59 msgid "Enable Legacy Tray Icons support" msgstr "Włącz Obsługę Starszych Ikon" #: prefs.js:91 msgid "Opacity (min: 0, max: 255)" msgstr "Krycie (min: 0, max: 255)" #: prefs.js:120 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Desaturacja (min: 0.0, max: 1.0)" #: prefs.js:148 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Jasność (min: -1.0, max: 1.0)" #: prefs.js:176 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Kontrast (min: -1.0, max: 1.0)" #: prefs.js:204 msgid "Icon size (min: 0, max: 96)" msgstr "Rozmiar ikon (min: 0, max: 96)" #: prefs.js:232 msgid "Tray horizontal alignment" msgstr "Wyśrodkowanie tacki systemowej" #: prefs.js:237 msgid "Center" msgstr "Centralnie" #: prefs.js:238 msgid "Left" msgstr "Po lewej" #: prefs.js:239 msgid "Right" msgstr "Po prawej" #: prefs.js:286 msgid "Indicator ID" msgstr "ID" #: prefs.js:287 msgid "Icon Name" msgstr "Nazwa ikony" #: prefs.js:288 msgid "Attention Icon Name" msgstr "Nazwa ikony uwagi" #: prefs.js:363 msgid "Preferences" msgstr "Ustawienia" #: prefs.js:365 msgid "Custom Icons" msgstr "Niestandardowe ikony" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Enable legacy tray icons support" msgstr "Włącz obsługę starszych ikon" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Saturation" msgstr "Nasycenie" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Brightness" msgstr "Jasność" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Contrast" msgstr "Kontrast" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Opacity" msgstr "Krycie" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:25 msgid "Icon size" msgstr "Rozmiar ikony" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon size in pixel" msgstr "Rozmiar ikony w pikselach" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:30 msgid "Icon spacing" msgstr "Odstępy ikon" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Icon spacing within the tray" msgstr "Odstępy ikon na pasku zadań" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:35 msgid "Position in tray" msgstr "Pozycja na pasku zadań" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "Ustaw, gdzie powinny pojawić się ikony na pasku zadań" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:40 msgid "Order in tray" msgstr "Kolejność na pasku zadań" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Set where the Icon tray should appear among other trays" msgstr "Ustaw położenie tacki z ikonami między innymi tackami" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:45 msgid "Custom icons" msgstr "Niestandardowe ikony" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:46 msgid "Replace any icons with custom icons from themes" msgstr "Zastąp dowolne ikony niestandardowymi ikonami z motywów" 07070100000029000081A400000000000000000000000165CC291900000DB5000000000000000000000000000000000000004400000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/pt_BR.po# Brazilian Portuguese translations for TopIcons-Plus package # Traduções em português brasileiro para o pacote TopIcons-Plus. # Copyright (C) 2019 THE TopIcons-Plus'S COPYRIGHT HOLDER # This file is distributed under the same license as the TopIcons-Plus package. # Rafael Fontenelle <rafaelff@gnome.org>, 2019. # msgid "" msgstr "" "Project-Id-Version: TopIcons-Plus\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2019-04-17 23:02-0300\n" "Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n" "Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" "X-Generator: Gtranslator 3.32.0\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "Opacidade (mín: 0, máx: 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Dessaturação (mín: 0.0, máx: 1.0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Brilho (mín: -1.0, máx: 1.0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Contraste (mín: -1.0, máx: 1.0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "Tamanho de ícones (mín: 0, máx: 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "Alinhamento horizontal da bandeja" #: prefs.js:212 msgid "Center" msgstr "Centro" #: prefs.js:213 msgid "Left" msgstr "Esquerda" #: prefs.js:214 msgid "Right" msgstr "Direita" #: prefs.js:259 msgid "Indicator ID" msgstr "" #: prefs.js:260 msgid "Icon Name" msgstr "" #: prefs.js:261 msgid "Attention Icon Name" msgstr "" #: prefs.js:336 msgid "Preferences" msgstr "" #: prefs.js:338 msgid "Custom Icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 #, fuzzy msgid "Icon size in pixel" msgstr "Tamanho de ícones (mín: 0, máx: 96)" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "" #~ msgid "Spacing between icons (min: 0, max: 20)" #~ msgstr "Espaço entre ícones (mín: 0, máx: 20)" #~ msgid "Tray offset" #~ msgstr "Deslocamento da bandeja" 0707010000002A000081A400000000000000000000000165CC29190000115E000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/ru.po# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-03-07 02:36+0100\n" "PO-Revision-Date: 2023-09-05 12:07+0300\n" "Last-Translator: Aleksandr Melman <Alexmelman88@gmail.com>\n" "Language-Team: \n" "Language: ru_RU\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: Poedit 3.3.2\n" #: prefs.js:59 msgid "Enable Legacy Tray Icons support" msgstr "Включить поддержку устаревших значков в трее" #: prefs.js:91 msgid "Opacity (min: 0, max: 255)" msgstr "Прозрачность (от 0 до 255)" #: prefs.js:120 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Насыщенность (от 0.0 до +1.0)" #: prefs.js:148 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Яркость (от -1.0 до +1.0)" #: prefs.js:176 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Контрастность (от -1.0 до +1.0)" #: prefs.js:204 msgid "Icon size (min: 0, max: 96)" msgstr "Размер иконок (от 0 до 96)" #: prefs.js:232 msgid "Tray horizontal alignment" msgstr "Горизонтальное выравнивание" #: prefs.js:237 msgid "Center" msgstr "По центру" #: prefs.js:238 msgid "Left" msgstr "Слева" #: prefs.js:239 msgid "Right" msgstr "Справа" #: prefs.js:286 msgid "Indicator ID" msgstr "Индикатор ID" #: prefs.js:287 msgid "Icon Name" msgstr "Имя значка" #: prefs.js:288 msgid "Attention Icon Name" msgstr "Заменяемое имя значка" #: prefs.js:363 msgid "Preferences" msgstr "Параметры" #: prefs.js:365 msgid "Custom Icons" msgstr "Пользовательские значки" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Enable legacy tray icons support" msgstr "Включить поддержку устаревших значков в трее" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Saturation" msgstr "Насыщенность" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Brightness" msgstr "Яркость" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Contrast" msgstr "Контрастность" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Opacity" msgstr "Прозрачность" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:25 msgid "Icon size" msgstr "Размер значка" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon size in pixel" msgstr "Размер иконок в пикселях" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:30 msgid "Icon spacing" msgstr "Интервал между значками" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Icon spacing within the tray" msgstr "Интервал между значками в трее" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:35 msgid "Position in tray" msgstr "Положение в трее" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "Установить, где должен отображаться значок в трее Gnome" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:40 msgid "Order in tray" msgstr "Порядок в трее" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Set where the Icon tray should appear among other trays" msgstr "Установить, где должен отображаться трей значков среди других треев" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:45 msgid "Custom icons" msgstr "Пользовательские значки" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:46 msgid "Replace any icons with custom icons from themes" msgstr "Заменить любые значки на пользовательские значки из тем" 0707010000002B000081A400000000000000000000000165CC291900000DDC000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/sk.po# Slovak translation of gnome-shell-extension-appindicator. # Copyright (C) 2022 # This file is distributed under the same license as the AppIndicatorExtension package. # Jose Riha <jose1711 gmail com>, 2022. # msgid "" msgstr "" "Project-Id-Version: AppIndicatorExtension\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2022-04-09 12:26+0200\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 3.0\n" "Last-Translator: Jose Riha <jose1711@gmail.com>\n" "Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n" "Language: sk\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "Krytie (min: 0, max: 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Odfarbenie (min: 0.0, max: 1.0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Jas (min: -1.0, max: 1.0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Kontrast (min: -1.0, max: 1.0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "Veľkosť ikon (min: 0, max: 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "Vodorovné zarovnanie lišty" #: prefs.js:212 msgid "Center" msgstr "V strede" #: prefs.js:213 msgid "Left" msgstr "Vľavo" #: prefs.js:214 msgid "Right" msgstr "Vpravo" #: prefs.js:259 msgid "Indicator ID" msgstr "ID" #: prefs.js:260 msgid "Icon Name" msgstr "Názov ikony" #: prefs.js:261 msgid "Attention Icon Name" msgstr "Názov ikony s upozornením" #: prefs.js:336 msgid "Preferences" msgstr "Predvoľby" #: prefs.js:338 msgid "Custom Icons" msgstr "Vlastné ikony" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "Sýtosť" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "Jas" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "Kontrast" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "Krytie" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "Veľkosť ikony" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 msgid "Icon size in pixel" msgstr "Veľkosť ikony v pixeloch" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "Rozstupy medzi ikonami" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "Rozstupy medzi ikonami na lište" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "Umiestnenie na lište" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "Nastavte, kde na lište sa má lišta ikon zobrazovať" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "Poradie na lište" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "Nastavte, kde medzi ostatnými lištami sa má lišta ikon zobrazovať" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "Vlastné ikony" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "Nahradiť ľubovoľné ikony vlastnými ikonami z motívov" 0707010000002C000081A400000000000000000000000165CC291900000DA1000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/sr.po# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2017-09-16 13:28+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.0.3\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "Прозирност (мин: 0, макс: 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Одсићење (мин: 0,0, макс: 1,0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Светлина (мин: -1,0, макс: 1,0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Контраст (мин: -1,0, макс: 1,0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "Величина икона (мин: 0, макс: 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "Хоризонтални положај касете" #: prefs.js:212 msgid "Center" msgstr "центар" #: prefs.js:213 msgid "Left" msgstr "лево" #: prefs.js:214 msgid "Right" msgstr "десно" #: prefs.js:259 msgid "Indicator ID" msgstr "" #: prefs.js:260 msgid "Icon Name" msgstr "" #: prefs.js:261 msgid "Attention Icon Name" msgstr "" #: prefs.js:336 msgid "Preferences" msgstr "" #: prefs.js:338 msgid "Custom Icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 #, fuzzy msgid "Icon size in pixel" msgstr "Величина икона (мин: 0, макс: 96)" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "" #~ msgid "Spacing between icons (min: 0, max: 20)" #~ msgstr "Размак између икона (мин: 0, макс: 20)" #~ msgid "Tray offset" #~ msgstr "Одступ касете" 0707010000002D000081A400000000000000000000000165CC291900000CFB000000000000000000000000000000000000004700000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/sr@latin.po# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2017-09-16 13:28+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: sr@latin\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 2.0.3\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "Prozirnost (min: 0, maks: 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Odsićenje (min: 0,0, maks: 1,0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Svetlina (min: -1,0, maks: 1,0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Kontrast (min: -1,0, maks: 1,0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "Veličina ikona (min: 0, maks: 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "Horizontalni položaj kasete" #: prefs.js:212 msgid "Center" msgstr "centar" #: prefs.js:213 msgid "Left" msgstr "levo" #: prefs.js:214 msgid "Right" msgstr "desno" #: prefs.js:259 msgid "Indicator ID" msgstr "" #: prefs.js:260 msgid "Icon Name" msgstr "" #: prefs.js:261 msgid "Attention Icon Name" msgstr "" #: prefs.js:336 msgid "Preferences" msgstr "" #: prefs.js:338 msgid "Custom Icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 #, fuzzy msgid "Icon size in pixel" msgstr "Veličina ikona (min: 0, maks: 96)" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "" #~ msgid "Spacing between icons (min: 0, max: 20)" #~ msgstr "Razmak između ikona (min: 0, maks: 20)" #~ msgid "Tray offset" #~ msgstr "Odstup kasete" 0707010000002E000081A400000000000000000000000165CC291900001312000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/ta.po# Tamil translation of gnome-shell-extension-appindicator. # Copyright (C) 2022 AppIndicatorExtension Contributors # This file is distributed under the same license as the AppIndicatorExtension package. # K.B.Dharun Krishna <kbdharunkrishna@gmail.com>, 2022. # msgid "" msgstr "" "Project-Id-Version: AppIndicatorExtension\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-27 20:43+0200\n" "PO-Revision-Date: 2022-12-23 09:46+0530\n" "Last-Translator: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>\n" "Language-Team: \n" "Language: ta\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 3.2.2\n" #: prefs.js:67 msgid "Opacity (min: 0, max: 255)" msgstr "ஒளிபுகாநிலை (குறைந்தது: 0, அதிகபட்சம்: 255)" #: prefs.js:95 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "தேய்மானம் (குறைந்தபட்சம்: 0.0, அதிகபட்சம்: 1.0)" #: prefs.js:123 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "பிரகாசம் (குறைந்தபட்சம்: -1.0, அதிகபட்சம்: 1.0)" #: prefs.js:151 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "மாறுபாடு (குறைந்தபட்சம்: -1.0, அதிகபட்சம்: 1.0)" #: prefs.js:179 msgid "Icon size (min: 0, max: 96)" msgstr "ஐகான் அளவு (குறைந்தபட்சம்: 0, அதிகபட்சம்: 96)" #: prefs.js:207 msgid "Tray horizontal alignment" msgstr "தட்டு கிடைமட்ட சீரமைப்பு" #: prefs.js:212 msgid "Center" msgstr "மையம்" #: prefs.js:213 msgid "Left" msgstr "இடதுபுறம்" #: prefs.js:214 msgid "Right" msgstr "வலதுபுறம்" #: prefs.js:259 msgid "Indicator ID" msgstr "குறிகாட்டி ஐடி" #: prefs.js:260 msgid "Icon Name" msgstr "ஐகான் பெயர்" #: prefs.js:261 msgid "Attention Icon Name" msgstr "கவனம் ஐகான் பெயர்" #: prefs.js:336 msgid "Preferences" msgstr "விருப்பங்கள்" #: prefs.js:338 msgid "Custom Icons" msgstr "தனிப்பயன் சின்னங்கள்" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Saturation" msgstr "செறிவூட்டல்" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Brightness" msgstr "பிரகாசம்" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Contrast" msgstr "மாறுபாடு" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Opacity" msgstr "ஒளிபுகாநிலை" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Icon size" msgstr "ஐகான் அளவு" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 msgid "Icon size in pixel" msgstr "பிக்சலில் ஐகான் அளவு" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon spacing" msgstr "ஐகான் இடைவெளி" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 msgid "Icon spacing within the tray" msgstr "தட்டுக்குள் ஐகான் இடைவெளி" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Position in tray" msgstr "தட்டில் நிலை" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "க்னோம் தட்டில் ஐகான் தட்டு எங்கு தோன்ற வேண்டும் என்பதை அமைக்கவும்" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Order in tray" msgstr "தட்டில் ஆர்டர் செய்யுங்கள்" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 msgid "Set where the Icon tray should appear among other trays" msgstr "மற்ற தட்டுகளில் ஐகான் தட்டு எங்கு தோன்ற வேண்டும் என்பதை அமைக்கவும்" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Custom icons" msgstr "தனிப்பயன் சின்னங்கள்" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 msgid "Replace any icons with custom icons from themes" msgstr "தீம்களிலிருந்து தனிப்பயன் ஐகான்களுடன் ஏதேனும் ஐகான்களை மாற்றவும்" 0707010000002F000081A400000000000000000000000165CC291900001024000000000000000000000000000000000000004100000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/tr.po# Ubuntu AppIndicator Turkish Translate. # Copyright (C) 2019-2023 Ubuntu AppIndicator'S COPYRIGHT HOLDER # This file is distributed under the same license as the Ubuntu AppIndicator package. # # Serdar Sağlam <teknomobil@yandex.com>, 2019. # Sabri Ünal <libreajans@gmail.com>, 2023. # msgid "" msgstr "" "Project-Id-Version: Ubuntu AppIndicator\n" "Report-Msgid-Bugs-To: https://github.com/ubuntu/gnome-shell-extension-appindicator\n" "POT-Creation-Date: 2023-03-07 02:36+0100\n" "PO-Revision-Date: 2023-04-20 12:56+0300\n" "Last-Translator: Sabri Ünal <libreajans@gmail.com>\n" "Language-Team: Turkish <takim@gnome.org.tr>\n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Poedit 3.2.2\n" #: prefs.js:59 msgid "Enable Legacy Tray Icons support" msgstr "Eski Tepsi Simgeleri desteğini etkinleştir" #: prefs.js:91 msgid "Opacity (min: 0, max: 255)" msgstr "Opaklık (az: 0, çok: 255)" #: prefs.js:120 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "Doygunluk (az: 0.0, çok: 1.0)" #: prefs.js:148 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "Parlaklık (az: -1.0, çok: 1.0)" #: prefs.js:176 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "Karşıtlık (az: -1.0, çok: 1.0)" #: prefs.js:204 msgid "Icon size (min: 0, max: 96)" msgstr "Simge boyutu (az: 0, çok : 96)" #: prefs.js:232 msgid "Tray horizontal alignment" msgstr "Tepsi yatay hizalama" #: prefs.js:237 msgid "Center" msgstr "Ortala" #: prefs.js:238 msgid "Left" msgstr "Sol" #: prefs.js:239 msgid "Right" msgstr "Sağ" #: prefs.js:286 msgid "Indicator ID" msgstr "Belirteç Kimliği" #: prefs.js:287 msgid "Icon Name" msgstr "Simge Adı" #: prefs.js:288 msgid "Attention Icon Name" msgstr "Dikkat Simgesi Adı" #: prefs.js:363 msgid "Preferences" msgstr "Tercihler" #: prefs.js:365 msgid "Custom Icons" msgstr "Özel Simgeler" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Enable legacy tray icons support" msgstr "Eski tepsi simgeleri desteğini etkinleştir" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Saturation" msgstr "Doygunluk" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Brightness" msgstr "Parlaklık" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Contrast" msgstr "Karşıtlık" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Opacity" msgstr "Matlık" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:25 msgid "Icon size" msgstr "Simge boyutu" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon size in pixel" msgstr "Simge boyutu (piksel olarak)" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:30 msgid "Icon spacing" msgstr "Simge boşluğu" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Icon spacing within the tray" msgstr "Tepsi içindeki simge boşluğu" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:35 msgid "Position in tray" msgstr "Tepsideki konumu" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "Simge tepsisinin GNOME tepsisinde nerede görüneceğini ayarla" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:40 msgid "Order in tray" msgstr "Tepsideki sırası" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Set where the Icon tray should appear among other trays" msgstr "Simge tepsisinin diğer tepsiler arasında nerede görüneceğini ayarla" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:45 msgid "Custom icons" msgstr "Özel simgeler" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:46 msgid "Replace any icons with custom icons from themes" msgstr "Herhangi bir simgeyi temalardaki özel simgelerle değiştir" #~ msgid "Spacing between icons (min: 0, max: 20)" #~ msgstr "Simgeler arasında boşluk (az: 0, çok: 20)" #~ msgid "Tray offset" #~ msgstr "Simgeleri dengele" 07070100000030000081A400000000000000000000000165CC291900000F70000000000000000000000000000000000000004400000000gnome-shell-extension-appindicator-v57+git5.03a7412/locale/zh_CN.po# Chinese (China) translation for TopIcons-Plus. # Copyright (C) 2017-2017 TopIcons-Plus's COPYRIGHT HOLDER # This file is distributed under the same license as the TopIcons-Plus package. # Dingzhong Chen <wsxy162@gmail.com>, 2017. # msgid "" msgstr "" "Project-Id-Version: TopIcons-Plus master\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-03-07 02:36+0100\n" "PO-Revision-Date: 2023-07-08 15:34+0800\n" "Last-Translator: Dee.H.Y <dongfengweixiao@hotmail.com>\n" "Language-Team: \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Poedit 3.3.2\n" #: prefs.js:59 msgid "Enable Legacy Tray Icons support" msgstr "启用旧托盘图标支持" #: prefs.js:91 msgid "Opacity (min: 0, max: 255)" msgstr "不透明度(最低:0,最高:255)" #: prefs.js:120 msgid "Desaturation (min: 0.0, max: 1.0)" msgstr "饱和度(最低:0.0,最高:1.0)" #: prefs.js:148 msgid "Brightness (min: -1.0, max: 1.0)" msgstr "亮度(最低:-1.0,最高:1.0)" #: prefs.js:176 msgid "Contrast (min: -1.0, max: 1.0)" msgstr "对比度(最低:-1.0,最高:1.0)" #: prefs.js:204 msgid "Icon size (min: 0, max: 96)" msgstr "图标大小(最小:0,最大:96)" #: prefs.js:232 msgid "Tray horizontal alignment" msgstr "托盘水平对齐方式" #: prefs.js:237 msgid "Center" msgstr "居中" #: prefs.js:238 msgid "Left" msgstr "左对齐" #: prefs.js:239 msgid "Right" msgstr "右对齐" #: prefs.js:286 msgid "Indicator ID" msgstr "指示器 ID" #: prefs.js:287 msgid "Icon Name" msgstr "图标名称" #: prefs.js:288 msgid "Attention Icon Name" msgstr "" #: prefs.js:363 msgid "Preferences" msgstr "首选项" #: prefs.js:365 msgid "Custom Icons" msgstr "自定义图标" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 msgid "Enable legacy tray icons support" msgstr "启用旧托盘图标支持" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 msgid "Saturation" msgstr "饱和度" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 msgid "Brightness" msgstr "亮度" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 msgid "Contrast" msgstr "对比度" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 msgid "Opacity" msgstr "透明度" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:25 msgid "Icon size" msgstr "图标尺寸" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 msgid "Icon size in pixel" msgstr "图标大小(像素)" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:30 msgid "Icon spacing" msgstr "图标间距" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 msgid "Icon spacing within the tray" msgstr "托盘内的图标间距" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:35 msgid "Position in tray" msgstr "托盘中的位置" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 msgid "Set where the Icon tray should appear in Gnome tray" msgstr "设置图标托盘应出现在Gnome托盘中的位置" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:40 msgid "Order in tray" msgstr "托盘中的顺序" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 msgid "Set where the Icon tray should appear among other trays" msgstr "设置图标托盘应出现在其他托盘中的位置" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:45 msgid "Custom icons" msgstr "自定义图标" #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:46 msgid "Replace any icons with custom icons from themes" msgstr "用主题中的自定义图标替换任意图标" #~ msgid "Spacing between icons (min: 0, max: 20)" #~ msgstr "图标间隔(最小:0,最大:20)" #~ msgid "Tray offset" #~ msgstr "托盘偏移量" 07070100000031000081A400000000000000000000000165CC29190000099D000000000000000000000000000000000000004000000000gnome-shell-extension-appindicator-v57+git5.03a7412/meson.buildproject('gnome-shell-ubuntu-appindicators', version : '57', meson_version : '>= 0.53', license: 'GPL2', ) gnome = import ('gnome') i18n = import('i18n') if get_option('local_install').auto() local_install = false if get_option('prefix') == '/usr/local' local_install = run_command(find_program('id'), '-u').stdout().strip() != '0' endif else local_install = get_option('local_install').enabled() endif sh = find_program('sh') jq = find_program('jq') metadata = files('metadata.json') uuid = run_command(jq, '-r', '.uuid', metadata).stdout().strip() if local_install prefix = run_command(sh, '-c', 'echo $HOME').stdout().strip() / '.local' else prefix = get_option('prefix') endif extension_dir = prefix / 'share' / 'gnome-shell' / 'extensions' / uuid if local_install locale_dir = extension_dir / 'locale' schema_dir = extension_dir / 'schemas' else locale_dir = prefix / get_option('localedir') schema_dir = prefix / get_option('datadir') / 'glib-2.0' / 'schemas' endif ls_cmd = ' '.join(['ls', '-1', '@0@']) js_sources = run_command(sh, '-c', ls_cmd.format('*.js')).stdout().strip().split('\n') install_data(metadata, files(js_sources), install_dir: extension_dir) install_subdir('interfaces-xml', install_dir: extension_dir) subdir('schemas') subdir('locale') eslint = find_program('eslint', required: false) if eslint.found() test('eslint', eslint, args: [meson.project_source_root(), '-f', 'tap'], workdir: meson.source_root(), protocol: 'tap') endif if local_install run_target('zip-file', command: [ sh, '-c', ';'.join([ 'set -xe', 'tmp_path="$(mktemp -d)"', 'trap "rm -rf $tmp_path" EXIT INT', 'zip_file="$MESON_BUILD_ROOT/@0@.zip"'.format(uuid), 'env DESTDIR="$tmp_path" ninja -C $MESON_BUILD_ROOT install', 'cd "$tmp_path/@0@"'.format(extension_dir), 'rm -f "$zip_file"', 'zip -r "$zip_file" .', ]) ]) endif summary({ 'Local installation': local_install, 'Extension UUID': uuid, 'Gettext domain': gettext_domain, 'ESLint': eslint.found(), }, section: 'Configuration') summary({ 'Extension directory': extension_dir, 'GSchema directory': schema_dir, 'Locale directory': locale_dir, }, section: 'Directories') 07070100000032000081A400000000000000000000000165CC291900000041000000000000000000000000000000000000004600000000gnome-shell-extension-appindicator-v57+git5.03a7412/meson_options.txtoption('local_install', type: 'feature', value : 'auto') 07070100000033000081A400000000000000000000000165CC2919000001D2000000000000000000000000000000000000004200000000gnome-shell-extension-appindicator-v57+git5.03a7412/metadata.json{ "shell-version": [ "45", "46" ], "gettext-domain": "AppIndicatorExtension", "settings-schema": "org.gnome.shell.extensions.appindicator", "uuid": "appindicatorsupport@rgcjonas.gmail.com", "name": "AppIndicator and KStatusNotifierItem Support", "description": "Adds AppIndicator, KStatusNotifierItem and legacy Tray icons support to the Shell", "url": "https://github.com/ubuntu/gnome-shell-extension-appindicator" } 07070100000034000081A400000000000000000000000165CC291900000A5E000000000000000000000000000000000000004400000000gnome-shell-extension-appindicator-v57+git5.03a7412/pixmapsUtils.js// This file is part of the AppIndicator/KStatusNotifierItem GNOME Shell extension // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. export function argbToRgba(src) { const dest = new Uint8Array(src.length); for (let j = 0; j < src.length; j += 4) { const srcAlpha = src[j]; dest[j] = src[j + 1]; /* red */ dest[j + 1] = src[j + 2]; /* green */ dest[j + 2] = src[j + 3]; /* blue */ dest[j + 3] = srcAlpha; /* alpha */ } return dest; } export function getBestPixmap(pixmapsVariant, preferredSize) { if (!pixmapsVariant) throw new TypeError('null pixmapsVariant'); const pixmapsVariantsArray = new Array(pixmapsVariant.n_children()); if (!pixmapsVariantsArray.length) throw TypeError('Empty Icon found'); for (let i = 0; i < pixmapsVariantsArray.length; ++i) pixmapsVariantsArray[i] = pixmapsVariant.get_child_value(i); const pixmapsSizedArray = pixmapsVariantsArray.map((pixmapVariant, index) => ({ width: pixmapVariant.get_child_value(0).unpack(), height: pixmapVariant.get_child_value(1).unpack(), index, })); const sortedIconPixmapArray = pixmapsSizedArray.sort( ({width: widthA, height: heightA}, {width: widthB, height: heightB}) => { const areaA = widthA * heightA; const areaB = widthB * heightB; return areaA - areaB; }); // we prefer any pixmap that is equal or bigger than our requested size const qualifiedIconPixmapArray = sortedIconPixmapArray.filter(({width, height}) => width >= preferredSize && height >= preferredSize); const {width, height, index} = qualifiedIconPixmapArray.length > 0 ? qualifiedIconPixmapArray[0] : sortedIconPixmapArray.pop(); const pixmapVariant = pixmapsVariantsArray[index].get_child_value(2); const rowStride = width * 4; // hopefully this is correct return {pixmapVariant, width, height, rowStride}; } 07070100000035000081A400000000000000000000000165CC291900002ED0000000000000000000000000000000000000003D00000000gnome-shell-extension-appindicator-v57+git5.03a7412/prefs.js// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*- /* exported init, buildPrefsWidget */ import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; import Gio from 'gi://Gio'; import Gtk from 'gi://Gtk'; import { ExtensionPreferences, gettext as _ } from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; const AppIndicatorPreferences = GObject.registerClass( class AppIndicatorPreferences extends Gtk.Box { _init(extension) { super._init({orientation: Gtk.Orientation.VERTICAL, spacing: 30}); this._settings = extension.getSettings(); let label = null; let widget = null; this.preferences_vbox = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL, spacing: 8, margin_start: 30, margin_end: 30, margin_top: 30, margin_bottom: 30, }); this.custom_icons_vbox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL, spacing: 10, margin_start: 10, margin_end: 10, margin_top: 10, margin_bottom: 10, }); label = new Gtk.Label({ label: _('Enable Legacy Tray Icons support'), hexpand: true, halign: Gtk.Align.START, }); widget = new Gtk.Switch({halign: Gtk.Align.END}); this._settings.bind('legacy-tray-enabled', widget, 'active', Gio.SettingsBindFlags.DEFAULT); this.legacy_tray_hbox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL, spacing: 10, margin_start: 10, margin_end: 10, margin_top: 10, margin_bottom: 10, }); this.legacy_tray_hbox.append(label); this.legacy_tray_hbox.append(widget); // Icon opacity this.opacity_hbox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL, spacing: 10, margin_start: 10, margin_end: 10, margin_top: 10, margin_bottom: 10, }); label = new Gtk.Label({ label: _('Opacity (min: 0, max: 255)'), hexpand: true, halign: Gtk.Align.START, }); widget = new Gtk.SpinButton({halign: Gtk.Align.END}); widget.set_sensitive(true); widget.set_range(0, 255); widget.set_value(this._settings.get_int('icon-opacity')); widget.set_increments(1, 2); widget.connect('value-changed', w => { this._settings.set_int('icon-opacity', w.get_value_as_int()); }); this.opacity_hbox.append(label); this.opacity_hbox.append(widget); // Icon saturation this.saturation_hbox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL, spacing: 10, margin_start: 10, margin_end: 10, margin_top: 10, margin_bottom: 10, }); label = new Gtk.Label({ label: _('Desaturation (min: 0.0, max: 1.0)'), hexpand: true, halign: Gtk.Align.START, }); widget = new Gtk.SpinButton({halign: Gtk.Align.END, digits: 1}); widget.set_sensitive(true); widget.set_range(0.0, 1.0); widget.set_value(this._settings.get_double('icon-saturation')); widget.set_increments(0.1, 0.2); widget.connect('value-changed', w => { this._settings.set_double('icon-saturation', w.get_value()); }); this.saturation_hbox.append(label); this.saturation_hbox.append(widget); // Icon brightness this.brightness_hbox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL, spacing: 10, margin_start: 10, margin_end: 10, margin_top: 10, margin_bottom: 10, }); label = new Gtk.Label({ label: _('Brightness (min: -1.0, max: 1.0)'), hexpand: true, halign: Gtk.Align.START, }); widget = new Gtk.SpinButton({halign: Gtk.Align.END, digits: 1}); widget.set_sensitive(true); widget.set_range(-1.0, 1.0); widget.set_value(this._settings.get_double('icon-brightness')); widget.set_increments(0.1, 0.2); widget.connect('value-changed', w => { this._settings.set_double('icon-brightness', w.get_value()); }); this.brightness_hbox.append(label); this.brightness_hbox.append(widget); // Icon contrast this.contrast_hbox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL, spacing: 10, margin_start: 10, margin_end: 10, margin_top: 10, margin_bottom: 10, }); label = new Gtk.Label({ label: _('Contrast (min: -1.0, max: 1.0)'), hexpand: true, halign: Gtk.Align.START, }); widget = new Gtk.SpinButton({halign: Gtk.Align.END, digits: 1}); widget.set_sensitive(true); widget.set_range(-1.0, 1.0); widget.set_value(this._settings.get_double('icon-contrast')); widget.set_increments(0.1, 0.2); widget.connect('value-changed', w => { this._settings.set_double('icon-contrast', w.get_value()); }); this.contrast_hbox.append(label); this.contrast_hbox.append(widget); // Icon size this.icon_size_hbox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL, spacing: 10, margin_start: 10, margin_end: 10, margin_top: 10, margin_bottom: 10, }); label = new Gtk.Label({ label: _('Icon size (min: 0, max: 96)'), hexpand: true, halign: Gtk.Align.START, }); widget = new Gtk.SpinButton({halign: Gtk.Align.END}); widget.set_sensitive(true); widget.set_range(0, 96); widget.set_value(this._settings.get_int('icon-size')); widget.set_increments(1, 2); widget.connect('value-changed', w => { this._settings.set_int('icon-size', w.get_value_as_int()); }); this.icon_size_hbox.append(label); this.icon_size_hbox.append(widget); // Tray position in panel this.tray_position_hbox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL, spacing: 10, margin_start: 10, margin_end: 10, margin_top: 10, margin_bottom: 10, }); label = new Gtk.Label({ label: _('Tray horizontal alignment'), hexpand: true, halign: Gtk.Align.START, }); widget = new Gtk.ComboBoxText(); widget.append('center', _('Center')); widget.append('left', _('Left')); widget.append('right', _('Right')); this._settings.bind('tray-pos', widget, 'active-id', Gio.SettingsBindFlags.DEFAULT); this.tray_position_hbox.append(label); this.tray_position_hbox.append(widget); this.preferences_vbox.append(this.legacy_tray_hbox); this.preferences_vbox.append(this.opacity_hbox); this.preferences_vbox.append(this.saturation_hbox); this.preferences_vbox.append(this.brightness_hbox); this.preferences_vbox.append(this.contrast_hbox); this.preferences_vbox.append(this.icon_size_hbox); this.preferences_vbox.append(this.tray_position_hbox); // Custom icons section const customListStore = new Gtk.ListStore(); customListStore.set_column_types([ GObject.TYPE_STRING, GObject.TYPE_STRING, GObject.TYPE_STRING, ]); const customInitArray = this._settings.get_value('custom-icons').deep_unpack(); customInitArray.forEach(pair => { customListStore.set(customListStore.append(), [0, 1, 2], pair); }); customListStore.append(); const customTreeView = new Gtk.TreeView({ model: customListStore, hexpand: true, vexpand: true, }); const customTitles = [ _('Indicator ID'), _('Icon Name'), _('Attention Icon Name'), ]; const indicatorIdColumn = new Gtk.TreeViewColumn({ title: customTitles[0], sizing: Gtk.TreeViewColumnSizing.AUTOSIZE, }); const customIconColumn = new Gtk.TreeViewColumn({ title: customTitles[1], sizing: Gtk.TreeViewColumnSizing.AUTOSIZE, }); const customAttentionIconColumn = new Gtk.TreeViewColumn({ title: customTitles[2], sizing: Gtk.TreeViewColumnSizing.AUTOSIZE, }); const cellrenderer = new Gtk.CellRendererText({editable: true}); indicatorIdColumn.pack_start(cellrenderer, true); customIconColumn.pack_start(cellrenderer, true); customAttentionIconColumn.pack_start(cellrenderer, true); indicatorIdColumn.add_attribute(cellrenderer, 'text', 0); customIconColumn.add_attribute(cellrenderer, 'text', 1); customAttentionIconColumn.add_attribute(cellrenderer, 'text', 2); customTreeView.insert_column(indicatorIdColumn, 0); customTreeView.insert_column(customIconColumn, 1); customTreeView.insert_column(customAttentionIconColumn, 2); customTreeView.set_grid_lines(Gtk.TreeViewGridLines.BOTH); this.custom_icons_vbox.append(customTreeView); cellrenderer.connect('edited', (w, path, text) => { this.selection = customTreeView.get_selection(); const title = customTreeView.get_cursor()[1].get_title(); const columnIndex = customTitles.indexOf(title); const selection = this.selection.get_selected(); const iter = selection.at(2); const text2 = customListStore.get_value(iter, columnIndex ? 0 : 1); customListStore.set(iter, [columnIndex], [text]); const storeLength = customListStore.iter_n_children(null); const customIconArray = []; for (let i = 0; i < storeLength; i++) { const returnIter = customListStore.iter_nth_child(null, i); const [success, iterList] = returnIter; if (!success) break; if (iterList) { const id = customListStore.get_value(iterList, 0); const customIcon = customListStore.get_value(iterList, 1); const customAttentionIcon = customListStore.get_value(iterList, 2); if (id && customIcon) customIconArray.push([id, customIcon, customAttentionIcon || '']); } else { break; } } this._settings.set_value('custom-icons', new GLib.Variant( 'a(sss)', customIconArray)); if (storeLength === 1 && (text || text2)) customListStore.append(); if (storeLength > 1) { if ((!text && !text2) && (storeLength - 1 > path)) customListStore.remove(iter); if ((text || text2) && storeLength - 1 <= path) customListStore.append(); } }); this.notebook = new Gtk.Notebook(); this.notebook.append_page(this.preferences_vbox, new Gtk.Label({label: _('Preferences')})); this.notebook.append_page(this.custom_icons_vbox, new Gtk.Label({label: _('Custom Icons')})); this.append(this.notebook); } }); export default class DockPreferences extends ExtensionPreferences { getPreferencesWidget() { return new AppIndicatorPreferences(this); } } 07070100000036000081A400000000000000000000000165CC291900002525000000000000000000000000000000000000004400000000gnome-shell-extension-appindicator-v57+git5.03a7412/promiseUtils.js// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- import Gio from 'gi://Gio'; import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; import Meta from 'gi://GdkPixbuf'; import * as Signals from 'resource:///org/gnome/shell/misc/signals.js'; export class CancellablePromise extends Promise { constructor(executor, cancellable) { if (!(executor instanceof Function)) throw TypeError('executor is not a function'); if (cancellable && !(cancellable instanceof Gio.Cancellable)) throw TypeError('cancellable parameter is not a Gio.Cancellable'); let rejector; let resolver; super((resolve, reject) => { resolver = resolve; rejector = reject; }); const {stack: promiseStack} = new Error(); this._promiseStack = promiseStack; this._resolver = (...args) => { resolver(...args); this._resolved = true; this._cleanup(); }; this._rejector = (...args) => { rejector(...args); this._rejected = true; this._cleanup(); }; if (!cancellable) { executor(this._resolver, this._rejector); return; } this._cancellable = cancellable; this._cancelled = cancellable.is_cancelled(); if (this._cancelled) { this._rejector(new GLib.Error(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED, 'Promise cancelled')); return; } this._cancellationId = cancellable.connect(() => { const id = this._cancellationId; this._cancellationId = 0; GLib.idle_add(GLib.PRIORITY_DEFAULT, () => cancellable.disconnect(id)); this.cancel(); }); executor(this._resolver, this._rejector); } _cleanup() { if (this._cancellationId) this._cancellable.disconnect(this._cancellationId); } get cancellable() { return this._chainRoot._cancellable || null; } get _chainRoot() { return this._root ? this._root : this; } then(...args) { const ret = super.then(...args); /* Every time we call then() on this promise we'd get a new * CancellablePromise however that won't have the properties that the * root one has set, and then it won't be possible to cancel a promise * chain from the last one. * To allow this we keep track of the root promise, make sure that * the same method on the root object is called during cancellation * or any destruction method if you want this to work. */ if (ret instanceof CancellablePromise) ret._root = this._chainRoot; return ret; } resolved() { return !!this._chainRoot._resolved; } rejected() { return !!this._chainRoot._rejected; } cancelled() { return !!this._chainRoot._cancelled; } pending() { return !this.resolved() && !this.rejected(); } cancel() { if (this._root) { this._root.cancel(); return this; } if (!this.pending()) return this; this._cancelled = true; const error = new GLib.Error(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED, 'Promise cancelled'); error.stack += `## Promise created at:\n${this._promiseStack}`; this._rejector(error); return this; } } export class SignalConnectionPromise extends CancellablePromise { constructor(object, signal, cancellable) { if (arguments.length === 1 && object instanceof Function) { super(object); return; } if (!(object.connect instanceof Function)) throw new TypeError('Not a valid object'); if (object instanceof GObject.Object && !GObject.signal_lookup(signal.split(':')[0], object.constructor.$gtype)) throw new TypeError(`Signal ${signal} not found on object ${object}`); let id; let destroyId; super(resolve => { let connectSignal; if (object instanceof GObject.Object) connectSignal = (sig, cb) => GObject.signal_connect(object, sig, cb); else connectSignal = (sig, cb) => object.connect(sig, cb); id = connectSignal(signal, (_obj, ...args) => { if (!args.length) resolve(); else resolve(args.length === 1 ? args[0] : args); }); if (signal !== 'destroy' && (!(object instanceof GObject.Object) || GObject.signal_lookup('destroy', object.constructor.$gtype))) destroyId = connectSignal('destroy', () => this.cancel()); }, cancellable); this._object = object; this._id = id; this._destroyId = destroyId; } _cleanup() { if (this._id) { let disconnectSignal; if (this._object instanceof GObject.Object) disconnectSignal = id => GObject.signal_handler_disconnect(this._object, id); else disconnectSignal = id => this._object.disconnect(id); disconnectSignal(this._id); if (this._destroyId) { disconnectSignal(this._destroyId); this._destroyId = 0; } this._object = null; this._id = 0; } super._cleanup(); } get object() { return this._chainRoot._object; } } export class GSourcePromise extends CancellablePromise { constructor(gsource, priority, cancellable) { if (arguments.length === 1 && gsource instanceof Function) { super(gsource); return; } if (gsource.constructor.$gtype !== GLib.Source.$gtype) throw new TypeError(`gsource ${gsource} is not of type GLib.Source`); if (priority === undefined) priority = GLib.PRIORITY_DEFAULT; else if (!Number.isInteger(priority)) throw TypeError('Invalid priority'); super(resolve => { gsource.set_priority(priority); gsource.set_callback(() => { resolve(); return GLib.SOURCE_REMOVE; }); gsource.attach(null); }, cancellable); this._gsource = gsource; this._gsource.set_name(`[gnome-shell] ${this.constructor.name} ${ new Error().stack.split('\n').filter(line => !line.match(/misc\/promiseUtils\.js/))[0]}`); if (this.rejected()) this._gsource.destroy(); } get gsource() { return this._chainRoot._gsource; } _cleanup() { if (this._gsource) { this._gsource.destroy(); this._gsource = null; } super._cleanup(); } } export class IdlePromise extends GSourcePromise { constructor(priority, cancellable) { if (arguments.length === 1 && priority instanceof Function) { super(priority); return; } if (priority === undefined) priority = GLib.PRIORITY_DEFAULT_IDLE; super(GLib.idle_source_new(), priority, cancellable); } } export class TimeoutPromise extends GSourcePromise { constructor(interval, priority, cancellable) { if (arguments.length === 1 && interval instanceof Function) { super(interval); return; } if (!Number.isInteger(interval) || interval < 0) throw TypeError('Invalid interval'); super(GLib.timeout_source_new(interval), priority, cancellable); } } export class TimeoutSecondsPromise extends GSourcePromise { constructor(interval, priority, cancellable) { if (arguments.length === 1 && interval instanceof Function) { super(interval); return; } if (!Number.isInteger(interval) || interval < 0) throw TypeError('Invalid interval'); super(GLib.timeout_source_new_seconds(interval), priority, cancellable); } } export class MetaLaterPromise extends CancellablePromise { constructor(laterType, cancellable) { if (arguments.length === 1 && laterType instanceof Function) { super(laterType); return; } if (laterType && laterType.constructor.$gtype !== Meta.LaterType.$gtype) throw new TypeError(`laterType ${laterType} is not of type Meta.LaterType`); else if (!laterType) laterType = Meta.LaterType.BEFORE_REDRAW; let id; super(resolve => { id = Meta.later_add(laterType, () => { this.remove(); resolve(); return GLib.SOURCE_REMOVE; }); }, cancellable); this._id = id; } _cleanup() { if (this._id) { Meta.later_remove(this._id); this._id = 0; } super._cleanup(); } } export function _promisifySignals(proto) { if (proto.connect_once) return; proto.connect_once = function (signal, cancellable) { return new SignalConnectionPromise(this, signal, cancellable); }; } _promisifySignals(GObject.Object.prototype); _promisifySignals(Signals.EventEmitter.prototype); 07070100000037000041ED00000000000000000000000265CC291900000000000000000000000000000000000000000000003C00000000gnome-shell-extension-appindicator-v57+git5.03a7412/schemas07070100000038000081A400000000000000000000000165CC29190000002C000000000000000000000000000000000000004300000000gnome-shell-extension-appindicator-v57+git5.03a7412/schemas/READMECompile with $ glib-compile-schemas schemas 07070100000039000081A400000000000000000000000165CC291900000180000000000000000000000000000000000000004800000000gnome-shell-extension-appindicator-v57+git5.03a7412/schemas/meson.buildschema_files = [ run_command(jq, '-r', '."settings-schema"', metadata).stdout().strip() + '.gschema.xml', run_command(sh, '-c', ls_cmd.format('*.gschema.xml')).stdout().strip().split('\n'), ] install_data( files(schema_files), install_dir: schema_dir ) meson.add_install_script(sh.path(), '-c', ' '.join([ 'glib-compile-schemas $DESTDIR/@0@'.format(schema_dir), ])) 0707010000003A000081A400000000000000000000000165CC2919000006CC000000000000000000000000000000000000007000000000gnome-shell-extension-appindicator-v57+git5.03a7412/schemas/org.gnome.shell.extensions.appindicator.gschema.xml<schemalist gettext-domain="AppIndicatorExtension"> <schema id="org.gnome.shell.extensions.appindicator" path="/org/gnome/shell/extensions/appindicator/"> <key name="legacy-tray-enabled" type="b"> <default>true</default> <summary>Enable legacy tray icons support</summary> </key> <key name="icon-saturation" type="d"> <default>0.0</default> <summary>Saturation</summary> </key> <key name="icon-brightness" type="d"> <default>0.0</default> <summary>Brightness</summary> </key> <key name="icon-contrast" type="d"> <default>0.0</default> <summary>Contrast</summary> </key> <key name="icon-opacity" type="i"> <default>240</default> <summary>Opacity</summary> </key> <key name="icon-size" type="i"> <default>0</default> <summary>Icon size</summary> <description>Icon size in pixel</description> </key> <key name="icon-spacing" type="i"> <default>12</default> <summary>Icon spacing</summary> <description>Icon spacing within the tray</description> </key> <key name="tray-pos" type="s"> <default>"right"</default> <summary>Position in tray</summary> <description>Set where the Icon tray should appear in Gnome tray</description> </key> <key name="tray-order" type="i"> <default>1</default> <summary>Order in tray</summary> <description>Set where the Icon tray should appear among other trays</description> </key> <key name="custom-icons" type="a(sss)"> <default>[]</default> <summary>Custom icons</summary> <description>Replace any icons with custom icons from themes</description> </key> </schema> </schemalist> 0707010000003B000081A400000000000000000000000165CC291900000674000000000000000000000000000000000000004700000000gnome-shell-extension-appindicator-v57+git5.03a7412/settingsManager.js// This file is part of the AppIndicator/KStatusNotifierItem GNOME Shell extension // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. let settingsManager; export class SettingsManager { static initialize(extension) { SettingsManager._settingsManager = new SettingsManager(extension); } static destroy() { SettingsManager._settingsManager.destroy(); SettingsManager._settingsManager = null; } static getDefault() { return this._settingsManager; } get gsettings() { return this._gsettings; } constructor(extension) { if (settingsManager) throw new Error('SettingsManager is already constructed'); this._gsettings = extension.getSettings(); } destroy() { this._gsettings = null; } } export function getDefault() { return SettingsManager.getDefault(); } export function getDefaultGSettings() { return SettingsManager.getDefault().gsettings; } 0707010000003C000081A400000000000000000000000165CC2919000029CB000000000000000000000000000000000000004D00000000gnome-shell-extension-appindicator-v57+git5.03a7412/statusNotifierWatcher.js// This file is part of the AppIndicator/KStatusNotifierItem GNOME Shell extension // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import Gio from 'gi://Gio'; import GLib from 'gi://GLib'; import * as AppIndicator from './appIndicator.js'; import * as IndicatorStatusIcon from './indicatorStatusIcon.js'; import * as Interfaces from './interfaces.js'; import * as PromiseUtils from './promiseUtils.js'; import * as Util from './util.js'; import * as DBusMenu from './dbusMenu.js'; import {DBusProxy} from './dbusProxy.js'; // TODO: replace with org.freedesktop and /org/freedesktop when approved const KDE_PREFIX = 'org.kde'; export const WATCHER_BUS_NAME = `${KDE_PREFIX}.StatusNotifierWatcher`; const WATCHER_OBJECT = '/StatusNotifierWatcher'; const DEFAULT_ITEM_OBJECT_PATH = '/StatusNotifierItem'; /* * The StatusNotifierWatcher class implements the StatusNotifierWatcher dbus object */ export class StatusNotifierWatcher { constructor(watchDog) { this._watchDog = watchDog; this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(Interfaces.StatusNotifierWatcher, this); try { this._dbusImpl.export(Gio.DBus.session, WATCHER_OBJECT); } catch (e) { Util.Logger.warn(`Failed to export ${WATCHER_OBJECT}`); logError(e); } this._cancellable = new Gio.Cancellable(); this._everAcquiredName = false; this._ownName = Gio.DBus.session.own_name(WATCHER_BUS_NAME, Gio.BusNameOwnerFlags.NONE, this._acquiredName.bind(this), this._lostName.bind(this)); this._items = new Map(); try { this._dbusImpl.emit_signal('StatusNotifierHostRegistered', null); } catch (e) { Util.Logger.warn(`Failed to notify registered host ${WATCHER_OBJECT}`); } this._seekStatusNotifierItems().catch(e => { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e, 'Looking for StatusNotifierItem\'s'); }); } _acquiredName() { this._everAcquiredName = true; this._watchDog.nameAcquired = true; } _lostName() { if (this._everAcquiredName) Util.Logger.debug(`Lost name${WATCHER_BUS_NAME}`); else Util.Logger.warn(`Failed to acquire ${WATCHER_BUS_NAME}`); this._watchDog.nameAcquired = false; } async _registerItem(service, busName, objPath) { const id = Util.indicatorId(service, busName, objPath); if (this._items.has(id)) { Util.Logger.warn(`Item ${id} is already registered`); return; } Util.Logger.debug(`Registering StatusNotifierItem ${id}`); try { const indicator = new AppIndicator.AppIndicator(service, busName, objPath); this._items.set(id, indicator); indicator.connect('destroy', () => this._onIndicatorDestroyed(indicator)); indicator.connect('name-owner-changed', async () => { if (!indicator.hasNameOwner) { try { await new PromiseUtils.TimeoutPromise(500, GLib.PRIORITY_DEFAULT, this._cancellable); if (this._items.has(id) && !indicator.hasNameOwner) indicator.destroy(); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); } } }); // if the desktop is not ready delay the icon creation and signal emissions await Util.waitForStartupCompletion(indicator.cancellable); const statusIcon = new IndicatorStatusIcon.IndicatorStatusIcon(indicator); IndicatorStatusIcon.addIconToPanel(statusIcon); this._dbusImpl.emit_signal('StatusNotifierItemRegistered', GLib.Variant.new('(s)', [indicator.uniqueId])); this._dbusImpl.emit_property_changed('RegisteredStatusNotifierItems', GLib.Variant.new('as', this.RegisteredStatusNotifierItems)); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); throw e; } } async _ensureItemRegistered(service, busName, objPath) { const id = Util.indicatorId(service, busName, objPath); const item = this._items.get(id); if (item) { // delete the old one and add the new indicator Util.Logger.debug(`Attempting to re-register ${id}; resetting instead`); item.reset(); return; } await this._registerItem(service, busName, objPath); } async _seekStatusNotifierItems() { // Some indicators (*coff*, dropbox, *coff*) do not re-register again // when the plugin is enabled/disabled, thus we need to manually look // for the objects in the session bus that implements the // StatusNotifierItem interface... However let's do it after a low // priority idle, so that it won't affect startup. const cancellable = this._cancellable; const bus = Gio.DBus.session; const uniqueNames = await Util.getBusNames(bus, cancellable); const introspectName = async name => { const nodes = Util.introspectBusObject(bus, name, cancellable, ['org.kde.StatusNotifierItem']); const services = [...uniqueNames.get(name)]; for await (const node of nodes) { const {path} = node; const ids = services.map(s => Util.indicatorId(s, name, path)); if (ids.every(id => !this._items.has(id))) { const service = services.find(s => s && s.startsWith('org.kde.StatusNotifierItem')) || services[0]; const id = Util.indicatorId( path === DEFAULT_ITEM_OBJECT_PATH ? service : null, name, path); Util.Logger.warn(`Using Brute-force mode for StatusNotifierItem ${id}`); this._registerItem(service, name, path); } } }; await Promise.allSettled([...uniqueNames.keys()].map(n => introspectName(n))); } async RegisterStatusNotifierItemAsync(params, invocation) { // it would be too easy if all application behaved the same // instead, ayatana patched gnome apps to send a path // while kde apps send a bus name const [service] = params; let busName, objPath; if (service.charAt(0) === '/') { // looks like a path busName = invocation.get_sender(); objPath = service; } else if (service.match(Util.BUS_ADDRESS_REGEX)) { try { busName = await Util.getUniqueBusName(invocation.get_connection(), service, this._cancellable); } catch (e) { logError(e); } objPath = DEFAULT_ITEM_OBJECT_PATH; } if (!busName || !objPath) { const error = `Impossible to register an indicator for parameters '${ service.toString()}'`; Util.Logger.warn(error); invocation.return_dbus_error('org.gnome.gjs.JSError.ValueError', error); return; } try { await this._ensureItemRegistered(service, busName, objPath); invocation.return_value(null); } catch (e) { if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) logError(e); invocation.return_dbus_error('org.gnome.gjs.JSError.ValueError', e.message); } } _onIndicatorDestroyed(indicator) { const {uniqueId} = indicator; this._items.delete(uniqueId); try { this._dbusImpl.emit_signal('StatusNotifierItemUnregistered', GLib.Variant.new('(s)', [uniqueId])); this._dbusImpl.emit_property_changed('RegisteredStatusNotifierItems', GLib.Variant.new('as', this.RegisteredStatusNotifierItems)); } catch (e) { Util.Logger.warn(`Failed to emit signals: ${e}`); } } RegisterStatusNotifierHostAsync(_service, invocation) { invocation.return_error_literal( Gio.DBusError, Gio.DBusError.NOT_SUPPORTED, 'Registering additional notification hosts is not supported'); } IsNotificationHostRegistered() { return true; } get RegisteredStatusNotifierItems() { return Array.from(this._items.values()).map(i => i.uniqueId); } get IsStatusNotifierHostRegistered() { return true; } get ProtocolVersion() { return 0; } destroy() { if (this._isDestroyed) return; // this doesn't do any sync operation and doesn't allow us to hook up // the event of being finished which results in our unholy debounce hack // (see extension.js) this._items.forEach(indicator => indicator.destroy()); this._cancellable.cancel(); try { this._dbusImpl.emit_signal('StatusNotifierHostUnregistered', null); } catch (e) { Util.Logger.warn(`Failed to emit uinregistered signal: ${e}`); } Gio.DBus.session.unown_name(this._ownName); try { this._dbusImpl.unexport(); } catch (e) { Util.Logger.warn(`Failed to unexport watcher object: ${e}`); } DBusMenu.DBusClient.destroy(); AppIndicator.AppIndicatorProxy.destroy(); DBusProxy.destroy(); Util.destroyDefaultTheme(); this._dbusImpl.run_dispose(); delete this._dbusImpl; delete this._items; this._isDestroyed = true; } } 0707010000003D000081A400000000000000000000000165CC291900000D4B000000000000000000000000000000000000004800000000gnome-shell-extension-appindicator-v57+git5.03a7412/trayIconsManager.js// This file is part of the AppIndicator/KStatusNotifierItem GNOME Shell extension // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import Shell from 'gi://Shell'; import * as Main from 'resource:///org/gnome/shell/ui/main.js'; import * as Signals from 'resource:///org/gnome/shell/misc/signals.js'; import * as IndicatorStatusIcon from './indicatorStatusIcon.js'; import * as Util from './util.js'; import * as SettingsManager from './settingsManager.js'; let trayIconsManager; export class TrayIconsManager extends Signals.EventEmitter { static initialize() { if (!trayIconsManager) trayIconsManager = new TrayIconsManager(); return trayIconsManager; } static destroy() { trayIconsManager.destroy(); } constructor() { super(); if (trayIconsManager) throw new Error('TrayIconsManager is already constructed'); this._changedId = SettingsManager.getDefaultGSettings().connect( 'changed::legacy-tray-enabled', () => this._toggle()); this._toggle(); } _toggle() { if (SettingsManager.getDefaultGSettings().get_boolean('legacy-tray-enabled')) this._enable(); else this._disable(); } _enable() { if (this._tray) return; this._tray = new Shell.TrayManager(); Util.connectSmart(this._tray, 'tray-icon-added', this, this.onTrayIconAdded); Util.connectSmart(this._tray, 'tray-icon-removed', this, this.onTrayIconRemoved); this._tray.manage_screen(Main.panel); } _disable() { if (!this._tray) return; IndicatorStatusIcon.getTrayIcons().forEach(i => i.destroy()); if (this._tray.unmanage_screen) { this._tray.unmanage_screen(); this._tray = null; } else { // FIXME: This is very ugly, but it's needed by old shell versions this._tray = null; imports.system.gc(); // force finalizing tray to unmanage screen } } onTrayIconAdded(_tray, icon) { const trayIcon = new IndicatorStatusIcon.IndicatorStatusTrayIcon(icon); IndicatorStatusIcon.addIconToPanel(trayIcon); } onTrayIconRemoved(_tray, icon) { try { const [trayIcon] = IndicatorStatusIcon.getTrayIcons().filter(i => i.icon === icon); trayIcon.destroy(); } catch (e) { Util.Logger.warning(`No icon container found for ${icon.title} (${icon})`); } } destroy() { this.emit('destroy'); SettingsManager.getDefaultGSettings().disconnect(this._changedId); this._disable(); trayIconsManager = null; } } 0707010000003E000081A400000000000000000000000165CC2919000035EF000000000000000000000000000000000000003C00000000gnome-shell-extension-appindicator-v57+git5.03a7412/util.js// This file is part of the AppIndicator/KStatusNotifierItem GNOME Shell extension // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import Gio from 'gi://Gio'; import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; import St from 'gi://St'; import * as Main from 'resource:///org/gnome/shell/ui/main.js'; import * as Config from 'resource:///org/gnome/shell/misc/config.js'; import * as Signals from 'resource:///org/gnome/shell/misc/signals.js'; import {BaseStatusIcon} from './indicatorStatusIcon.js'; export const BUS_ADDRESS_REGEX = /([a-zA-Z0-9._-]+\.[a-zA-Z0-9.-]+)|(:[0-9]+\.[0-9]+)$/; Gio._promisify(Gio.DBusConnection.prototype, 'call'); Gio._promisify(Gio._LocalFilePrototype, 'read'); Gio._promisify(Gio.InputStream.prototype, 'read_bytes_async'); export function indicatorId(service, busName, objectPath) { if (service !== busName && service?.match(BUS_ADDRESS_REGEX)) return service; return `${busName}@${objectPath}`; } export async function getUniqueBusName(bus, name, cancellable) { if (name[0] === ':') return name; if (!bus) bus = Gio.DBus.session; const variantName = new GLib.Variant('(s)', [name]); const [unique] = (await bus.call('org.freedesktop.DBus', '/', 'org.freedesktop.DBus', 'GetNameOwner', variantName, new GLib.VariantType('(s)'), Gio.DBusCallFlags.NONE, -1, cancellable)).deep_unpack(); return unique; } export async function getBusNames(bus, cancellable) { if (!bus) bus = Gio.DBus.session; const [names] = (await bus.call('org.freedesktop.DBus', '/', 'org.freedesktop.DBus', 'ListNames', null, new GLib.VariantType('(as)'), Gio.DBusCallFlags.NONE, -1, cancellable)).deep_unpack(); const uniqueNames = new Map(); const requests = names.map(name => getUniqueBusName(bus, name, cancellable)); const results = await Promise.allSettled(requests); for (let i = 0; i < results.length; i++) { const result = results[i]; if (result.status === 'fulfilled') { let namesForBus = uniqueNames.get(result.value); if (!namesForBus) { namesForBus = new Set(); uniqueNames.set(result.value, namesForBus); } namesForBus.add(result.value !== names[i] ? names[i] : null); } else if (!result.reason.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) { Logger.debug(`Impossible to get the unique name of ${names[i]}: ${result.reason}`); } } return uniqueNames; } async function getProcessId(connectionName, cancellable = null, bus = Gio.DBus.session) { const res = await bus.call('org.freedesktop.DBus', '/', 'org.freedesktop.DBus', 'GetConnectionUnixProcessID', new GLib.Variant('(s)', [connectionName]), new GLib.VariantType('(u)'), Gio.DBusCallFlags.NONE, -1, cancellable); const [pid] = res.deepUnpack(); return pid; } export async function getProcessName(connectionName, cancellable = null, priority = GLib.PRIORITY_DEFAULT, bus = Gio.DBus.session) { const pid = await getProcessId(connectionName, cancellable, bus); const cmdFile = Gio.File.new_for_path(`/proc/${pid}/cmdline`); const inputStream = await cmdFile.read_async(priority, cancellable); const bytes = await inputStream.read_bytes_async(2048, priority, cancellable); const textDecoder = new TextDecoder(); return textDecoder.decode(bytes.toArray().map(v => !v ? 0x20 : v)); } export async function* introspectBusObject(bus, name, cancellable, interfaces = undefined, path = undefined) { if (!path) path = '/'; const [introspection] = (await bus.call(name, path, 'org.freedesktop.DBus.Introspectable', 'Introspect', null, new GLib.VariantType('(s)'), Gio.DBusCallFlags.NONE, 5000, cancellable)).deep_unpack(); const nodeInfo = Gio.DBusNodeInfo.new_for_xml(introspection); if (!interfaces || dbusNodeImplementsInterfaces(nodeInfo, interfaces)) yield {nodeInfo, path}; if (path === '/') path = ''; for (const subNodeInfo of nodeInfo.nodes) { const subPath = `${path}/${subNodeInfo.path}`; yield* introspectBusObject(bus, name, cancellable, interfaces, subPath); } } function dbusNodeImplementsInterfaces(nodeInfo, interfaces) { if (!(nodeInfo instanceof Gio.DBusNodeInfo) || !Array.isArray(interfaces)) return false; return interfaces.some(iface => nodeInfo.lookup_interface(iface)); } export class NameWatcher extends Signals.EventEmitter { constructor(name) { super(); this._watcherId = Gio.DBus.session.watch_name(name, Gio.BusNameWatcherFlags.NONE, () => { this._nameOnBus = true; Logger.debug(`Name ${name} appeared`); this.emit('changed'); this.emit('appeared'); }, () => { this._nameOnBus = false; Logger.debug(`Name ${name} vanished`); this.emit('changed'); this.emit('vanished'); }); } destroy() { this.emit('destroy'); Gio.DBus.session.unwatch_name(this._watcherId); delete this._watcherId; } get nameOnBus() { return !!this._nameOnBus; } } function connectSmart3A(src, signal, handler) { const id = src.connect(signal, handler); let destroyId = 0; if (src.connect && (!(src instanceof GObject.Object) || GObject.signal_lookup('destroy', src))) { destroyId = src.connect('destroy', () => { src.disconnect(id); src.disconnect(destroyId); }); } return [id, destroyId]; } function connectSmart4A(src, signal, target, method) { if (typeof method !== 'function') throw new TypeError('Unsupported function'); method = method.bind(target); const signalId = src.connect(signal, method); const onDestroy = () => { src.disconnect(signalId); if (srcDestroyId) src.disconnect(srcDestroyId); if (tgtDestroyId) target.disconnect(tgtDestroyId); }; // GObject classes might or might not have a destroy signal // JS Classes will not complain when connecting to non-existent signals const srcDestroyId = src.connect && (!(src instanceof GObject.Object) || GObject.signal_lookup('destroy', src)) ? src.connect('destroy', onDestroy) : 0; const tgtDestroyId = target.connect && (!(target instanceof GObject.Object) || GObject.signal_lookup('destroy', target)) ? target.connect('destroy', onDestroy) : 0; return [signalId, srcDestroyId, tgtDestroyId]; } // eslint-disable-next-line valid-jsdoc /** * Connect signals to slots, and remove the connection when either source or * target are destroyed * * Usage: * Util.connectSmart(srcOb, 'signal', tgtObj, 'handler') * or * Util.connectSmart(srcOb, 'signal', () => { ... }) */ export function connectSmart(...args) { if (arguments.length === 4) return connectSmart4A(...args); else return connectSmart3A(...args); } function disconnectSmart3A(src, signalIds) { const [id, destroyId] = signalIds; src.disconnect(id); if (destroyId) src.disconnect(destroyId); } function disconnectSmart4A(src, tgt, signalIds) { const [signalId, srcDestroyId, tgtDestroyId] = signalIds; disconnectSmart3A(src, [signalId, srcDestroyId]); if (tgtDestroyId) tgt.disconnect(tgtDestroyId); } export function disconnectSmart(...args) { if (arguments.length === 2) return disconnectSmart3A(...args); else if (arguments.length === 3) return disconnectSmart4A(...args); throw new TypeError('Unexpected number of arguments'); } let _defaultTheme; export function getDefaultTheme() { if (_defaultTheme) return _defaultTheme; _defaultTheme = new St.IconTheme(); return _defaultTheme; } export function destroyDefaultTheme() { _defaultTheme = null; } // eslint-disable-next-line valid-jsdoc /** * Helper function to wait for the system startup to be completed. * Adding widgets before the desktop is ready to accept them can result in errors. */ export async function waitForStartupCompletion(cancellable) { if (Main.layoutManager._startingUp) await Main.layoutManager.connect_once('startup-complete', cancellable); } /** * Helper class for logging stuff */ export class Logger { static _logStructured(logLevel, message, extraFields = {}) { if (!Object.values(GLib.LogLevelFlags).includes(logLevel)) { Logger._logStructured(GLib.LogLevelFlags.LEVEL_WARNING, 'logLevel is not a valid GLib.LogLevelFlags'); return; } if (!Logger._levels.includes(logLevel)) return; let fields = { 'SYSLOG_IDENTIFIER': this.uuid, 'MESSAGE': `${message}`, }; let thisFile = null; const {stack} = new Error(); for (let stackLine of stack.split('\n')) { stackLine = stackLine.replace('resource:///org/gnome/Shell/', ''); const [code, line] = stackLine.split(':'); const [func, file] = code.split(/@(.+)/); if (!thisFile || thisFile === file) { thisFile = file; continue; } fields = Object.assign(fields, { 'CODE_FILE': file || '', 'CODE_LINE': line || '', 'CODE_FUNC': func || '', }); break; } GLib.log_structured(Logger._domain, logLevel, Object.assign(fields, extraFields)); } static init(extension) { if (Logger._domain) return; const allLevels = Object.values(GLib.LogLevelFlags); const domains = GLib.getenv('G_MESSAGES_DEBUG'); const {name: domain} = extension.metadata; this.uuid = extension.metadata.uuid; Logger._domain = domain.replaceAll(' ', '-'); if (domains === 'all' || (domains && domains.split(' ').includes(Logger._domain))) { Logger._levels = allLevels; } else { Logger._levels = allLevels.filter( l => l <= GLib.LogLevelFlags.LEVEL_WARNING); } } static debug(message) { Logger._logStructured(GLib.LogLevelFlags.LEVEL_DEBUG, message); } static message(message) { Logger._logStructured(GLib.LogLevelFlags.LEVEL_MESSAGE, message); } static warn(message) { Logger._logStructured(GLib.LogLevelFlags.LEVEL_WARNING, message); } static error(message) { Logger._logStructured(GLib.LogLevelFlags.LEVEL_ERROR, message); } static critical(message) { Logger._logStructured(GLib.LogLevelFlags.LEVEL_CRITICAL, message); } } export function versionCheck(required) { const current = Config.PACKAGE_VERSION; const currentArray = current.split('.'); const [major] = currentArray; return major >= required; } export function tryCleanupOldIndicators() { const indicatorType = BaseStatusIcon; const indicators = Object.values(Main.panel.statusArea).filter(i => i instanceof indicatorType); try { const panelBoxes = [ Main.panel._leftBox, Main.panel._centerBox, Main.panel._rightBox, ]; panelBoxes.forEach(box => indicators.push(...box.get_children().filter(i => i instanceof indicatorType))); } catch (e) { logError(e); } new Set(indicators).forEach(i => i.destroy()); } export const CancellableChild = GObject.registerClass({ Properties: { 'parent': GObject.ParamSpec.object( 'parent', 'parent', 'parent', GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY, Gio.Cancellable.$gtype), }, }, class CancellableChild extends Gio.Cancellable { _init(parent) { if (parent && !(parent instanceof Gio.Cancellable)) throw TypeError('Not a valid cancellable'); super._init({parent}); if (parent) { if (parent.is_cancelled()) { this.cancel(); return; } this._connectToParent(); } } _connectToParent() { this._connectId = this.parent.connect(() => { this._realCancel(); if (this._disconnectIdle) return; this._disconnectIdle = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => { delete this._disconnectIdle; this._disconnectFromParent(); return GLib.SOURCE_REMOVE; }); }); } _disconnectFromParent() { if (this._connectId && !this._disconnectIdle) { this.parent.disconnect(this._connectId); delete this._connectId; } } _realCancel() { Gio.Cancellable.prototype.cancel.call(this); } cancel() { this._disconnectFromParent(); this._realCancel(); } }); 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!617 blocks
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor