rhythmbox r5638 - in trunk: . backends doc/reference lib rhythmdb sources widgets



Author: jmatthew
Date: Fri Mar 21 12:18:47 2008
New Revision: 5638
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5638&view=rev

Log:
2008-03-21  Jonathan Matthew  <jonathan d14n org>

	* backends/rb-player-gst-data-tee.c:
	(rb_player_gst_data_tee_interface_init):
	* backends/rb-player.c: (rb_player_interface_init):
	* lib/rb-async-queue-watch.c: (rb_async_queue_watch_dispatch):
	* lib/rb-async-queue-watch.h:
	* rhythmdb/rhythmdb-property-model.c:
	(rhythmdb_property_model_class_init):
	* sources/rb-source.c: (rb_source_class_init):
	* widgets/rb-cell-renderer-rating.c:
	(rb_cell_renderer_rating_class_init):
	* widgets/rb-rating.c: (rb_rating_class_init):
	* widgets/rb-search-entry.c: (rb_search_entry_class_init):
	* widgets/rb-uri-dialog.c: (rb_uri_dialog_class_init):
	Fix signal argument descriptions.  Forgot to include the object
	emitting the signals..
	
	* widgets/rb-song-info.c: (rb_song_info_class_init):
	* widgets/rb-song-info.h:
	* doc/reference/rhythmbox-sections.txt:
	gtk-doc for RBSongInfo.


Modified:
   trunk/ChangeLog
   trunk/backends/rb-player-gst-data-tee.c
   trunk/backends/rb-player.c
   trunk/doc/reference/rhythmbox-sections.txt
   trunk/lib/rb-async-queue-watch.c
   trunk/lib/rb-async-queue-watch.h
   trunk/rhythmdb/rhythmdb-property-model.c
   trunk/sources/rb-source.c
   trunk/widgets/rb-cell-renderer-rating.c
   trunk/widgets/rb-rating.c
   trunk/widgets/rb-search-entry.c
   trunk/widgets/rb-song-info.c
   trunk/widgets/rb-song-info.h
   trunk/widgets/rb-uri-dialog.c

Modified: trunk/backends/rb-player-gst-data-tee.c
==============================================================================
--- trunk/backends/rb-player-gst-data-tee.c	(original)
+++ trunk/backends/rb-player-gst-data-tee.c	Fri Mar 21 12:18:47 2008
@@ -49,6 +49,7 @@
 {
 	/**
 	 * RBPlayerGstDataTee::data-tee-inserted:
+	 * @player: the #RBPlayerGstDataTee implementation
 	 * @data_tee: the element which has been inserted
 	 *
 	 * The 'data_tee-inserted' signal is emitted when the tee element has been
@@ -66,6 +67,7 @@
 
 	/**
 	 * RBPlayerGstDataTee::data-tee-pre-remove:
+	 * @player: the #RBPlayerGstDataTee implementation
 	 * @data_tee: the element which is about to be removed
 	 *
 	 * The 'data_tee-pre-remove' signal is emitted immediately before the element

Modified: trunk/backends/rb-player.c
==============================================================================
--- trunk/backends/rb-player.c	(original)
+++ trunk/backends/rb-player.c	Fri Mar 21 12:18:47 2008
@@ -80,6 +80,7 @@
 {
 	/**
 	 * RBPlayer::eos:
+	 * @player: the #RBPlayer
 	 * @stream_data: the data associated with the stream that finished
 	 *
 	 * The 'eos' signal is emitted when a stream finishes.
@@ -96,6 +97,7 @@
 
 	/**
 	 * RBPlayer::info:
+	 * @player: the #RBPlayer
 	 * @stream_data: the data associated with the stream
 	 * @field: the #RBMetaDataField corresponding to the stream info
 	 * @value: the value of the stream info field
@@ -115,6 +117,7 @@
 
 	/**
 	 * RBPlayer::error:
+	 * @player: the #RBPlayer
 	 * @stream_data: the data associated with the stream
 	 * @error: description of the error
 	 *
@@ -134,6 +137,7 @@
 
 	/**
 	 * RBPlayer::tick:
+	 * @player: the #RBPlayer
 	 * @stream_data: the data associated with the stream
 	 * @elapsed: playback position in the stream
 	 * @duration: current estimate of the duration of the stream
@@ -155,6 +159,7 @@
 
 	/**
 	 * RBPlayer::buffering:
+	 * @player: the #RBPlayer
 	 * @stream_data: the data associated with the buffering stream
 	 * @progress: buffering percentage
 	 *
@@ -175,6 +180,7 @@
 
 	/**
 	 * RBPlayer::event:
+	 * @player: the #RBPlayer
 	 * @stream_data: data associated with the stream
 	 * @data: event data
 	 *
@@ -198,6 +204,7 @@
 
 	/**
 	 * RBPlayer::playing-stream:
+	 * @player: the #RBPlayer
 	 * @stream_data: data associated with the stream
 	 *
 	 * The 'playing-stream' signal is emitted when the main playing stream

Modified: trunk/doc/reference/rhythmbox-sections.txt
==============================================================================
--- trunk/doc/reference/rhythmbox-sections.txt	(original)
+++ trunk/doc/reference/rhythmbox-sections.txt	Fri Mar 21 12:18:47 2008
@@ -693,10 +693,9 @@
 <SECTION>
 <FILE>rhythmdb-property-model</FILE>
 <TITLE>RhythmDBPropertyModel</TITLE>
-RHythmDBPropertyModel
+RhythmDBPropertyModel
 RhythmDBPropertyModelClass
 RhythmDBPropertyModelColumn
-RhythmDBPropertyModelPrivate
 rhythmdb_property_model_new
 rhythmdb_property_model_iter_from_string
 rhythmdb_property_model_enable_drag
@@ -709,6 +708,7 @@
 RHYTHMDB_IS_PROPERTY_MODEL_CLASS
 RHYTHMDB_PROPERTY_MODEL_GET_CLASS
 RHYTHMDB_TYPE_PROPERTY_MODEL_COLUMN
+RhythmDBPropertyModelPrivate
 </SECTION>
 
 <SECTION>
@@ -904,7 +904,9 @@
 
 <SECTION>
 <FILE>rb-song-info</FILE>
-RBSongInfoPrivate
+<TITLE>RBSongInfo</TITLE>
+RBSongInfo
+RBSongInfoClass
 rb_song_info_new
 rb_song_info_append_page
 <SUBSECTION Standard>
@@ -915,6 +917,7 @@
 RB_SONG_INFO_CLASS
 RB_IS_SONG_INFO_CLASS
 RB_SONG_INFO_GET_CLASS
+RBSongInfoPrivate
 </SECTION>
 
 <SECTION>

Modified: trunk/lib/rb-async-queue-watch.c
==============================================================================
--- trunk/lib/rb-async-queue-watch.c	(original)
+++ trunk/lib/rb-async-queue-watch.c	Fri Mar 21 12:18:47 2008
@@ -27,6 +27,14 @@
  * @short_description: GSource for watching a GAsyncQueue in the main loop
  */
 
+/**
+ * RBAsyncQueueWatchFunc:
+ * @item: the item found in the queue
+ * @data: user data specified when creating the watch
+ *
+ * Callback to call when an item is found in the queue.
+ */
+
 typedef struct {
 	GSource source;
 	GAsyncQueue *queue;
@@ -52,10 +60,10 @@
 {
 	RBAsyncQueueWatch *watch = (RBAsyncQueueWatch *)source;
 	RBAsyncQueueWatchFunc cb = (RBAsyncQueueWatchFunc)callback;
-	gpointer event;
+	gpointer item;
 
-	event = g_async_queue_try_pop (watch->queue);
-	if (event == NULL) {
+	item = g_async_queue_try_pop (watch->queue);
+	if (item == NULL) {
 		return TRUE;
 	}
 
@@ -63,7 +71,7 @@
 		return FALSE;
 	}
 
-	cb (event, user_data);
+	cb (item, user_data);
 	return TRUE;
 }
 

Modified: trunk/lib/rb-async-queue-watch.h
==============================================================================
--- trunk/lib/rb-async-queue-watch.h	(original)
+++ trunk/lib/rb-async-queue-watch.h	Fri Mar 21 12:18:47 2008
@@ -22,7 +22,7 @@
 
 #include <glib.h>
 
-typedef void (*RBAsyncQueueWatchFunc) (gpointer event, gpointer data);
+typedef void (*RBAsyncQueueWatchFunc) (gpointer item, gpointer data);
 
 guint rb_async_queue_watch_new (GAsyncQueue *queue,
 				gint priority,

Modified: trunk/rhythmdb/rhythmdb-property-model.c
==============================================================================
--- trunk/rhythmdb/rhythmdb-property-model.c	(original)
+++ trunk/rhythmdb/rhythmdb-property-model.c	Fri Mar 21 12:18:47 2008
@@ -225,6 +225,7 @@
 
 	/**
 	 * RhythmDBPropertyModel::pre-row-deletion:
+	 * @model: the #RhythmDBPropertyModel
 	 *
 	 * Emitted just before a row is deleted from the model.
 	 */

Modified: trunk/sources/rb-source.c
==============================================================================
--- trunk/sources/rb-source.c	(original)
+++ trunk/sources/rb-source.c	Fri Mar 21 12:18:47 2008
@@ -318,6 +318,7 @@
 
 	/**
 	 * RBSource::deleted:
+	 * @source: the #RBSource
 	 *
 	 * Emitted when the source is being deleted.
 	 */
@@ -333,6 +334,7 @@
 
 	/**
 	 * RBSource::status_changed:
+	 * @source: the #RBSource
 	 *
 	 * Emitted when the source's status changes.
 	 */
@@ -348,6 +350,7 @@
 
 	/**
 	 * RBSource::filter_changed:
+	 * @source: the #RBSource
 	 *
 	 * Fires when the user changes the filter, either by changing the
 	 * contents of the search box or by selecting a different browser

Modified: trunk/widgets/rb-cell-renderer-rating.c
==============================================================================
--- trunk/widgets/rb-cell-renderer-rating.c	(original)
+++ trunk/widgets/rb-cell-renderer-rating.c	Fri Mar 21 12:18:47 2008
@@ -145,6 +145,7 @@
 
 	/**
 	 * RBCellRendererRating::rated:
+	 * @renderer: the #RBCellRendererRating
 	 * @score: the new rating
 	 * @path: string form of the #GtkTreePath to the row that was changed
 	 *

Modified: trunk/widgets/rb-rating.c
==============================================================================
--- trunk/widgets/rb-rating.c	(original)
+++ trunk/widgets/rb-rating.c	Fri Mar 21 12:18:47 2008
@@ -116,6 +116,7 @@
 
 	/**
 	 * RBRating::rated:
+	 * @rating: the #RBRating
 	 * @score: the new rating
 	 *
 	 * Emitted when the user changes the rating.

Modified: trunk/widgets/rb-search-entry.c
==============================================================================
--- trunk/widgets/rb-search-entry.c	(original)
+++ trunk/widgets/rb-search-entry.c	Fri Mar 21 12:18:47 2008
@@ -90,6 +90,7 @@
 
 	/**
 	 * RBSearchEntry::search:
+	 * @entry: the #RBSearchEntry
 	 * @text: search text
 	 *
 	 * Emitted when the search text changes.  A signal
@@ -109,6 +110,7 @@
 
 	/**
 	 * RBSearchEntry::activate:
+	 * @entry: the #RBSearchEntry
 	 *
 	 * Emitted when the entry is activated.
 	 */

Modified: trunk/widgets/rb-song-info.c
==============================================================================
--- trunk/widgets/rb-song-info.c	(original)
+++ trunk/widgets/rb-song-info.c	Fri Mar 21 12:18:47 2008
@@ -141,6 +141,35 @@
 
 #define RB_SONG_INFO_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RB_TYPE_SONG_INFO, RBSongInfoPrivate))
 
+/**
+ * SECTION:rb-song-info
+ * @short_description: song properties dialog
+ *
+ * Displays song properties and, if we know how to edit tags in the file,
+ * allows the user to edit them.
+ *
+ * This class has two modes.  It can display and edit properties of a single
+ * entry, in which case it uses a #GtkNotebook to split the properties across
+ * 'basic' and 'details' pages, and it can display and edit properties of
+ * multiple entries at a time, in which case a smaller set of properties is
+ * displayed in a single set.
+ *
+ * In single-entry mode, it is possible to add extra pages to the #GtkNotebook
+ * widget in the dialog.  The 'create-song-info' signal is emitted by the #RBShell
+ * object, allowing signal handlers to add pages by calling #rb_song_info_append_page.
+ * The lyrics plugin is currently the only place where this ability is used.
+ * In this mode, the dialog features 'back' and 'forward' buttons that move to the
+ * next or previous entries from the currently displayed track list.
+ *
+ * In multiple-entry mode, only the set of properties that can usefully be set
+ * across multiple entries at once are displayed.
+ *
+ * When the dialog is closed, any changes made will be applied to the entry (or entries)
+ * that were displayed in the dialog.  For songs in the library, this will result
+ * in the song tags being updated on disk.  For other entry types, this only updates
+ * the data store in the database.
+ */
+
 enum
 {
 	PRE_METADATA_CHANGE,
@@ -173,6 +202,13 @@
 
 	widget_class->show = rb_song_info_show;
 
+	/**
+	 * RBSongInfo:source:
+	 *
+	 * The #RBSource that created the song properties window.  Used to update
+	 * for track list changes, and to find the sets of albums, artist, and genres
+	 * to use for tag edit completion.
+	 */
 	g_object_class_install_property (object_class,
 					 PROP_SOURCE,
 					 g_param_spec_object ("source",
@@ -180,6 +216,13 @@
 					                      "RBSource object",
 					                      RB_TYPE_SOURCE,
 					                      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+	/**
+	 * RBSongInfo:entry-view:
+	 *
+	 * The #RBEntryView for the source that created the song properties window.  Used
+	 * find the set of selected entries, and to change the selection when the 'back' and
+	 * 'forward' buttons are pressed.
+	 */
 	g_object_class_install_property (object_class,
 					 PROP_ENTRY_VIEW,
 					 g_param_spec_object ("entry-view",
@@ -187,6 +230,12 @@
 					                      "RBEntryView object",
 					                      RB_TYPE_ENTRY_VIEW,
 					                      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+	/**
+	 * RBSongInfo:current-entry:
+	 *
+	 * The #RhythmDBEntry that is currently being displayed.  Will be NULL for
+	 * multiple-entry song properties windows.
+	 */
 	g_object_class_install_property (object_class,
 					 PROP_CURRENT_ENTRY,
 					 g_param_spec_boxed ("current-entry",
@@ -195,6 +244,12 @@
 							     RHYTHMDB_TYPE_ENTRY,
 					                     G_PARAM_READABLE));
 
+	/**
+	 * RBSongInfo:selected-entries:
+	 *
+	 * The set of #RhythmDBEntry objects currently being displayed.  Valid for both
+	 * single-entry and multiple-entry song properties windows.
+	 */
 	g_object_class_install_property (object_class,
 					 PROP_SELECTED_ENTRIES,
 					 g_param_spec_value_array ("selected-entries",
@@ -210,6 +265,15 @@
 	object_class->dispose = rb_song_info_dispose;
 	object_class->finalize = rb_song_info_finalize;
 
+	/**
+	 * RBSongInfo::pre-metadata-change:
+	 * @song_info: the #RBSongInfo instance
+	 * @entry: the #RhythmDBEntry being changed
+	 *
+	 * Emitted just before the changes made in the song properties window
+	 * are applied to the database.  This is only emitted in the single-entry
+	 * case.
+	 */
 	rb_song_info_signals[PRE_METADATA_CHANGE] =
 		g_signal_new ("pre-metadata-change",
 			      G_OBJECT_CLASS_TYPE (object_class),
@@ -221,6 +285,14 @@
 			      1,
 			      RHYTHMDB_TYPE_ENTRY);
 
+	/**
+	 * RBSongInfo::post-metadata-change:
+	 * @song_info: the #RBSongInfo instance
+	 * @entry: the #RhythmDBEntry that was changed
+	 *
+	 * Emitted just after changes have been applied to the database.
+	 * Probably useless.
+	 */
 	rb_song_info_signals[POST_METADATA_CHANGE] =
 		g_signal_new ("post-metadata-change",
 			      G_OBJECT_CLASS_TYPE (object_class),
@@ -677,6 +749,16 @@
 	}
 }
 
+/**
+ * rb_song_info_new:
+ * @source: #RBSource creating the song properties window
+ * @entry_view: the #RBEntryView to get selection data from
+ *
+ * Creates a new #RBSongInfo for the selected entry or entries in
+ * the specified entry view.
+ *
+ * Return value: the new song properties window
+ */
 GtkWidget *
 rb_song_info_new (RBSource *source, RBEntryView *entry_view)
 {
@@ -700,6 +782,17 @@
 	return GTK_WIDGET (song_info);
 }
 
+/**
+ * rb_song_info_append_page:
+ * @info: a #RBSongInfo
+ * @title: the title of the new page
+ * @page: the page #GtkWidget
+ *
+ * Adds a new page to the song properties window.  Should be called
+ * in a handler connected to the #RBShell 'create-song-info' signal.
+ *
+ * Return value: the page number
+ */
 guint
 rb_song_info_append_page (RBSongInfo *info, const char *title, GtkWidget *page)
 {

Modified: trunk/widgets/rb-song-info.h
==============================================================================
--- trunk/widgets/rb-song-info.h	(original)
+++ trunk/widgets/rb-song-info.h	Fri Mar 21 12:18:47 2008
@@ -36,22 +36,24 @@
 #define RB_IS_SONG_INFO_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_SONG_INFO))
 #define RB_SONG_INFO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_SONG_INFO, RBSongInfoClass))
 
+typedef struct _RBSongInfo RBSongInfo;
+typedef struct _RBSongInfoClass RBSongInfoClass;
 typedef struct RBSongInfoPrivate RBSongInfoPrivate;
 
-typedef struct
+struct _RBSongInfo
 {
 	GtkDialog parent;
 
 	RBSongInfoPrivate *priv;
-} RBSongInfo;
+};
 
-typedef struct
+struct _RBSongInfoClass
 {
 	GtkDialogClass parent_class;
 
 	void (*pre_metadata_change) (RBSongInfo *info, RhythmDBEntry *entry);
 	void (*post_metadata_change) (RBSongInfo *info, RhythmDBEntry *entry);
-} RBSongInfoClass;
+};
 
 GType      rb_song_info_get_type (void);
 

Modified: trunk/widgets/rb-uri-dialog.c
==============================================================================
--- trunk/widgets/rb-uri-dialog.c	(original)
+++ trunk/widgets/rb-uri-dialog.c	Fri Mar 21 12:18:47 2008
@@ -110,6 +110,7 @@
 
 	/**
 	 * RBURIDialog::location-added:
+	 * @dialog: the #RBURIDialog
 	 * @uri: URI entered
 	 *
 	 * Emitted when the user has entered a URI into the dialog.



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