mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 22:13:36 +08:00
add new programName option to linux options (#2817)
* add new programName option to linux options * modify changelog * free program name string
This commit is contained in:
parent
b48579892b
commit
e72e4aa179
@ -190,6 +190,12 @@ func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger.
|
|||||||
|
|
||||||
C.install_signal_handlers()
|
C.install_signal_handlers()
|
||||||
|
|
||||||
|
if appoptions.Linux != nil && appoptions.Linux.ProgramName != "" {
|
||||||
|
prgname := C.CString(appoptions.Linux.ProgramName)
|
||||||
|
C.g_set_prgname(prgname)
|
||||||
|
C.free(unsafe.Pointer(prgname))
|
||||||
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,15 @@ type Options struct {
|
|||||||
// - WebviewGpuPolicyOnDemand
|
// - WebviewGpuPolicyOnDemand
|
||||||
// - WebviewGpuPolicyNever
|
// - WebviewGpuPolicyNever
|
||||||
WebviewGpuPolicy WebviewGpuPolicy
|
WebviewGpuPolicy WebviewGpuPolicy
|
||||||
|
|
||||||
|
// ProgramName is used to set the program's name for the window manager via GTK's g_set_prgname().
|
||||||
|
//This name should not be localized. [see the docs]
|
||||||
|
//
|
||||||
|
//When a .desktop file is created this value helps with window grouping and desktop icons when the .desktop file's Name
|
||||||
|
//property differs form the executable's filename.
|
||||||
|
//
|
||||||
|
//[see the docs]: https://docs.gtk.org/glib/func.set_prgname.html
|
||||||
|
ProgramName string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Messages struct {
|
type Messages struct {
|
||||||
|
@ -106,6 +106,7 @@ func main() {
|
|||||||
Icon: icon,
|
Icon: icon,
|
||||||
WindowIsTranslucent: false,
|
WindowIsTranslucent: false,
|
||||||
WebviewGpuPolicy: linux.WebviewGpuPolicyAlways,
|
WebviewGpuPolicy: linux.WebviewGpuPolicyAlways,
|
||||||
|
ProgramName: "wails"
|
||||||
},
|
},
|
||||||
Debug: options.Debug{
|
Debug: options.Debug{
|
||||||
OpenInspectorOnStartup: false,
|
OpenInspectorOnStartup: false,
|
||||||
@ -898,6 +899,17 @@ Default: `WebviewGpuPolicyAlways`
|
|||||||
| WebviewGpuPolicyOnDemand | Hardware acceleration is enabled/disabled as request by web contents|
|
| WebviewGpuPolicyOnDemand | Hardware acceleration is enabled/disabled as request by web contents|
|
||||||
| WebviewGpuPolicyNever | Hardware acceleration is always disabled |
|
| WebviewGpuPolicyNever | Hardware acceleration is always disabled |
|
||||||
|
|
||||||
|
#### ProgramName
|
||||||
|
|
||||||
|
This option is used to set the program's name for the window manager via GTK's g_set_prgname().
|
||||||
|
This name should not be localized, [see the docs](https://docs.gtk.org/glib/func.set_prgname.html).
|
||||||
|
|
||||||
|
When a .desktop file is created this value helps with window grouping and desktop icons when the .desktop file's `Name`
|
||||||
|
property differs form the executable's filename.
|
||||||
|
|
||||||
|
Name: ProgramName<br/>
|
||||||
|
Type: string<br/>
|
||||||
|
|
||||||
### Debug
|
### Debug
|
||||||
|
|
||||||
This defines [Debug specific options](#Debug) that apply to debug builds.
|
This defines [Debug specific options](#Debug) that apply to debug builds.
|
||||||
|
@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Added smart functionality for the default context-menu in production with CSS styles to control it. Added by @mmghv in [PR](https://github.com/wailsapp/wails/pull/2748)
|
- Added smart functionality for the default context-menu in production with CSS styles to control it. Added by @mmghv in [PR](https://github.com/wailsapp/wails/pull/2748)
|
||||||
- Added custom error formatting to allow passing structured errors back to the frontend.
|
- Added custom error formatting to allow passing structured errors back to the frontend.
|
||||||
- Added sveltekit.mdx guide. Added by @figuerom16 in [PR](https://github.com/wailsapp/wails/pull/2771)
|
- Added sveltekit.mdx guide. Added by @figuerom16 in [PR](https://github.com/wailsapp/wails/pull/2771)
|
||||||
|
- Added ProgramName option to [linux.Options](/docs/reference/options#linux). Added by @lyimmi in [PR](https://github.com/wailsapp/wails/pull/2817)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user