Fix some introspection warnings

Adapted from:
b9a3360ee8
This commit is contained in:
JosephMcc 2016-12-26 11:41:29 -08:00
parent c6f5fd5e1d
commit 7a6db1f8c5
10 changed files with 485 additions and 450 deletions

View File

@ -329,7 +329,7 @@ app_weak_notify (gpointer data,
* Returns the #XedApp object. This object is a singleton and * Returns the #XedApp object. This object is a singleton and
* represents the running xed instance. * represents the running xed instance.
* *
* Return value: the #XedApp pointer * Return value: (transfer none): the #XedApp pointer
*/ */
XedApp * XedApp *
xed_app_get_default (void) xed_app_get_default (void)
@ -527,7 +527,7 @@ xed_app_create_window_real (XedApp *app,
* *
* Create a new #XedWindow part of @app. * Create a new #XedWindow part of @app.
* *
* Return value: the new #XedWindow * Return value: (transfer none): the new #XedWindow
*/ */
XedWindow * XedWindow *
xed_app_create_window (XedApp *app, xed_app_create_window (XedApp *app,
@ -566,7 +566,7 @@ _xed_app_restore_window (XedApp *app,
* *
* Returns all the windows currently present in #XedApp. * Returns all the windows currently present in #XedApp.
* *
* Return value: (transfer none): the list of #XedWindows objects. * Return value: (element-type Xed.Window) (transfer none): the list of #XedWindows objects.
* The list should not be freed * The list should not be freed
*/ */
const GList * const GList *
@ -583,7 +583,7 @@ xed_app_get_windows (XedApp *app)
* *
* Retrives the #XedWindow currently active. * Retrives the #XedWindow currently active.
* *
* Return value: the active #XedWindow * Return value: (transfer none): the active #XedWindow
*/ */
XedWindow * XedWindow *
xed_app_get_active_window (XedApp *app) xed_app_get_active_window (XedApp *app)

View File

@ -1036,6 +1036,12 @@ set_uri (XedDocument *doc,
} }
} }
/**
* xed_document_get_location:
* @doc: a #XedDocument
*
* Returns: (allow-none) (transfer full): a new #GFile
*/
GFile * GFile *
xed_document_get_location (XedDocument *doc) xed_document_get_location (XedDocument *doc)
{ {
@ -1736,7 +1742,7 @@ compute_num_of_lines (const gchar *text)
} }
/** /**
* xed_document_set_search_text" * xed_document_set_search_text:
* @doc: * @doc:
* @text: (allow-none): * @text: (allow-none):
* @flags: * @flags:
@ -1835,7 +1841,7 @@ xed_document_get_can_search_again (XedDocument *doc)
* @start: (allow-none): * @start: (allow-none):
* @end: (allow-none): * @end: (allow-none):
* @match_start: (allow-none): * @match_start: (allow-none):
* @match_end: (allow=none): * @match_end: (allow-none):
**/ **/
gboolean gboolean
xed_document_search_forward (XedDocument *doc, xed_document_search_forward (XedDocument *doc,
@ -1920,7 +1926,7 @@ xed_document_search_forward (XedDocument *doc,
* @start: (allow-none): * @start: (allow-none):
* @end: (allow-none): * @end: (allow-none):
* @match_start: (allow-none): * @match_start: (allow-none):
* @match_end: (allow=none): * @match_end: (allow-none):
**/ **/
gboolean gboolean
xed_document_search_backward (XedDocument *doc, xed_document_search_backward (XedDocument *doc,
@ -2130,6 +2136,12 @@ xed_document_set_language (XedDocument *doc,
set_language (doc, lang, TRUE); set_language (doc, lang, TRUE);
} }
/**
* xed_document_get_language:
* @doc:
*
* Return value: (transfer none):
*/
GtkSourceLanguage * GtkSourceLanguage *
xed_document_get_language (XedDocument *doc) xed_document_get_language (XedDocument *doc)
{ {

View File

@ -455,7 +455,7 @@ xed_file_chooser_dialog_new_valist (const gchar *title,
* @action: Open or save mode for the dialog * @action: Open or save mode for the dialog
* @first_button_text: (allow-none): stock ID or text to go in * @first_button_text: (allow-none): stock ID or text to go in
* the first button, or %NULL * the first button, or %NULL
* @Varargs: (allow-none): response ID for the first button, then * @...: (allow-none): response ID for the first button, then
* additional (button, id) pairs, ending with %NULL * additional (button, id) pairs, ending with %NULL
* *
* Creates a new #XedFileChooserDialog. This function is analogous to * Creates a new #XedFileChooserDialog. This function is analogous to

View File

@ -532,7 +532,7 @@ xed_message_bus_init (XedMessageBus *self)
* *
* Get the default application #XedMessageBus. * Get the default application #XedMessageBus.
* *
* Return value: the default #XedMessageBus * Return value: (transfer none): the default #XedMessageBus
* *
*/ */
XedMessageBus * XedMessageBus *
@ -797,7 +797,7 @@ foreach_type (const gchar *key,
/** /**
* xed_message_bus_foreach: * xed_message_bus_foreach:
* @bus: the #XedMessagebus * @bus: the #XedMessagebus
* @func: the callback function * @func: (scope call): the callback function
* @userdata: the user data to supply to the callback function * @userdata: the user data to supply to the callback function
* *
* Calls @func for each message type registered on the bus * Calls @func for each message type registered on the bus
@ -875,7 +875,7 @@ xed_message_bus_disconnect (XedMessageBus *bus,
* @bus: a #XedMessageBus * @bus: a #XedMessageBus
* @object_path: the object path * @object_path: the object path
* @method: the method * @method: the method
* @callback: the connected callback * @callback: (scope call): the connected callback
* @userdata: the userdata with which the callback was connected * @userdata: the userdata with which the callback was connected
* *
* Disconnects a previously connected message callback by matching the * Disconnects a previously connected message callback by matching the
@ -918,7 +918,7 @@ xed_message_bus_block (XedMessageBus *bus,
* @bus: a #XedMessageBus * @bus: a #XedMessageBus
* @object_path: the object path * @object_path: the object path
* @method: the method * @method: the method
* @callback: the callback to block * @callback: (scope call): the callback to block
* @userdata: the userdata with which the callback was connected * @userdata: the userdata with which the callback was connected
* *
* Blocks evoking the callback that matches provided @callback and @userdata. * Blocks evoking the callback that matches provided @callback and @userdata.
@ -959,7 +959,7 @@ xed_message_bus_unblock (XedMessageBus *bus,
* @bus: a #XedMessageBus * @bus: a #XedMessageBus
* @object_path: the object path * @object_path: the object path
* @method: the method * @method: the method
* @callback: the callback to block * @callback: (scope call): the callback to block
* @userdata: the userdata with which the callback was connected * @userdata: the userdata with which the callback was connected
* *
* Unblocks the callback that matches provided @callback and @userdata. * Unblocks the callback that matches provided @callback and @userdata.
@ -1134,7 +1134,7 @@ xed_message_bus_send (XedMessageBus *bus,
* specifies key (string) value pairs used to construct the message * specifies key (string) value pairs used to construct the message
* arguments. To send a message asynchronously use xed_message_bus_send(). * arguments. To send a message asynchronously use xed_message_bus_send().
* *
* Return value: the constructed #XedMessage. The caller owns a reference * Return value: (transfer full): the constructed #XedMessage. The caller owns a reference
* to the #XedMessage and should call g_object_unref() when * to the #XedMessage and should call g_object_unref() when
* it is no longer needed * it is no longer needed
*/ */

View File

@ -398,7 +398,7 @@ xed_message_type_set_valist (XedMessageType *message_type,
* Instantiate a new message from the message type with specific values * Instantiate a new message from the message type with specific values
* for the message arguments. * for the message arguments.
* *
* Return value: the newly created message * Return value: (transfer full): the newly created message
* *
*/ */
XedMessage * XedMessage *
@ -423,7 +423,7 @@ xed_message_type_instantiate_valist (XedMessageType *message_type,
* Instantiate a new message from the message type with specific values * Instantiate a new message from the message type with specific values
* for the message arguments. * for the message arguments.
* *
* Return value: the newly created message * Return value: (transfer full): the newly created message
* *
*/ */
XedMessage * XedMessage *
@ -509,7 +509,7 @@ foreach_gtype (const gchar *key,
/** /**
* xed_message_type_foreach: * xed_message_type_foreach:
* @message_type: the #XedMessageType * @message_type: the #XedMessageType
* @func: the callback function * @func: (scope call): the callback function
* @user_data: user data supplied to the callback function * @user_data: user data supplied to the callback function
* *
* Calls @func for each argument in the message type. * Calls @func for each argument in the message type.

View File

@ -367,8 +367,8 @@ xed_message_set_value (XedMessage *message,
/** /**
* xed_message_set_valuesv: * xed_message_set_valuesv:
* @message: the #XedMessage * @message: the #XedMessage
* @keys: (array-length=n_values): keys to set values for * @keys: (array length=n_values): keys to set values for
* @values: (array-length=n_values): values to set * @values: (array length=n_values): values to set
* @n_values: number of arguments to set values for * @n_values: number of arguments to set values for
* *
* Set message argument values. * Set message argument values.

View File

@ -453,6 +453,13 @@ xed_status_combo_box_remove_item (XedStatusComboBox *combo,
GTK_WIDGET (item)); GTK_WIDGET (item));
} }
/**
* xed_status_combo_box_get_items:
* @combo:
*
* Returns: (element-type Gtk.Widget) (transfer container):
*/
GList * GList *
xed_status_combo_box_get_items (XedStatusComboBox *combo) xed_status_combo_box_get_items (XedStatusComboBox *combo)
{ {

View File

@ -1592,7 +1592,7 @@ _xed_tab_new_from_uri (const gchar *uri,
* *
* Gets the #XedView inside @tab. * Gets the #XedView inside @tab.
* *
* Returns: the #XedView inside @tab * Returns: (transfer none): the #XedView inside @tab
*/ */
XedView * XedView *
xed_tab_get_view (XedTab *tab) xed_tab_get_view (XedTab *tab)
@ -1606,7 +1606,7 @@ xed_tab_get_view (XedTab *tab)
* *
* Gets the #XedDocument associated to @tab. * Gets the #XedDocument associated to @tab.
* *
* Returns: the #XedDocument associated to @tab * Returns: (transfer none): the #XedDocument associated to @tab
*/ */
XedDocument * XedDocument *
xed_tab_get_document (XedTab *tab) xed_tab_get_document (XedTab *tab)
@ -1931,7 +1931,7 @@ _xed_tab_get_icon (XedTab *tab)
* *
* Gets the #XedTab associated with @doc. * Gets the #XedTab associated with @doc.
* *
* Returns: the #XedTab associated with @doc * Returns: (transfer none): the #XedTab associated with @doc
*/ */
XedTab * XedTab *
xed_tab_get_from_document (XedDocument *doc) xed_tab_get_from_document (XedDocument *doc)

View File

@ -213,6 +213,13 @@ xed_gdk_color_to_string (GdkColor color)
color.blue); color.blue);
} }
/**
* xed_gtk_button_new_with_stock_icon:
* @label:
* @stock_id:
*
* Returns: (transfer full):
*/
GtkWidget * GtkWidget *
xed_gtk_button_new_with_stock_icon (const gchar *label, xed_gtk_button_new_with_stock_icon (const gchar *label,
const gchar *stock_id) const gchar *stock_id)
@ -227,6 +234,15 @@ xed_gtk_button_new_with_stock_icon (const gchar *label,
return button; return button;
} }
/**
* xed_dialog_add_button:
* @dialog:
* @text:
* @stock_id:
* @response_id:
*
* Returns: (transfer none):
*/
GtkWidget * GtkWidget *
xed_dialog_add_button (GtkDialog *dialog, xed_dialog_add_button (GtkDialog *dialog,
const gchar *text, const gchar *text,
@ -1384,7 +1400,7 @@ xed_utils_uri_for_display (const gchar *uri)
* *
* Create a list of valid uri's from a uri-list drop. * Create a list of valid uri's from a uri-list drop.
* *
* Return value: a string array which will hold the uris or %NULL if there * Return value: (transfer full): a string array which will hold the uris or %NULL if there
* were no valid uris. g_strfreev should be used when the * were no valid uris. g_strfreev should be used when the
* string array is no longer used * string array is no longer used
*/ */

View File

@ -3395,7 +3395,7 @@ xed_window_init (XedWindow *window)
* *
* Gets the active #XedView. * Gets the active #XedView.
* *
* Returns: the active #XedView * Returns: (transfer none): the active #XedView
*/ */
XedView * XedView *
xed_window_get_active_view (XedWindow *window) xed_window_get_active_view (XedWindow *window)
@ -3423,7 +3423,7 @@ xed_window_get_active_view (XedWindow *window)
* *
* Gets the active #XedDocument. * Gets the active #XedDocument.
* *
* Returns: the active #XedDocument * Returns: (transfer none): the active #XedDocument
*/ */
XedDocument * XedDocument *
xed_window_get_active_document (XedWindow *window) xed_window_get_active_document (XedWindow *window)
@ -3460,7 +3460,7 @@ _xed_window_get_notebook (XedWindow *window)
* Creates a new #XedTab and adds the new tab to the #XedNotebook. * Creates a new #XedTab and adds the new tab to the #XedNotebook.
* In case @jump_to is %TRUE the #XedNotebook switches to that new #XedTab. * In case @jump_to is %TRUE the #XedNotebook switches to that new #XedTab.
* *
* Returns: a new #XedTab * Returns: (transfer none): a new #XedTab
*/ */
XedTab * XedTab *
xed_window_create_tab (XedWindow *window, xed_window_create_tab (XedWindow *window,
@ -3497,7 +3497,7 @@ xed_window_create_tab (XedWindow *window,
* Whether @create is %TRUE, creates a new empty document if location does * Whether @create is %TRUE, creates a new empty document if location does
* not refer to an existing file * not refer to an existing file
* *
* Returns: a new #XedTab * Returns: (transfer none): a new #XedTab
*/ */
XedTab * XedTab *
xed_window_create_tab_from_uri (XedWindow *window, xed_window_create_tab_from_uri (XedWindow *window,
@ -3536,7 +3536,7 @@ xed_window_create_tab_from_uri (XedWindow *window,
* *
* Gets the active #XedTab in the @window. * Gets the active #XedTab in the @window.
* *
* Returns: the active #XedTab in the @window. * Returns: (transfer none): the active #XedTab in the @window.
*/ */
XedTab * XedTab *
xed_window_get_active_tab (XedWindow *window) xed_window_get_active_tab (XedWindow *window)
@ -3729,7 +3729,7 @@ xed_window_set_active_tab (XedWindow *window,
* *
* Gets the #GtkWindowGroup in which @window resides. * Gets the #GtkWindowGroup in which @window resides.
* *
* Returns: the #GtkWindowGroup * Returns: (transfer none): the #GtkWindowGroup
*/ */
GtkWindowGroup * GtkWindowGroup *
xed_window_get_group (XedWindow *window) xed_window_get_group (XedWindow *window)
@ -3751,7 +3751,7 @@ _xed_window_is_removing_tabs (XedWindow *window)
* *
* Gets the #GtkUIManager associated with the @window. * Gets the #GtkUIManager associated with the @window.
* *
* Returns: the #GtkUIManager of the @window. * Returns: (transfer none): the #GtkUIManager of the @window.
*/ */
GtkUIManager * GtkUIManager *
xed_window_get_ui_manager (XedWindow *window) xed_window_get_ui_manager (XedWindow *window)
@ -3766,7 +3766,7 @@ xed_window_get_ui_manager (XedWindow *window)
* *
* Gets the side #XedPanel of the @window. * Gets the side #XedPanel of the @window.
* *
* Returns: the side #XedPanel. * Returns: (transfer none): the side #XedPanel.
*/ */
XedPanel * XedPanel *
xed_window_get_side_panel (XedWindow *window) xed_window_get_side_panel (XedWindow *window)
@ -3781,7 +3781,7 @@ xed_window_get_side_panel (XedWindow *window)
* *
* Gets the bottom #XedPanel of the @window. * Gets the bottom #XedPanel of the @window.
* *
* Returns: the bottom #XedPanel. * Returns: (transfer none): the bottom #XedPanel.
*/ */
XedPanel * XedPanel *
xed_window_get_bottom_panel (XedWindow *window) xed_window_get_bottom_panel (XedWindow *window)
@ -3796,7 +3796,7 @@ xed_window_get_bottom_panel (XedWindow *window)
* *
* Gets the #XedStatusbar of the @window. * Gets the #XedStatusbar of the @window.
* *
* Returns: the #XedStatusbar of the @window. * Returns: (transfer none): the #XedStatusbar of the @window.
*/ */
GtkWidget * GtkWidget *
xed_window_get_statusbar (XedWindow *window) xed_window_get_statusbar (XedWindow *window)
@ -3809,9 +3809,9 @@ xed_window_get_statusbar (XedWindow *window)
* xed_window_get_searchbar: * xed_window_get_searchbar:
* @window: a #XedWindow * @window: a #XedWindow
* *
* Gets the #XedSearchDialog of the @window. * Gets the #XedSearchbar of the @window.
* *
* Returns: the #XedSearchDialog of the @window. * Returns: (transfer none): the #XedSearchbar of the @window.
*/ */
GtkWidget * GtkWidget *
xed_window_get_searchbar (XedWindow *window) xed_window_get_searchbar (XedWindow *window)
@ -4084,7 +4084,7 @@ xed_window_get_message_bus (XedWindow *window)
* *
* Gets the #XedTab that matches @uri. * Gets the #XedTab that matches @uri.
* *
* Returns: the #XedTab associated with @uri. * Returns: (transfer none): the #XedTab associated with @uri.
* *
* Deprecated: 2.24: Use xed_window_get_tab_from_location() instead. * Deprecated: 2.24: Use xed_window_get_tab_from_location() instead.
*/ */