Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gtk] implement date picke #284

Merged
merged 10 commits into from
Mar 20, 2024

Conversation

lytico
Copy link
Owner

@lytico lytico commented Mar 20, 2024

Description of Change

implement DatePicker

cherry picked from nblockchain#7

Issues Fixed

Fixes #

webwarrior-ws and others added 10 commits March 20, 2024 01:47
Fix potential exception if DatePicker is used
many times quickly:

```
    (GWallet.Frontend.Maui:110296): GLib-GObject-CRITICAL **: 12:14:36.625: g_object_remove_toggle_ref: assertion 'G_IS_OBJECT (object)' failed

    (GWallet.Frontend.Maui:110296): GLib-GObject-CRITICAL **: 12:14:36.627: g_object_remove_toggle_ref: assertion 'G_IS_OBJECT (object)' failed
    Marshaling button-press-event signal
    Exception in Gtk# callback delegate
      Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
    GLib.MissingIntPtrCtorException: Unable to construct instance of type Microsoft.Maui.Platform.DatePickerWindow from native object handle. Instance of managed subclass may have been prematurely disposed.
       at GLib.ObjectManager.CreateObject(IntPtr raw)
       at GLib.Object.GetObject(IntPtr o, Boolean owned_ref)
       at GLib.Value.get_Val()
       at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
       at GLib.ExceptionManager.RaiseUnhandledException(Exception e, Boolean is_terminal)
       at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
       at GLib.Application.Run(String program_name, String[] args)
       at GLib.Application.Run()
       at Microsoft.Maui.MauiGtkApplication.Launch(EventArgs args) in /home/ubuntu/geewallet-build/geewallet/dependencies/maui/src/Core/src/Platform/Gtk/MauiGtkApplication.cs:line 127
       at Microsoft.Maui.MauiGtkApplication.Run(String[] args) in /home/ubuntu/geewallet-build/geewallet/dependencies/maui/src/Core/src/Platform/Gtk/MauiGtkApplication.cs:line 40
       at GWallet.Frontend.Maui.Program.main(String[] _args) in /home/ubuntu/geewallet-build/geewallet/src/GWallet.Frontend.Maui/Platforms/Gtk/Program.fs:line 14
```

By using Hide instead of Destroy.

(cherry picked from commit 7ff3c3a)
Fix position of calendar pop-up when opened more than one time.

(cherry picked from commit 1dcf7a9)
Avoid excessive firing of OnDateTimeChanged events when
creating DatePickerWindow.

(cherry picked from commit a1efe23)
Update calendar properties SelectedDate, MinimumDate,
MaximumDate when opening calendar popup when it is already
created but hidden.

(cherry picked from commit fe92c90)
DatePicker window location was wrong when we didn't use
x11 GdkBackend. This problem was fixed by setting the
TransientFor property.

Co-authored-by: webwarrior-ws <[email protected]>
(cherry picked from commit 0032339)
Replace deprecated methods.
Used Entry icon instead of defining a new button for datepicker
arrow.

Co-authored-by: webwarrior-ws <[email protected]>
(cherry picked from commit 8c3d7c2)
@lytico lytico merged commit 3a3a0ab into lytico/gtk-ongoing Mar 20, 2024
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants