5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-07 16:32:26 +08:00
Commit Graph

47 Commits

Author SHA1 Message Date
Lea Anthony
e668c81806
Improved panic handling. Added guide. 2025-01-16 22:08:18 +11:00
Gabriel Lima
5481f3a684
[linux] fix: update for new events syntax (#3734)
Changed uses of deprecated `.On` to the current standard.
2024-09-08 20:22:42 +10:00
Lea Anthony
5cde12b42a
Refactored Events (#3731)
Experimental rename
2024-09-07 16:39:02 +10:00
stendler
88c9017fdc
[v3,linux] fix: enable to run natively in wayland (#3614)
fix: enable to run natively in wayland

Incorporated from this v2 change:
https://github.com/wailsapp/wails/pull/1811
2024-08-25 21:39:22 +10:00
Lea Anthony
cd3b561623 Fix errors with raising errors! 2024-08-04 19:19:40 +10:00
Atterpac
76da9e55c9
Add fatalHandler() stubs to fix non-windows builds (#3642) 2024-07-29 19:32:15 +10:00
Travis McLane
cfe2424f4d
WindowDidMove / WindowDidResize events for Linux and Windows
* [linux] emit system specific event for theme change

Code was incorrectly emitting the `events.Common.ThemeChanged` event
instead of the OS Specific `events.Linux.SystemThemeChanged` event.
It is the reponsibility of the code in events_common_linux.go to map
it to the common variety.

* [linux] implement WindowDidMove

* [linux] implement debounce for WindowDidMove

* [example] listen for events.Common.WindowDidMove

* [windows] move WindowDidMove mapper outside of DnD guard

* WindowDidResize implementation

* windows: WindowDidResize

* chore: changelog update

* events.Common.WindowDidMove and events.Common.WindowDidResize
2024-06-30 16:11:45 -05:00
Travis McLane
45195d5bd6
linux: theme handling bugfix (#3515)
* linux: theme handling bugfix

* update changelog
2024-05-28 11:06:30 -05:00
Lea Anthony
e424a85a99
Menu improvements (#3492)
* Expose `DefaultApplicationMenu`.
Add `FindByLabel` and `ItemAt` for finding menu items in a menu

* Add `Menu.RemoveMenuItem()`, `MneuItem.GetAccelerator()` and `MenuItem.RemoveAccelerator()`

* Remove `Update`

* Iterate when removing menu items

* Add `GetSubmenu()`
2024-05-20 21:15:02 +10:00
Travis McLane
735b6b6c87 noop: remove Println for events.Linux.ApplicationStartup 2024-05-02 15:31:49 -05:00
abichinger
7c921d6a81
[v3 alpha] implement setIcon on linux (#3354)
* implement `linuxApp.setIcon`

* Move code into `linux_cgo.go`
2024-04-09 11:04:54 -05:00
Lea Anthony
aba82cc527 Update system.Environment 2024-03-19 20:37:03 +11:00
Lea Anthony
98aff7778e Support ProgramName on linux 2024-03-17 21:09:20 +11:00
Travis McLane
6d90c1678c move install_signal_handlers to proper location 2024-03-06 16:59:13 -06:00
Lea Anthony
a7fb568aff Fix signal handlers 2024-03-06 16:59:13 -06:00
Lea Anthony
02a1b540ce [WIP] refactor CGO methods 2024-03-06 15:43:50 -06:00
Lea Anthony
a048233f4c Added menu cloning.
Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
2024-03-06 15:40:28 -06:00
Lea Anthony
758c4c2c8d Refactor Linux application handling in webview
This update introduces a LinuxOptions struct for Linux-specific application configurations and refines webview for Linux. The 'windows' map has been renamed to 'windowMap' to avoid confusion. Moreover, a method to unregister Windows has been added to ensure the Linux application automatically quits when the last window closes, unless explicitly disabled in the new LinuxOptions structure. Reset Window position after hiding. Some debug output has been removed.
2024-03-06 11:52:06 -06:00
Lea Anthony
84e1bb4d9b Improve Linux application events and refactor app method receivers
This commit includes the addition of common events for the Linux platform. Refactored and standardized the method receivers for the application from 'm' to 'l'. Also, the application startup events in the window example have been updated according to the new naming scheme.
2024-03-06 11:48:26 -06:00
Lea Anthony
4cd4b46772 [WIP] refactor CGO methods 2024-03-06 11:42:19 -06:00
Lea Anthony
3d93c83920 Added menu cloning.
Introduced the ability to clone a menu, along with its submenus, in Linux-based web applications to create a full deep copy. This fixes reusing the application menu for window menus.
2024-03-06 11:42:19 -06:00
Lea Anthony
809863d61a Refactor Linux application handling in webview
This update introduces a LinuxOptions struct for Linux-specific application configurations and refines webview for Linux. The 'windows' map has been renamed to 'windowMap' to avoid confusion. Moreover, a method to unregister Windows has been added to ensure the Linux application automatically quits when the last window closes, unless explicitly disabled in the new LinuxOptions structure. Reset Window position after hiding. Some debug output has been removed.
2024-03-06 11:42:19 -06:00
Lea Anthony
05b16f1d63 Improve Linux application events and refactor app method receivers
This commit includes the addition of common events for the Linux platform. Refactored and standardized the method receivers for the application from 'm' to 'l'. Also, the application startup events in the window example have been updated according to the new naming scheme.
2024-03-06 11:42:19 -06:00
Lea Anthony
bfa53dfd6c Update windowSetupSignalHandlers & linux events 2024-03-06 11:42:19 -06:00
Lea Anthony
861ddea1b2
Add option to prevent application shutdown
This update allows the application shutdown to be cancelled. It implements the shouldQuit function, which can prevent the application from quitting if it returns false. Additional checks have been added to ensure cleanup and quit processes are performed only if required. The darwin delegate and linux and windows applications were modified to include this new functionality.
2024-01-17 20:45:30 +11:00
Lea Anthony
0b48c3456b
[linux] Add webkit version detection + capabilities 2023-11-12 08:21:31 +11:00
Travis McLane
27c4c5e6f6 [v3 linux] bail early if bad dbus message
Need at least two elements to decide what theme it is and if it is
a theme message at all.

Addresses #3040
2023-11-08 22:41:35 -06:00
Travis McLane
a773da2651 [v3 linux] use dbus for monitoring theme changes 2023-11-06 10:49:14 -06:00
Travis McLane
0cd64d1fbc [v3 linux] noop: remove commented code 2023-11-06 10:41:14 -06:00
Travis McLane
495da9b292 [v3 linux] implement logPlatformInfo 2023-11-06 10:41:14 -06:00
Lea Anthony
c77c823c3c Revert "[linux] Implement events"
This reverts commit 8ddd29d285.
2023-10-07 12:21:49 +11:00
Travis McLane
dbcf65b2d6 Revert "Merge branch 'v3-alpha-linux-systray' into v3-alpha"
This reverts commit 92b26488da, reversing
changes made to 1c48d567e1.
2023-10-05 08:34:12 -05:00
Lea Anthony
8ddd29d285
[linux] Implement events 2023-10-03 08:37:11 +11:00
Travis McLane
efa67cb01c [v3 linux] systray implementation
Linux requires a `gtk_menu_bar` for a gtk_window to display a menu.
For the `systray` a `gtk_menu` is needed instead.
This change creates the correct type of `impl` for the `Menu`
depending on how it is being used.
2023-09-28 14:50:38 -05:00
Lea Anthony
7cdab16ba9
Add API docs. Do small refactors 2023-09-24 08:57:40 +10:00
Travis McLane
2f7c6834d0 [v3 linux] use invokeSync 2023-09-11 17:12:57 -05:00
Travis McLane
4804b34208
[v3 linux] api changes (#2830) 2023-08-19 06:12:34 +10:00
Lea Anthony
6cbead5bfe
Improved logging++ 2023-08-13 16:52:39 +10:00
Lea Anthony
dc865404a9
[v3] Initial hooks implementation 2023-07-12 20:31:13 +10:00
Travis McLane
d52c26e82f [v3 linux] implement missing functions 2023-06-23 21:50:51 -05:00
Travis McLane
bef454f950 [v3 linux] initial linux implementation 2023-06-23 21:50:51 -05:00
Travis McLane
94e1ec91ad Revert "Merge branch 'v3-alpha_linux' into v3-alpha"
This reverts commit b317efaf2c, reversing
changes made to 29b9c5200f.
2023-06-23 21:50:51 -05:00
Travis McLane
17647e2c2f [linux/cgo] hide/show implementation 2023-05-10 09:10:03 -05:00
Travis McLane
41aef27631 [linux] use getNativeApplication 2023-05-10 09:10:03 -05:00
Travis McLane
be2d616190 [linux] getNativeApplication 2023-05-10 09:10:03 -05:00
Travis McLane
9453a60254 [linux] window registration + default menu 2023-05-10 09:10:03 -05:00
Travis McLane
68cfd130d3 [linux/cgo] initial implementation 2023-05-10 09:10:03 -05:00