Skip to content

Commit 38cfd2b

Browse files
committed
Updated iconview application launcher and context menu (#51)
1 parent e56519c commit 38cfd2b

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/adapters/ui/iconview.js

+13-5
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,16 @@ export class DesktopIconView extends EventEmitter {
161161
}
162162
},
163163

164-
openEntry: ({entry}) => {
164+
openEntry: ({entry, forceDialog}) => {
165165
if (entry.isDirectory) {
166166
this.core.run('FileManager', {
167167
path: entry
168168
});
169169
} else {
170-
this.core.open(entry, {useDefault: false});
170+
this.core.open(entry, {
171+
useDefault: true,
172+
forceDialog
173+
});
171174
}
172175

173176
return {selected: -1};
@@ -209,13 +212,18 @@ export class DesktopIconView extends EventEmitter {
209212
}
210213

211214
createFileContextMenu(ev, entry) {
215+
const _ = this.core.make('osjs/locale').translate;
216+
212217
this.core.make('osjs/contextmenu', {
213218
position: ev,
214219
menu: [{
215-
label: 'Open',
216-
onclick: () => this.iconview.openEntry(({entry}))
220+
label: _('LBL_OPEN'),
221+
onclick: () => this.iconview.openEntry({entry, forceDialog: false})
222+
}, {
223+
label: _('LBL_OPEN_WITH'),
224+
onclick: () => this.iconview.openEntry({entry, forceDialog: true})
217225
}, {
218-
label: 'Remove',
226+
label: _('LBL_DELETE'),
219227
onclick: () => this.iconview.removeEntry(entry)
220228
}]
221229
});

0 commit comments

Comments
 (0)