[gedit] Fix most introspection warnings



commit 4eef0a5c4a19acde1e9575d6d4db6cd184a8edb2
Author: Garrett Regier <alias301 gmail com>
Date:   Mon Sep 20 07:35:05 2010 -0700

    Fix most introspection warnings
    
    The scanner became much more picky.

 gedit/Makefile.am           |    6 +++---
 gedit/gedit-app.c           |    8 ++++----
 gedit/gedit-commands-file.c |    6 +++---
 gedit/gedit-document.c      |    8 +++++++-
 gedit/gedit-document.h      |    7 ++++++-
 gedit/gedit-message-bus.c   |   16 ++++++++--------
 gedit/gedit-message-type.c  |    6 +++---
 gedit/gedit-message-type.h  |    4 ++--
 gedit/gedit-message.c       |   14 ++++++++++++++
 gedit/gedit-message.h       |    2 +-
 gedit/gedit-tab.c           |    2 +-
 gedit/gedit-window.c        |   16 ++++++++++++++--
 12 files changed, 66 insertions(+), 29 deletions(-)
---
diff --git a/gedit/Makefile.am b/gedit/Makefile.am
index 4aca99b..d5e9931 100644
--- a/gedit/Makefile.am
+++ b/gedit/Makefile.am
@@ -123,10 +123,12 @@ NOINST_H_FILES =			\
 	gedit-session.h			\
 	gedit-settings.h		\
 	gedit-smart-charset-converter.h	\
+	gedit-status-combo-box.h	\
 	gedit-style-scheme-manager.h	\
 	gedit-tab-label.h		\
 	gedittextregion.h		\
 	gedit-ui.h			\
+	gedit-utils.h 			\
 	gedit-view-frame.h		\
 	gedit-window-private.h
 
@@ -145,9 +147,7 @@ INST_H_FILES =				\
 	gedit-panel.h			\
 	gedit-progress-info-bar.h	\
 	gedit-statusbar.h		\
-	gedit-status-combo-box.h	\
 	gedit-tab.h 			\
-	gedit-utils.h 			\
 	gedit-view.h 			\
 	gedit-view-activatable.h	\
 	gedit-window.h			\
@@ -284,7 +284,7 @@ INTROSPECTION_SCANNER_ARGS = -I$(top_srcdir) --warn-all
 Gedit_3_0_gir_NAMESPACE = Gedit
 Gedit_3_0_gir_VERSION = 3.0
 Gedit_3_0_gir_PROGRAM = $(builddir)/gedit
-Gedit_3_0_gir_FILES = $(theatrics_files) $(INST_H_FILES) $(libgedit_c_files)
+Gedit_3_0_gir_FILES = $(INST_H_FILES) $(libgedit_c_files)
 Gedit_3_0_gir_INCLUDES = Gtk-3.0 GtkSource-3.0
 
 girdir = $(datadir)/gedit/gir-1.0
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 8847c30..f5e4c28 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -544,7 +544,7 @@ gedit_app_init (GeditApp *app)
  * Returns the #GeditApp object. This object is a singleton and
  * represents the running gedit instance.
  *
- * Return value: the #GeditApp pointer
+ * Return value: (transfer none): the #GeditApp pointer
  */
 GeditApp *
 gedit_app_get_default (void)
@@ -765,7 +765,7 @@ gedit_app_create_window_real (GeditApp    *app,
  *
  * Create a new #GeditWindow part of @app.
  *
- * Return value: the new #GeditWindow
+ * Return value: (transfer none): the new #GeditWindow
  */
 GeditWindow *
 gedit_app_create_window (GeditApp  *app,
@@ -802,7 +802,7 @@ _gedit_app_restore_window (GeditApp    *app,
  *
  * Returns all the windows currently present in #GeditApp.
  *
- * Return value: (element-type Window) (transfer none): the list of #GeditWindows objects.
+ * Return value: (element-type Gedit.Window) (transfer none): the list of #GeditWindows objects.
  * The list should not be freed
  */
 const GList *
@@ -819,7 +819,7 @@ gedit_app_get_windows (GeditApp *app)
  *
  * Retrives the #GeditWindow currently active.
  *
- * Return value: the active #GeditWindow
+ * Return value: (transfer none): the active #GeditWindow
  */
 GeditWindow *
 gedit_app_get_active_window (GeditApp *app)
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index f7af910..62e679a 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -291,7 +291,7 @@ load_file_list (GeditWindow         *window,
 }
 
 /**
- * gedit_commands_load_uri:
+ * gedit_commands_load_location:
  * @window:
  * @location:
  * @encoding: (allow-none):
@@ -330,9 +330,9 @@ gedit_commands_load_location (GeditWindow         *window,
 }
 
 /**
- * gedit_commands_load_uris:
+ * gedit_commands_load_locations:
  * @window:
- * @locations: (element-type Glib.File) (transfer none):
+ * @locations: (element-type GLib.File) (transfer none):
  * @encoding: (allow-none):
  * @line_pos:
  * @column_pos:
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index e905a4d..b81043a 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -1203,7 +1203,7 @@ set_location (GeditDocument *doc,
  * gedit_document_get_location:
  * @doc: a #GeditDocument
  *
- * Returns: (allow-none): a copy of the internal #GFile
+ * Returns: (allow-none) (transfer full): a copy of the internal #GFile
  */
 GFile *
 gedit_document_get_location (GeditDocument *doc)
@@ -2788,6 +2788,12 @@ gedit_document_set_language (GeditDocument     *doc,
 	set_language (doc, lang, TRUE);
 }
 
+/**
+ * gedit_document_get_language:
+ * @doc:
+ *
+ * Return value: (transfer none):
+ */
 GtkSourceLanguage *
 gedit_document_get_language (GeditDocument *doc)
 {
diff --git a/gedit/gedit-document.h b/gedit/gedit-document.h
index 6d31a46..1dfc1f7 100644
--- a/gedit/gedit-document.h
+++ b/gedit/gedit-document.h
@@ -207,7 +207,7 @@ gchar		*gedit_document_get_short_name_for_display
 
 void		 gedit_document_set_short_name_for_display
 						(GeditDocument       *doc,
-						 const gchar         *name);
+						 const gchar         *short_name);
 
 gchar		*gedit_document_get_content_type
 					 	(GeditDocument       *doc);
@@ -344,6 +344,11 @@ void		_gedit_document_search_region   (GeditDocument       *doc,
 #define GEDIT_SEARCH_SET_CASE_SENSITIVE(sflags,state) ((state == TRUE) ? \
 (sflags |= GEDIT_SEARCH_CASE_SENSITIVE) : (sflags &= ~GEDIT_SEARCH_CASE_SENSITIVE))
 
+/**
+ * GeditMountOperationFactory: (skip)
+ * @doc:
+ * @userdata:
+ */
 typedef GMountOperation *(*GeditMountOperationFactory)(GeditDocument *doc, 
 						       gpointer       userdata);
 
diff --git a/gedit/gedit-message-bus.c b/gedit/gedit-message-bus.c
index 4594657..c086d2b 100644
--- a/gedit/gedit-message-bus.c
+++ b/gedit/gedit-message-bus.c
@@ -545,7 +545,7 @@ gedit_message_bus_init (GeditMessageBus *self)
  *
  * Get the default application #GeditMessageBus.
  *
- * Return value: the default #GeditMessageBus
+ * Return value: (transfer full): the default #GeditMessageBus
  *
  */
 GeditMessageBus *
@@ -816,7 +816,7 @@ foreach_type (const gchar      *key,
 /**
  * gedit_message_bus_foreach:
  * @bus: the #GeditMessagebus
- * @func: the callback function
+ * @func: (scope call): the callback function
  * @user_data: the user data to supply to the callback function
  *
  * Calls @func for each message type registered on the bus
@@ -894,7 +894,7 @@ gedit_message_bus_disconnect (GeditMessageBus *bus,
  * @bus: a #GeditMessageBus
  * @object_path: the object path
  * @method: the method
- * @callback: the connected callback
+ * @callback: (scope call): the connected callback
  * @user_data: the user_data with which the callback was connected
  *
  * Disconnects a previously connected message callback by matching the 
@@ -937,7 +937,7 @@ gedit_message_bus_block (GeditMessageBus *bus,
  * @bus: a #GeditMessageBus
  * @object_path: the object path
  * @method: the method
- * @callback: the callback to block
+ * @callback: (scope call): the callback to block
  * @user_data: the user_data with which the callback was connected
  *
  * Blocks evoking the callback that matches provided @callback and @user_data.
@@ -978,7 +978,7 @@ gedit_message_bus_unblock (GeditMessageBus *bus,
  * @bus: a #GeditMessageBus
  * @object_path: the object path
  * @method: the method
- * @callback: the callback to block
+ * @callback: (scope call): the callback to block
  * @user_data: the user_data with which the callback was connected
  *
  * Unblocks the callback that matches provided @callback and @user_data.
@@ -1155,9 +1155,9 @@ gedit_message_bus_send (GeditMessageBus *bus,
  * specifies key (string) value pairs used to construct the message 
  * arguments. To send a message asynchronously use gedit_message_bus_send().
  *
- * Return value: (allow-none): the constructed #GeditMessage. The caller owns a 
- *               reference to the #GeditMessage and should call g_object_unref()
- *               when it is no longer needed
+ * Return value: (allow-none) (transfer full): the constructed #GeditMessage.
+ *               The caller owns a reference to the #GeditMessage and should
+ *               call g_object_unref() when it is no longer needed.
  */
 GeditMessage *
 gedit_message_bus_send_sync (GeditMessageBus *bus,
diff --git a/gedit/gedit-message-type.c b/gedit/gedit-message-type.c
index 9407b6b..5db7f98 100644
--- a/gedit/gedit-message-type.c
+++ b/gedit/gedit-message-type.c
@@ -404,7 +404,7 @@ gedit_message_type_set_valist (GeditMessageType *message_type,
  * Instantiate a new message from the message type with specific values
  * for the message arguments.
  *
- * Return value: the newly created message
+ * Return value: (transfer full): the newly created message
  *
  */
 GeditMessage *
@@ -429,7 +429,7 @@ gedit_message_type_instantiate_valist (GeditMessageType *message_type,
  * Instantiate a new message from the message type with specific values
  * for the message arguments.
  *
- * Return value: the newly created message
+ * Return value: (transfer full): the newly created message
  *
  */
 GeditMessage *
@@ -523,7 +523,7 @@ foreach_gtype (const gchar  *key,
 /**
  * gedit_message_type_foreach:
  * @message_type: the #GeditMessageType
- * @func: the callback function
+ * @func: (scope call): the callback function
  * @user_data: user data supplied to the callback function
  *
  * Calls @func for each argument in the message type.
diff --git a/gedit/gedit-message-type.h b/gedit/gedit-message-type.h
index bc4a937..c1e884a 100644
--- a/gedit/gedit-message-type.h
+++ b/gedit/gedit-message-type.h
@@ -54,14 +54,14 @@ GeditMessageType	*gedit_message_type_new				(const gchar      *object_path,
 GeditMessageType	*gedit_message_type_new_valist			(const gchar      *object_path,
 									 const gchar      *method,
 									 guint             num_optional,
-									 va_list           va_args);
+									 va_list           var_args);
 
 void			 gedit_message_type_set				(GeditMessageType *message_type,
 									 guint             num_optional,
 									 ...) G_GNUC_NULL_TERMINATED;
 void			 gedit_message_type_set_valist			(GeditMessageType *message_type,
 									 guint             num_optional,
-									 va_list           va_args);
+									 va_list           var_args);
 
 GeditMessageType	*gedit_message_type_ref				(GeditMessageType *message_type);
 void			 gedit_message_type_unref			(GeditMessageType *message_type);
diff --git a/gedit/gedit-message.c b/gedit/gedit-message.c
index 3c99da8..935c260 100644
--- a/gedit/gedit-message.c
+++ b/gedit/gedit-message.c
@@ -252,6 +252,20 @@ value_lookup (GeditMessage *message,
 }
 
 /**
+ * gedit_message_get_message_type:
+ * @message:
+ *
+ * Return value: (transfer none):
+ */
+GeditMessageType *
+gedit_message_get_message_type (GeditMessage *message)
+{
+	g_return_val_if_fail (GEDIT_IS_MESSAGE (message), NULL);
+
+	return message->priv->type;
+}
+
+/**
  * gedit_message_get_method:
  * @message: the #GeditMessage
  *
diff --git a/gedit/gedit-message.h b/gedit/gedit-message.h
index e00e59d..5395192 100644
--- a/gedit/gedit-message.h
+++ b/gedit/gedit-message.h
@@ -54,7 +54,7 @@ struct _GeditMessageClass
 
 GType		 gedit_message_get_type			(void) G_GNUC_CONST;
 
-struct _GeditMessageType gedit_message_get_message_type (GeditMessage  *message);
+struct _GeditMessageType *gedit_message_get_message_type (GeditMessage  *message);
 
 void		 gedit_message_get			(GeditMessage  *message,
 							 ...) G_GNUC_NULL_TERMINATED;
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 245110e..c998fda 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -2050,7 +2050,7 @@ _gedit_tab_get_icon (GeditTab *tab)
  *
  * Gets the #GeditTab associated with @doc.
  *
- * Returns: the #GeditTab associated with @doc
+ * Returns: (transfer none): the #GeditTab associated with @doc
  */
 GeditTab *
 gedit_tab_get_from_document (GeditDocument *doc)
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 6da3d66..20f5d7f 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -4432,7 +4432,7 @@ process_create_tab (GeditWindow *window,
  * Creates a new #GeditTab and adds the new tab to the #GeditNotebook.
  * In case @jump_to is %TRUE the #GeditNotebook switches to that new #GeditTab.
  *
- * Returns: a new #GeditTab
+ * Returns: (transfer none): a new #GeditTab
  */
 GeditTab *
 gedit_window_create_tab (GeditWindow *window,
@@ -4456,6 +4456,7 @@ gedit_window_create_tab (GeditWindow *window,
  * @location: the location of the document
  * @encoding: a #GeditEncoding
  * @line_pos: the line position to visualize
+ * @column_pos: the column position to visualize
  * @create: %TRUE to create a new document in case @uri does exist
  * @jump_to: %TRUE to set the new #GeditTab as active
  *
@@ -4464,7 +4465,7 @@ gedit_window_create_tab (GeditWindow *window,
  * Whether @create is %TRUE, creates a new empty document if location does 
  * not refer to an existing file
  *
- * Returns: a new #GeditTab
+ * Returns: (transfer none): a new #GeditTab
  */
 GeditTab *
 gedit_window_create_tab_from_location (GeditWindow         *window,
@@ -4491,6 +4492,17 @@ gedit_window_create_tab_from_location (GeditWindow         *window,
 	return process_create_tab (window, notebook, GEDIT_TAB (tab), jump_to);
 }
 
+/**
+ * gedit_window_create_tab_from_stream:
+ * @window: a #GeditWindow
+ * @stream: a #GInputStream
+ * @encoding: a #GeditEncoding
+ * @line_pos: the line position to visualize
+ * @column_pos: the column position to visualize
+ * @jump_to: %TRUE to set the new #GeditTab as active
+ *
+ * Returns: (transfer none): a new #GeditTab
+ */
 GeditTab *
 gedit_window_create_tab_from_stream (GeditWindow         *window,
                                      GInputStream        *stream,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]