! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Improve GObject introspection annotations
Status:
RESOLVED: MOVED

Comments

Description Olivier Duchateau 2019-02-15 18:43:27 CET
Created attachment 8298 
Improve GObject introspection annotations

This patch improves the GObject introspection annotations, otherwise some methods are not introspectables (see bug #13462).
Comment 1 Andre Miranda editbugs 2019-02-16 03:00:04 CET
Quick review:

> garcon_menu_directory_set_icon_name (GarconMenuDirectory *directory,
> -                                     const gchar         *icon_name)
> +                                     const gchar         *icon)
Any reason to rename that parameter? I think icon_name is more descriptive, is aligned with the function name and just "name" makes me think it's some sort of struct such as GIcon.

> -  static GarconMenuSeparator *separator = NULL;
> +  GarconMenuSeparator *separator = NULL;
> 
>    if (G_UNLIKELY (separator == NULL))
>      {
Why did you remove that static? Now separator will always be NULL so the if is unnecessary. Couldn't we let the code as is and annotate the returns with (transfer none)?

> + * Returns: (transfer full) (nullable): a #GarconMenu or %NULL.
> + */
> GarconMenu *
> garcon_menu_get_menu_with_name (GarconMenu  *menu,
Are you sure this one is a transfer full? (There are other get functions that I'm not sure it's supposed to be transfer full).
Comment 2 Skunnyk editbugs 2019-03-13 23:13:45 CET
Thank you for your work Olivier, really appreciated.
Can you fix or answer to Andre's review ? Then we can merge it in association with #13462
Comment 3 Git Bot editbugs 2020-05-25 22:48:24 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/garcon/-/issues/8.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #15142

Reported by:
Olivier Duchateau
Reported on: 2019-02-15
Last modified on: 2020-05-25

People

Assignee:
Jannis Pohlmann
CC List:
2 users

Version

Attachments

Improve GObject introspection annotations (22.75 KB, patch)
2019-02-15 18:43 CET , Olivier Duchateau
no flags

Additional information