[gnome-games] Update annotations on libgames-support



commit a1ed0b1ee905c77ef0cef2f52e61b0e4e4d8e3e1
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Jan 21 10:28:21 2011 +1100

    Update annotations on libgames-support

 libgames-support/games-clock.c          |    7 ++
 libgames-support/games-clock.h          |    6 +-
 libgames-support/games-conf.c           |    6 +-
 libgames-support/games-conf.h           |   12 ++--
 libgames-support/games-files.c          |   24 ++++----
 libgames-support/games-gridframe.h      |    4 +-
 libgames-support/games-preimage.c       |   16 +++---
 libgames-support/games-preimage.h       |    5 +-
 libgames-support/games-score.c          |   93 +++++++++++++++++++++----------
 libgames-support/games-score.h          |   29 +++++++---
 libgames-support/games-scores-backend.c |   47 +++++++++-------
 libgames-support/games-scores-dialog.h  |    4 +-
 libgames-support/games-scores.c         |    4 +-
 libgames-support/games-settings.c       |    5 +-
 libgames-support/games-sound.c          |    6 +-
 15 files changed, 168 insertions(+), 100 deletions(-)
---
diff --git a/libgames-support/games-clock.c b/libgames-support/games-clock.c
index 7eaaeae..2b0a4d8 100644
--- a/libgames-support/games-clock.c
+++ b/libgames-support/games-clock.c
@@ -93,6 +93,13 @@ games_clock_init (GamesClock *clock_widget)
   gtk_label_set_text (GTK_LABEL (clock_widget), "00:00:00");
 }
 
+/**
+ * games_clock_new:
+ * 
+ * Create a new game clock
+ * 
+ * Returns: A new #GamesClock
+ **/
 GtkWidget *
 games_clock_new (void)
 {
diff --git a/libgames-support/games-clock.h b/libgames-support/games-clock.h
index 0db21c6..e792018 100644
--- a/libgames-support/games-clock.h
+++ b/libgames-support/games-clock.h
@@ -23,7 +23,7 @@ G_BEGIN_DECLS
 #define GAMES_IS_CLOCK(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_CLOCK))
 #define GAMES_IS_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_CLOCK))
 
-typedef struct _GamesClock {
+typedef struct {
   GtkLabel label;
 
   guint update_timeout_id;
@@ -33,7 +33,9 @@ typedef struct _GamesClock {
   time_t stop_time;
 } GamesClock;
 
-typedef GtkLabelClass GamesClockClass;
+typedef struct {
+  GtkLabelClass parent_class;
+} GamesClockClass;
 
 GType      games_clock_get_type     (void);
 GtkWidget *games_clock_new          (void);
diff --git a/libgames-support/games-conf.c b/libgames-support/games-conf.c
index 70f5115..03e1dcb 100644
--- a/libgames-support/games-conf.c
+++ b/libgames-support/games-conf.c
@@ -45,7 +45,7 @@
 
 #define GAMES_CONF_GET_PRIVATE(that)(G_TYPE_INSTANCE_GET_PRIVATE ((that), GAMES_TYPE_CONF, GamesConfPrivate))
 
-struct _GamesConfPrivate {
+struct GamesConfPrivate {
   char *game_name;
 
 #ifdef HAVE_GNOME
@@ -592,7 +592,7 @@ games_conf_shutdown (void)
  * Returns the default #GamesConf instance. games_conf_init() must have
  * been called before this!
  *
- * Returns: a #GamesConf (no reference)
+ * Returns: (transfer none): a #GamesConf (no reference)
  */
 GamesConf *
 games_conf_get_default (void)
@@ -754,7 +754,7 @@ games_conf_set_string (const char *group, const char *key,
  * Returns the string array associated with @key in @group, or %NULL if
  * @key is not set, or an error occurred
  *
- * Returns: a newly allocated string array, or %NULL
+ * Returns: (transfer full): a newly allocated string array, or %NULL
  */
 char **
 games_conf_get_string_list (const char *group, const char *key,
diff --git a/libgames-support/games-conf.h b/libgames-support/games-conf.h
index 5bef9d7..23b701c 100644
--- a/libgames-support/games-conf.h
+++ b/libgames-support/games-conf.h
@@ -31,16 +31,18 @@ G_BEGIN_DECLS
 #define GAMES_IS_CONF_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), GAMES_TYPE_CONF))
 #define GAMES_CONF_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GAMES_TYPE_CONF, GamesConfClass))
 
-typedef  GObjectClass             GamesConfClass;
-typedef struct _GamesConf         GamesConf;
-typedef struct _GamesConfPrivate  GamesConfPrivate;
+typedef struct GamesConfPrivate  GamesConfPrivate;
 
-struct _GamesConf {
+typedef struct {
   GObject parent_instance;
 
   /*< private > */
   GamesConfPrivate *priv;
-};
+} GamesConf;
+
+typedef struct {
+  GObjectClass parent_class;  
+} GamesConfClass;
 
 GType games_conf_get_type (void);
 
diff --git a/libgames-support/games-files.c b/libgames-support/games-files.c
index 09e7589..71bfa9d 100644
--- a/libgames-support/games-files.c
+++ b/libgames-support/games-files.c
@@ -279,7 +279,7 @@ games_file_list_new_images (const gchar * path1, ...)
 
 /**
  * games_file_list_create_widget:
- * @gamesfilelist: The list of files to use.
+ * @filelist: The list of files to use.
  * @selection: The name to select as the default. NULL means no default.
  * @flags: A set of flags to specify how the names are displayed. 
  * 
@@ -290,25 +290,25 @@ games_file_list_new_images (const gchar * path1, ...)
  * removes extensions, and GAMES_FILE_LIST_REPLACE_UNDERSCORES with replaces
  * underscores with spaces.
  * 
- * Return value: A widget with the list of names.
+ * Return value: (transfer full): A widget with the list of names.
  **/
 GtkWidget *
-games_file_list_create_widget (GamesFileList * gamesfilelist,
+games_file_list_create_widget (GamesFileList * filelist,
 			       const gchar * selection, guint flags)
 {
   gint itemno;
   GtkComboBox *widget;
   gchar *visible, *string;
-  GList *filelist = gamesfilelist->list;
+  GList *iter = filelist->list;
   gboolean found = FALSE;
 
   widget = GTK_COMBO_BOX (gtk_combo_box_text_new ());
 
   itemno = 0;
-  while (filelist) {
+  while (iter) {
     gchar *s;
 
-    string = (gchar *) filelist->data;
+    string = (gchar *) iter->data;
     visible = g_strdup (string);
 
     /* These are a bit hackish, but we don't yet have a good regexp
@@ -337,7 +337,7 @@ games_file_list_create_widget (GamesFileList * gamesfilelist,
     g_free (visible);
 
     itemno++;
-    filelist = g_list_next (filelist);
+    iter = g_list_next (iter);
   }
   if (!found)
     gtk_combo_box_set_active (widget, 0);
@@ -348,17 +348,17 @@ games_file_list_create_widget (GamesFileList * gamesfilelist,
 /**
  * games_file_list_for_each:
  * @filelist: The file list to iterate over.
- * @function: The function to call on each item. It gets called with two 
+ * @function: (scope call): The function to call on each item. It gets called with two 
  * arguments: the file name and the pointer supplied to this function in 
  * the userdata argument.
- * @userdata: An arbitrary pointer that gets passed as the second argument
+ * @userdata: (closure): An arbitrary pointer that gets passed as the second argument
  * to each call of function.
  * 
  * Apply a function to each file name in the list.
  **/
 void
 games_file_list_for_each (GamesFileList * filelist, GFunc function,
-			  gpointer userdata)
+                          gpointer userdata)
 {
   g_list_foreach (filelist->list, function, userdata);
 }
@@ -366,10 +366,10 @@ games_file_list_for_each (GamesFileList * filelist, GFunc function,
 /**
  * games_file_list_find:
  * @filelist: The file list to iterate over.
- * @function: The function to call on each item. It gets called with two 
+ * @function: (scope call): The function to call on each item. It gets called with two 
  * arguments: the file name and the pointer supplied to this function in 
  * the userdata argument.
- * @userdata: An arbitrary pointer that gets passed as the second argument
+ * @userdata: (closure): An arbitrary pointer that gets passed as the second argument
  * to each call of function.
  * 
  * Find a file name by iterating through a list until the given function
diff --git a/libgames-support/games-gridframe.h b/libgames-support/games-gridframe.h
index cee5083..d4400d6 100644
--- a/libgames-support/games-gridframe.h
+++ b/libgames-support/games-gridframe.h
@@ -31,7 +31,7 @@ G_BEGIN_DECLS
 #define GAMES_IS_GRID_FRAME(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GRID_FRAME))
 #define GAMES_IS_GRID_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_GRID_FRAME))
 #define GAMES_GRID_FRAME_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_GRID_FRAME))
-  typedef struct _GamesGridFrame {
+typedef struct _GamesGridFrame {
   GtkBin bin;
 
   gint xmult;
@@ -46,7 +46,7 @@ G_BEGIN_DECLS
   GtkAllocation old_allocation;
 } GamesGridFrame;
 
-typedef struct _GamesGridFrameClass {
+typedef struct {
   GtkBinClass parent;
 } GamesGridFrameClass;
 
diff --git a/libgames-support/games-preimage.c b/libgames-support/games-preimage.c
index adaa9fe..bad1771 100644
--- a/libgames-support/games-preimage.c
+++ b/libgames-support/games-preimage.c
@@ -85,15 +85,15 @@ games_preimage_class_init (GamesPreimageClass * klass)
 
 /**
  * games_preimage_render:
- * @preimage:
+ * @preimage: the image to render
  * @width: the desired width
  * @height: the desired height
  *
  * Creates a #GdkPixbuf from @preimage's image at the specified
  * @width and @height.
  *
- * Returns: a new #GdkPixbuf
-*/
+ * Returns: (transfer full): the new #GdkPixbuf
+ **/
 GdkPixbuf *
 games_preimage_render (GamesPreimage * preimage, gint width, gint height)
 {
@@ -133,7 +133,7 @@ games_preimage_render (GamesPreimage * preimage, gint width, gint height)
  *
  * Renders from @preimage's image at the specified
  * @width and @height to @cr.
-*/
+ **/
 void
 games_preimage_render_cairo (GamesPreimage * preimage,
                              cairo_t *cr,
@@ -230,7 +230,7 @@ cairo_pixels_to_pixbuf (guint8 * pixels, int rowstride, int height)
  *
  * Returns: %TRUE, of %FALSE if there was an error or @preimage
  * isn't a scalable SVG image
- */
+ **/
 void
 games_preimage_render_cairo_sub (GamesPreimage * preimage,
                                  cairo_t *cr,
@@ -279,7 +279,7 @@ games_preimage_render_cairo_sub (GamesPreimage * preimage,
  * clipped to @width and @height.
  * If @node is NULL, the whole image is rendered into tha clip region.
  *
- * Returns: a new #GdkPixbuf, or %NULL if there was an error or @preimage
+ * Returns: (transfer full) (allow-none): a new #GdkPixbuf, or %NULL if there was an error or @preimage
  * isn't a scalable SVG image
  */
 GdkPixbuf *
@@ -336,7 +336,7 @@ games_preimage_render_sub (GamesPreimage * preimage,
  *
  * Creates a new #GamesPreimage from the image in @filename.
  *
- * Returns: a new #GamesPreimage, or %NULL if there was an error
+ * Returns: (allow-none): a new #GamesPreimage, or %NULL if there was an error
  */
 GamesPreimage *
 games_preimage_new_from_file (const gchar * filename, GError ** error)
@@ -468,7 +468,7 @@ games_preimage_get_height (GamesPreimage * preimage)
  *
  * Renders @preimage onto a new #GdkPixbuf at its natural size
  *
- * Returns: a reference to a #GdkPixbuf possibly owned by @images which
+ * Returns: (transfer full) (allow-none): a reference to a #GdkPixbuf possibly owned by @images which
  * you must not modify; or %NULL if there was an error
  */
 GdkPixbuf *
diff --git a/libgames-support/games-preimage.h b/libgames-support/games-preimage.h
index 8ec2398..15d8df5 100644
--- a/libgames-support/games-preimage.h
+++ b/libgames-support/games-preimage.h
@@ -36,7 +36,10 @@ G_BEGIN_DECLS
 #define GAMES_GET_PREIMAGE_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_PREIMAGE, GamesPreimageClass))
 
 typedef struct _GamesPreimage GamesPreimage;
-typedef GObjectClass GamesPreimageClass;
+
+typedef struct {
+  GObjectClass parent_class;
+} GamesPreimageClass;
 
 GType games_preimage_get_type (void);
 
diff --git a/libgames-support/games-score.c b/libgames-support/games-score.c
index 51d8291..8fa7f67 100644
--- a/libgames-support/games-score.c
+++ b/libgames-support/games-score.c
@@ -21,49 +21,47 @@
 
 #include "games-score.h"
 
+G_DEFINE_TYPE (GamesScore, games_score, G_TYPE_OBJECT)
+
+/**
+ * games_score_new:
+ * 
+ * Creates a new score object.
+ * 
+ * Return value: the new #GamesScore
+ **/
 GamesScore *
 games_score_new (void)
 {
-  GamesScore *newscore;
-  const gchar* name;
-
-  newscore = g_slice_new0 (GamesScore);
-  newscore->time = time (NULL);
-  /* FIXME: We don't handle the "Unknown" case. */
-  name = g_get_real_name ();
-  if (name[0] == '\0' || g_utf8_validate (name, -1, NULL) != TRUE) {
-    name = g_get_user_name ();
-    if (g_utf8_validate (name, -1, NULL) != TRUE) {
-      name = "";
-    }
-  }
-  newscore->name = g_strdup (name);
-
-  return newscore;
+  return g_object_new (GAMES_TYPE_SCORE, NULL);
 }
 
+/**
+ * games_score_dup:
+ * @orig: The score to duplicate
+ * 
+ * Duplicates a score object.
+ * 
+ * Return value: (transfer full): A copy of @orig.
+ **/
 GamesScore *
 games_score_dup (GamesScore * orig)
 {
-  GamesScore *new;
+  GamesScore *duplicate;
 
-  new = g_slice_new (GamesScore);
-  *new = *orig;
-  new->name = g_strdup (orig->name);
+  duplicate = games_score_new ();
+  duplicate->value = orig->value;
+  duplicate->time = orig->time;
+  g_free (duplicate->name);
+  duplicate->name = g_strdup (orig->name);
 
-  return new;
-}
-
-void
-games_score_destroy (GamesScore * score)
-{
-  g_free (score->name);
-  g_slice_free (GamesScore, score);
+  return duplicate;
 }
 
 gint
-games_score_compare_values (GamesScoreStyle style, GamesScoreValue a,
-			    GamesScoreValue b)
+games_score_compare_values (GamesScoreStyle style,
+                            GamesScoreValue a,
+                            GamesScoreValue b)
 {
   switch (style) {
   case GAMES_SCORES_STYLE_PLAIN_DESCENDING:
@@ -102,3 +100,38 @@ games_score_compare (GamesScoreStyle style, GamesScore * a, GamesScore * b)
 {
   return games_score_compare_values (style, a->value, b->value);
 }
+
+static void
+games_score_finalize (GObject * object)
+{
+  GamesScore *score = GAMES_SCORE (object);
+
+  g_free (score->name);
+
+  G_OBJECT_CLASS (games_score_parent_class)->finalize (object);
+}
+
+static void
+games_score_class_init (GamesScoreClass * klass)
+{
+  GObjectClass *object_class = (GObjectClass *) klass;
+
+  object_class->finalize = games_score_finalize;
+}
+
+static void
+games_score_init (GamesScore *score)
+{
+  const gchar* name;
+
+  score->time = time (NULL);
+  /* FIXME: We don't handle the "Unknown" case. */
+  name = g_get_real_name ();
+  if (name[0] == '\0' || g_utf8_validate (name, -1, NULL) != TRUE) {
+    name = g_get_user_name ();
+    if (g_utf8_validate (name, -1, NULL) != TRUE) {
+      name = "";
+    }
+  }
+  score->name = g_strdup (name);
+}
diff --git a/libgames-support/games-score.h b/libgames-support/games-score.h
index 1ef7a5b..e1dc68f 100644
--- a/libgames-support/games-score.h
+++ b/libgames-support/games-score.h
@@ -20,11 +20,17 @@
 #ifndef GAMES_SCORE_H
 #define GAMES_SCORE_H
 
-#include <glib.h>
+#include <glib-object.h>
 #include <time.h>
 
 G_BEGIN_DECLS
 
+#define GAMES_TYPE_SCORE            (games_score_get_type ())
+#define GAMES_SCORE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_SCORE, GamesScore))
+#define GAMES_SCORE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_SCORE, GamesScoreClass))
+#define GAMES_IS_SCORE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_SCORE))
+#define GAMES_IS_SCORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_SCORE))
+
 /* GamesScore and GamesScoresStyle should be kept in sync. */
 typedef enum {
   GAMES_SCORES_STYLE_PLAIN_DESCENDING,
@@ -39,18 +45,25 @@ typedef union {
 } GamesScoreValue;
 
 typedef struct {
+  GObject parent;
   GamesScoreValue value;
   time_t time;
   gchar *name;
 } GamesScore;
 
-GamesScore *games_score_new (void);
-GamesScore *games_score_dup (GamesScore * orig);
-gint games_score_compare (GamesScoreStyle style, GamesScore * a,
-			  GamesScore * b);
-gint games_score_compare_values (GamesScoreStyle style, GamesScoreValue a,
-				 GamesScoreValue b);
-void games_score_destroy (GamesScore * score);
+typedef struct {
+  GObjectClass parent_class;
+} GamesScoreClass;
+
+GType       games_score_get_type       (void);
+GamesScore *games_score_new            (void);
+GamesScore *games_score_dup            (GamesScore * orig);
+gint        games_score_compare        (GamesScoreStyle style,
+                                        GamesScore * a,
+			                            GamesScore * b);
+gint        games_score_compare_values (GamesScoreStyle style,
+                                        GamesScoreValue a,
+                                        GamesScoreValue b);
 
 G_END_DECLS
 
diff --git a/libgames-support/games-scores-backend.c b/libgames-support/games-scores-backend.c
index 1ee04f5..c6a4b54 100644
--- a/libgames-support/games-scores-backend.c
+++ b/libgames-support/games-scores-backend.c
@@ -69,22 +69,22 @@ static void
 games_scores_backend_init (GamesScoresBackend * backend)
 {
   backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (backend,
-					       GAMES_TYPE_SCORES_BACKEND,
-					       GamesScoresBackendPrivate);
+                                               GAMES_TYPE_SCORES_BACKEND,
+                                               GamesScoresBackendPrivate);
 }
 
 GamesScoresBackend *
 games_scores_backend_new (GamesScoreStyle style,
-			  char *base_name,
+                          char *base_name,
                           char *name)
 {
   GamesScoresBackend *backend;
   gchar *fullname;
 
   backend = GAMES_SCORES_BACKEND (g_object_new (GAMES_TYPE_SCORES_BACKEND,
-						NULL));
+                                                NULL));
 
-  if (name[0] == '\0')		/* Name is "" */
+  if (name[0] == '\0')                /* Name is "" */
     fullname = g_strjoin (".", base_name, "scores", NULL);
   else
     fullname = g_strjoin (".", base_name, name, "scores", NULL);
@@ -115,7 +115,7 @@ games_scores_backend_get_lock (GamesScoresBackend * self)
     /* Assume we already have the lock and rewind the file to
      * the beginning. */
     setgid_io_seek (self->priv->fd, 0, SEEK_SET);
-    return TRUE;		/* Assume we already have the lock. */
+    return TRUE;                /* Assume we already have the lock. */
   }
 
   self->priv->fd = setgid_io_open (self->priv->filename, O_RDWR);
@@ -152,9 +152,16 @@ games_scores_backend_release_lock (GamesScoresBackend * self)
 
 #endif /* ENABLE_SETGID */
 
-/* You can alter the list returned by this function, but you must
+/**
+ * games_scores_backend_get_scores:
+ * @self: the backend to get the scores from
+ * 
+ * You can alter the list returned by this function, but you must
  * make sure you set it again with the _set_scores method or discard it
- * with with the _discard_scores method. Otherwise deadlocks will ensue. */
+ * with with the _discard_scores method. Otherwise deadlocks will ensue.
+ *
+ * Return value: (transfer none) (allow-none) (element-type GnomeGamesSupport.Score): The list of scores
+ */
 GList *
 games_scores_backend_get_scores (GamesScoresBackend * self)
 {
@@ -183,7 +190,7 @@ games_scores_backend_get_scores (GamesScoresBackend * self)
     /* Dump the old list of scores. */
     t = self->scores_list;
     while (t != NULL) {
-      games_score_destroy ((GamesScore *) t->data);
+      g_object_unref (t->data);
       t = g_list_next (t);
     }
     g_list_free (self->scores_list);
@@ -205,9 +212,9 @@ games_scores_backend_get_scores (GamesScoresBackend * self)
       target -= length;
       length = setgid_io_read (self->priv->fd, buffer, info.st_size);
       if (length == -1) {
-	games_scores_backend_release_lock (self);
-	g_free (buffer);
-	return NULL;
+        games_scores_backend_release_lock (self);
+        g_free (buffer);
+        return NULL;
       }
     } while (length < target);
 
@@ -224,11 +231,11 @@ games_scores_backend_get_scores (GamesScoresBackend * self)
       *eol++ = '\0';
       timestr = strchr (scorestr, ' ');
       if (timestr == NULL)
-	break;
+        break;
       *timestr++ = '\0';
       namestr = strchr (timestr, ' ');
       if (namestr == NULL)
-	break;
+        break;
       *namestr++ = '\0';
       /* At this point we have three strings, all null terminated. All
        * part of the original buffer. */
@@ -238,12 +245,12 @@ games_scores_backend_get_scores (GamesScoresBackend * self)
       switch (self->priv->style) {
       case GAMES_SCORES_STYLE_PLAIN_DESCENDING:
       case GAMES_SCORES_STYLE_PLAIN_ASCENDING:
-	newscore->value.plain = g_ascii_strtod (scorestr, NULL);
-	break;
+        newscore->value.plain = g_ascii_strtod (scorestr, NULL);
+        break;
       case GAMES_SCORES_STYLE_TIME_DESCENDING:
       case GAMES_SCORES_STYLE_TIME_ASCENDING:
-	newscore->value.time_double = g_ascii_strtod (scorestr, NULL);
-	break;
+        newscore->value.time_double = g_ascii_strtod (scorestr, NULL);
+        break;
       default:
         g_assert_not_reached ();
       }
@@ -303,8 +310,8 @@ games_scores_backend_set_scores (GamesScoresBackend * self, GList * list)
     rname = d->name;
 
     buffer = g_strdup_printf ("%s %"G_GUINT64_FORMAT" %s\n",
-			      g_ascii_dtostr (dtostrbuf, sizeof (dtostrbuf),
-					      rscore), rtime, rname);
+                              g_ascii_dtostr (dtostrbuf, sizeof (dtostrbuf),
+                                              rscore), rtime, rname);
     setgid_io_write (self->priv->fd, buffer, strlen (buffer));
     output_length += strlen (buffer);
     /* Ignore any errors and blunder on. */
diff --git a/libgames-support/games-scores-dialog.h b/libgames-support/games-scores-dialog.h
index f63333d..a011942 100644
--- a/libgames-support/games-scores-dialog.h
+++ b/libgames-support/games-scores-dialog.h
@@ -54,14 +54,14 @@ typedef enum {
 
 typedef struct _GamesScoresDialogPrivate GamesScoresDialogPrivate;
 
-typedef struct _GamesScoresDialog {
+typedef struct {
   GtkDialog dialog;
 
   /* <private> */
   GamesScoresDialogPrivate *_priv;
 } GamesScoresDialog;
 
-typedef struct _GamesScoresDialogClass {
+typedef struct {
   GtkDialogClass parent_class;
 } GamesScoresDialogClass;
 
diff --git a/libgames-support/games-scores.c b/libgames-support/games-scores.c
index 98c12e2..a3c18f4 100644
--- a/libgames-support/games-scores.c
+++ b/libgames-support/games-scores.c
@@ -296,7 +296,7 @@ games_scores_add_score (GamesScores * self, GamesScoreValue score)
     s = g_list_nth (scores_list, GAMES_SCORES_SIGNIFICANT - 1);
     /* Note that we are guaranteed to only need to remove one link
      * and it is also guaranteed not to be the first one. */
-    games_score_destroy ((GamesScore *) (g_list_next (s)->data));
+    g_object_unref (g_list_next (s)->data);
     g_list_free (g_list_next (s));
     s->next = NULL;
   }
@@ -402,7 +402,7 @@ games_scores_update_score (GamesScores * self, gchar * new_name)
  * be the either the same or accurate after any games_scores call
  * except games_scores_get. Do not alter the data either.
  *
- * Returns: (transfer none): A list of GamesScore objects.
+ * Returns: (element-type GnomeGamesSupport.Score) (transfer none): A list of GamesScore objects.
  **/
 GList *
 games_scores_get (GamesScores * self)
diff --git a/libgames-support/games-settings.c b/libgames-support/games-settings.c
index b8f52a0..475bfe8 100644
--- a/libgames-support/games-settings.c
+++ b/libgames-support/games-settings.c
@@ -258,9 +258,10 @@ games_settings_get_keyval (GSettings *settings,
  * games_settings_set_keyval:
  * @settings: a #GSettings
  * @key: the key name
- * @value: the value to store
+ * @keyval: the value to store
+ * @modifiers: key modifiers with @keyval
  *
- * Associates @value with the key @key in group @group.
+ * Associates @keyval with the key @key in group @group.
  *
  * It is a programmer error to pass a key that isn't valid for settings.
  *
diff --git a/libgames-support/games-sound.c b/libgames-support/games-sound.c
index bf064aa..4cceeb1 100644
--- a/libgames-support/games-sound.c
+++ b/libgames-support/games-sound.c
@@ -167,7 +167,7 @@ games_sound_init (GdkScreen *screen)
 
 /**
  * games_sound_play:
- * @filename: the sound file to player
+ * @sound_name: the sound file to player
  * 
  * Plays a sound with the given filename from the
  * GAMES_RUNTIME_SOUND_DIRECTORY directory in .ogg format.
@@ -185,7 +185,7 @@ games_sound_play (const gchar * sound_name)
     
 /**
  * games_sound_play_for_screen:
- * @filename: the sound file to player
+ * @sound_name: the sound file to player
  * 
  * Plays a sound with the given filename from the
  * GAMES_RUNTIME_SOUND_DIRECTORY directory in .ogg format.
@@ -224,7 +224,7 @@ games_sound_play_for_event (const gchar *sound_name,
 /**
  * games_sound_play_for_widget:
  * @sound_name: the name of the sound to play
- * @event: the #GdkEvent associated with the sound
+ * @widget: the #GtkWidget to play the sound for
  *
  * Plays a sound for @widget. Use games_sound_play_for_event() instead
  * if the sound is associated with an event.



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