Closed mahsashadi closed 3 years ago
Just change your initial window title, i.e. in the window option where it takes the title from metadata normally.
Here's a handy function:
function setWindowTitleSuffixed(core, proc, win) {
// This also does translations... nice!
const {translatableFlat} = this.core.make('osjs/locale');
const prefix = translatableFlat(proc.metadata.title);
return (suffix) => suffix ? win.setTitle(`${prefix} - ${suffix}`) : prefix
}
// usage
const setTitle = setWindowTitleSuffixed(core, proc, win)
setTitle('something') // -> 'Application Name - something'
You can use that for your basic application as well (this is actually very close to what it does internally). If you wanna override that behaviour, you can just hook into the instance:
basic.updateWindowTitle = function() {
// this.win here
}
Just change your initial window title
Oops! sorry,I did not check the win.setTitle() function.
Here's a handy function:
Thanks a lot :+1:
I need some text to be added beside application name in window header.
when I open a file in my application, with open dialog it will be done, but I need the same when I open my application through right-click on file in file-manager application.