[goffice] New GoView class for use with file savers and openers.



commit af43f9becfe26da6b888b2e09d6aa942396dd951
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sat Aug 4 12:07:06 2012 +0200

    New GoView class for use with file savers and openers.

 ChangeLog                                    |   16 ++++++++++
 goffice/app/Makefile.am                      |    2 +
 goffice/app/file-priv.h                      |    4 +-
 goffice/app/file.c                           |   30 ++++++++-----------
 goffice/app/file.h                           |   10 +++---
 goffice/app/go-app.h                         |    2 +-
 goffice/app/go-plugin-loader-module.c        |   16 +++++-----
 goffice/app/go-plugin-service.c              |    8 ++--
 goffice/app/go-plugin-service.h              |    4 +-
 goffice/app/go-view.c                        |   30 +++++++++++++++++++
 goffice/app/go-view.h                        |   40 ++++++++++++++++++++++++++
 goffice/app/goffice-app.h                    |    2 +
 goffice/graph/gog-axis.h                     |    2 +-
 goffice/graph/gog-graph.c                    |   17 ++++++++---
 goffice/gtk/go-action-combo-stack.c          |    6 ++--
 goffice/gtk/go-calendar-button.c             |    6 ++++
 goffice/gtk/go-color-group.c                 |   16 +++++-----
 goffice/gtk/go-color-palette.c               |    2 +-
 goffice/gtk/go-graph-widget.c                |   13 ++++----
 goffice/gtk/go-palette.c                     |    8 ++--
 goffice/gtk/go-selector.c                    |    8 ++--
 goffice/utils/go-file.c                      |    2 +-
 plugins/plot_distrib/gog-probability-plot.c  |    2 +-
 plugins/plot_surface/gog-xyz-surface-prefs.c |    4 ++-
 24 files changed, 175 insertions(+), 75 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 14bd687..db1594c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2012-08-04  Jean Brefort  <jean brefort normalesup org>
+
+	* goffice/app/Makefile.am: new GoView class for use in file openers and
+	savers.
+	* goffice/app/file-priv.h: ditto.
+	* goffice/app/file.c: ditto.
+	* goffice/app/file.h: ditto.
+	* goffice/app/go-app.h: ditto.
+	* goffice/app/go-plugin-loader-module.c: ditto.
+	* goffice/app/go-plugin-service.c: ditto.
+	* goffice/app/go-plugin-service.h: ditto.
+	* goffice/app/go-view.c: ditto.
+	* goffice/app/go-view.h: ditto.
+	* goffice/app/goffice-app.h: ditto.
+	* all others: introspection warnings.
+
 2012-08-01  Jean Brefort  <jean brefort normalesup org>
 
 	* all: fixed some introspection and doc warnings.
diff --git a/goffice/app/Makefile.am b/goffice/app/Makefile.am
index baa1c03..c915162 100644
--- a/goffice/app/Makefile.am
+++ b/goffice/app/Makefile.am
@@ -6,6 +6,7 @@ noinst_HEADERS = \
 libgoffice_app_la_SOURCES = \
 	go-doc.c 			\
 	go-doc-control.c 		\
+	go-view.c			\
 	\
 	go-plugin.c 			\
 	go-plugin-loader.c 		\
@@ -26,6 +27,7 @@ libgoffice_app_la_api_headers = 	\
 	go-doc-impl.h 			\
 	go-doc-control.h 		\
 	go-doc-control-impl.h 		\
+	go-view.h			\
 	go-plugin.h 			\
 	go-plugin-loader.h 		\
 	go-plugin-loader-module.h 	\
diff --git a/goffice/app/file-priv.h b/goffice/app/file-priv.h
index 1b210d9..1348743 100644
--- a/goffice/app/file-priv.h
+++ b/goffice/app/file-priv.h
@@ -25,7 +25,7 @@ struct _GOFileOpenerClass {
 	void      (*open)  (GOFileOpener const *fo,
 			    gchar const *opt_enc,
 	                    GOIOContext *io_context,
-	                    gpointer  fixme_fixme_workbook_view,
+	                    GoView *view,
 	                    GsfInput *input);
 };
 
@@ -65,7 +65,7 @@ struct _GOFileSaverClass {
 	/* private */
 	void (*save) (GOFileSaver const *fs,
 	              GOIOContext *io_context,
-	              gconstpointer wbv,
+	              GoView const *view,
 	              GsfOutput *output);
 
 	gboolean (*set_export_options) (GOFileSaver *fs,
diff --git a/goffice/app/file.c b/goffice/app/file.c
index 67cfac7..24c0ef0 100644
--- a/goffice/app/file.c
+++ b/goffice/app/file.c
@@ -88,18 +88,15 @@ go_file_opener_probe_real (GOFileOpener const *fo, GsfInput *input,
 
 static void
 go_file_opener_open_real (GOFileOpener const *fo, gchar const *opt_enc,
-			  GOIOContext *io_context,
-			  gpointer FIXME_workbook_view,
-			  GsfInput *input)
+                          GOIOContext *io_context, GoView *view,
+                          GsfInput *input)
 {
 	if (fo->open_func != NULL) {
 		if (fo->encoding_dependent)
 			((GOFileOpenerOpenFuncWithEnc)fo->open_func)
-				(fo, opt_enc, io_context,
-				 FIXME_workbook_view, input);
+				(fo, opt_enc, io_context, view, input);
 		else
-			fo->open_func (fo, io_context,
-				       FIXME_workbook_view, input);
+			fo->open_func (fo, io_context, view, input);
 	} else
 		go_io_error_unknown (io_context);
 }
@@ -293,7 +290,7 @@ go_file_opener_probe (GOFileOpener const *fo, GsfInput *input, GOFileProbeLevel
  * @fo: GOFileOpener object
  * @opt_enc: Optional encoding
  * @io_context: Context for i/o operation
- * @FIXME_workbook_view: Workbook View
+ * @view: #GoView
  * @input: Gsf input stream
  *
  * Reads content of @file_name file into workbook @wbv is attached to.
@@ -305,13 +302,12 @@ go_file_opener_probe (GOFileOpener const *fo, GsfInput *input, GOFileProbeLevel
 void
 go_file_opener_open (GOFileOpener const *fo, gchar const *opt_enc,
 		     GOIOContext *io_context,
-		     gpointer FIXME_workbook_view, GsfInput *input)
+		      GoView *view, GsfInput *input)
 {
 	g_return_if_fail (GO_IS_FILE_OPENER (fo));
 	g_return_if_fail (GSF_IS_INPUT (input));
 
-	GO_FILE_OPENER_METHOD (fo, open) (fo, opt_enc, io_context,
-					  FIXME_workbook_view, input);
+	GO_FILE_OPENER_METHOD (fo, open) (fo, opt_enc, io_context, view, input);
 }
 
 /*
@@ -447,14 +443,14 @@ go_file_saver_get_property (GObject *object, guint property_id,
 
 static void
 go_file_saver_save_real (GOFileSaver const *fs, GOIOContext *io_context,
-			 gconstpointer FIXME_workbook_view, GsfOutput *output)
+			 GoView const *view, GsfOutput *output)
 {
 	if (fs->save_func == NULL) {
 		go_io_error_unknown (io_context);
 		return;
 	}
 
-	fs->save_func (fs, io_context, FIXME_workbook_view, output);
+	fs->save_func (fs, io_context, view, output);
 }
 
 static void
@@ -666,7 +662,7 @@ go_file_saver_set_export_options (GOFileSaver *fs,
  * go_file_saver_save:
  * @fs: GOFileSaver object
  * @io_context: Context for i/o operation
- * @FIXME_workbook_view: Workbook View
+ * @view: #GoView
  * @output: Output stream
  *
  * Saves @wbv and the workbook it is attached to into @output stream.
@@ -677,8 +673,7 @@ go_file_saver_set_export_options (GOFileSaver *fs,
  */
 void
 go_file_saver_save (GOFileSaver const *fs, GOIOContext *io_context,
-		    gconstpointer FIXME_workbook_view,
-		    GsfOutput *output)
+		    GoView *view, GsfOutput *output)
 {
 	g_return_if_fail (GO_IS_FILE_SAVER (fs));
 	g_return_if_fail (GSF_IS_OUTPUT (output));
@@ -716,8 +711,7 @@ go_file_saver_save (GOFileSaver const *fs, GOIOContext *io_context,
 		g_free (file_name);
 	}
 
-	GO_FILE_SAVER_METHOD (fs, save) (fs, io_context,
-					 FIXME_workbook_view, output);
+	GO_FILE_SAVER_METHOD (fs, save) (fs, io_context, view, output);
 }
 
 /**
diff --git a/goffice/app/file.h b/goffice/app/file.h
index 34fd301..8ee1340 100644
--- a/goffice/app/file.h
+++ b/goffice/app/file.h
@@ -53,12 +53,12 @@ typedef gboolean (*GOFileOpenerProbeFunc) (GOFileOpener const *fo,
 					    GOFileProbeLevel pl);
 typedef void     (*GOFileOpenerOpenFunc) (GOFileOpener const *fo,
 					  GOIOContext *io_context,
-					  gpointer FIXME_FIXME_workbook_view,
+					  GoView *view,
 					  GsfInput *input);
 typedef void     (*GOFileOpenerOpenFuncWithEnc) (GOFileOpener const *fo,
 						 gchar const *enc,
 						 GOIOContext *io_context,
-						 gpointer FIXME_workbook_view,
+						 GoView *view,
 						 GsfInput *input);
 
 GType go_file_opener_get_type (void);
@@ -82,7 +82,7 @@ gboolean     go_file_opener_probe (GOFileOpener const *fo, GsfInput *input,
 				    GOFileProbeLevel pl);
 void         go_file_opener_open (GOFileOpener const *fo, gchar const *opt_enc,
 				  GOIOContext *io_context,
-				  gpointer FIXME_workbook_view,
+				  GoView *view,
 				  GsfInput *input);
 
 char const *go_file_opener_get_id		  (GOFileOpener const *fo);
@@ -105,7 +105,7 @@ typedef struct _GOFileSaverClass GOFileSaverClass;
 
 typedef void (*GOFileSaverSaveFunc) (GOFileSaver const *fs,
 				     GOIOContext *io_context,
-				     gconstpointer FIXME_FIXME_workbook_view,
+				     GoView const *view,
 				     GsfOutput *output);
 
 GType go_file_saver_get_type (void);
@@ -126,7 +126,7 @@ gboolean     go_file_saver_set_export_options (GOFileSaver *fs,
 					       GError **err);
 
 void         go_file_saver_save (GOFileSaver const *fs, GOIOContext *io_context,
-				 gconstpointer FIXME_workbook_view,
+				 GoView *view,
 				 GsfOutput *output);
 void         go_file_saver_set_overwrite_files	(GOFileSaver *fs,
 						 gboolean overwrite);
diff --git a/goffice/app/go-app.h b/goffice/app/go-app.h
index 31fd3ec..d31c654 100644
--- a/goffice/app/go-app.h
+++ b/goffice/app/go-app.h
@@ -1,5 +1,5 @@
 /*
- * go-app.h :  A GOffice appument
+ * go-app.h :  A GOffice application
  *
  * Copyright (C) 2004 Jody Goldberg (jody gnome org)
  *
diff --git a/goffice/app/go-plugin-loader-module.c b/goffice/app/go-plugin-loader-module.c
index fe24b53..a22a03d 100644
--- a/goffice/app/go-plugin-loader-module.c
+++ b/goffice/app/go-plugin-loader-module.c
@@ -240,7 +240,7 @@ typedef struct {
 	gboolean (*module_func_file_probe) (GOFileOpener const *fo, GsfInput *input,
 					    GOFileProbeLevel pl);
 	void (*module_func_file_open) (GOFileOpener const *fo, GOIOContext *io_context,
-				       gpointer FIXME_FIXME_workbook_view,
+				       GoView *view,
 				       GsfInput *input);
 } ServiceLoaderDataFileOpener;
 
@@ -260,7 +260,7 @@ go_plugin_loader_module_func_file_probe (GOFileOpener const *fo, GOPluginService
 static void
 go_plugin_loader_module_func_file_open (GOFileOpener const *fo, GOPluginService *service,
 					 GOIOContext *io_context,
-					 gpointer   FIXME_FIXME_workbook_view,
+					 GoView *view,
 					GsfInput  *input,
 					char const *enc)
 {
@@ -273,14 +273,14 @@ go_plugin_loader_module_func_file_open (GOFileOpener const *fo, GOPluginService
 	if (fo->encoding_dependent) {
 		void (*module_func_file_open) (GOFileOpener const *fo, char const *enc,
 					       GOIOContext *io_context,
-					       gpointer FIXME_FIXME_workbook_view,
+					       GoView *view,
 					       GsfInput *input);
 		module_func_file_open = (gpointer)(loader_data->module_func_file_open);
 		module_func_file_open (fo, enc, io_context,
-				       FIXME_FIXME_workbook_view, input);
+				       view, input);
 	} else
 		loader_data->module_func_file_open (fo, io_context,
-						    FIXME_FIXME_workbook_view, input);
+						    view, input);
 }
 
 static char *
@@ -347,14 +347,14 @@ go_plugin_loader_module_load_service_file_opener (GOPluginLoader *loader,
 
 typedef struct {
 	void (*module_func_file_save) (GOFileSaver const *fs, GOIOContext *io_context,
-				       gconstpointer FIXME_FIXME_workbook_view,
+				       GoView const *view,
 				       GsfOutput *output);
 } ServiceLoaderDataFileSaver;
 
 static void
 go_plugin_loader_module_func_file_save (GOFileSaver const *fs, GOPluginService *service,
 					 GOIOContext *io_context,
-					 gconstpointer FIXME_FIXME_workbook_view,
+					 GoView const *view,
 					 GsfOutput *output)
 {
 	ServiceLoaderDataFileSaver *loader_data;
@@ -364,7 +364,7 @@ go_plugin_loader_module_func_file_save (GOFileSaver const *fs, GOPluginService *
 
 	loader_data = g_object_get_data (G_OBJECT (service), "loader_data");
 	loader_data->module_func_file_save (fs, io_context,
-		FIXME_FIXME_workbook_view, output);
+		view, output);
 }
 
 static void
diff --git a/goffice/app/go-plugin-service.c b/goffice/app/go-plugin-service.c
index fcf4603..289a153 100644
--- a/goffice/app/go-plugin-service.c
+++ b/goffice/app/go-plugin-service.c
@@ -626,7 +626,7 @@ go_plugin_file_opener_probe (GOFileOpener const *fo, GsfInput *input,
 static void
 go_plugin_file_opener_open (GOFileOpener const *fo, gchar const *enc,
 			     GOIOContext *io_context,
-			     gpointer FIXME_FIXME_workbook_view,
+			     GoView *view,
 			     GsfInput *input)
 
 {
@@ -645,7 +645,7 @@ go_plugin_file_opener_open (GOFileOpener const *fo, gchar const *enc,
 	}
 
 	g_return_if_fail (service_file_opener->cbs.plugin_func_file_open != NULL);
-	service_file_opener->cbs.plugin_func_file_open (fo, pfo->service, io_context, FIXME_FIXME_workbook_view, input, enc);
+	service_file_opener->cbs.plugin_func_file_open (fo, pfo->service, io_context, view, input, enc);
 }
 
 static void
@@ -888,7 +888,7 @@ go_plugin_file_saver_init (GOPluginFileSaver *fs)
 
 static void
 go_plugin_file_saver_save (GOFileSaver const *fs, GOIOContext *io_context,
-			    gconstpointer FIXME_FIXME_workbook_view,
+			    GoView const *view,
 			    GsfOutput *output)
 {
 	GOPluginFileSaver *pfs = GO_PLUGIN_FILE_SAVER (fs);
@@ -908,7 +908,7 @@ go_plugin_file_saver_save (GOFileSaver const *fs, GOIOContext *io_context,
 	}
 
 	g_return_if_fail (service_file_saver->cbs.plugin_func_file_save != NULL);
-	service_file_saver->cbs.plugin_func_file_save (fs, pfs->service, io_context, FIXME_FIXME_workbook_view, output);
+	service_file_saver->cbs.plugin_func_file_save (fs, pfs->service, io_context, view, output);
 }
 
 static void
diff --git a/goffice/app/go-plugin-service.h b/goffice/app/go-plugin-service.h
index 49d98df..23c8864 100644
--- a/goffice/app/go-plugin-service.h
+++ b/goffice/app/go-plugin-service.h
@@ -47,7 +47,7 @@ typedef struct {
 	         GsfInput *input, GOFileProbeLevel pl);
 	void     (*plugin_func_file_open) (
 	         GOFileOpener const *fo, GOPluginService *service,
-	         GOIOContext *io_context, gpointer fixme_workbook_view,
+	         GOIOContext *io_context, GoView *view,
 		 GsfInput *input, char const *enc);
 } GOPluginServiceFileOpenerCallbacks;
 
@@ -61,7 +61,7 @@ typedef struct _GOPluginServiceFileSaver GOPluginServiceFileSaver;
 typedef struct {
 	void  (*plugin_func_file_save) (
 	      GOFileSaver const *fs, GOPluginService *service,
-	      GOIOContext *io_context, gconstpointer fixme_workbook_view,
+	      GOIOContext *io_context, GoView const *view,
 	      GsfOutput *output);
 } GOPluginServiceFileSaverCallbacks;
 
diff --git a/goffice/app/go-view.c b/goffice/app/go-view.c
new file mode 100644
index 0000000..53ba008
--- /dev/null
+++ b/goffice/app/go-view.c
@@ -0,0 +1,30 @@
+/*
+ * go-view.c :  A GOffice base view
+ *
+ * Copyright (C) 2012 Jean Brefort (jean brefort normalesup org)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA
+ */
+
+#include <goffice-config.h>
+#include <goffice/app/go-view.h>
+#include <gsf/gsf-impl-utils.h>
+
+typedef GObjectClass GoViewClass;
+
+GSF_CLASS (GoView, go_view,
+	   NULL, NULL,
+	   G_TYPE_OBJECT)
diff --git a/goffice/app/go-view.h b/goffice/app/go-view.h
new file mode 100644
index 0000000..8e23ee7
--- /dev/null
+++ b/goffice/app/go-view.h
@@ -0,0 +1,40 @@
+/*
+ * go-view.h :  A GOffice base view
+ *
+ * Copyright (C) 2012 Jean Brefort (jean brefort normalesup org)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA
+ */
+#ifndef GO_VIEW_H
+#define GO_VIEW_H
+
+#include <goffice/goffice.h>
+
+G_BEGIN_DECLS
+
+struct _GoView {
+	GObject base;
+};
+
+#define GO_TYPE_VIEW    (go_view_get_type ())
+#define GO_VIEW(o)	    (G_TYPE_CHECK_INSTANCE_CAST ((o), GO_TYPE_VIEW, GoView))
+#define GO_IS_VIEW(o)	    (G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_TYPE_VIEW))
+
+GType go_view_get_type (void);
+
+G_END_DECLS
+
+#endif /* GO_VIEW_H */
diff --git a/goffice/app/goffice-app.h b/goffice/app/goffice-app.h
index 95fef4e..364dc8a 100644
--- a/goffice/app/goffice-app.h
+++ b/goffice/app/goffice-app.h
@@ -30,6 +30,7 @@ typedef struct _GOApp		GOApp;
 typedef struct _GODoc		GODoc;
 typedef struct _GODocControl	GODocControl;
 typedef struct _GOCmdContext	GOCmdContext;
+typedef struct _GoView		GoView;
 
 typedef struct _GOPlugin	GOPlugin;
 typedef struct _GOPluginService	GOPluginService;
@@ -76,6 +77,7 @@ G_END_DECLS
 #include <goffice/app/go-plugin-loader-module.h>
 #include <goffice/app/go-plugin-service.h>
 #include <goffice/app/go-plugin-service-impl.h>
+#include <goffice/app/go-view.h>
 #include <goffice/app/io-context.h>
 #include <goffice/app/io-context-priv.h>
 
diff --git a/goffice/graph/gog-axis.h b/goffice/graph/gog-axis.h
index e56447a..2857dc8 100644
--- a/goffice/graph/gog-axis.h
+++ b/goffice/graph/gog-axis.h
@@ -60,7 +60,7 @@ double	      gog_axis_map_get_baseline	  (GogAxisMap *map);
 void 	      gog_axis_map_get_extents 	  (GogAxisMap *map, double *start, double *stop);
 void 	      gog_axis_map_get_real_extents (GogAxisMap *map, double *start, double *stop);
 void	      gog_axis_map_get_bounds 	  (GogAxisMap *map, double *minimum, double *maximum);
-void 	      gog_axis_map_get_real_bounds (GogAxisMap *map, double *start, double *stop);
+void 	      gog_axis_map_get_real_bounds (GogAxisMap *map, double *minimum, double *maximum);
 void 	      gog_axis_map_free		  (GogAxisMap *map);
 gboolean      gog_axis_map_is_valid 	  (GogAxisMap *map);
 gboolean      gog_axis_map_is_inverted 	  (GogAxisMap *map);
diff --git a/goffice/graph/gog-graph.c b/goffice/graph/gog-graph.c
index 01a297e..8257ae9 100644
--- a/goffice/graph/gog-graph.c
+++ b/goffice/graph/gog-graph.c
@@ -547,7 +547,7 @@ gog_graph_num_rows (GogGraph const *graph)
  * gog_graph_dup:
  * @graph: #GogGraph
  *
- * Returns: (transfer full) a deep copy of @graph.
+ * Returns: (transfer full): a deep copy of @graph.
  **/
 GogGraph *
 gog_graph_dup (GogGraph const *graph)
@@ -557,6 +557,12 @@ gog_graph_dup (GogGraph const *graph)
 	return GOG_GRAPH (res);
 }
 
+/**
+ * gog_graph_get_theme:
+ * @graph: #GogGraph
+ *
+ * Returns: (transfer none): the #GogTheme used by @graph.
+ **/
 GogTheme *
 gog_graph_get_theme (GogGraph const *graph)
 {
@@ -602,7 +608,7 @@ gog_graph_set_theme (GogGraph *graph, GogTheme *theme)
  * gog_graph_get_data:
  * @graph: #GogGraph
  *
- * Returns: a list of the GOData objects that are data to the graph.
+ * Returns: (element-type GOData*) (transfer none): a list of the GOData objects that are data to the graph.
  * The caller should _not_ modify or free the list.
  **/
 GSList *
@@ -617,7 +623,7 @@ gog_graph_get_data (GogGraph const *graph)
  * @graph: #GogGraph
  * @dat: #GOData
  *
- * Returns: @dat or something equivalent to it that already exists in the graph.
+ * Returns: (transfer full): @dat or something equivalent to it that already exists in the graph.
  * 	Otherwise use @dat.  Adds a gobject ref to the target and increments a
  *	 count of the number of refs made from this #GogGraph.
  **/
@@ -1081,7 +1087,7 @@ gog_graph_view_handle_event (GogGraphView *view, GdkEvent *event,
  * gog_graph_view_get_selection:
  * @gview: #GogGraphView
  *
- * Returns: current selected view.
+ * Returns: (transfer none): current selected view.
  **/
 GogView *
 gog_graph_view_get_selection (GogGraphView *gview)
@@ -1129,7 +1135,8 @@ gog_graph_view_set_selection (GogGraphView *gview, GogObject *gobj)
  *
  * Builds a list of supported formats for image export.
  *
- * returns: a #GSList of #GOImageFormat.
+ * returns: (element-type GOImageFormat) (transfer container): a #GSList
+ * of #GOImageFormat.
  **/
 
 GSList *
diff --git a/goffice/gtk/go-action-combo-stack.c b/goffice/gtk/go-action-combo-stack.c
index 74e34e7..6ef3120 100644
--- a/goffice/gtk/go-action-combo-stack.c
+++ b/goffice/gtk/go-action-combo-stack.c
@@ -441,10 +441,10 @@ go_action_combo_stack_truncate (GOActionComboStack *act, unsigned n)
 }
 
 /**
- * go_action_combo_stack_selection :
- * @a : #GOActionComboStack
+ * go_action_combo_stack_selection:
+ * @a: #GOActionComboStack
  *
- * Returns: the key of the item last selected in one of the proxies.
+ * Returns: (transfer full): the key of the item last selected in one of the proxies.
  * 	Yes this interface is terrible, but we can't return the key in the
  * 	activate signal.
  *
diff --git a/goffice/gtk/go-calendar-button.c b/goffice/gtk/go-calendar-button.c
index d4b55d4..62b19f4 100644
--- a/goffice/gtk/go-calendar-button.c
+++ b/goffice/gtk/go-calendar-button.c
@@ -86,6 +86,12 @@ go_calendar_button_new (void)
 	return g_object_new (GO_TYPE_CALENDAR_BUTTON, NULL);
 }
 
+/**
+ * go_calendar_button_get_calendar:
+ * @calb: #GOCalendarButton
+ * 
+ * Returns: (transfer none): the embedded calendar.
+ **/
 GtkCalendar *
 go_calendar_button_get_calendar (GOCalendarButton *calb)
 {
diff --git a/goffice/gtk/go-color-group.c b/goffice/gtk/go-color-group.c
index 4d7b174..555c0d6 100644
--- a/goffice/gtk/go-color-group.c
+++ b/goffice/gtk/go-color-group.c
@@ -97,12 +97,12 @@ GSF_CLASS (GOColorGroup, go_color_group,
 	   G_TYPE_OBJECT)
 
 /**
- * go_color_group_find :
- * @name : target name
- * @context : an arbitrary id to identify what context to search in
+ * go_color_group_find:
+ * @name: target name
+ * @context: an arbitrary id to identify what context to search in
  *
  * No reference is added if it is found.
- * Returns: Look up the name/context specific color-group.
+ * Returns: (transfer none): Look up the name/context specific color-group.
  * 		%NULL if it is not found.
  **/
 GOColorGroup *
@@ -137,9 +137,9 @@ cg_equal (GOColorGroup const *a, GOColorGroup const *b)
 }
 
 /**
- * go_color_group_fetch :
- * @name : target name
- * @context : identifying context
+ * go_color_group_fetch:
+ * @name: target name
+ * @context: identifying context
  *
  * if name is NULL or a name not currently in use by another group
  * then a new group is created and returned. If name was NULL
@@ -148,7 +148,7 @@ cg_equal (GOColorGroup const *a, GOColorGroup const *b)
  * If name was already used by a group then the reference count is
  * incremented and a pointer to the group is returned.
  *
- * Returns: A #GOColorGroup
+ * Returns: (transfer full):  A #GOColorGroup
  **/
 GOColorGroup *
 go_color_group_fetch (char const *name, gpointer context)
diff --git a/goffice/gtk/go-color-palette.c b/goffice/gtk/go-color-palette.c
index 3e1c287..ad42c90 100644
--- a/goffice/gtk/go-color-palette.c
+++ b/goffice/gtk/go-color-palette.c
@@ -674,7 +674,7 @@ cb_menu_custom_activate (GtkWidget *button, GOMenuColor *menu)
  * @custom_dialog_title: optional string
  * @current_color: #GOColor
  *
- * Returns:  a submenu with a palette of colours.  Caller is responsible for
+ * Returns: (transfer full): a submenu with a palette of colours.  Caller is responsible for
  * 	creating an item to point to the submenu.
  **/
 GtkWidget *
diff --git a/goffice/gtk/go-graph-widget.c b/goffice/gtk/go-graph-widget.c
index ba997f3..aaac6bb 100644
--- a/goffice/gtk/go-graph-widget.c
+++ b/goffice/gtk/go-graph-widget.c
@@ -156,10 +156,11 @@ go_graph_widget_button_press_event (GtkWidget *widget,
 	if (event->type == GDK_BUTTON_PRESS) {
 		gw->button_pressed = TRUE;
 
-		gdk_window_get_pointer (gtk_widget_get_window (widget),
-					&gw->button_press_x,
-					&gw->button_press_y,
-					NULL);
+		gdk_window_get_device_position (gtk_widget_get_window (widget),
+		                                event->device,
+		                                &gw->button_press_x,
+		                                &gw->button_press_y,
+		                                NULL);
 	}
 
 	if (GTK_WIDGET_CLASS (graph_parent_klass)->button_press_event != NULL) {
@@ -198,8 +199,8 @@ go_graph_widget_motion_notify_event (GtkWidget *widget,
 		GtkAdjustment *hadjustment, *vadjustment;
 		hadjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (gw));
 		vadjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (gw));
-		gdk_window_get_pointer (gtk_widget_get_window (widget),
-					&x, &y, NULL);
+		gdk_window_get_device_position (gtk_widget_get_window (widget),
+		                                 event->device, &x, &y, NULL);
 
 		if (hadjustment != NULL) {
 			newval = gtk_adjustment_get_value (hadjustment) - (x - gw->button_press_x);
diff --git a/goffice/gtk/go-palette.c b/goffice/gtk/go-palette.c
index b8ee2db..5da6fab 100644
--- a/goffice/gtk/go-palette.c
+++ b/goffice/gtk/go-palette.c
@@ -282,9 +282,9 @@ cb_custom_activate (GtkWidget *item, GOPalette *palette)
  * @n_swatches: number of palette items
  * @swatch_width: swatch width as multiple of swatch height
  * @n_columns: number of columns for displaying palette items
- * @swatch_render: a user function used for swatch rendering
+ * @swatch_render: (scope notified): a user function used for swatch rendering
  * @data: user data for use by swatch render function
- * @destroy: a function to destroy user data on widget finalization
+ * @destroy: (scope async): a function to destroy user data on widget finalization
  *
  * Returns: a new #GOPalette object.
  **/
@@ -373,7 +373,7 @@ go_palette_show_custom (GOPalette *palette,
  * go_palette_get_user_data:
  * @palette: a #GOPalette
  *
- * Returns: a pointer to user data given to go_palette_new function.
+ * Returns: (transfer none): a pointer to user data given to go_palette_new function.
  **/
 gpointer
 go_palette_get_user_data (GOPalette *palette)
@@ -388,7 +388,7 @@ go_palette_get_user_data (GOPalette *palette)
  * @palette: a #GOPalette
  * @index: default index
  *
- * Returns: a new #GtkDrawingArea which will be rendered like a @palette
+ * Returns: (transfer full): a new #GtkDrawingArea which will be rendered like a @palette
  * swatch. @index can be changed later by changing swatch "index" data.
  **/
 GtkWidget *
diff --git a/goffice/gtk/go-selector.c b/goffice/gtk/go-selector.c
index 5279724..9e9dd08 100644
--- a/goffice/gtk/go-selector.c
+++ b/goffice/gtk/go-selector.c
@@ -442,7 +442,7 @@ go_selector_activate (GOSelector *selector)
  * A convenience function to access user_data of selector palette.
  * (See @go_palette_get_user_data).
  *
- * Returns: a pointer to palette user_data.
+ * Returns: (transfer none): a pointer to palette user_data.
  **/
 gpointer
 go_selector_get_user_data (GOSelector *selector)
@@ -520,9 +520,9 @@ go_selector_drag_data_get (GtkWidget        *button,
  * @selector: a #GOSelector
  * @dnd_target: drag and drop target type
  * @dnd_length: length of data transfered on drop
- * @data_get: a user provided data_get method
- * @data_received: a user provided data_received method
- * @fill_icon: a user function for dnd icon creation
+ * @data_get: (scope notified): a user provided data_get method
+ * @data_received: (scope notified): a user provided data_received method
+ * @fill_icon: (scope notified): a user function for dnd icon creation
  *
  * Setups drag and drop for @selector.
  **/
diff --git a/goffice/utils/go-file.c b/goffice/utils/go-file.c
index 91b441f..e1a19b1 100644
--- a/goffice/utils/go-file.c
+++ b/goffice/utils/go-file.c
@@ -909,7 +909,7 @@ go_file_get_date_changed (char const *uri)
 
 /**
  * go_url_encode:
- * @uri_fragment: The uri part to be encoded
+ * @uri: The uri part to be encoded
  * @type: 0: mailto, 1: file or http
  *
  * url-encode a string according to RFC 2368.
diff --git a/plugins/plot_distrib/gog-probability-plot.c b/plugins/plot_distrib/gog-probability-plot.c
index e05640e..7907d7b 100644
--- a/plugins/plot_distrib/gog-probability-plot.c
+++ b/plugins/plot_distrib/gog-probability-plot.c
@@ -65,7 +65,7 @@ gog_probability_plot_populate_editor (GogObject *item,
 			      GogDataAllocator *dalloc,
 			      GOCmdContext *cc)
 {
-	GtkWidget *w, *box = gtk_vbox_new (FALSE, 0);
+	GtkWidget *w, *box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 	gtk_container_set_border_width (GTK_CONTAINER (box), 12);
 	w = gtk_check_button_new_with_label (_("Use data as Y-values"));
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), GOG_PROBABILITY_PLOT (item)->data_as_yvals);
diff --git a/plugins/plot_surface/gog-xyz-surface-prefs.c b/plugins/plot_surface/gog-xyz-surface-prefs.c
index 050a49f..b711141 100644
--- a/plugins/plot_surface/gog-xyz-surface-prefs.c
+++ b/plugins/plot_surface/gog-xyz-surface-prefs.c
@@ -80,7 +80,9 @@ cb_rows_toggled (GtkToggleButton *btn, XYZSurfPrefsState *state)
 static void
 cb_missing_as_changed (GtkComboBoxText *box, XYZSurfPrefsState *state)
 {
-	g_object_set (state->plot, "missing-as", gtk_combo_box_text_get_active_text (box));
+	g_object_set (state->plot,
+	              "missing-as", gtk_combo_box_text_get_active_text (box),
+	              NULL);
 		
 }
 



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