From 3d9dcbcf877c1bf48cd85a1fd132bec5e9bbd7ad Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Tue, 2 Mar 2021 07:30:47 -0300 Subject: [PATCH] Valac think that getters are always owned by the struct --- .../api/include/gobject/winrt-toast-notification.h | 8 ++++---- .../api/src/gobject/winrt-toast-notification.cpp | 12 ++++++------ .../vapi/winrt_windows_ui_notifications.vapi | 7 +++++-- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/plugins/windows-notification/api/include/gobject/winrt-toast-notification.h b/plugins/windows-notification/api/include/gobject/winrt-toast-notification.h index dfcb639c..eb5ccdf8 100644 --- a/plugins/windows-notification/api/include/gobject/winrt-toast-notification.h +++ b/plugins/windows-notification/api/include/gobject/winrt-toast-notification.h @@ -34,11 +34,11 @@ winrtWindowsUINotificationsToastNotification* winrt_windows_ui_notifications_toa void winrt_windows_ui_notifications_toast_notification_set_ExpiresOnReboot(winrtWindowsUINotificationsToastNotification* self, gboolean value); gboolean winrt_windows_ui_notifications_toast_notification_get_ExpiresOnReboot(winrtWindowsUINotificationsToastNotification* self); -void winrt_windows_ui_notifications_toast_notification_set_Tag(winrtWindowsUINotificationsToastNotification* self, const gchar* value); -gchar* winrt_windows_ui_notifications_toast_notification_get_Tag(winrtWindowsUINotificationsToastNotification* self); +void winrt_windows_ui_notifications_toast_notification_SetTag(winrtWindowsUINotificationsToastNotification* self, const gchar* value); +gchar* winrt_windows_ui_notifications_toast_notification_GetTag(winrtWindowsUINotificationsToastNotification* self); -void winrt_windows_ui_notifications_toast_notification_set_Group(winrtWindowsUINotificationsToastNotification* self, const gchar* value); -gchar* winrt_windows_ui_notifications_toast_notification_get_Group(winrtWindowsUINotificationsToastNotification* self); +void winrt_windows_ui_notifications_toast_notification_SetGroup(winrtWindowsUINotificationsToastNotification* self, const gchar* value); +gchar* winrt_windows_ui_notifications_toast_notification_GetGroup(winrtWindowsUINotificationsToastNotification* self); winrtEventToken* winrt_windows_ui_notifications_toast_notification_Activated(winrtWindowsUINotificationsToastNotification* self, NotificationCallbackActivated callback, void* context, void(*free)(void*)); void winrt_windows_ui_notifications_toast_notification_RemoveActivated(winrtWindowsUINotificationsToastNotification* self, winrtEventToken* token); diff --git a/plugins/windows-notification/api/src/gobject/winrt-toast-notification.cpp b/plugins/windows-notification/api/src/gobject/winrt-toast-notification.cpp index c0018936..21404f16 100644 --- a/plugins/windows-notification/api/src/gobject/winrt-toast-notification.cpp +++ b/plugins/windows-notification/api/src/gobject/winrt-toast-notification.cpp @@ -194,7 +194,7 @@ gboolean winrt_windows_ui_notifications_toast_notification_get_ExpiresOnReboot(w return winrt_windows_ui_notifications_toast_notification_get_internal(self)->ExpiresOnReboot(); } -void winrt_windows_ui_notifications_toast_notification_set_Tag(winrtWindowsUINotificationsToastNotification* self, const char* value) +void winrt_windows_ui_notifications_toast_notification_SetTag(winrtWindowsUINotificationsToastNotification* self, const char* value) { g_return_if_fail (WINRT_IS_WINDOWS_UI_NOTIFICATIONS_TOAST_NOTIFICATION (self)); @@ -202,21 +202,21 @@ void winrt_windows_ui_notifications_toast_notification_set_Tag(winrtWindowsUINot } /** - * winrt_windows_ui_notifications_toast_notification_get_Tag: + * winrt_windows_ui_notifications_toast_notification_GetTag: * @manager: a #winrtWindowsUINotificationsToastNotification * * Returns the value of the tag * * Returns: (transfer full): the value */ -char* winrt_windows_ui_notifications_toast_notification_get_Tag(winrtWindowsUINotificationsToastNotification* self) +char* winrt_windows_ui_notifications_toast_notification_GetTag(winrtWindowsUINotificationsToastNotification* self) { g_return_val_if_fail (WINRT_IS_WINDOWS_UI_NOTIFICATIONS_TOAST_NOTIFICATION (self), FALSE); return wsview_to_char(winrt_windows_ui_notifications_toast_notification_get_internal(self)->Tag()); } -void winrt_windows_ui_notifications_toast_notification_set_Group(winrtWindowsUINotificationsToastNotification* self, const char* value) +void winrt_windows_ui_notifications_toast_notification_SetGroup(winrtWindowsUINotificationsToastNotification* self, const char* value) { g_return_if_fail (WINRT_IS_WINDOWS_UI_NOTIFICATIONS_TOAST_NOTIFICATION (self)); @@ -224,14 +224,14 @@ void winrt_windows_ui_notifications_toast_notification_set_Group(winrtWindowsUIN } /** - * winrt_windows_ui_notifications_toast_notification_get_Group: + * winrt_windows_ui_notifications_toast_notification_GetGroup: * @manager: a #winrtWindowsUINotificationsToastNotification * * Returns the value of the group * * Returns: (transfer full): the value */ -char* winrt_windows_ui_notifications_toast_notification_get_Group(winrtWindowsUINotificationsToastNotification* self) +char* winrt_windows_ui_notifications_toast_notification_GetGroup(winrtWindowsUINotificationsToastNotification* self) { g_return_val_if_fail (WINRT_IS_WINDOWS_UI_NOTIFICATIONS_TOAST_NOTIFICATION (self), FALSE); diff --git a/plugins/windows-notification/vapi/winrt_windows_ui_notifications.vapi b/plugins/windows-notification/vapi/winrt_windows_ui_notifications.vapi index 7902bc3c..9966b3b5 100644 --- a/plugins/windows-notification/vapi/winrt_windows_ui_notifications.vapi +++ b/plugins/windows-notification/vapi/winrt_windows_ui_notifications.vapi @@ -37,8 +37,6 @@ namespace winrt.Windows.UI.Notifications { public class ToastNotification : GLib.Object { public ToastNotification(string doc); public bool ExpiresOnReboot { get; set; } - public string Tag { get; set; } // TODO: check if valac is cleaning this string - public string Group { get; set; } public EventToken Activated(owned NotificationCallbackActivated handler); public void RemoveActivated(EventToken token); @@ -48,6 +46,11 @@ namespace winrt.Windows.UI.Notifications { public EventToken Dismissed(owned NotificationCallbackDismissed handler); public void RemoveDismissed(EventToken token); + + public string GetTag(); + public void SetTag(string tag); + public string GetGroup(); + public void SetGroup(string group); } [CCode (type_id = "winrt_windows_ui_notifications_toast_notifier_get_type ()")]