New upstream version 43
Marco Trevisan (TreviƱo)
1 year, 7 months ago
0 | 0 | extends: |
1 | 1 | - ./lint/eslintrc-gjs.yml |
2 | 2 | - ./lint/eslintrc-shell.yml |
3 | ||
4 | overrides: | |
5 | - files: ./*.js | |
6 | globals: | |
7 | global: readonly |
96 | 96 | } |
97 | 97 | |
98 | 98 | async _setupProxy() { |
99 | try { | |
100 | await this._proxy.init_async(GLib.PRIORITY_DEFAULT, this._cancellable); | |
99 | const cancellable = this._cancellable; | |
100 | ||
101 | try { | |
102 | await this._proxy.init_async(GLib.PRIORITY_DEFAULT, cancellable); | |
103 | this._setupProxyAsyncMethods(); | |
101 | 104 | this._checkIfReady(); |
102 | 105 | this._checkNeededProperties(); |
103 | 106 | } catch (e) { |
104 | 107 | if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) |
105 | 108 | Util.Logger.warn(`While initalizing proxy for ${this._uniqueId}: ${e}`); |
109 | } | |
110 | ||
111 | try { | |
112 | this._commandLine = await Util.getProcessName(this.busName, | |
113 | cancellable, GLib.PRIORITY_LOW); | |
114 | } catch (e) { | |
115 | Util.Logger.debug(`${this._indicator.id}, failed getting command line: ${e.message}`); | |
106 | 116 | } |
107 | 117 | } |
108 | 118 | |
127 | 137 | } |
128 | 138 | |
129 | 139 | return false; |
140 | } | |
141 | ||
142 | _setupProxyAsyncMethods() { | |
143 | Util.ensureProxyAsyncMethod(this._proxy, 'Activate'); | |
144 | Util.ensureProxyAsyncMethod(this._proxy, 'ContextMenu'); | |
145 | Util.ensureProxyAsyncMethod(this._proxy, 'Scroll'); | |
146 | Util.ensureProxyAsyncMethod(this._proxy, 'SecondaryActivate'); | |
147 | Util.ensureProxyAsyncMethod(this._proxy, 'ProvideXdgActivationToken'); | |
148 | Util.ensureProxyAsyncMethod(this._proxy, 'XAyatanaSecondaryActivate'); | |
130 | 149 | } |
131 | 150 | |
132 | 151 | async _checkNeededProperties() { |
146 | 165 | return this.id && this.menuPath; |
147 | 166 | } |
148 | 167 | |
149 | _nameOwnerChanged() { | |
150 | if (!this.hasNameOwner) | |
168 | async _nameOwnerChanged() { | |
169 | if (!this.hasNameOwner) { | |
151 | 170 | this._checkIfReady(); |
152 | else | |
153 | this._checkNeededProperties(); | |
171 | } else { | |
172 | try { | |
173 | await this._checkNeededProperties(); | |
174 | } catch (e) { | |
175 | if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) | |
176 | Util.Logger.warn(`${this.uniqueId}, Impossible to get basic properties: ${e}`); | |
177 | } | |
178 | } | |
154 | 179 | |
155 | 180 | this.emit('name-owner-changed'); |
156 | 181 | } |
204 | 229 | this._proxyPropertyList.includes(p)).forEach(p => |
205 | 230 | Util.refreshPropertyOnProxy(this._proxy, p, { |
206 | 231 | skipEqualityCheck: p.endsWith('Pixmap'), |
207 | }), | |
232 | }).catch(e => logError(e)), | |
208 | 233 | ); |
209 | 234 | } |
210 | 235 | |
365 | 390 | delete this._nameWatcher; |
366 | 391 | } |
367 | 392 | |
368 | open(x, y) { | |
393 | _getActivationToken(timestamp) { | |
394 | const launchContext = global.create_app_launch_context(timestamp, -1); | |
395 | const fakeAppInfo = Gio.AppInfo.create_from_commandline( | |
396 | this._commandLine || 'true', this.id, | |
397 | Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION); | |
398 | return [launchContext, launchContext.get_startup_notify_id(fakeAppInfo, [])]; | |
399 | } | |
400 | ||
401 | async provideActivationToken(timestamp) { | |
402 | if (this._hasProvideXdgActivationToken === false) | |
403 | return; | |
404 | ||
405 | const [launchContext, activationToken] = this._getActivationToken(timestamp); | |
406 | try { | |
407 | await this._proxy.ProvideXdgActivationTokenAsync(activationToken, | |
408 | this._cancellable); | |
409 | this._hasProvideXdgActivationToken = true; | |
410 | } catch (e) { | |
411 | launchContext.launch_failed(activationToken); | |
412 | ||
413 | if (e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_METHOD)) | |
414 | this._hasProvideXdgActivationToken = false; | |
415 | else | |
416 | Util.Logger.warn(`${this.id}, failed to provide activation token: ${e.message}`); | |
417 | } | |
418 | } | |
419 | ||
420 | async open(x, y, timestamp) { | |
421 | const cancellable = this._cancellable; | |
369 | 422 | // we can't use WindowID because we're not able to get the x11 window id from a MetaWindow |
370 | 423 | // nor can we call any X11 functions. Luckily, the Activate method usually works fine. |
371 | 424 | // parameters are "an hint to the item where to show eventual windows" [sic] |
372 | 425 | // ... and don't seem to have any effect. |
373 | this._proxy.ActivateRemote(x, y, this._cancellable, (_, e) => { | |
374 | if (e && !e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) | |
375 | Util.Logger.critical(`${this._indicator.id}, failed to activate: ${e.message}`); | |
376 | }); | |
377 | } | |
378 | ||
379 | secondaryActivate(timestamp, x, y) { | |
426 | ||
427 | try { | |
428 | await this.provideActivationToken(timestamp); | |
429 | await this._proxy.ActivateAsync(x, y, cancellable); | |
430 | this.supportsActivation = true; | |
431 | } catch (e) { | |
432 | if (e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_METHOD)) { | |
433 | this.supportsActivation = false; | |
434 | Util.Logger.warn(`${this.id}, does not support activation: ${e.message}`); | |
435 | return; | |
436 | } | |
437 | ||
438 | if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) | |
439 | Util.Logger.critical(`${this.id}, failed to activate: ${e.message}`); | |
440 | } | |
441 | } | |
442 | ||
443 | async secondaryActivate(timestamp, x, y) { | |
380 | 444 | const cancellable = this._cancellable; |
381 | 445 | |
382 | this._proxy.XAyatanaSecondaryActivateRemote(timestamp, cancellable, (_, e) => { | |
383 | if (e && e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_METHOD)) { | |
384 | this._proxy.SecondaryActivateRemote(x, y, cancellable, (_r, error) => { | |
385 | if (error && !error.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) | |
386 | Util.Logger.critical(`${this._indicator.id}, failed to secondary activate: ${e.message}`); | |
387 | }); | |
388 | } else if (e && !e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) { | |
389 | Util.Logger.critical(`${this._indicator.id}, failed to secondary activate: ${e.message}`); | |
390 | } | |
391 | }); | |
392 | } | |
393 | ||
394 | scroll(dx, dy) { | |
446 | try { | |
447 | await this.provideActivationToken(timestamp); | |
448 | ||
449 | if (this._hasAyatanaSecondaryActivate !== false) { | |
450 | try { | |
451 | await this._proxy.XAyatanaSecondaryActivateAsync(timestamp, cancellable); | |
452 | this._hasAyatanaSecondaryActivate = true; | |
453 | } catch (e) { | |
454 | if (e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_METHOD)) | |
455 | this._hasAyatanaSecondaryActivate = false; | |
456 | else | |
457 | throw e; | |
458 | } | |
459 | } | |
460 | ||
461 | if (!this._hasAyatanaSecondaryActivate) | |
462 | await this._proxy.SecondaryActivateAsync(x, y, cancellable); | |
463 | } catch (e) { | |
464 | if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) | |
465 | Util.Logger.critical(`${this.id}, failed to secondary activate: ${e.message}`); | |
466 | } | |
467 | } | |
468 | ||
469 | async scroll(dx, dy) { | |
395 | 470 | const cancellable = this._cancellable; |
396 | 471 | |
397 | if (dx !== 0) { | |
398 | this._proxy.ScrollRemote(Math.floor(dx), 'horizontal', cancellable, (_, e) => { | |
399 | if (e && !e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) | |
400 | Util.Logger.critical(`${this._indicator.id}, failed to scroll horizontally: ${e.message}`); | |
401 | }); | |
402 | } | |
403 | ||
404 | if (dy !== 0) { | |
405 | this._proxy.ScrollRemote(Math.floor(dy), 'vertical', cancellable, (_, e) => { | |
406 | if (e && !e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) | |
407 | Util.Logger.critical(`${this._indicator.id}, failed to scroll vertically: ${e.message}`); | |
408 | }); | |
472 | try { | |
473 | const actions = []; | |
474 | ||
475 | if (dx !== 0) { | |
476 | actions.push(this._proxy.ScrollAsync(Math.floor(dx), | |
477 | 'horizontal', cancellable)); | |
478 | } | |
479 | ||
480 | if (dy !== 0) { | |
481 | actions.push(this._proxy.ScrollAsync(Math.floor(dy), | |
482 | 'vertical', cancellable)); | |
483 | } | |
484 | ||
485 | await Promise.all(actions); | |
486 | } catch (e) { | |
487 | Util.Logger.critical(`${this.id}, failed to scroll: ${e.message}`); | |
409 | 488 | } |
410 | 489 | } |
411 | 490 | }; |
858 | 937 | this._iconCache.clear(); |
859 | 938 | this._cancelLoading(); |
860 | 939 | |
861 | this._updateIcon(); | |
940 | this._updateIcon().catch(e => logError(e)); | |
862 | 941 | this._updateOverlayIcon(); |
863 | 942 | } |
864 | 943 |
380 | 380 | } else { |
381 | 381 | // we don't, so let's create us |
382 | 382 | this._items.set(id, new DbusMenuItem(this, id, properties, childrenIds)); |
383 | this._requestProperties(id); | |
383 | this._requestProperties(id).catch(e => { | |
384 | if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) | |
385 | Util.Logger.warn(`Could not get menu properties menu proxy: ${e}`); | |
386 | }); | |
384 | 387 | } |
385 | 388 | |
386 | 389 | return id; |
532 | 535 | Util.connectSmart(shellItem, 'activate', |
533 | 536 | shellItem, MenuItemFactory._onActivate); |
534 | 537 | |
538 | shellItem.connect('destroy', () => { | |
539 | shellItem._dbusItem = null; | |
540 | shellItem._dbusClient = null; | |
541 | }); | |
542 | ||
535 | 543 | if (shellItem.menu) { |
536 | 544 | Util.connectSmart(shellItem.menu, 'open-state-changed', |
537 | 545 | shellItem, MenuItemFactory._onOpenStateChanged); |
567 | 575 | } |
568 | 576 | }, |
569 | 577 | |
570 | _onActivate() { | |
571 | this._dbusItem.handleEvent('clicked', GLib.Variant.new('i', 0), 0); | |
578 | _onActivate(_item, event) { | |
579 | const timestamp = event.get_time(); | |
580 | if (timestamp && this._dbusClient.indicator) | |
581 | this._dbusClient.indicator.provideActivationToken(timestamp); | |
582 | ||
583 | this._dbusItem.handleEvent('clicked', GLib.Variant.new('i', 0), | |
584 | timestamp); | |
572 | 585 | }, |
573 | 586 | |
574 | 587 | _onPropertyChanged(dbusItem, prop, _value) { |
718 | 731 | */ |
719 | 732 | var Client = class AppIndicatorsClient { |
720 | 733 | |
721 | constructor(busName, path) { | |
734 | constructor(busName, path, indicator) { | |
722 | 735 | this._busName = busName; |
723 | 736 | this._busPath = path; |
724 | 737 | this._client = new DBusClient(busName, path); |
725 | 738 | this._rootMenu = null; // the shell menu |
726 | 739 | this._rootItem = null; // the DbusMenuItem for the root |
740 | this.indicator = indicator; | |
727 | 741 | } |
728 | 742 | |
729 | 743 | get isReady() { |
815 | 829 | this._client = null; |
816 | 830 | this._rootItem = null; |
817 | 831 | this._rootMenu = null; |
832 | this.indicator = null; | |
818 | 833 | } |
819 | 834 | }; |
820 | 835 | Signals.addSignalMethods(Client.prototype); |
55 | 55 | |
56 | 56 | function enable() { |
57 | 57 | isEnabled = true; |
58 | Util.tryCleanupOldIndicators(); | |
58 | 59 | maybeEnableAfterNameAvailable(); |
59 | 60 | TrayIconsManager.TrayIconsManager.initialize(); |
60 | 61 | } |
13 | 13 | // along with this program; if not, write to the Free Software |
14 | 14 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
15 | 15 | |
16 | /* exported IndicatorStatusIcon, IndicatorStatusTrayIcon */ | |
16 | /* exported BaseStatusIcon, IndicatorStatusIcon, IndicatorStatusTrayIcon, | |
17 | addIconToPanel, getTrayIcons, getAppIndicatorIcons */ | |
17 | 18 | |
18 | 19 | const Clutter = imports.gi.Clutter; |
20 | const GLib = imports.gi.GLib; | |
19 | 21 | const GObject = imports.gi.GObject; |
20 | 22 | const St = imports.gi.St; |
21 | 23 | |
33 | 35 | const PromiseUtils = Extension.imports.promiseUtils; |
34 | 36 | const SettingsManager = Extension.imports.settingsManager; |
35 | 37 | |
36 | const BaseStatusIcon = GObject.registerClass( | |
38 | function addIconToPanel(statusIcon) { | |
39 | if (!(statusIcon instanceof BaseStatusIcon)) | |
40 | throw TypeError(`Unexpected icon type: ${statusIcon}`); | |
41 | ||
42 | const settings = SettingsManager.getDefaultGSettings(); | |
43 | const indicatorId = `appindicator-${statusIcon.uniqueId}`; | |
44 | ||
45 | const currentIcon = Main.panel.statusArea[indicatorId]; | |
46 | if (currentIcon) { | |
47 | if (currentIcon !== statusIcon) | |
48 | currentIcon.destroy(); | |
49 | ||
50 | Main.panel.statusArea[indicatorId] = null; | |
51 | } | |
52 | ||
53 | Main.panel.addToStatusArea(indicatorId, statusIcon, 1, | |
54 | settings.get_string('tray-pos')); | |
55 | ||
56 | Util.connectSmart(settings, 'changed::tray-pos', statusIcon, () => | |
57 | addIconToPanel(statusIcon)); | |
58 | } | |
59 | ||
60 | function getTrayIcons() { | |
61 | return Object.values(Main.panel.statusArea).filter( | |
62 | i => i instanceof IndicatorStatusTrayIcon); | |
63 | } | |
64 | ||
65 | function getAppIndicatorIcons() { | |
66 | return Object.values(Main.panel.statusArea).filter( | |
67 | i => i instanceof IndicatorStatusIcon); | |
68 | } | |
69 | ||
70 | var BaseStatusIcon = GObject.registerClass( | |
37 | 71 | class AppIndicatorsIndicatorBaseStatusIcon extends PanelMenu.Button { |
38 | 72 | _init(menuAlignment, nameText, iconActor, dontCreateMenu) { |
39 | 73 | super._init(menuAlignment, nameText, dontCreateMenu); |
40 | 74 | |
41 | 75 | const settings = SettingsManager.getDefaultGSettings(); |
42 | 76 | Util.connectSmart(settings, 'changed::icon-opacity', this, this._updateOpacity); |
43 | Util.connectSmart(settings, 'changed::tray-pos', this, this._showIfReady); | |
44 | 77 | this.connect('notify::hover', () => this._onHoverChanged()); |
45 | 78 | |
46 | 79 | this._setIconActor(iconActor); |
68 | 101 | throw new GObject.NotImplementedError('isReady() in %s'.format(this.constructor.name)); |
69 | 102 | } |
70 | 103 | |
104 | get icon() { | |
105 | return this._icon; | |
106 | } | |
107 | ||
71 | 108 | get uniqueId() { |
72 | 109 | throw new GObject.NotImplementedError('uniqueId in %s'.format(this.constructor.name)); |
73 | 110 | } |
74 | 111 | |
75 | 112 | _showIfReady() { |
76 | if (!this.isReady()) | |
77 | return; | |
78 | ||
79 | const indicatorId = `appindicator-${this.uniqueId}`; | |
80 | Main.panel.statusArea[indicatorId] = null; | |
81 | Main.panel.addToStatusArea(indicatorId, this, 1, | |
82 | SettingsManager.getDefaultGSettings().get_string('tray-pos')); | |
113 | this.visible = this.isReady(); | |
83 | 114 | } |
84 | 115 | |
85 | 116 | _onHoverChanged() { |
156 | 187 | super._init(0.5, indicator.accessibleName, |
157 | 188 | new AppIndicator.IconActor(indicator, Panel.PANEL_ICON_SIZE)); |
158 | 189 | this._indicator = indicator; |
190 | ||
191 | this._lastClickTime = -1; | |
192 | this._lastClickX = -1; | |
193 | this._lastClickY = -1; | |
159 | 194 | |
160 | 195 | this._box = new St.BoxLayout({ style_class: 'panel-status-indicators-box' }); |
161 | 196 | this._box.add_style_class_name('appindicator-box'); |
229 | 264 | |
230 | 265 | if (this._indicator.menuPath) { |
231 | 266 | this._menuClient = new DBusMenu.Client(this._indicator.busName, |
232 | this._indicator.menuPath); | |
267 | this._indicator.menuPath, this._indicator); | |
233 | 268 | this._menuClient.attachToMenu(this.menu); |
234 | 269 | } |
235 | 270 | } |
241 | 276 | this._updateLabel(); |
242 | 277 | this._updateStatus(); |
243 | 278 | this._updateMenu(); |
244 | ||
245 | super._showIfReady(); | |
279 | } | |
280 | ||
281 | _updateClickCount(buttonEvent) { | |
282 | const { x, y, time } = buttonEvent; | |
283 | const { doubleClickDistance, doubleClickTime } = | |
284 | Clutter.Settings.get_default(); | |
285 | ||
286 | if (time > (this._lastClickTime + doubleClickTime) || | |
287 | (Math.abs(x - this._lastClickX) > doubleClickDistance) || | |
288 | (Math.abs(y - this._lastClickY) > doubleClickDistance)) | |
289 | this._clickCount = 0; | |
290 | ||
291 | this._lastClickTime = time; | |
292 | this._lastClickX = x; | |
293 | this._lastClickY = y; | |
294 | ||
295 | this._clickCount = (this._clickCount % 2) + 1; | |
296 | ||
297 | return this._clickCount; | |
298 | } | |
299 | ||
300 | _maybeHandleDoubleClick(buttonEvent) { | |
301 | if (this._indicator.supportsActivation === false) | |
302 | return Clutter.EVENT_PROPAGATE; | |
303 | ||
304 | if (buttonEvent.button !== Clutter.BUTTON_PRIMARY) | |
305 | return Clutter.EVENT_PROPAGATE; | |
306 | ||
307 | if (buttonEvent.click_count === 2 || | |
308 | (buttonEvent.click_count === undefined && | |
309 | this._updateClickCount(buttonEvent) === 2)) { | |
310 | this._indicator.open(buttonEvent.x, buttonEvent.y, buttonEvent.time); | |
311 | return Clutter.EVENT_STOP; | |
312 | } | |
313 | ||
314 | return Clutter.EVENT_PROPAGATE; | |
315 | } | |
316 | ||
317 | vfunc_event(event) { | |
318 | if (this.menu.numMenuItems && event.type() === Clutter.EventType.TOUCH_BEGIN) | |
319 | this.menu.toggle(); | |
320 | ||
321 | return Clutter.EVENT_PROPAGATE; | |
246 | 322 | } |
247 | 323 | |
248 | 324 | vfunc_button_press_event(buttonEvent) { |
325 | if (this._waitDoubleClickId) { | |
326 | GLib.source_remove(this._waitDoubleClickId); | |
327 | this._waitDoubleClickId = 0; | |
328 | } | |
329 | ||
249 | 330 | // if middle mouse button clicked send SecondaryActivate dbus event and do not show appindicator menu |
250 | if (buttonEvent.button === 2) { | |
251 | Main.panel.menuManager._closeMenu(true, Main.panel.menuManager.activeMenu); | |
331 | if (buttonEvent.button === Clutter.BUTTON_MIDDLE) { | |
332 | if (Main.panel.menuManager.activeMenu) | |
333 | Main.panel.menuManager._closeMenu(true, Main.panel.menuManager.activeMenu); | |
252 | 334 | this._indicator.secondaryActivate(buttonEvent.time, buttonEvent.x, buttonEvent.y); |
253 | 335 | return Clutter.EVENT_STOP; |
254 | 336 | } |
255 | 337 | |
256 | if (buttonEvent.button === 1 && buttonEvent.click_count === 2) { | |
257 | this._indicator.open(buttonEvent.x, buttonEvent.y); | |
258 | return Clutter.EVENT_STOP; | |
259 | } | |
338 | const doubleClickHandled = this._maybeHandleDoubleClick(buttonEvent); | |
339 | if (doubleClickHandled === Clutter.EVENT_PROPAGATE && | |
340 | buttonEvent.button === Clutter.BUTTON_PRIMARY && | |
341 | this.menu.numMenuItems) { | |
342 | if (this._indicator.supportsActivation) { | |
343 | const { doubleClickTime } = Clutter.Settings.get_default(); | |
344 | this._waitDoubleClickId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, | |
345 | doubleClickTime, () => { | |
346 | this.menu.toggle(); | |
347 | this._waitDoubleClickId = 0; | |
348 | return GLib.SOURCE_REMOVE; | |
349 | }); | |
350 | } else { | |
351 | this.menu.toggle(); | |
352 | } | |
353 | } | |
354 | ||
355 | return Clutter.EVENT_PROPAGATE; | |
356 | } | |
357 | ||
358 | vfunc_button_release_event(buttonEvent) { | |
359 | if (!this._indicator.supportsActivation) | |
360 | return this._maybeHandleDoubleClick(buttonEvent); | |
260 | 361 | |
261 | 362 | return Clutter.EVENT_PROPAGATE; |
262 | 363 | } |
330 | 431 | Util.Logger.debug(`Destroying legacy tray icon ${this.uniqueId}`); |
331 | 432 | this._icon.destroy(); |
332 | 433 | this._icon = null; |
434 | ||
435 | if (this._waitDoubleClickId) { | |
436 | GLib.source_remove(this._waitDoubleClickId); | |
437 | this._waitDoubleClickId = 0; | |
438 | } | |
333 | 439 | }); |
334 | 440 | } |
335 | 441 |
64 | 64 | <arg name="y" type="i" direction="in"/> |
65 | 65 | </method> |
66 | 66 | |
67 | <method name="ProvideXdgActivationToken"> | |
68 | <arg name="token" type="s" direction="in"/> | |
69 | </method> | |
70 | ||
67 | 71 | <method name="SecondaryActivate"> |
68 | 72 | <arg name="x" type="i" direction="in"/> |
69 | 73 | <arg name="y" type="i" direction="in"/> |
0 | cs | |
0 | 1 | de |
1 | 2 | fr |
2 | 3 | hu |
3 | 4 | it |
4 | 5 | ja |
6 | ko | |
5 | 7 | nl |
8 | oc | |
6 | 9 | pl |
7 | 10 | pt_BR |
8 | 11 | ru |
11 | 14 | sr |
12 | 15 | tr |
13 | 16 | zh_CN |
14 |
0 | # Czech translation of gnome-shell-extension-appindicator. | |
1 | # Copyright (C) 2022 | |
2 | # This file is distributed under the same license as the AppIndicatorExtension package. | |
3 | # Daniel Rusek <mail@asciiwolf.com>, 2022. | |
4 | # | |
5 | msgid "" | |
6 | msgstr "" | |
7 | "Project-Id-Version: \n" | |
8 | "Report-Msgid-Bugs-To: \n" | |
9 | "POT-Creation-Date: 2021-09-27 20:43+0200\n" | |
10 | "PO-Revision-Date: 2022-04-09 00:16+0200\n" | |
11 | "Last-Translator: Daniel Rusek <mail@asciiwolf.com>\n" | |
12 | "Language-Team: \n" | |
13 | "Language: cs\n" | |
14 | "MIME-Version: 1.0\n" | |
15 | "Content-Type: text/plain; charset=UTF-8\n" | |
16 | "Content-Transfer-Encoding: 8bit\n" | |
17 | "Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n" | |
18 | "X-Generator: Poedit 3.0.1\n" | |
19 | ||
20 | #: prefs.js:67 | |
21 | msgid "Opacity (min: 0, max: 255)" | |
22 | msgstr "KrytĆ (min: 0, max: 255)" | |
23 | ||
24 | #: prefs.js:95 | |
25 | msgid "Desaturation (min: 0.0, max: 1.0)" | |
26 | msgstr "OdbarvenĆ (min: 0.0, max: 1.0)" | |
27 | ||
28 | #: prefs.js:123 | |
29 | msgid "Brightness (min: -1.0, max: 1.0)" | |
30 | msgstr "Jas (min: -1.0, max: 1.0)" | |
31 | ||
32 | #: prefs.js:151 | |
33 | msgid "Contrast (min: -1.0, max: 1.0)" | |
34 | msgstr "Kontrast (min: -1.0, max: 1.0)" | |
35 | ||
36 | #: prefs.js:179 | |
37 | msgid "Icon size (min: 0, max: 96)" | |
38 | msgstr "Velikost ikon (min: 0, max: 96)" | |
39 | ||
40 | #: prefs.js:207 | |
41 | msgid "Tray horizontal alignment" | |
42 | msgstr "VodorovnĆ© zarovnĆ”nĆ liÅ”ty" | |
43 | ||
44 | #: prefs.js:212 | |
45 | msgid "Center" | |
46 | msgstr "Ve stÅedu" | |
47 | ||
48 | #: prefs.js:213 | |
49 | msgid "Left" | |
50 | msgstr "Vlevo" | |
51 | ||
52 | #: prefs.js:214 | |
53 | msgid "Right" | |
54 | msgstr "Vpravo" | |
55 | ||
56 | #: prefs.js:259 | |
57 | msgid "Indicator ID" | |
58 | msgstr "ID" | |
59 | ||
60 | #: prefs.js:260 | |
61 | msgid "Icon Name" | |
62 | msgstr "NƔzev ikony" | |
63 | ||
64 | #: prefs.js:261 | |
65 | msgid "Attention Icon Name" | |
66 | msgstr "NĆ”zev ikony s upozornÄnĆm" | |
67 | ||
68 | #: prefs.js:336 | |
69 | msgid "Preferences" | |
70 | msgstr "PÅedvolby" | |
71 | ||
72 | #: prefs.js:338 | |
73 | msgid "Custom Icons" | |
74 | msgstr "VlastnĆ ikony" | |
75 | ||
76 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 | |
77 | msgid "Saturation" | |
78 | msgstr "Sytost" | |
79 | ||
80 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 | |
81 | msgid "Brightness" | |
82 | msgstr "Jas" | |
83 | ||
84 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 | |
85 | msgid "Contrast" | |
86 | msgstr "Kontrast" | |
87 | ||
88 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 | |
89 | msgid "Opacity" | |
90 | msgstr "KrytĆ" | |
91 | ||
92 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 | |
93 | msgid "Icon size" | |
94 | msgstr "Velikost ikony" | |
95 | ||
96 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 | |
97 | msgid "Icon size in pixel" | |
98 | msgstr "Velikost ikony v pixelech" | |
99 | ||
100 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 | |
101 | msgid "Icon spacing" | |
102 | msgstr "Rozestupy mezi ikonami" | |
103 | ||
104 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 | |
105 | msgid "Icon spacing within the tray" | |
106 | msgstr "Rozestupy mezi ikonami na liÅ”tÄ" | |
107 | ||
108 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 | |
109 | msgid "Position in tray" | |
110 | msgstr "UmĆstÄnĆ na liÅ”tÄ" | |
111 | ||
112 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 | |
113 | msgid "Set where the Icon tray should appear in Gnome tray" | |
114 | msgstr "Nastavte, kde na Gnome liÅ”tÄ se mĆ” liÅ”ta ikon zobrazovat" | |
115 | ||
116 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 | |
117 | msgid "Order in tray" | |
118 | msgstr "PoÅadĆ na liÅ”tÄ" | |
119 | ||
120 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 | |
121 | msgid "Set where the Icon tray should appear among other trays" | |
122 | msgstr "Nastavte, kde mezi ostatnĆmi liÅ”tami se mĆ” liÅ”ta ikon zobrazovat" | |
123 | ||
124 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 | |
125 | msgid "Custom icons" | |
126 | msgstr "VlastnĆ ikony" | |
127 | ||
128 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 | |
129 | msgid "Replace any icons with custom icons from themes" | |
130 | msgstr "Nahradit libovolnĆ© ikony vlastnĆmi ikonami z motivÅÆ" |
7 | 7 | "Project-Id-Version: \n" |
8 | 8 | "Report-Msgid-Bugs-To: \n" |
9 | 9 | "POT-Creation-Date: 2021-09-27 20:43+0200\n" |
10 | "PO-Revision-Date: 2017-09-17 15:05+0200\n" | |
11 | "Last-Translator: \n" | |
10 | "PO-Revision-Date: 2022-05-26 22:59+0200\n" | |
11 | "Last-Translator: roxfr <roxfr@outlook.fr>\n" | |
12 | 12 | "Language-Team: Jimmy Scionti <jimmy.scionti@gmail.com>\n" |
13 | 13 | "Language: fr\n" |
14 | 14 | "MIME-Version: 1.0\n" |
15 | 15 | "Content-Type: text/plain; charset=UTF-8\n" |
16 | 16 | "Content-Transfer-Encoding: 8bit\n" |
17 | "X-Generator: Poedit 2.0.3\n" | |
18 | 17 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" |
18 | "X-Generator: Poedit 3.0.1\n" | |
19 | 19 | |
20 | 20 | #: prefs.js:67 |
21 | 21 | msgid "Opacity (min: 0, max: 255)" |
55 | 55 | |
56 | 56 | #: prefs.js:259 |
57 | 57 | msgid "Indicator ID" |
58 | msgstr "" | |
58 | msgstr "ID de l'indicateur" | |
59 | 59 | |
60 | 60 | #: prefs.js:260 |
61 | 61 | msgid "Icon Name" |
62 | msgstr "" | |
62 | msgstr "Nom de l'icƓne" | |
63 | 63 | |
64 | 64 | #: prefs.js:261 |
65 | 65 | msgid "Attention Icon Name" |
66 | msgstr "" | |
66 | msgstr "Nom de l'icƓne Attention" | |
67 | 67 | |
68 | 68 | #: prefs.js:336 |
69 | 69 | msgid "Preferences" |
70 | msgstr "" | |
70 | msgstr "PrƩfƩrences" | |
71 | 71 | |
72 | 72 | #: prefs.js:338 |
73 | 73 | msgid "Custom Icons" |
74 | msgstr "" | |
74 | msgstr "IcƓnes personnalisƩes" | |
75 | 75 | |
76 | 76 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 |
77 | 77 | msgid "Saturation" |
78 | msgstr "" | |
78 | msgstr "Saturation" | |
79 | 79 | |
80 | 80 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 |
81 | 81 | msgid "Brightness" |
82 | msgstr "" | |
82 | msgstr "LuminositƩ" | |
83 | 83 | |
84 | 84 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 |
85 | 85 | msgid "Contrast" |
86 | msgstr "" | |
86 | msgstr "Contraste" | |
87 | 87 | |
88 | 88 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 |
89 | 89 | msgid "Opacity" |
90 | msgstr "" | |
90 | msgstr "OpacitƩ" | |
91 | 91 | |
92 | 92 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 |
93 | 93 | msgid "Icon size" |
94 | msgstr "" | |
94 | msgstr "Taille des icƓnes" | |
95 | 95 | |
96 | 96 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 |
97 | #, fuzzy | |
98 | 97 | msgid "Icon size in pixel" |
99 | msgstr "Taille des icƓnes (min : 0 ; max : 96)" | |
98 | msgstr "Taille des icƓnes en pixels" | |
100 | 99 | |
101 | 100 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 |
102 | 101 | msgid "Icon spacing" |
103 | msgstr "" | |
102 | msgstr "Espacement des icƓnes" | |
104 | 103 | |
105 | 104 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 |
106 | 105 | msgid "Icon spacing within the tray" |
107 | msgstr "" | |
106 | msgstr "Espacement des icƓnes dans la barre" | |
108 | 107 | |
109 | 108 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 |
110 | 109 | msgid "Position in tray" |
111 | msgstr "" | |
110 | msgstr "Position dans la barre" | |
112 | 111 | |
113 | 112 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 |
114 | 113 | msgid "Set where the Icon tray should appear in Gnome tray" |
115 | msgstr "" | |
114 | msgstr "DĆ©finir oĆ¹ la barre d'icĆ“nes doit apparaĆ®tre dans la barre d'Ć©tat de Gnome" | |
116 | 115 | |
117 | 116 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 |
118 | 117 | msgid "Order in tray" |
119 | msgstr "" | |
118 | msgstr "Commande dans la barre" | |
120 | 119 | |
121 | 120 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 |
122 | 121 | msgid "Set where the Icon tray should appear among other trays" |
123 | msgstr "" | |
122 | msgstr "DĆ©finir oĆ¹ la barre d'icĆ“nes doit apparaĆ®tre parmi les autres barres" | |
124 | 123 | |
125 | 124 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 |
126 | 125 | msgid "Custom icons" |
127 | msgstr "" | |
126 | msgstr "IcƓnes personnalisƩes" | |
128 | 127 | |
129 | 128 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 |
130 | 129 | msgid "Replace any icons with custom icons from themes" |
131 | msgstr "" | |
130 | msgstr "Remplacer toutes les icĆ“nes par des icĆ“nes personnalisĆ©es Ć partir des thĆØmes" | |
132 | 131 | |
133 | 132 | #~ msgid "Spacing between icons (min: 0, max: 20)" |
134 | 133 | #~ msgstr "Espacement entre les icƓnes (min : 0 ; max : 20)" |
0 | # SOME DESCRIPTIVE TITLE. | |
1 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
2 | # This file is distributed under the same license as the AppIndicatorExtension package. | |
3 | # Junghee Lee <daemul72@gmail.com>, 2022. | |
4 | # | |
5 | msgid "" | |
6 | msgstr "" | |
7 | "Project-Id-Version: AppIndicatorExtension\n" | |
8 | "Report-Msgid-Bugs-To: \n" | |
9 | "POT-Creation-Date: 2021-09-27 20:43+0200\n" | |
10 | "PO-Revision-Date: 2022-04-22 17:45+0900\n" | |
11 | "Last-Translator: ģ“ģ ķ¬ <daemul72@gmail.com>\n" | |
12 | "Language-Team: ģ“ģ ķ¬ <daemul72@gmail.com>\n" | |
13 | "Language: ko\n" | |
14 | "MIME-Version: 1.0\n" | |
15 | "Content-Type: text/plain; charset=UTF-8\n" | |
16 | "Content-Transfer-Encoding: 8bit\n" | |
17 | "Plural-Forms: nplurals=1; plural=0;\n" | |
18 | "X-Generator: Poedit 3.0.1\n" | |
19 | ||
20 | #: prefs.js:67 | |
21 | msgid "Opacity (min: 0, max: 255)" | |
22 | msgstr "ė¶ķ¬ėŖ ė (ģµģ: 0, ģµė: 255)" | |
23 | ||
24 | #: prefs.js:95 | |
25 | msgid "Desaturation (min: 0.0, max: 1.0)" | |
26 | msgstr "ģ±ė ź°ģ (ģµģ: 0.0, ģµė: 1.0)" | |
27 | ||
28 | #: prefs.js:123 | |
29 | msgid "Brightness (min: -1.0, max: 1.0)" | |
30 | msgstr "ėŖ ė (ģµģ: -1.0, ģµė: 1.0)" | |
31 | ||
32 | #: prefs.js:151 | |
33 | msgid "Contrast (min: -1.0, max: 1.0)" | |
34 | msgstr "ėė¹ (ģµģ: -1.0, ģµė: 1.0)" | |
35 | ||
36 | #: prefs.js:179 | |
37 | msgid "Icon size (min: 0, max: 96)" | |
38 | msgstr "ģģ“ģ½ ķ¬źø° (ģµģ: 0, ģµė: 96)" | |
39 | ||
40 | #: prefs.js:207 | |
41 | msgid "Tray horizontal alignment" | |
42 | msgstr "ķøė ģ“ ģķ ģ ė ¬" | |
43 | ||
44 | #: prefs.js:212 | |
45 | msgid "Center" | |
46 | msgstr "ģ¤ģ" | |
47 | ||
48 | #: prefs.js:213 | |
49 | msgid "Left" | |
50 | msgstr "ģ¼ģŖ½" | |
51 | ||
52 | #: prefs.js:214 | |
53 | msgid "Right" | |
54 | msgstr "ģ¤ė„øģŖ½" | |
55 | ||
56 | #: prefs.js:259 | |
57 | msgid "Indicator ID" | |
58 | msgstr "ķģźø° ID" | |
59 | ||
60 | #: prefs.js:260 | |
61 | msgid "Icon Name" | |
62 | msgstr "ģģ“ģ½ ģ“ė¦" | |
63 | ||
64 | #: prefs.js:261 | |
65 | msgid "Attention Icon Name" | |
66 | msgstr "ģ£¼ģ ģģ“ģ½ ģ“ė¦" | |
67 | ||
68 | #: prefs.js:336 | |
69 | msgid "Preferences" | |
70 | msgstr "źø°ė³ø ģ¤ģ " | |
71 | ||
72 | #: prefs.js:338 | |
73 | msgid "Custom Icons" | |
74 | msgstr "ģ¬ģ©ģ ģ§ģ ģģ“ģ½" | |
75 | ||
76 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 | |
77 | msgid "Saturation" | |
78 | msgstr "ģ±ė" | |
79 | ||
80 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 | |
81 | msgid "Brightness" | |
82 | msgstr "ėŖ ė" | |
83 | ||
84 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 | |
85 | msgid "Contrast" | |
86 | msgstr "ėė¹" | |
87 | ||
88 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 | |
89 | msgid "Opacity" | |
90 | msgstr "ė¶ķ¬ėŖ ė" | |
91 | ||
92 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 | |
93 | msgid "Icon size" | |
94 | msgstr "ģģ“ģ½ ķ¬źø°" | |
95 | ||
96 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 | |
97 | msgid "Icon size in pixel" | |
98 | msgstr "ģģ“ģ½ ķ¬źø° (ķ½ģ )" | |
99 | ||
100 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 | |
101 | msgid "Icon spacing" | |
102 | msgstr "ģģ“ģ½ ź°ź²©" | |
103 | ||
104 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 | |
105 | msgid "Icon spacing within the tray" | |
106 | msgstr "ķøė ģ“ ė“ ģģ“ģ½ ź°ź²©" | |
107 | ||
108 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 | |
109 | msgid "Position in tray" | |
110 | msgstr "ķøė ģ“ģ ģģ¹" | |
111 | ||
112 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 | |
113 | msgid "Set where the Icon tray should appear in Gnome tray" | |
114 | msgstr "ź·øė ķøė ģ“ģģ ģģ“ģ½ ķøė ģ“ź° ėķė ģģ¹ ģ§ģ ķźø°" | |
115 | ||
116 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 | |
117 | msgid "Order in tray" | |
118 | msgstr "ķøė ģ“ģģ ģ§ģķźø°" | |
119 | ||
120 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 | |
121 | msgid "Set where the Icon tray should appear among other trays" | |
122 | msgstr "ģģ“ģ½ ķøė ģ“ź° ė¤ė„ø ķøė ģ“ ģ¤ģģ ķģėģ“ģ¼ ķė ģģ¹ ģ§ģ ķźø°" | |
123 | ||
124 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 | |
125 | msgid "Custom icons" | |
126 | msgstr "ģ¬ģ©ģ ģ§ģ ģģ“ģ½" | |
127 | ||
128 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 | |
129 | msgid "Replace any icons with custom icons from themes" | |
130 | msgstr "ėŖØė ģģ“ģ½ģ ķ ė§ģ ģ¬ģ©ģ ģ§ģ ģģ“ģ½ģ¼ė” ė°ź¾øźø°" |
0 | # SOME DESCRIPTIVE TITLE. | |
1 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
2 | # This file is distributed under the same license as the AppIndicatorExtension package. | |
3 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
4 | # | |
5 | msgid "" | |
6 | msgstr "" | |
7 | "Project-Id-Version: AppIndicatorExtension\n" | |
8 | "Report-Msgid-Bugs-To: \n" | |
9 | "POT-Creation-Date: 2021-09-27 20:43+0200\n" | |
10 | "PO-Revision-Date: 2022-03-31 20:14+0200\n" | |
11 | "Last-Translator: Quentin PAGĆS\n" | |
12 | "Language-Team: \n" | |
13 | "Language: oc\n" | |
14 | "MIME-Version: 1.0\n" | |
15 | "Content-Type: text/plain; charset=UTF-8\n" | |
16 | "Content-Transfer-Encoding: 8bit\n" | |
17 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" | |
18 | "X-Generator: Poedit 3.0.1\n" | |
19 | ||
20 | #: prefs.js:67 | |
21 | msgid "Opacity (min: 0, max: 255)" | |
22 | msgstr "Opacitat (min : 0, max : 255)" | |
23 | ||
24 | #: prefs.js:95 | |
25 | msgid "Desaturation (min: 0.0, max: 1.0)" | |
26 | msgstr "Desaturacion (min : 0.0, max : 1.0)" | |
27 | ||
28 | #: prefs.js:123 | |
29 | msgid "Brightness (min: -1.0, max: 1.0)" | |
30 | msgstr "Luminositat (min : -1.0, max : 1.0)" | |
31 | ||
32 | #: prefs.js:151 | |
33 | msgid "Contrast (min: -1.0, max: 1.0)" | |
34 | msgstr "Contraste (min: -1.0, max : 1.0)" | |
35 | ||
36 | #: prefs.js:179 | |
37 | msgid "Icon size (min: 0, max: 96)" | |
38 | msgstr "Talha dāicĆ²na (min : 0, max : 96)" | |
39 | ||
40 | #: prefs.js:207 | |
41 | msgid "Tray horizontal alignment" | |
42 | msgstr "Alinhament orizontal del tirador" | |
43 | ||
44 | #: prefs.js:212 | |
45 | msgid "Center" | |
46 | msgstr "Centre" | |
47 | ||
48 | #: prefs.js:213 | |
49 | msgid "Left" | |
50 | msgstr "EsquĆØrra" | |
51 | ||
52 | #: prefs.js:214 | |
53 | msgid "Right" | |
54 | msgstr "Drecha" | |
55 | ||
56 | #: prefs.js:259 | |
57 | msgid "Indicator ID" | |
58 | msgstr "ID indicador" | |
59 | ||
60 | #: prefs.js:260 | |
61 | msgid "Icon Name" | |
62 | msgstr "Nom de l'icĆ²na" | |
63 | ||
64 | #: prefs.js:261 | |
65 | msgid "Attention Icon Name" | |
66 | msgstr "Nom de lāicĆ²na dāatencion" | |
67 | ||
68 | #: prefs.js:336 | |
69 | msgid "Preferences" | |
70 | msgstr "PreferƩncias" | |
71 | ||
72 | #: prefs.js:338 | |
73 | msgid "Custom Icons" | |
74 | msgstr "IcĆ²nas personalizadas" | |
75 | ||
76 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:5 | |
77 | msgid "Saturation" | |
78 | msgstr "Saturacion" | |
79 | ||
80 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:9 | |
81 | msgid "Brightness" | |
82 | msgstr "Luminositat" | |
83 | ||
84 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:13 | |
85 | msgid "Contrast" | |
86 | msgstr "Contraste" | |
87 | ||
88 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:17 | |
89 | msgid "Opacity" | |
90 | msgstr "Opacitat" | |
91 | ||
92 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:21 | |
93 | msgid "Icon size" | |
94 | msgstr "Talha de las icĆ²nas" | |
95 | ||
96 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:22 | |
97 | msgid "Icon size in pixel" | |
98 | msgstr "Talha de las icĆ²nas en pixĆØl" | |
99 | ||
100 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:26 | |
101 | msgid "Icon spacing" | |
102 | msgstr "EspaƧament de las icĆ²nas" | |
103 | ||
104 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:27 | |
105 | msgid "Icon spacing within the tray" | |
106 | msgstr "EspaƧament de las icĆ²nas dedins lo tirador" | |
107 | ||
108 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:31 | |
109 | msgid "Position in tray" | |
110 | msgstr "Posicion pel tirador" | |
111 | ||
112 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 | |
113 | msgid "Set where the Icon tray should appear in Gnome tray" | |
114 | msgstr "Indica se lāicĆ²na del tirador deu aparĆ©isser pel panĆØl Gnome" | |
115 | ||
116 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 | |
117 | msgid "Order in tray" | |
118 | msgstr "Ćrdre dins lo tirador" | |
119 | ||
120 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 | |
121 | msgid "Set where the Icon tray should appear among other trays" | |
122 | msgstr "DefinĆs se lāicĆ²na del tirador deu aparĆ©isser demest los autres panĆØls" | |
123 | ||
124 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 | |
125 | msgid "Custom icons" | |
126 | msgstr "IcĆ²nas personalizadas" | |
127 | ||
128 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:42 | |
129 | msgid "Replace any icons with custom icons from themes" | |
130 | msgstr "RemplaƧar quina icĆ²na que siĆ” per una icĆ²na personalizada dels tĆØmas" |
7 | 7 | "Project-Id-Version: AppIndicatorExtension\n" |
8 | 8 | "Report-Msgid-Bugs-To: \n" |
9 | 9 | "POT-Creation-Date: 2021-09-27 20:43+0200\n" |
10 | "PO-Revision-Date: 2022-02-06 11:22+0100\n" | |
10 | "PO-Revision-Date: 2022-04-09 12:26+0200\n" | |
11 | 11 | "Language-Team: \n" |
12 | 12 | "MIME-Version: 1.0\n" |
13 | 13 | "Content-Type: text/plain; charset=UTF-8\n" |
111 | 111 | |
112 | 112 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:32 |
113 | 113 | msgid "Set where the Icon tray should appear in Gnome tray" |
114 | msgstr "Nastavte, kde sa majĆŗ ikony na liÅ”te zobrazovaÅ„" | |
114 | msgstr "Nastavte, kde na liÅ”te sa mĆ” liÅ”ta ikon zobrazovaÅ„" | |
115 | 115 | |
116 | 116 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:36 |
117 | 117 | msgid "Order in tray" |
119 | 119 | |
120 | 120 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:37 |
121 | 121 | msgid "Set where the Icon tray should appear among other trays" |
122 | msgstr "Nastavte, kde sa majĆŗ ikony na liÅ”te zobrazovaÅ„ vzhľadom na ostatnĆ© ikony" | |
122 | msgstr "Nastavte, kde medzi ostatnĆ½mi liÅ”tami sa mĆ” liÅ”ta ikon zobrazovaÅ„" | |
123 | 123 | |
124 | 124 | #: schemas/org.gnome.shell.extensions.appindicator.gschema.xml:41 |
125 | 125 | msgid "Custom icons" |
0 | 0 | project('gnome-shell-ubuntu-appindicators', |
1 | version : '42', | |
1 | version : '43', | |
2 | 2 | meson_version : '>= 0.53', |
3 | 3 | license: 'GPL2', |
4 | 4 | ) |
5 | 5 | "3.38", |
6 | 6 | "40", |
7 | 7 | "41", |
8 | "42" | |
8 | "42", | |
9 | "43" | |
9 | 10 | ], |
10 | 11 | "gettext-domain": "AppIndicatorExtension", |
11 | 12 | "settings-schema": "org.gnome.shell.extensions.appindicator", |
43 | 43 | constructor(watchDog) { |
44 | 44 | this._watchDog = watchDog; |
45 | 45 | this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(Interfaces.StatusNotifierWatcher, this); |
46 | this._dbusImpl.export(Gio.DBus.session, WATCHER_OBJECT); | |
46 | try { | |
47 | this._dbusImpl.export(Gio.DBus.session, WATCHER_OBJECT); | |
48 | } catch (e) { | |
49 | Util.Logger.warn(`Failed to export ${WATCHER_OBJECT}`); | |
50 | logError(e); | |
51 | } | |
47 | 52 | this._cancellable = new Gio.Cancellable(); |
48 | 53 | this._everAcquiredName = false; |
49 | 54 | this._ownName = Gio.DBus.session.own_name(WATCHER_BUS_NAME, |
52 | 57 | this._lostName.bind(this)); |
53 | 58 | this._items = new Map(); |
54 | 59 | |
55 | this._dbusImpl.emit_signal('StatusNotifierHostRegistered', null); | |
60 | try { | |
61 | this._dbusImpl.emit_signal('StatusNotifierHostRegistered', null); | |
62 | } catch (e) { | |
63 | Util.Logger.warn(`Failed to notify registered host ${WATCHER_OBJECT}`); | |
64 | } | |
65 | ||
56 | 66 | this._seekStatusNotifierItems().catch(e => { |
57 | 67 | if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) |
58 | 68 | logError(e, 'Looking for StatusNotifierItem\'s'); |
104 | 114 | // if the desktop is not ready delay the icon creation and signal emissions |
105 | 115 | await Util.waitForStartupCompletion(indicator.cancellable); |
106 | 116 | const statusIcon = new IndicatorStatusIcon.IndicatorStatusIcon(indicator); |
117 | IndicatorStatusIcon.addIconToPanel(statusIcon); | |
107 | 118 | indicator.connect('destroy', () => statusIcon.destroy()); |
108 | 119 | |
109 | 120 | this._dbusImpl.emit_signal('StatusNotifierItemRegistered', |
204 | 215 | indicator.destroy(); |
205 | 216 | this._items.delete(id); |
206 | 217 | |
207 | this._dbusImpl.emit_signal('StatusNotifierItemUnregistered', | |
208 | GLib.Variant.new('(s)', [uniqueId])); | |
209 | this._dbusImpl.emit_property_changed('RegisteredStatusNotifierItems', | |
210 | GLib.Variant.new('as', this.RegisteredStatusNotifierItems)); | |
218 | try { | |
219 | this._dbusImpl.emit_signal('StatusNotifierItemUnregistered', | |
220 | GLib.Variant.new('(s)', [uniqueId])); | |
221 | this._dbusImpl.emit_property_changed('RegisteredStatusNotifierItems', | |
222 | GLib.Variant.new('as', this.RegisteredStatusNotifierItems)); | |
223 | } catch (e) { | |
224 | Util.Logger.warn(`Failed to emit signals: ${e}`); | |
225 | } | |
211 | 226 | } |
212 | 227 | |
213 | 228 | RegisterStatusNotifierHostAsync(_service, invocation) { |
234 | 249 | } |
235 | 250 | |
236 | 251 | destroy() { |
237 | if (!this._isDestroyed) { | |
238 | // this doesn't do any sync operation and doesn't allow us to hook up the event of being finished | |
239 | // which results in our unholy debounce hack (see extension.js) | |
240 | Array.from(this._items.keys()).forEach(i => this._remove(i)); | |
252 | if (this._isDestroyed) | |
253 | return; | |
254 | ||
255 | // this doesn't do any sync operation and doesn't allow us to hook up | |
256 | // the event of being finished which results in our unholy debounce hack | |
257 | // (see extension.js) | |
258 | Array.from(this._items.keys()).forEach(i => this._remove(i)); | |
259 | this._cancellable.cancel(); | |
260 | ||
261 | try { | |
241 | 262 | this._dbusImpl.emit_signal('StatusNotifierHostUnregistered', null); |
242 | Gio.DBus.session.unown_name(this._ownName); | |
243 | this._cancellable.cancel(); | |
263 | } catch (e) { | |
264 | Util.Logger.warn(`Failed to emit uinregistered signal: ${e}`); | |
265 | } | |
266 | ||
267 | Gio.DBus.session.unown_name(this._ownName); | |
268 | ||
269 | try { | |
244 | 270 | this._dbusImpl.unexport(); |
245 | delete this._items; | |
246 | this._isDestroyed = true; | |
247 | } | |
271 | } catch (e) { | |
272 | Util.Logger.warn(`Failed to unexport watcher object: ${e}`); | |
273 | } | |
274 | ||
275 | delete this._items; | |
276 | this._isDestroyed = true; | |
248 | 277 | } |
249 | 278 | }; |
47 | 47 | Util.connectSmart(this._tray, 'tray-icon-removed', this, this.onTrayIconRemoved); |
48 | 48 | |
49 | 49 | this._tray.manage_screen(Main.panel); |
50 | this._icons = []; | |
51 | 50 | } |
52 | 51 | |
53 | 52 | onTrayIconAdded(_tray, icon) { |
54 | 53 | const trayIcon = new IndicatorStatusIcon.IndicatorStatusTrayIcon(icon); |
55 | this._icons.push(trayIcon); | |
56 | trayIcon.connect('destroy', () => | |
57 | this._icons.splice(this._icons.indexOf(trayIcon), 1)); | |
54 | IndicatorStatusIcon.addIconToPanel(trayIcon); | |
58 | 55 | } |
59 | 56 | |
60 | 57 | onTrayIconRemoved(_tray, icon) { |
61 | icon.destroy(); | |
58 | try { | |
59 | const [trayIcon] = IndicatorStatusIcon.getTrayIcons().filter(i => i.icon === icon); | |
60 | trayIcon.destroy(); | |
61 | } catch (e) { | |
62 | Util.Logger.warning(`No icon container found for ${icon.title} (${icon})`); | |
63 | } | |
62 | 64 | } |
63 | 65 | |
64 | 66 | destroy() { |
65 | 67 | this.emit('destroy'); |
66 | this._icons.forEach(i => i.destroy()); | |
68 | IndicatorStatusIcon.getTrayIcons().forEach(i => i.destroy()); | |
67 | 69 | if (this._tray.unmanage_screen) { |
68 | 70 | this._tray.unmanage_screen(); |
69 | 71 | this._tray = null; |
15 | 15 | |
16 | 16 | /* exported refreshPropertyOnProxy, getUniqueBusName, getBusNames, |
17 | 17 | introspectBusObject, dbusNodeImplementsInterfaces, waitForStartupCompletion, |
18 | connectSmart, versionCheck, getDefaultTheme, BUS_ADDRESS_REGEX */ | |
19 | ||
18 | connectSmart, versionCheck, getDefaultTheme, tryCleanupOldIndicators, | |
19 | getProcessName, ensureProxyAsyncMethod, BUS_ADDRESS_REGEX */ | |
20 | ||
21 | const ByteArray = imports.byteArray; | |
20 | 22 | const Gio = imports.gi.Gio; |
21 | 23 | const GLib = imports.gi.GLib; |
22 | 24 | const Gtk = imports.gi.Gtk; |
29 | 31 | const Config = imports.misc.config; |
30 | 32 | const ExtensionUtils = imports.misc.extensionUtils; |
31 | 33 | const Extension = ExtensionUtils.getCurrentExtension(); |
34 | const IndicatorStatusIcon = Extension.imports.indicatorStatusIcon; | |
32 | 35 | const Params = imports.misc.params; |
33 | 36 | const PromiseUtils = Extension.imports.promiseUtils; |
34 | 37 | const Signals = imports.signals; |
36 | 39 | var BUS_ADDRESS_REGEX = /([a-zA-Z0-9._-]+\.[a-zA-Z0-9.-]+)|(:[0-9]+\.[0-9]+)$/; |
37 | 40 | |
38 | 41 | PromiseUtils._promisify(Gio.DBusConnection.prototype, 'call', 'call_finish'); |
42 | PromiseUtils._promisify(Gio._LocalFilePrototype, 'read', 'read_finish'); | |
43 | PromiseUtils._promisify(Gio.InputStream.prototype, 'read_bytes_async', 'read_bytes_finish'); | |
39 | 44 | |
40 | 45 | async function refreshPropertyOnProxy(proxy, propertyName, params) { |
41 | 46 | if (!proxy._proxyCancellables) |
156 | 161 | } |
157 | 162 | |
158 | 163 | return uniqueNames; |
164 | } | |
165 | ||
166 | async function getProcessId(connectionName, cancellable = null, bus = Gio.DBus.session) { | |
167 | const res = await bus.call('org.freedesktop.DBus', '/', | |
168 | 'org.freedesktop.DBus', 'GetConnectionUnixProcessID', | |
169 | new GLib.Variant('(s)', [connectionName]), | |
170 | new GLib.VariantType('(u)'), | |
171 | Gio.DBusCallFlags.NONE, | |
172 | -1, | |
173 | cancellable); | |
174 | const [pid] = res.deepUnpack(); | |
175 | return pid; | |
176 | } | |
177 | ||
178 | // This can be removed when we will have GNOME 43 as minimum version | |
179 | function ensureProxyAsyncMethod(proxy, method) { | |
180 | if (proxy[`${method}Async`]) | |
181 | return; | |
182 | ||
183 | if (!proxy[`${method}Remote`]) | |
184 | throw new Error(`Missing remote method '${method}'`); | |
185 | ||
186 | proxy[`${method}Async`] = function (...args) { | |
187 | return new Promise((resolve, reject) => { | |
188 | this[`${method}Remote`](...args, (ret, e) => { | |
189 | if (e) | |
190 | reject(e); | |
191 | else | |
192 | resolve(ret); | |
193 | }); | |
194 | }); | |
195 | }; | |
196 | } | |
197 | ||
198 | async function getProcessName(connectionName, cancellable = null, | |
199 | priority = GLib.PRIORITY_DEFAULT, bus = Gio.DBus.session) { | |
200 | const pid = await getProcessId(connectionName, cancellable, bus); | |
201 | const cmdFile = Gio.File.new_for_path(`/proc/${pid}/cmdline`); | |
202 | const inputStream = await cmdFile.read_async(priority, cancellable); | |
203 | const bytes = await inputStream.read_bytes_async(2048, priority, cancellable); | |
204 | return ByteArray.toString(bytes.toArray().map(v => !v ? 0x20 : v)); | |
159 | 205 | } |
160 | 206 | |
161 | 207 | async function introspectBusObject(bus, name, cancellable, path = undefined) { |
379 | 425 | } |
380 | 426 | return false; |
381 | 427 | } |
428 | ||
429 | function tryCleanupOldIndicators() { | |
430 | const indicatorType = IndicatorStatusIcon.BaseStatusIcon; | |
431 | const indicators = Object.values(Main.panel.statusArea).filter(i => i instanceof indicatorType); | |
432 | ||
433 | try { | |
434 | const panelBoxes = [ | |
435 | Main.panel._leftBox, Main.panel._centerBox, Main.panel._rightBox, | |
436 | ]; | |
437 | ||
438 | panelBoxes.forEach(box => | |
439 | indicators.push(...box.get_children().filter(i => i instanceof indicatorType))); | |
440 | } catch (e) { | |
441 | logError(e); | |
442 | } | |
443 | ||
444 | new Set(indicators).forEach(i => i.destroy()); | |
445 | } |