Annotate Pidgin constructors that return base types
Review Request #3838 — Created Feb. 14, 2025 and submitted — Latest diff uploaded
In that case, annotating the actual type will help bindings use the correct type.
Compared the gir before and after, and types were more specific:
--- Pidgin-3.0.gir 2025-02-14 01:13:40.813791641 -0500 +++ build/pidgin/Pidgin-3.0.gir 2025-02-14 03:05:58.968098262 -0500 @@ -54,8 +54,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginabout.h" - line="58">A new instance of the about dialog.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="58">The new about dialog.</doc> + <type name="AboutDialog" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="application" @@ -100,12 +100,13 @@ <doc xml:space="preserve" filename="pidgin/pidginaccountchooser.h" line="52">Creates a combo box filled with accounts.</doc> - <source-position filename="pidgin/pidginaccountchooser.h" line="62"/> + <source-position filename="pidgin/pidginaccountchooser.h" line="63"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginaccountchooser.h" - line="57">The account chooser combo box.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="57">The new account + chooser combo box.</doc> + <type name="AccountChooser" c:type="GtkWidget*"/> </return-value> </constructor> <method name="get_filter" @@ -258,12 +259,13 @@ <doc xml:space="preserve" filename="pidgin/pidginaccountdisplay.h" line="52">Creates a display for an account.</doc> - <source-position filename="pidgin/pidginaccountdisplay.h" line="63"/> + <source-position filename="pidgin/pidginaccountdisplay.h" line="64"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginaccountdisplay.h" - line="58">The account display.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="58">The new account + display.</doc> + <type name="AccountDisplay" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="account" transfer-ownership="none"> @@ -371,8 +373,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginaccounteditor.h" - line="61">The new instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="61">The new account editor.</doc> + <type name="AccountEditor" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="account" @@ -542,8 +544,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginaccountfilterconnected.h" - line="60">The new #PidginAccountFilterConnected instance.</doc> - <type name="Gtk.Filter" c:type="GtkFilter*"/> + line="60">The new filter.</doc> + <type name="AccountFilterConnected" c:type="GtkFilter*"/> </return-value> </constructor> </class> @@ -585,8 +587,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginaccountfilterprotocol.h" - line="61">The new #PidginAccountFilterProtocol instance.</doc> - <type name="Gtk.Filter" c:type="GtkFilter*"/> + line="61">The new filter.</doc> + <type name="AccountFilterProtocol" c:type="GtkFilter*"/> </return-value> <parameters> <parameter name="protocol_id" transfer-ownership="none"> @@ -673,7 +675,7 @@ <doc xml:space="preserve" filename="pidgin/pidginaccountmanager.h" line="58">The dialog.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + <type name="AccountManager" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="application" @@ -770,7 +772,7 @@ <doc xml:space="preserve" filename="pidgin/pidginaccountmanagerrow.h" line="58">The new account row.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + <type name="AccountManagerRow" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="account" @@ -887,7 +889,7 @@ <doc xml:space="preserve" filename="pidgin/pidginaccountrow.h" line="62">The new instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + <type name="AccountRow" c:type="GtkWidget*"/> </return-value> </constructor> <method name="get_account" @@ -1056,8 +1058,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginaccountsdisabledmenu.h" - line="60">The new menu instance.</doc> - <type name="Gio.MenuModel" c:type="GMenuModel*"/> + line="60">The new instance.</doc> + <type name="AccountsDisabledMenu" c:type="GMenuModel*"/> </return-value> </constructor> </class> @@ -1097,8 +1099,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginaccountsenabledmenu.h" - line="60">The new menu instance.</doc> - <type name="Gio.MenuModel" c:type="GMenuModel*"/> + line="60">The new instance.</doc> + <type name="AccountsEnabledMenu" c:type="GMenuModel*"/> </return-value> </constructor> </class> @@ -1137,8 +1139,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginapplication.h" - line="59">The new #PidginApplication instance.</doc> - <type name="Gio.Application" c:type="GApplication*"/> + line="59">The new instance.</doc> + <type name="Application" c:type="GApplication*"/> </return-value> </constructor> <method name="add_action_group" @@ -1237,8 +1239,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginautoadjustment.h" - line="61">The new #PidginAutoAdjustment instance.</doc> - <type name="Gtk.Adjustment" c:type="GtkAdjustment*"/> + line="61">The new instance.</doc> + <type name="AutoAdjustment" c:type="GtkAdjustment*"/> </return-value> </constructor> <method name="decrement" @@ -1314,8 +1316,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginavatar.h" - line="59">The new #PidginAvatar instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="59">The new instance.</doc> + <type name="Avatar" c:type="GtkWidget*"/> </return-value> </constructor> <method name="get_animate" @@ -1544,8 +1546,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/prefs/pidginawayprefs.h" - line="58">The new #PidginAwayPrefs instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="58">The new instance.</doc> + <type name="AwayPrefs" c:type="GtkWidget*"/> </return-value> </constructor> </class> @@ -1583,7 +1585,7 @@ <doc xml:space="preserve" filename="pidgin/pidginbadges.h" line="59">The new widget.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + <type name="Badges" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="badges" transfer-ownership="none"> @@ -1696,8 +1698,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginchanneljoindialog.h" - line="56">The widget.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="56">The new widget.</doc> + <type name="ChannelJoinDialog" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="application" @@ -1750,8 +1752,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidgincontactlist.h" - line="62">The new #PidginContactList instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="62">The new instance.</doc> + <type name="ContactList" c:type="GtkWidget*"/> </return-value> </constructor> </class> @@ -1791,7 +1793,7 @@ <doc xml:space="preserve" filename="pidgin/pidginconversation.h" line="62">The new widget.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + <type name="Conversation" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="conversation" transfer-ownership="none"> @@ -1914,12 +1916,13 @@ filename="pidgin/pidginconversationmember.h" line="52">Creates a display for a conversation member.</doc> <source-position filename="pidgin/pidginconversationmember.h" - line="63"/> + line="64"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginconversationmember.h" - line="58">The conversation member display.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="58">The conversation + member display.</doc> + <type name="ConversationMember" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="conversation_member" transfer-ownership="none"> @@ -2033,8 +2036,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/prefs/pidginconversationprefs.h" - line="58">The new #PidginConversationPrefs instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="58">The new instance.</doc> + <type name="ConversationPrefs" c:type="GtkWidget*"/> </return-value> </constructor> </class> @@ -2077,8 +2080,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/prefs/pidgincredentialprefs.h" - line="66">The new #PidginCredentialPrefs instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="66">The new instance.</doc> + <type name="CredentialPrefs" c:type="GtkWidget*"/> </return-value> </constructor> </class> @@ -2116,20 +2119,21 @@ version="3.0"> <doc xml:space="preserve" filename="pidgin/prefs/pidgincredentialproviderrow.h" - line="63">Creates a new #PidginCredentialProviderRow instance.</doc> + line="65">Creates a new #PidginCredentialProviderRow instance.</doc> <source-position filename="pidgin/prefs/pidgincredentialproviderrow.h" - line="74"/> + line="77"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/prefs/pidgincredentialproviderrow.h" - line="69">The new #PidginCredentialProviderRow instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="71">The new + instance.</doc> + <type name="CredentialProviderRow" c:type="GtkWidget*"/> </return-value> @@ -2835,8 +2839,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidgindisplaywindow.h" - line="60">The new #PidginDisplayWindow instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="60">The new instance.</doc> + <type name="DisplayWindow" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="application" @@ -3163,8 +3167,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidgininfopane.h" - line="60">The new #PidginInfoPane instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="60">The new instance.</doc> + <type name="InfoPane" c:type="GtkWidget*"/> </return-value> </constructor> <method name="get_child" @@ -3395,7 +3399,7 @@ <doc xml:space="preserve" filename="pidgin/pidginkeypad.h" line="57">The new instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + <type name="Keypad" c:type="GtkWidget*"/> </return-value> </constructor> <method name="set_key_capture_widget" @@ -3478,7 +3482,7 @@ <doc xml:space="preserve" filename="pidgin/pidginmessage.h" line="59">The new instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + <type name="Message" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="message" @@ -3586,8 +3590,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/prefs/pidginnetworkprefs.h" - line="58">The new #PidginNetworkPrefs instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="58">The new instance.</doc> + <type name="NetworkPrefs" c:type="GtkWidget*"/> </return-value> </constructor> </class> @@ -3735,7 +3739,7 @@ <doc xml:space="preserve" filename="pidgin/pidginnotification.h" line="74">The new instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + <type name="Notification" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="notification" transfer-ownership="none"> @@ -3885,9 +3889,9 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginnotificationaddcontact.h" - line="66">The new #PidginNotificationAddContact + line="66">The new instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + <type name="NotificationAddContact" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="notification" transfer-ownership="none"> @@ -3941,9 +3945,9 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginnotificationauthorizationrequest.h" - line="66">The new #PidginNotificationAuthorizationRequest - instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="66">The + new instance.</doc> + <type name="NotificationAuthorizationRequest" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="notification" transfer-ownership="none"> @@ -4006,12 +4010,13 @@ line="60">Creates a new #PidginNotificationConnectionError instance that will display @notification.</doc> <source-position filename="pidgin/pidginnotificationconnectionerror.h" - line="72"/> + line="73"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginnotificationconnectionerror.h" - line="67">The new instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="67">The new + instance.</doc> + <type name="NotificationConnectionError" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="notification" transfer-ownership="none"> @@ -4063,8 +4068,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginnotificationlink.h" - line="64">The new #PidginNotificationLink instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="64">The new instance.</doc> + <type name="NotificationLink" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="notification" transfer-ownership="none"> @@ -4114,8 +4119,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginnotificationlist.h" - line="59">The new #PidginNotificationList instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="59">The new instance.</doc> + <type name="NotificationList" c:type="GtkWidget*"/> </return-value> </constructor> </class> @@ -4161,8 +4166,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginpluginsmenu.h" - line="56">The new #PidginPluginsMenu instance.</doc> - <type name="Gio.MenuModel" c:type="GMenuModel*"/> + line="56">The new instance.</doc> + <type name="PluginsMenu" c:type="GMenuModel*"/> </return-value> </constructor> </class> @@ -4232,7 +4237,7 @@ <doc xml:space="preserve" filename="pidgin/pidginpresenceicon.h" line="61">The new presence icon.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + <type name="PresenceIcon" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="presence" @@ -4475,12 +4480,13 @@ <doc xml:space="preserve" filename="pidgin/pidginprotocolchooser.h" line="54">Creates a drop down for a user to select a protocol from.</doc> - <source-position filename="pidgin/pidginprotocolchooser.h" line="64"/> + <source-position filename="pidgin/pidginprotocolchooser.h" line="65"/> <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/pidginprotocolchooser.h" - line="59">The protocol chooser drop down.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="59">The protocol chooser + drop down.</doc> + <type name="ProtocolChooser" c:type="GtkWidget*"/> </return-value> </constructor> <method name="get_protocol" @@ -4581,8 +4587,8 @@ <return-value transfer-ownership="full"> <doc xml:space="preserve" filename="pidgin/prefs/pidginproxyprefs.h" - line="58">The new #PidginProxyPrefs instance.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + line="58">The new instance.</doc> + <type name="ProxyPrefs" c:type="GtkWidget*"/> </return-value> </constructor> </class> @@ -4624,7 +4630,7 @@ <doc xml:space="preserve" filename="pidgin/pidgintypinglabel.h" line="60">The new widget.</doc> - <type name="Gtk.Widget" c:type="GtkWidget*"/> + <type name="TypingLabel" c:type="GtkWidget*"/> </return-value> <parameters> <parameter name="conversation" transfer-ownership="none"> @@ -4745,7 +4751,7 @@ <doc xml:space="preserve" filename="pidgin/pidginui.h" line="60">The new instance.</doc> - <type name="Purple.Ui" c:type="PurpleUi*"/> + <type name="Ui" c:type="PurpleUi*"/> </return-value> </constructor> </class>