mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
Merge pull request #13307 from atom/dg-windows-jump-lists
Windows taskbar recent & tasks support
This commit is contained in:
commit
07ce491dec
@ -46,6 +46,31 @@ export default class ReopenProjectMenuManager {
|
||||
this.projects = this.historyManager.getProjects().slice(0, this.config.get('core.reopenProjectMenuCount'))
|
||||
const newMenu = ReopenProjectMenuManager.createProjectsMenu(this.projects)
|
||||
this.lastProjectMenu = this.menuManager.add([newMenu])
|
||||
this.updateWindowsJumpList()
|
||||
}
|
||||
|
||||
updateWindowsJumpList () {
|
||||
if (process.platform !== 'win32') return
|
||||
|
||||
if (this.app === undefined) {
|
||||
this.app = require('remote').app
|
||||
}
|
||||
|
||||
this.app.setJumpList([
|
||||
{
|
||||
type:'custom',
|
||||
name:'Recent Projects',
|
||||
items: this.projects.map(p => ({
|
||||
type: 'task',
|
||||
title: ReopenProjectMenuManager.createLabel(p),
|
||||
program: process.execPath,
|
||||
args: p.paths.map(path => `"${path}"`).join(' ') }))
|
||||
},
|
||||
{ type: 'recent' },
|
||||
{ items: [
|
||||
{type: 'task', title: 'New Window', program: process.execPath, args: '--new-window', description: 'Opens a new Atom window'}
|
||||
]}
|
||||
])
|
||||
}
|
||||
|
||||
dispose () {
|
||||
|
@ -441,7 +441,7 @@ class Workspace extends Model
|
||||
|
||||
# Avoid adding URLs as recent documents to work-around this Spotlight crash:
|
||||
# https://github.com/atom/atom/issues/10071
|
||||
if uri? and not url.parse(uri).protocol?
|
||||
if uri? and (not url.parse(uri).protocol? or process.platform is 'win32')
|
||||
@applicationDelegate.addRecentDocument(uri)
|
||||
|
||||
pane = @paneContainer.paneForURI(uri) if searchAllPanes
|
||||
|
Loading…
Reference in New Issue
Block a user