New upstream version 19.01
Iain Lane
5 years ago
8 | 8 | ## How to contribute? |
9 | 9 | * Download the code |
10 | 10 | * Build with Meson (see at the next section) |
11 | * Log out & log in from your user session. Alternatively, just restart the computer. | |
11 | 12 | * Activate the extension in GNOME Tweaks |
12 | 13 | |
13 | 14 | ## Build with Meson |
54 | 54 | REDO: 2, |
55 | 55 | }; |
56 | 56 | |
57 | var StoredCoordinates = { | |
58 | PRESERVE: 0, | |
59 | OVERWRITE:1, | |
60 | }; | |
61 | ||
57 | 62 | class Placeholder extends St.Bin { |
58 | 63 | constructor() { |
59 | 64 | super(); |
86 | 91 | can_focus: true, |
87 | 92 | opacity: 255 |
88 | 93 | }); |
89 | this.actor.add_actor(this._grid); | |
94 | this.actor.add_child(this._grid); | |
90 | 95 | |
91 | 96 | this._renamePopup = new RenamePopup(this); |
92 | this.actor.add_actor(this._renamePopup.actor); | |
93 | ||
94 | this._bgManager._container.add_actor(this.actor); | |
97 | this.actor.add_child(this._renamePopup.actor); | |
98 | ||
99 | this._bgManager._container.add_child(this.actor); | |
95 | 100 | |
96 | 101 | this.actor.connect('destroy', () => this._onDestroy()); |
97 | 102 | |
108 | 113 | () => this._backgroundDestroyed()); |
109 | 114 | |
110 | 115 | this._grid.connect('button-press-event', (actor, event) => this._onPressButton(actor, event)); |
111 | this._rubberBand = new St.Widget({ style_class: 'rubber-band' }); | |
112 | this._rubberBand.hide(); | |
113 | Main.layoutManager.uiGroup.add_actor(this._rubberBand); | |
114 | 116 | |
115 | 117 | this._grid.connect('key-press-event', this._onKeyPress.bind(this)); |
116 | 118 | |
151 | 153 | else if (symbol == Clutter.Delete) { |
152 | 154 | Extension.desktopManager.doTrash(); |
153 | 155 | return Clutter.EVENT_STOP; |
156 | } else if (symbol == Clutter.F2) { | |
157 | // Support renaming other grids file items. | |
158 | Extension.desktopManager.doRename(); | |
159 | return Clutter.EVENT_STOP; | |
154 | 160 | } |
155 | 161 | |
156 | 162 | return Clutter.EVENT_PROPAGATE; |
174 | 180 | this._bgManager.backgroundActor.disconnect(this._bgDestroyedId); |
175 | 181 | this._bgDestroyedId = 0; |
176 | 182 | this._bgManager = null; |
177 | this._rubberBand.destroy(); | |
178 | 183 | } |
179 | 184 | |
180 | 185 | _omNewFolderClicked() { |
278 | 283 | } |
279 | 284 | |
280 | 285 | _onOpenTerminalClicked() { |
281 | let desktopUri = DesktopIconsUtil.getDesktopDir().get_uri(); | |
282 | let command = DesktopIconsUtil.getTerminalCommand(desktopUri); | |
286 | let desktopPath = DesktopIconsUtil.getDesktopDir().get_path(); | |
287 | let command = DesktopIconsUtil.getTerminalCommand(desktopPath); | |
283 | 288 | |
284 | 289 | Util.spawnCommandLine(command); |
285 | 290 | } |
303 | 308 | this._undoMenuItem = menu.addAction(_("Undo"), () => this._onUndoClicked()); |
304 | 309 | this._redoMenuItem = menu.addAction(_("Redo"), () => this._onRedoClicked()); |
305 | 310 | menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); |
306 | menu.addAction(_("Open Desktop in Files"), () => this._onOpenDesktopInFilesClicked()); | |
307 | menu.addAction(_("Open Terminal"), () => this._onOpenTerminalClicked()); | |
311 | menu.addAction(_("Show Desktop in Files"), () => this._onOpenDesktopInFilesClicked()); | |
312 | menu.addAction(_("Open in Terminal"), () => this._onOpenTerminalClicked()); | |
308 | 313 | menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); |
309 | 314 | menu.addSettingsAction(_("Change Background…"), 'gnome-background-panel.desktop'); |
315 | menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); | |
310 | 316 | menu.addSettingsAction(_("Display Settings"), 'gnome-display-panel.desktop'); |
311 | 317 | menu.addSettingsAction(_("Settings"), 'gnome-control-center.desktop'); |
312 | 318 | |
313 | 319 | menu.actor.add_style_class_name('background-menu'); |
314 | 320 | |
315 | Main.layoutManager.uiGroup.add_actor(menu.actor); | |
321 | Main.layoutManager.uiGroup.add_child(menu.actor); | |
316 | 322 | menu.actor.hide(); |
317 | 323 | |
318 | 324 | menu._propertiesChangedId = DBusUtils.NautilusFileOperationsProxy.connect('g-properties-changed', |
346 | 352 | this.actor._desktopBackgroundManager.ignoreRelease(); |
347 | 353 | } |
348 | 354 | |
349 | dropItems(fileItems) { | |
350 | let reserved = {}; | |
351 | for (let fileItem of fileItems) { | |
352 | let [dropX, dropY] = (fileItem.savedCoordinates == null) ? [0, 0] : fileItem.savedCoordinates; | |
353 | let [column, row] = this._getEmptyPlaceClosestTo(dropX, dropY, reserved); | |
354 | let placeholder = this.layout.get_child_at(column, row); | |
355 | let hashedPosition = `${column},${row}`; | |
356 | if (hashedPosition in reserved) | |
357 | continue; | |
358 | ||
359 | reserved[`${column},${row}`] = fileItem; | |
360 | placeholder.child = fileItem.actor; | |
361 | this._addFileItemTo(fileItem, column, row); | |
362 | } | |
363 | } | |
364 | ||
365 | _addFileItemTo(fileItem, column, row) { | |
355 | _addFileItemTo(fileItem, column, row, overwriteCoordinates) { | |
366 | 356 | let placeholder = this.layout.get_child_at(column, row); |
367 | 357 | placeholder.child = fileItem.actor; |
368 | 358 | this._fileItems.push(fileItem); |
369 | 359 | let selectedId = fileItem.connect('selected', this._onFileItemSelected.bind(this)); |
370 | let renameId = fileItem.connect('rename-clicked', this._onFileItemRenameClicked.bind(this)); | |
360 | let renameId = fileItem.connect('rename-clicked', this.doRename.bind(this)); | |
371 | 361 | this._fileItemHandlers.set(fileItem, [selectedId, renameId]); |
362 | ||
372 | 363 | /* If this file is new in the Desktop and hasn't yet |
373 | 364 | * fixed coordinates, store the new possition to ensure |
374 | * that the next time it will be shown in the same possition | |
365 | * that the next time it will be shown in the same possition. | |
366 | * Also store the new possition if it has been moved by the user, | |
367 | * and not triggered by a screen change. | |
375 | 368 | */ |
376 | if (fileItem.savedCoordinates == null) { | |
369 | if ((fileItem.savedCoordinates == null) || (overwriteCoordinates == StoredCoordinates.OVERWRITE)) { | |
377 | 370 | let [fileX, fileY] = placeholder.get_transformed_position(); |
378 | 371 | fileItem.savedCoordinates = [Math.round(fileX), Math.round(fileY)]; |
379 | 372 | } |
380 | 373 | } |
381 | 374 | |
382 | addFileItemCloseTo(fileItem, x, y) { | |
383 | let [column, row] = this._getEmptyPlaceClosestTo(x, y, null); | |
384 | this._addFileItemTo(fileItem, column, row); | |
385 | } | |
386 | ||
387 | _getEmptyPlaceClosestTo(x, y, reserved) { | |
375 | addFileItemCloseTo(fileItem, x, y, overwriteCoordinates) { | |
376 | let [column, row] = this._getEmptyPlaceClosestTo(x, y); | |
377 | this._addFileItemTo(fileItem, column, row, overwriteCoordinates); | |
378 | } | |
379 | ||
380 | _getEmptyPlaceClosestTo(x, y) { | |
388 | 381 | let maxColumns = this._getMaxColumns(); |
389 | 382 | let maxRows = this._getMaxRows(); |
390 | 383 | |
408 | 401 | if (placeholder.child != null) |
409 | 402 | continue; |
410 | 403 | |
411 | if (reserved && `${column},${row}` in reserved) | |
412 | continue; | |
413 | ||
414 | 404 | let [proposedX, proposedY] = placeholder.get_transformed_position(); |
415 | 405 | let distance = DesktopIconsUtil.distanceBetweenPoints(proposedX, proposedY, x, y); |
416 | 406 | if (distance < minDistance) { |
453 | 443 | } |
454 | 444 | |
455 | 445 | reset() { |
456 | for (let fileItem of this._fileItems) | |
446 | let tmpFileItemsCopy = this._fileItems.slice(); | |
447 | for (let fileItem of tmpFileItemsCopy) | |
457 | 448 | this.removeFileItem(fileItem); |
458 | 449 | this._grid.remove_all_children(); |
459 | 450 | |
553 | 544 | this._grid.grab_key_focus(); |
554 | 545 | } |
555 | 546 | |
556 | _onFileItemRenameClicked(fileItem) { | |
547 | doRename(fileItem) { | |
557 | 548 | this._renamePopup.onFileItemRenameClicked(fileItem); |
558 | 549 | } |
559 | 550 | }; |
585 | 576 | let renameButtonsBoxLayout = new Clutter.BoxLayout({ homogeneous: true }); |
586 | 577 | let renameButtonsBox = new St.Widget({ layout_manager: renameButtonsBoxLayout, |
587 | 578 | x_expand: true }); |
588 | renameButtonsBox.add_actor(this._renameCancelButton); | |
589 | renameButtonsBox.add_actor(this._renameOkButton); | |
579 | renameButtonsBox.add_child(this._renameCancelButton); | |
580 | renameButtonsBox.add_child(this._renameOkButton); | |
590 | 581 | |
591 | 582 | let renameContentLayout = new Clutter.BoxLayout({ spacing: 6, |
592 | 583 | orientation: Clutter.Orientation.VERTICAL }); |
593 | 584 | let renameContent = new St.Widget({ style_class: 'rename-popup', |
594 | 585 | layout_manager: renameContentLayout, |
595 | 586 | x_expand: true }); |
596 | renameContent.add_actor(this._renameEntry); | |
597 | renameContent.add_actor(renameButtonsBox); | |
587 | renameContent.add_child(this._renameEntry); | |
588 | renameContent.add_child(renameButtonsBox); | |
598 | 589 | |
599 | 590 | this._boxPointer = new BoxPointer.BoxPointer(St.Side.TOP, { can_focus: false, x_expand: true }); |
600 | 591 | this.actor = this._boxPointer.actor; |
50 | 50 | function getExtraFolders() { |
51 | 51 | let extraFolders = new Array(); |
52 | 52 | if (Prefs.settings.get_boolean('show-home')) { |
53 | extraFolders.push([Gio.File.new_for_commandline_arg(GLib.get_home_dir()), Prefs.FILE_TYPE.USER_DIRECTORY_HOME]); | |
53 | extraFolders.push([Gio.File.new_for_commandline_arg(GLib.get_home_dir()), Prefs.FileType.USER_DIRECTORY_HOME]); | |
54 | 54 | } |
55 | 55 | if (Prefs.settings.get_boolean('show-trash')) { |
56 | extraFolders.push([Gio.File.new_for_uri('trash:///'), Prefs.FILE_TYPE.USER_DIRECTORY_TRASH]); | |
56 | extraFolders.push([Gio.File.new_for_uri('trash:///'), Prefs.FileType.USER_DIRECTORY_TRASH]); | |
57 | 57 | } |
58 | 58 | return extraFolders; |
59 | 59 | } |
69 | 69 | |
70 | 70 | this._layoutChildrenId = 0; |
71 | 71 | this._deleteChildrenId = 0; |
72 | this._scheduleDesktopsRefreshId = 0; | |
73 | 72 | this._monitorDesktopDir = null; |
74 | 73 | this._desktopMonitorCancellable = null; |
75 | 74 | this._desktopGrids = {}; |
83 | 82 | this._monitorsChangedId = Main.layoutManager.connect('monitors-changed', () => this._recreateDesktopIcons()); |
84 | 83 | this._rubberBand = new St.Widget({ style_class: 'rubber-band' }); |
85 | 84 | this._rubberBand.hide(); |
86 | Main.layoutManager.uiGroup.add_actor(this._rubberBand); | |
85 | Main.layoutManager.uiGroup.add_child(this._rubberBand); | |
87 | 86 | this._grabHelper = new GrabHelper.GrabHelper(global.stage); |
88 | ||
89 | if (this.writableByOthers) | |
90 | log(`desktop-icons: Desktop is writable by others - will not allow launching any desktop files`); | |
91 | 87 | |
92 | 88 | this._addDesktopIcons(); |
93 | 89 | this._monitorDesktopFolder(); |
239 | 235 | let resultGenerator = function *() { |
240 | 236 | let info; |
241 | 237 | while ((info = fileEnum.next_file(null))) |
242 | yield [fileEnum.get_child(info), info, Prefs.FILE_TYPE.NONE]; | |
238 | yield [fileEnum.get_child(info), info, Prefs.FileType.NONE]; | |
243 | 239 | for (let [newFolder, extras] of DesktopIconsUtil.getExtraFolders()) { |
244 | 240 | yield [newFolder, newFolder.query_info(DesktopIconsUtil.DEFAULT_ATTRIBUTES, Gio.FileQueryInfoFlags.NONE, this._desktopEnumerateCancellable), extras]; |
245 | 241 | } |
321 | 317 | this._unixMode = info.get_attribute_uint32(Gio.FILE_ATTRIBUTE_UNIX_MODE); |
322 | 318 | this._setWritableByOthers((this._unixMode & S_IWOTH) != 0); |
323 | 319 | |
324 | if (this.writableByOthers) | |
320 | if (this._writableByOthers) | |
325 | 321 | log(`desktop-icons: Desktop is writable by others - will not allow launching any desktop files`); |
326 | 322 | } catch(error) { |
327 | 323 | if (!error.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) |
332 | 328 | return; |
333 | 329 | } |
334 | 330 | |
335 | // Rate limiting isn't enough, as one action will create different events on the same file. | |
336 | // limit by adding a timeout | |
337 | if (this._scheduleDesktopsRefreshId) { | |
338 | return; | |
339 | } | |
340 | ||
341 | 331 | // Only get a subset of events we are interested in. |
342 | 332 | // Note that CREATED will emit a CHANGES_DONE_HINT |
343 | 333 | if (![DELETED, MOVED_IN, MOVED_OUT, CREATED].includes(eventType)) |
344 | 334 | return; |
345 | 335 | |
346 | 336 | this._recreateDesktopIcons(); |
347 | } | |
348 | ||
349 | _getContainerWithChild(child) { | |
350 | let monitorIndex = Main.layoutManager.findIndexForActor(child); | |
351 | let desktopGrid = this._desktopGrids[monitorIndex]; | |
352 | let children = desktopGrid.actor.get_children(); | |
353 | ||
354 | if (children.some(x => x.child == child)) | |
355 | return desktopGrid; | |
356 | else | |
357 | throw new Error('Missmatch between expected items in a desktop grid not found'); | |
358 | 337 | } |
359 | 338 | |
360 | 339 | _setupDnD() { |
397 | 376 | }); |
398 | 377 | clone.x = fileItem.actor.get_transformed_position()[0]; |
399 | 378 | clone.y = fileItem.actor.get_transformed_position()[1]; |
400 | this._draggableContainer.add_actor(clone); | |
379 | this._draggableContainer.add_child(clone); | |
401 | 380 | } |
402 | 381 | |
403 | 382 | Main.layoutManager.uiGroup.add_child(this._draggableContainer); |
493 | 472 | * them. |
494 | 473 | */ |
495 | 474 | for (let item of this._selection) { |
496 | let [itemX, itemY] = (item.savedCoordinates == null) ? [0, 0] : item.savedCoordinates; | |
475 | let [itemX, itemY] = item.actor.get_transformed_position(); | |
497 | 476 | let monitorIndex = findMonitorIndexForPos(itemX, itemY); |
498 | savedCoordinates.set(item, item.actor.get_transformed_position()); | |
477 | savedCoordinates.set(item, [itemX, itemY]); | |
499 | 478 | this._desktopGrids[monitorIndex].removeFileItem(item); |
479 | } | |
480 | ||
481 | for (let item of this._selection) { | |
482 | let [itemX, itemY] = savedCoordinates.get(item); | |
500 | 483 | /* Set the new ideal position where the item drop should happen */ |
501 | let newfileX = Math.round(xDiff + itemX); | |
502 | let newfileY = Math.round(yDiff + itemY); | |
503 | item.savedCoordinates = [newfileX, newfileY]; | |
504 | } | |
505 | ||
506 | for (let key in this._desktopGrids) { | |
507 | /* Create list of items to drop per desktop. We want to drop them at | |
508 | * once so calculations for the dropping per grid are smoother | |
509 | */ | |
510 | let itemsForDropDesktop = [...this._selection].filter( | |
511 | (x) => { | |
512 | let [itemX, itemY] = (x.savedCoordinates == null) ? [0, 0] : x.savedCoordinates; | |
513 | let monitorIndex = findMonitorIndexForPos(itemX, itemY); | |
514 | return key == monitorIndex; | |
515 | } | |
516 | ); | |
517 | ||
518 | this._desktopGrids[key].dropItems(itemsForDropDesktop); | |
484 | let newFileX = Math.round(xDiff + itemX); | |
485 | let newFileY = Math.round(yDiff + itemY); | |
486 | let monitorIndex = findMonitorIndexForPos(newFileX, newFileY); | |
487 | this._desktopGrids[monitorIndex].addFileItemCloseTo(item, newFileX, newFileY, DesktopGrid.StoredCoordinates.OVERWRITE); | |
519 | 488 | } |
520 | 489 | |
521 | 490 | return true; |
530 | 499 | if (fileItem.isSpecial) |
531 | 500 | return false; |
532 | 501 | if (fileItemDestination.file.get_uri() == fileItem.file.get_uri()) |
533 | continue; | |
502 | return false; | |
534 | 503 | droppedUris.push(fileItem.file.get_uri()); |
535 | 504 | } |
536 | 505 | |
581 | 550 | let monitorIndex = findMonitorIndexForPos(x, y); |
582 | 551 | let desktopGrid = this._desktopGrids[monitorIndex]; |
583 | 552 | try { |
584 | desktopGrid.addFileItemCloseTo(item, x, y); | |
553 | desktopGrid.addFileItemCloseTo(item, x, y, DesktopGrid.StoredCoordinates.PRESERVE); | |
585 | 554 | } catch (e) { |
586 | 555 | log(`Error adding children to desktop: ${e.message}`); |
587 | 556 | } |
618 | 587 | return GLib.SOURCE_REMOVE; |
619 | 588 | } |
620 | 589 | |
590 | doRename() { | |
591 | if (this._selection.size != 1) | |
592 | return; | |
593 | ||
594 | let item = [...this._selection][0]; | |
595 | if (item.canRename()) | |
596 | item.doRename(); | |
597 | } | |
598 | ||
621 | 599 | doOpen() { |
622 | 600 | for (let fileItem of this._selection) |
623 | 601 | fileItem.doOpen(); |
63 | 63 | this._thumbnailScriptWatch = 0; |
64 | 64 | this._setMetadataCancellable = null; |
65 | 65 | this._queryFileInfoCancellable = null; |
66 | this._isSpecial = this._fileExtra != Prefs.FILE_TYPE.NONE; | |
66 | this._isSpecial = this._fileExtra != Prefs.FileType.NONE; | |
67 | 67 | |
68 | 68 | this._file = file; |
69 | 69 | |
90 | 90 | y_expand: true, |
91 | 91 | x_align: Clutter.ActorAlign.FILL, |
92 | 92 | vertical: true }); |
93 | this.actor.add_actor(this._container); | |
93 | this.actor.set_child(this._container); | |
94 | 94 | this._icon = new St.Bin(); |
95 | 95 | this._icon.set_height(Prefs.get_icon_size() * scaleFactor); |
96 | 96 | |
97 | 97 | this._iconContainer = new St.Bin({ visible: true }); |
98 | 98 | this._iconContainer.child = this._icon; |
99 | this._container.add_actor(this._iconContainer); | |
99 | this._container.add_child(this._iconContainer); | |
100 | 100 | |
101 | 101 | this._label = new St.Label({ |
102 | 102 | style_class: 'name-label' |
103 | 103 | }); |
104 | 104 | |
105 | this._container.add_actor(this._label); | |
105 | this._container.add_child(this._label); | |
106 | 106 | let clutterText = this._label.get_clutter_text(); |
107 | 107 | /* TODO: Convert to gobject.set for 3.30 */ |
108 | 108 | clutterText.set_line_wrap(true); |
137 | 137 | this._primaryButtonPressed = false; |
138 | 138 | if (this._attributeCanExecute && !this._isDesktopFile) |
139 | 139 | this._execLine = this.file.get_path(); |
140 | if (fileExtra == Prefs.FILE_TYPE.USER_DIRECTORY_TRASH) { | |
140 | if (fileExtra == Prefs.FileType.USER_DIRECTORY_TRASH) { | |
141 | 141 | // if this icon is the trash, monitor the state of the directory to update the icon |
142 | 142 | this._trashChanged = false; |
143 | 143 | this._trashInitializeCancellable = null; |
248 | 248 | |
249 | 249 | this._fileType = fileInfo.get_file_type(); |
250 | 250 | this._isDirectory = this._fileType == Gio.FileType.DIRECTORY; |
251 | this._isSpecial = this._fileExtra != Prefs.FILE_TYPE.NONE; | |
251 | this._isSpecial = this._fileExtra != Prefs.FileType.NONE; | |
252 | 252 | this._attributeHidden = fileInfo.get_is_hidden(); |
253 | 253 | this._isSymlink = fileInfo.get_is_symlink(); |
254 | 254 | this._modifiedTime = this._fileInfo.get_attribute_uint64("time::modified"); |
267 | 267 | } |
268 | 268 | |
269 | 269 | _updateIcon() { |
270 | if (this._fileExtra == Prefs.FILE_TYPE.USER_DIRECTORY_TRASH) { | |
270 | if (this._fileExtra == Prefs.FileType.USER_DIRECTORY_TRASH) { | |
271 | 271 | this._icon.child = this._createEmblemedStIcon(this._fileInfo.get_icon(), null); |
272 | 272 | return; |
273 | 273 | } |
411 | 411 | } |
412 | 412 | |
413 | 413 | doRename() { |
414 | if (!this.canRename()) { | |
415 | log (`Error: ${this.file.get_uri()} cannot be renamed`); | |
416 | return; | |
417 | } | |
418 | ||
414 | 419 | this.emit('rename-clicked'); |
415 | 420 | } |
416 | 421 | |
540 | 545 | } |
541 | 546 | } |
542 | 547 | |
548 | canRename() { | |
549 | return !this.trustedDesktopFile && this._fileExtra == Prefs.FileType.NONE; | |
550 | } | |
551 | ||
543 | 552 | _createMenu() { |
544 | 553 | this._menuManager = new PopupMenu.PopupMenuManager({ actor: this.actor }); |
545 | 554 | let side = St.Side.LEFT; |
548 | 557 | this._menu = new PopupMenu.PopupMenu(this.actor, 0.5, side); |
549 | 558 | this._menu.addAction(_('Open'), () => this.doOpen()); |
550 | 559 | switch (this._fileExtra) { |
551 | case Prefs.FILE_TYPE.NONE: | |
560 | case Prefs.FileType.NONE: | |
552 | 561 | this._actionCut = this._menu.addAction(_('Cut'), () => this._onCutClicked()); |
553 | 562 | this._actionCopy = this._menu.addAction(_('Copy'), () => this._onCopyClicked()); |
554 | if (!this.trustedDesktopFile) | |
555 | this._menu.addAction(_('Rename'), () => this.doRename()); | |
563 | if (this.canRename()) | |
564 | this._menu.addAction(_('Rename…'), () => this.doRename()); | |
556 | 565 | this._actionTrash = this._menu.addAction(_('Move to Trash'), () => this._onMoveToTrashClicked()); |
557 | 566 | if (this._isDesktopFile && !Extension.desktopManager.writableByOthers && !this._writableByOthers) { |
558 | 567 | this._menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); |
561 | 570 | |
562 | 571 | } |
563 | 572 | break; |
564 | case Prefs.FILE_TYPE.USER_DIRECTORY_TRASH: | |
573 | case Prefs.FileType.USER_DIRECTORY_TRASH: | |
565 | 574 | this._menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); |
566 | 575 | this._menu.addAction(_('Empty Trash'), () => this._onEmptyTrashClicked()); |
567 | 576 | break; |
572 | 581 | this._menu.addAction(_('Properties'), () => this._onPropertiesClicked()); |
573 | 582 | this._menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); |
574 | 583 | this._menu.addAction(_('Show in Files'), () => this._onShowInFilesClicked()); |
584 | if (this._isDirectory && this.file.get_path() != null) | |
585 | this._actionOpenInTerminal = this._menu.addAction(_('Open in Terminal'), () => this._onOpenTerminalClicked()); | |
586 | ||
575 | 587 | this._menuManager.addMenu(this._menu); |
576 | 588 | |
577 | Main.layoutManager.uiGroup.add_actor(this._menu.actor); | |
589 | Main.layoutManager.uiGroup.add_child(this._menu.actor); | |
578 | 590 | this._menu.actor.hide(); |
591 | } | |
592 | ||
593 | _onOpenTerminalClicked () { | |
594 | let command = DesktopIconsUtil.getTerminalCommand(this.file.get_path()); | |
595 | Util.spawnCommandLine(command); | |
579 | 596 | } |
580 | 597 | |
581 | 598 | _onPressButton(actor, event) { |
0 | {"name": "Desktop Icons", "description": "Add icons to the desktop", "uuid": "desktop-icons@csoriano", "shell-version": ["3.28.0", "3.30.0"]} | |
0 | {"name": "Desktop Icons", "description": "Add icons to the desktop", "uuid": "desktop-icons@csoriano", "shell-version": ["3.30.0"]} |
2 | 2 | # This file is distributed under the same license as the PACKAGE package. |
3 | 3 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
4 | 4 | # Sergio Costas <rastersoft@gmail.com>, 2018. |
5 | # Daniel Mustieles <daniel.mustieles@gmail.com>, 2018. | |
5 | # Daniel Mustieles <daniel.mustieles@gmail.com>, 2018, 2019. | |
6 | 6 | # |
7 | 7 | msgid "" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
10 | 10 | "Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/ShellExtensions/desktop-" |
11 | 11 | "icons/issues\n" |
12 | "POT-Creation-Date: 2018-11-29 09:07+0000\n" | |
13 | "PO-Revision-Date: 2018-11-30 09:33+0100\n" | |
12 | "POT-Creation-Date: 2018-12-14 09:12+0000\n" | |
13 | "PO-Revision-Date: 2019-01-08 16:12+0100\n" | |
14 | 14 | "Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n" |
15 | 15 | "Language-Team: es <gnome-es-list@gnome.org>\n" |
16 | 16 | "Language: es\n" |
20 | 20 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" |
21 | 21 | "X-Generator: Gtranslator 2.91.7\n" |
22 | 22 | |
23 | #: prefs.js:93 | |
23 | #: prefs.js:102 | |
24 | 24 | msgid "Size for the desktop icons" |
25 | 25 | msgstr "Tamaño de los iconos del escritorio" |
26 | 26 | |
27 | #: prefs.js:93 | |
27 | #: prefs.js:102 | |
28 | 28 | msgid "Small" |
29 | 29 | msgstr "Pequeño" |
30 | 30 | |
31 | #: prefs.js:93 | |
31 | #: prefs.js:102 | |
32 | 32 | msgid "Standard" |
33 | 33 | msgstr "Estándar" |
34 | 34 | |
35 | #: prefs.js:93 | |
35 | #: prefs.js:102 | |
36 | 36 | msgid "Large" |
37 | 37 | msgstr "Grande" |
38 | 38 | |
39 | #: prefs.js:93 | |
39 | #: prefs.js:102 | |
40 | 40 | msgid "Huge" |
41 | 41 | msgstr "Inmenso" |
42 | 42 | |
43 | #: prefs.js:94 | |
43 | #: prefs.js:103 | |
44 | 44 | msgid "Show the personal folder in the desktop" |
45 | 45 | msgstr "Mostrar la carpeta personal en el escritorio" |
46 | 46 | |
47 | #: prefs.js:95 | |
47 | #: prefs.js:104 | |
48 | 48 | msgid "Show the trash icon in the desktop" |
49 | 49 | msgstr "Mostrar la papelera en el escritorio" |
50 | 50 | |
51 | #: desktopGrid.js:185 desktopGrid.js:304 | |
51 | #: desktopGrid.js:182 desktopGrid.js:301 | |
52 | 52 | msgid "New Folder" |
53 | 53 | msgstr "Nueva carpeta" |
54 | 54 | |
55 | #: desktopGrid.js:306 | |
55 | #: desktopGrid.js:303 | |
56 | 56 | msgid "Paste" |
57 | 57 | msgstr "Pegar" |
58 | 58 | |
59 | #: desktopGrid.js:307 | |
59 | #: desktopGrid.js:304 | |
60 | 60 | msgid "Undo" |
61 | 61 | msgstr "Deshacer" |
62 | 62 | |
63 | #: desktopGrid.js:308 | |
63 | #: desktopGrid.js:305 | |
64 | 64 | msgid "Redo" |
65 | 65 | msgstr "Rehacer" |
66 | 66 | |
67 | #: desktopGrid.js:310 | |
67 | #: desktopGrid.js:307 | |
68 | 68 | msgid "Open Desktop in Files" |
69 | 69 | msgstr "Abrir el escritorio en Files" |
70 | 70 | |
71 | #: desktopGrid.js:311 | |
71 | #: desktopGrid.js:308 | |
72 | 72 | msgid "Open Terminal" |
73 | 73 | msgstr "Abrir un terminal" |
74 | 74 | |
75 | #: desktopGrid.js:313 | |
75 | #: desktopGrid.js:310 | |
76 | 76 | msgid "Change Background…" |
77 | 77 | msgstr "Cambiar el fondo..." |
78 | 78 | |
79 | #: desktopGrid.js:314 | |
79 | #: desktopGrid.js:311 | |
80 | 80 | msgid "Display Settings" |
81 | 81 | msgstr "Configuración de pantalla" |
82 | 82 | |
83 | #: desktopGrid.js:315 | |
83 | #: desktopGrid.js:312 | |
84 | 84 | msgid "Settings" |
85 | 85 | msgstr "Configuración" |
86 | 86 | |
87 | #: desktopGrid.js:569 | |
87 | #: desktopGrid.js:568 | |
88 | 88 | msgid "Enter file name…" |
89 | 89 | msgstr "Introduzca el nombre del archivo…" |
90 | 90 | |
91 | #: desktopGrid.js:573 | |
92 | msgid "Ok" | |
91 | #: desktopGrid.js:572 | |
92 | msgid "OK" | |
93 | 93 | msgstr "Aceptar" |
94 | 94 | |
95 | #: desktopGrid.js:579 | |
95 | #: desktopGrid.js:578 | |
96 | 96 | msgid "Cancel" |
97 | 97 | msgstr "Cancelar" |
98 | 98 | |
99 | #: fileItem.js:393 | |
99 | #: fileItem.js:485 | |
100 | msgid "Don’t Allow Launching" | |
101 | msgstr "No permitir lanzar" | |
102 | ||
103 | #: fileItem.js:487 | |
104 | msgid "Allow Launching" | |
105 | msgstr "Permitir lanzar" | |
106 | ||
107 | #: fileItem.js:550 | |
100 | 108 | msgid "Open" |
101 | 109 | msgstr "Abrir" |
102 | 110 | |
103 | #: fileItem.js:396 | |
111 | #: fileItem.js:553 | |
104 | 112 | msgid "Cut" |
105 | 113 | msgstr "Cortar" |
106 | 114 | |
107 | #: fileItem.js:397 | |
115 | #: fileItem.js:554 | |
108 | 116 | msgid "Copy" |
109 | 117 | msgstr "Copiar" |
110 | 118 | |
111 | #: fileItem.js:398 | |
119 | #: fileItem.js:556 | |
112 | 120 | msgid "Rename" |
113 | 121 | msgstr "Renombrar" |
114 | 122 | |
115 | #: fileItem.js:399 | |
123 | #: fileItem.js:557 | |
116 | 124 | msgid "Move to Trash" |
117 | 125 | msgstr "Mover a la papelera" |
118 | 126 | |
119 | #: fileItem.js:403 | |
120 | #| msgid "Empty trash" | |
127 | #: fileItem.js:567 | |
121 | 128 | msgid "Empty Trash" |
122 | 129 | msgstr "Vaciar la papelera" |
123 | 130 | |
124 | #: fileItem.js:409 | |
131 | #: fileItem.js:573 | |
125 | 132 | msgid "Properties" |
126 | 133 | msgstr "Propiedades" |
127 | 134 | |
128 | #: fileItem.js:411 | |
135 | #: fileItem.js:575 | |
129 | 136 | msgid "Show in Files" |
130 | 137 | msgstr "Mostrar en Files" |
131 | 138 | |
153 | 160 | msgid "Show the trash icon in the desktop." |
154 | 161 | msgstr "Mostrar la papelera en el escritorio." |
155 | 162 | |
163 | #~ msgid "Ok" | |
164 | #~ msgstr "Aceptar" | |
165 | ||
156 | 166 | #~ msgid "huge" |
157 | 167 | #~ msgstr "inmenso" |
158 | 168 |
1 | 1 | # Copyright (C) 2018 desktop-icons's COPYRIGHT HOLDER |
2 | 2 | # This file is distributed under the same license as the desktop-icons package. |
3 | 3 | # ghentdebian <ghent.debian@gmail.com>, 2018. |
4 | # Charles Monzat <charles.monzat@numericable.fr>, 2018. | |
4 | 5 | # |
5 | 6 | msgid "" |
6 | 7 | msgstr "" |
7 | 8 | "Project-Id-Version: desktop-icons master\n" |
8 | 9 | "Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/ShellExtensions/desktop-" |
9 | 10 | "icons/issues\n" |
10 | "POT-Creation-Date: 2018-11-29 09:07+0000\n" | |
11 | "PO-Revision-Date: 2018-11-30 10:21+0100\n" | |
12 | "Last-Translator: ghentdebian <ghent.debian@gmail.com>\n" | |
13 | "Language-Team: French <gnomefr@traduc.org>\n" | |
11 | "POT-Creation-Date: 2018-12-14 09:12+0000\n" | |
12 | "PO-Revision-Date: 2018-12-16 17:47+0100\n" | |
13 | "Last-Translator: Charles Monzat <charles.monzat@numericable.fr>\n" | |
14 | "Language-Team: GNOME French Team <gnomefr@traduc.org>\n" | |
14 | 15 | "Language: fr\n" |
15 | 16 | "MIME-Version: 1.0\n" |
16 | 17 | "Content-Type: text/plain; charset=UTF-8\n" |
17 | 18 | "Content-Transfer-Encoding: 8bit\n" |
18 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" | |
19 | "X-Generator: Poedit 2.2\n" | |
19 | "Plural-Forms: nplurals=2; plural=(n > 1)\n" | |
20 | "X-Generator: Gtranslator 3.30.0\n" | |
20 | 21 | |
21 | #: prefs.js:93 | |
22 | #: prefs.js:102 | |
22 | 23 | msgid "Size for the desktop icons" |
23 | 24 | msgstr "Taille des icônes du bureau" |
24 | 25 | |
25 | #: prefs.js:93 | |
26 | #: prefs.js:102 | |
26 | 27 | msgid "Small" |
27 | 28 | msgstr "Petite" |
28 | 29 | |
29 | #: prefs.js:93 | |
30 | #: prefs.js:102 | |
30 | 31 | msgid "Standard" |
31 | 32 | msgstr "Normale" |
32 | 33 | |
33 | #: prefs.js:93 | |
34 | #: prefs.js:102 | |
34 | 35 | msgid "Large" |
35 | 36 | msgstr "Grande" |
36 | 37 | |
37 | #: prefs.js:93 | |
38 | #: prefs.js:102 | |
38 | 39 | msgid "Huge" |
39 | 40 | msgstr "Immense" |
40 | 41 | |
41 | #: prefs.js:94 | |
42 | #: prefs.js:103 | |
42 | 43 | msgid "Show the personal folder in the desktop" |
43 | 44 | msgstr "Montrer le dossier personnel sur le bureau" |
44 | 45 | |
45 | #: prefs.js:95 | |
46 | #: prefs.js:104 | |
46 | 47 | msgid "Show the trash icon in the desktop" |
47 | 48 | msgstr "Montrer la corbeille sur le bureau" |
48 | 49 | |
49 | #: desktopGrid.js:185 desktopGrid.js:304 | |
50 | #: desktopGrid.js:182 desktopGrid.js:301 | |
50 | 51 | msgid "New Folder" |
51 | 52 | msgstr "Nouveau dossier" |
52 | 53 | |
53 | #: desktopGrid.js:306 | |
54 | #: desktopGrid.js:303 | |
54 | 55 | msgid "Paste" |
55 | 56 | msgstr "Coller" |
56 | 57 | |
57 | #: desktopGrid.js:307 | |
58 | #: desktopGrid.js:304 | |
58 | 59 | msgid "Undo" |
59 | 60 | msgstr "Annuler" |
60 | 61 | |
61 | #: desktopGrid.js:308 | |
62 | #: desktopGrid.js:305 | |
62 | 63 | msgid "Redo" |
63 | 64 | msgstr "Refaire" |
64 | 65 | |
65 | #: desktopGrid.js:310 | |
66 | #: desktopGrid.js:307 | |
66 | 67 | msgid "Open Desktop in Files" |
67 | 68 | msgstr "Ouvrir le bureau dans Fichiers" |
68 | 69 | |
69 | #: desktopGrid.js:311 | |
70 | #: desktopGrid.js:308 | |
70 | 71 | msgid "Open Terminal" |
71 | 72 | msgstr "Ouvrir un terminal" |
72 | 73 | |
73 | #: desktopGrid.js:313 | |
74 | #: desktopGrid.js:310 | |
74 | 75 | msgid "Change Background…" |
75 | 76 | msgstr "Changer l’arrière-plan…" |
76 | 77 | |
77 | #: desktopGrid.js:314 | |
78 | #: desktopGrid.js:311 | |
78 | 79 | msgid "Display Settings" |
79 | 80 | msgstr "Configuration d’affichage" |
80 | 81 | |
81 | #: desktopGrid.js:315 | |
82 | #: desktopGrid.js:312 | |
82 | 83 | msgid "Settings" |
83 | 84 | msgstr "Paramètres" |
84 | 85 | |
85 | #: desktopGrid.js:569 | |
86 | #: desktopGrid.js:568 | |
86 | 87 | msgid "Enter file name…" |
87 | 88 | msgstr "Saisir un nom de fichier…" |
88 | 89 | |
89 | #: desktopGrid.js:573 | |
90 | msgid "Ok" | |
90 | #: desktopGrid.js:572 | |
91 | msgid "OK" | |
91 | 92 | msgstr "Valider" |
92 | 93 | |
93 | #: desktopGrid.js:579 | |
94 | #: desktopGrid.js:578 | |
94 | 95 | msgid "Cancel" |
95 | 96 | msgstr "Annuler" |
96 | 97 | |
97 | #: fileItem.js:393 | |
98 | #: fileItem.js:485 | |
99 | msgid "Don’t Allow Launching" | |
100 | msgstr "Ne pas autoriser le lancement" | |
101 | ||
102 | #: fileItem.js:487 | |
103 | msgid "Allow Launching" | |
104 | msgstr "Autoriser le lancement" | |
105 | ||
106 | #: fileItem.js:550 | |
98 | 107 | msgid "Open" |
99 | 108 | msgstr "Ouvrir" |
100 | 109 | |
101 | #: fileItem.js:396 | |
110 | #: fileItem.js:553 | |
102 | 111 | msgid "Cut" |
103 | 112 | msgstr "Couper" |
104 | 113 | |
105 | #: fileItem.js:397 | |
114 | #: fileItem.js:554 | |
106 | 115 | msgid "Copy" |
107 | 116 | msgstr "Copier" |
108 | 117 | |
109 | #: fileItem.js:398 | |
118 | #: fileItem.js:556 | |
110 | 119 | msgid "Rename" |
111 | 120 | msgstr "Renommer" |
112 | 121 | |
113 | #: fileItem.js:399 | |
122 | #: fileItem.js:557 | |
114 | 123 | msgid "Move to Trash" |
115 | 124 | msgstr "Mettre à la corbeille" |
116 | 125 | |
117 | #: fileItem.js:403 | |
126 | #: fileItem.js:567 | |
118 | 127 | msgid "Empty Trash" |
119 | 128 | msgstr "Vider la corbeille" |
120 | 129 | |
121 | #: fileItem.js:409 | |
130 | #: fileItem.js:573 | |
122 | 131 | msgid "Properties" |
123 | 132 | msgstr "Propriétés" |
124 | 133 | |
125 | #: fileItem.js:411 | |
134 | #: fileItem.js:575 | |
126 | 135 | msgid "Show in Files" |
127 | 136 | msgstr "Montrer dans Fichiers" |
128 | 137 | |
149 | 158 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:23 |
150 | 159 | msgid "Show the trash icon in the desktop." |
151 | 160 | msgstr "Montrer la corbeille sur le bureau." |
161 | ||
162 | #~ msgid "Ok" | |
163 | #~ msgstr "Valider" |
0 | 0 | # Polish translation for desktop-icons. |
1 | # Copyright © 2018 the desktop-icons authors. | |
1 | # Copyright © 2018-2019 the desktop-icons authors. | |
2 | 2 | # This file is distributed under the same license as the desktop-icons package. |
3 | # Piotr Drąg <piotrdrag@gmail.com>, 2018. | |
4 | # Aviary.pl <community-poland@mozilla.org>, 2018. | |
3 | # Piotr Drąg <piotrdrag@gmail.com>, 2018-2019. | |
4 | # Aviary.pl <community-poland@mozilla.org>, 2018-2019. | |
5 | 5 | # |
6 | 6 | msgid "" |
7 | 7 | msgstr "" |
8 | 8 | "Project-Id-Version: desktop-icons\n" |
9 | 9 | "Report-Msgid-Bugs-To: https://gitlab.gnome.org/World/ShellExtensions/desktop-" |
10 | 10 | "icons/issues\n" |
11 | "POT-Creation-Date: 2018-12-14 09:12+0000\n" | |
12 | "PO-Revision-Date: 2018-12-15 15:27+0100\n" | |
11 | "POT-Creation-Date: 2019-01-11 11:54+0000\n" | |
12 | "PO-Revision-Date: 2019-01-12 12:39+0100\n" | |
13 | 13 | "Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n" |
14 | 14 | "Language-Team: Polish <community-poland@mozilla.org>\n" |
15 | 15 | "Language: pl\n" |
35 | 35 | msgid "Large" |
36 | 36 | msgstr "Duży" |
37 | 37 | |
38 | #: prefs.js:102 | |
39 | msgid "Huge" | |
40 | msgstr "Wielki" | |
41 | ||
42 | 38 | #: prefs.js:103 |
43 | 39 | msgid "Show the personal folder in the desktop" |
44 | 40 | msgstr "Katalog domowy na pulpicie" |
47 | 43 | msgid "Show the trash icon in the desktop" |
48 | 44 | msgstr "Kosz na pulpicie" |
49 | 45 | |
50 | #: desktopGrid.js:182 desktopGrid.js:301 | |
46 | #: desktopGrid.js:187 desktopGrid.js:306 | |
51 | 47 | msgid "New Folder" |
52 | 48 | msgstr "Nowy katalog" |
53 | 49 | |
54 | #: desktopGrid.js:303 | |
50 | #: desktopGrid.js:308 | |
55 | 51 | msgid "Paste" |
56 | 52 | msgstr "Wklej" |
57 | 53 | |
58 | #: desktopGrid.js:304 | |
54 | #: desktopGrid.js:309 | |
59 | 55 | msgid "Undo" |
60 | 56 | msgstr "Cofnij" |
61 | 57 | |
62 | #: desktopGrid.js:305 | |
58 | #: desktopGrid.js:310 | |
63 | 59 | msgid "Redo" |
64 | 60 | msgstr "Ponów" |
65 | 61 | |
66 | #: desktopGrid.js:307 | |
67 | msgid "Open Desktop in Files" | |
68 | msgstr "Otwórz pulpit w menedżerze plików" | |
62 | #: desktopGrid.js:312 | |
63 | msgid "Show Desktop in Files" | |
64 | msgstr "Wyświetl pulpit w menedżerze plików" | |
69 | 65 | |
70 | #: desktopGrid.js:308 | |
66 | #: desktopGrid.js:313 | |
71 | 67 | msgid "Open Terminal" |
72 | 68 | msgstr "Otwórz terminal" |
73 | 69 | |
74 | #: desktopGrid.js:310 | |
70 | #: desktopGrid.js:315 | |
75 | 71 | msgid "Change Background…" |
76 | 72 | msgstr "Zmień tło…" |
77 | 73 | |
78 | #: desktopGrid.js:311 | |
74 | #: desktopGrid.js:317 | |
79 | 75 | msgid "Display Settings" |
80 | 76 | msgstr "Ustawienia ekranu" |
81 | 77 | |
82 | #: desktopGrid.js:312 | |
78 | #: desktopGrid.js:318 | |
83 | 79 | msgid "Settings" |
84 | 80 | msgstr "Ustawienia" |
85 | 81 | |
86 | #: desktopGrid.js:568 | |
82 | #: desktopGrid.js:559 | |
87 | 83 | msgid "Enter file name…" |
88 | 84 | msgstr "Nazwa pliku…" |
89 | 85 | |
90 | #: desktopGrid.js:572 | |
86 | #: desktopGrid.js:563 | |
91 | 87 | msgid "OK" |
92 | 88 | msgstr "OK" |
93 | 89 | |
94 | #: desktopGrid.js:578 | |
90 | #: desktopGrid.js:569 | |
95 | 91 | msgid "Cancel" |
96 | 92 | msgstr "Anuluj" |
97 | 93 | |
98 | #: fileItem.js:485 | |
94 | #: fileItem.js:490 | |
99 | 95 | msgid "Don’t Allow Launching" |
100 | 96 | msgstr "Nie zezwalaj na uruchamianie" |
101 | 97 | |
102 | #: fileItem.js:487 | |
98 | #: fileItem.js:492 | |
103 | 99 | msgid "Allow Launching" |
104 | 100 | msgstr "Zezwól na uruchamianie" |
105 | 101 | |
106 | #: fileItem.js:550 | |
102 | #: fileItem.js:559 | |
107 | 103 | msgid "Open" |
108 | 104 | msgstr "Otwórz" |
109 | 105 | |
110 | #: fileItem.js:553 | |
106 | #: fileItem.js:562 | |
111 | 107 | msgid "Cut" |
112 | 108 | msgstr "Wytnij" |
113 | 109 | |
114 | #: fileItem.js:554 | |
110 | #: fileItem.js:563 | |
115 | 111 | msgid "Copy" |
116 | 112 | msgstr "Skopiuj" |
117 | 113 | |
118 | #: fileItem.js:556 | |
119 | msgid "Rename" | |
120 | msgstr "Zmień nazwę" | |
114 | #: fileItem.js:565 | |
115 | msgid "Rename…" | |
116 | msgstr "Zmień nazwę…" | |
121 | 117 | |
122 | #: fileItem.js:557 | |
118 | #: fileItem.js:566 | |
123 | 119 | msgid "Move to Trash" |
124 | 120 | msgstr "Przenieś do kosza" |
125 | 121 | |
126 | #: fileItem.js:567 | |
122 | #: fileItem.js:576 | |
127 | 123 | msgid "Empty Trash" |
128 | 124 | msgstr "Opróżnij kosz" |
129 | 125 | |
130 | #: fileItem.js:573 | |
126 | #: fileItem.js:582 | |
131 | 127 | msgid "Properties" |
132 | 128 | msgstr "Właściwości" |
133 | 129 | |
134 | #: fileItem.js:575 | |
130 | #: fileItem.js:584 | |
135 | 131 | msgid "Show in Files" |
136 | 132 | msgstr "Wyświetl w menedżerze plików" |
137 | 133 | |
138 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:12 | |
134 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:11 | |
139 | 135 | msgid "Icon size" |
140 | 136 | msgstr "Rozmiar ikon" |
141 | 137 | |
142 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:13 | |
138 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:12 | |
143 | 139 | msgid "Set the size for the desktop icons." |
144 | 140 | msgstr "Ustawia rozmiar ikon na pulpicie." |
145 | 141 | |
146 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:17 | |
142 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:16 | |
147 | 143 | msgid "Show personal folder" |
148 | 144 | msgstr "Katalog domowy" |
149 | 145 | |
150 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:18 | |
146 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:17 | |
151 | 147 | msgid "Show the personal folder in the desktop." |
152 | 148 | msgstr "Wyświetla katalog domowy na pulpicie." |
153 | 149 | |
154 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:22 | |
150 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:21 | |
155 | 151 | msgid "Show trash icon" |
156 | 152 | msgstr "Kosz" |
157 | 153 | |
158 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:23 | |
154 | #: schemas/org.gnome.shell.extensions.desktop-icons.gschema.xml:22 | |
159 | 155 | msgid "Show the trash icon in the desktop." |
160 | 156 | msgstr "Wyświetla kosz na pulpicie." |
31 | 31 | const SCHEMA_GTK = 'org.gtk.Settings.FileChooser'; |
32 | 32 | const SCHEMA = 'org.gnome.shell.extensions.desktop-icons'; |
33 | 33 | |
34 | const ICON_SIZE = { 'small': 48, 'standard': 64, 'large': 96, 'huge': 128 }; | |
35 | const ICON_WIDTH = { 'small': 120, 'standard': 128, 'large': 128, 'huge': 140 }; | |
36 | const ICON_HEIGHT = { 'small': 98, 'standard': 114, 'large': 146, 'huge': 178 }; | |
34 | const ICON_SIZE = { 'small': 48, 'standard': 64, 'large': 96 }; | |
35 | const ICON_WIDTH = { 'small': 120, 'standard': 128, 'large': 128 }; | |
36 | const ICON_HEIGHT = { 'small': 98, 'standard': 114, 'large': 146 }; | |
37 | 37 | |
38 | var FILE_TYPE = { | |
38 | var FileType = { | |
39 | 39 | NONE: null, |
40 | 40 | USER_DIRECTORY_HOME: 'show-home', |
41 | 41 | USER_DIRECTORY_TRASH: 'show-trash', |
98 | 98 | |
99 | 99 | let frame = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL, border_width: 10, spacing: 10 }); |
100 | 100 | |
101 | frame.add(buildSelector('icon-size', _("Size for the desktop icons"), { 'small': _("Small"), 'standard': _("Standard"), 'large': _("Large"), 'huge': _("Huge")})); | |
101 | frame.add(buildSelector('icon-size', _("Size for the desktop icons"), { 'small': _("Small"), 'standard': _("Standard"), 'large': _("Large") })); | |
102 | 102 | frame.add(buildSwitcher('show-home', _("Show the personal folder in the desktop"))); |
103 | 103 | frame.add(buildSwitcher('show-trash', _("Show the trash icon in the desktop"))); |
104 | 104 | frame.show_all(); |
3 | 3 | <value value="0" nick="small"/> |
4 | 4 | <value value="1" nick="standard"/> |
5 | 5 | <value value="2" nick="large"/> |
6 | <value value="3" nick="huge"/> | |
7 | 6 | </enum> |
8 | 7 | <schema path="/org/gnome/shell/extensions/desktop-icons/" id="org.gnome.shell.extensions.desktop-icons"> |
9 | 8 | <key name="icon-size" enum="org.gnome.shell.extension.desktop-icons.ZoomLevel"> |
10 | <default>'large'</default> | |
9 | <default>'standard'</default> | |
11 | 10 | <summary>Icon size</summary> |
12 | 11 | <description>Set the size for the desktop icons.</description> |
13 | 12 | </key> |