2009-09-14  Graham Cobb  <g+770@cobb.uk.net>

	* src/starling.c (starling_run): Remove Full Screen menu item for Fremantle

2009-09-13  Graham Cobb  <g+770@cobb.uk.net>

	* configure.ac: set up MAEMO5 condition for automake

	* data/Makefile.am (bass.png): Conditionalise application icon size

2009-08-31  Graham Cobb  <g+770@cobb.uk.net>

	* src/lyrics.c: Support libsoup2.4 as well as 2.2

	* src/lastfm.c: Support libsoup2.4 as well as 2.2

	* configure.ac (LIBSOUP22): Support libsoup2.4 as well as 2.2

2009-01-09  Neal H. Walfield  <neal@gnu.org>

	* configure.ac: Bump version to 0.9.9.  Release it.

2009-01-09  Neal H. Walfield  <neal@gnu.org>

	* data/Makefile.am (pixmap_DATA): Rename from this...
	(dist_pixmap_DATA): ... to this.  Add bass-20x20.png,
	bass-26x26.png, bass-40x40.png, bass-48x48.png and bass-64x64.png.
	(bass.png): Don't copy the source, link to it.

2008-12-21  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (worker_thread): Improve FAT detection heuristic.
	
2008-12-21  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_for_each): Handle MDB_VOLUME_NUMBER.
	* src/playlist.c (do_refresh): Sort by volume number.

2008-12-21  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (LOCK): Don't take the lock if the thread is the
	current thread is the main thread.
	(UNLOCK): Likewise.

2008-12-21  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (meta_data_reader): More robustly unreference
	MSG.  Always update a track's stats.

2008-12-21  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (meta_data_reader): Spend at most 3 seconds on any
	given song.

2008-12-21  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c: Include <assert.h>.
	(main_thread): New variable.
	(struct sig): New structure.
	(struct _MusicDB): Add fields signal_id, signal_queue and
	signal_lock.
	(signals_flush): New function.
	(signal_schedule): Likewise.
	(music_db_init): Initialize main_thread, db->signal_lock and
	db->signal_queue.
	(music_db_finalize): Free them.
	(music_db_add): Don't call g_signal_emit, instead use
	signal_schedule.
	(music_db_set_info_internal): Likewise.
	(worker_thread): Likewise.

	(status_kick): Call LOCK() before calling g_timeout_add using and
	UNLOCK() afterwards.

2008-12-20  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (worker_thread): Avoid scanning files multiple
	times.

2008-12-20  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h: Include <stdint.h>.
	(MDB_SIZE): Define.
	(struct music_db_info): Add field size.
	* src/musicdb.c (struct info_cache_entry): Add field size.
	(music_db_create_table): Create columns uid, md5 and size.
	(music_db_get_info_internal): Set INFO->SIZE if appropriate.
	(meta_data_reader): Save the track's size.

2008-12-19  Neal H. Walfield  <neal@gnu.org>

	* src/player.c (struct _Player): New fields volume, sink and
	bus_watch.
	(player_init): Set PL->VOLUME to -1.
	(playbin_ensure): Save the bus callback's identifier in
	PL->BUS_WATCH.  If PL->VOLUME >= 0, set PL->PLAYBIN's "volume"
	property.
	(playbin_recreate): New function.
	(player_set_source): Don't call playbin_ensure but
	playbin_recreate.
	(player_get_volume): Just return PL->VOLUME.
	(player_set_volume): Don't call playbin_ensure.  Save VOLUME in
	PL->VOLUME.  Only set the volume if PL->PLAYBIN is not NULL.

2008-12-19  Neal H. Walfield  <neal@gnu.org>

	* src/main.c (main): Call g_thread_init and gdk_threads_init.
	Surround gtk_main with a call to gdk_threads_enter and
	gdk_threads_leave.
	* src/musicdb.c (gdk_threads_enter): New weak declaration.
	(gdk_threads_leave): Likewise.
	(LOCK): New macro.
	(UNLOCK): Likewise.
	(music_db_init): Don't call g_thread_init here.
	(music_db_add): Use LOCK and UNLOCK when emitted signals.
	(music_db_set_info_internal): Likewise.
	(status_update): Likewise.
	(worker_thread): Likewise.

2008-12-19  Neal H. Walfield  <neal@gnu.org>

	* src/player.c: Include "config.h".
	(playbin_ensure): If we fail to create a playbin, display an error
	message to the user.

2008-12-08  Graham Cobb  <g+770@cobb.uk.net>

	* data/Makefile.am: Fix typo in icon filenames (bass... instead of base...)!

	* src/starling.c (starling_run): Change application name to GPE Audio player

	* debian/postinst: Add postinst script to rebuild hildon icon cache

	* hildon/gpe-todo.desktop.in.in (_Name): Change name to GPE Audio player

	* hildon/*.png: Add icons for 26x26, 40x40, 48x48 and 64x64.  
	Rename base.png to base-40x40.png

	* data/Makefile.am (nobase_icons_DATA): Create various icons for hildon

2008-11-27  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (worker_thread): When scanning files, don't add
	tracks with a 0 mtime to the meta data scanner queue.

2008-11-25  Neal H. Walfield  <neal@gnu.org>

	* src/lastfm.c (maybe_submit): Only call submit if neither USER
	nor PASSWORD is the empty string.

2008-11-25  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (meta_data_changed): New function.
	(starling_run): Connect ST->DB's "changed-entry" signal to it.

2008-11-25  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (status_kick): Trigger status_update every half
	second.

2008-11-25  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (worker_thread): Use sqlite_exec instead of
	sqlite_exec_printf where possible.

2008-11-25  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (busy_handler): If COOKIE is not NULL, set *COOKIE
	to 1.  Reduce pause time.
	(main_thread_busy): New variable.
	(music_db_open): Pass it to sqlite_busy_handler for the main
	sqlite instance.
	(music_db_add_recursive_internal): If SQLITEH is no the main
	instance and MAIN_THREAD_BUSY is greater than 0, pause and then
	decrement MAIN_THREAD_BUSY.
	(meta_data_reader): Likewise.

2008-11-25  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (new_decoded_pad): Unref AUDIOPAD.

2008-11-25  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (meta_data_reader): Free TAGS.

2008-11-24  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (new_decoded_pad): Drop reference to AUDIOPAD.

2008-11-24  Neal H. Walfield  <neal@gnu.org>

	* src/utils.h (html_escape_string): Drop string's const
	qualifier.  Note that the this function assumes ownership of
	STRING.  Update callers.
	* src/utils.c (html_escape_string): Drop string's const qualifier.
	If there are no characters that must be rewritten, just return
	STRING.  Otherwise, free string before returning.

2008-11-23  Neal H. Walfield  <neal@gnu.org>

	* configure.ac: Check for the gtk_volume_button_new function.
	* src/starling.c (struct _Starling) [!HAVE_GTK_VOLUME_BUTTON_NEW]:
	Remove field volume_button.
	(deserialize) [!HAVE_GTK_VOLUME_BUTTON_NEW]: Don't restore the
	volume's state.
	(serialize) [!HAVE_GTK_VOLUME_BUTTON_NEW]: Don't save the volume's
	state.
	(volume_changed) [!HAVE_GTK_VOLUME_BUTTON_NEW]: Don't define.
	(starling_run) [!HAVE_GTK_VOLUME_BUTTON_NEW]: Don't create the
	volume button.

2008-11-23  Neal H. Walfield  <neal@gnu.org>

	* src/utils.h (html_escape_string): New declaration.
	* src/utils.c (html_escape_string): New function.
	* src/starling.c (library_button_press_event): Use it.

2008-11-22  Neal H. Walfield  <neal@gnu.org>

	* src/player.h (player_get_volume): New declaration.
	(player_set_volume): Likewise.
	* src/player.c (player_get_volume): New function.
	(player_set_volume): Likewise.
	* src/starling.c (struct _Starling): Add field volume_button.
	(KEYVOLUME): Define.
	(deserialize): Restore ST->VOLUME_BUTTON's state.
	(serialize): Save ST->VOLUME_BUTTON's state.
	(volume_changed): New function.
	(starling_run): Create a volume button and save it in
	ST->VOLUME_BUTTON.  Attach it's "value-changed" signal to
	value_changed.

2008-11-22  Neal H. Walfield  <neal@gnu.org>

	* src/utils.h (sqlite_bind_int): Remove declaration.
	* src/utils.c (CHECK_TBL_STATEMENT): Don't define.
	(has_db_table): Rewrite.
	(sqlite_bind_int): Remove function.

2008-11-22  Neal H. Walfield  <neal@gnu.org>

	* src/lyrics.c (lyrics_init): Call has_db_table.  Only create the
	table if it returns false.

2008-11-22  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (lastfm_submit_cb): Fix typo.

2008-11-22  Neal H. Walfield  <neal@gnu.org>

	* src/lastfm.h: Include <gtk/gtklabel.h>.  Don't include
	"starling.h".
	(lastfm_init): Change prototype to take the user name, password,
	whether to auto submit tracks and a label to update.  Don't take a
	point to a Starling structure.  Update users.
	(lastfm_enqueue): Don't take a point to a Starling structure.
	Update users.
	(lastfm_submit): Don't take any parameters.  Update users.
	(lastfm_user_data_set): New declaration.
	(lastfm_count): Remove declaration.
	* src/lastfm.c: Don't include "md5.h" or "starling.h".  Include
	"md5sum.h".
	(LASTFM_MAX_ITEMS_PER_SUBMISSION): Make a string.
	(CREATE_STATEMENT): Don't define.
	(COUNT_STATEMENT): Likewise.
	(SELECT_STATEMENT): Likewise.
	(STORE_STATEMENT): Likewise.
	(DELETE_STATEMENT): Likewise.
	(HANDSHAKE_URI): Likewise.
	(lastfm_data): Remove field label.
	(lastfm_helper_data): Remove structure.
	(db): Don't initialize.
	(last_id_send): Likewise.
	(session): New global variable.
	(extant): Likewise.
	(user): Likewise.
	(password): Likewise.
	(label): Likewise.
	(auto_submit): Likewise.
	(lastfm_show_count): Rename from this...
	(update_status): ... to this.  Don't take a label or a count.
	Update users.  Instead, use LABEL and call lastfm_count.  If we
	are updating, note it.
	(lastfm_delete_by_id): Rewrite.
	(lastfm_create_table): Likewise.
	(lastfm_count): Likewise.  Mark as a pure function.
	(lastfm_submit): Move body of function from here...
	(submit): ... to this new function.  If EXTANT is true, return.
	Don't allocate the cookie here.  Don't allocate a new soup
	session; queue MSG on SESSION.
	(lastfm_submit): Call submit.
	(maybe_submit): New function.
	(lastfm_enqueue): Rewrite.  Call update_status and maybe_submit.
	(got_submission_response): Check whether we got a respose.  Parse
	the response more carefully.
	(lastfm_submit_real_helper): Move from here...
	(lastfm_submit_real): ... to here.  Rewrite.
	(got_handshake_response): Be more careful.
	(lastfm_user_data_set): New function.
	(lastfm_init): Take a user name, password, whether to auto submit
	tracks and a label to update.  Don't take a point to a Starling
	structure.  Rewrite.
	* src/starling.c (struct _Starling): Add field lastfm_autosubmit.
	(KEYLFMAUTOSUBMIT): Define.
	(starling_run): Don't call lastfm_init here...
	(deserialize_bottom_half): .. call it here.
	(deserialize): Restore ST->LASTFM_AUTOSUBMIT's state.
	(serialize): Save ST->LASTFM_AUTOSUBMIT's state.
	(lastfm_submit_cb): Show an error dialog box if the username or
	password is empty.
	(starling_run): Initialize ST->LASTFM_AUTOSUBMIT.

	* configure.ac: Check for g_compute_checksum_for_data.  If that is
	not found, check for md5_buffer.  If that is not found, add md5.c
	to LIBOBJ.
	* src/md5sum.h: New file.
	* src/md5sum.c: Likewise.
	* src/Makefile.am (starling_SOURCES): Remove md5.h and md5.c.  Add
	md5sum.h md5sum.c.
	(EXTRA_DIST): Add md5.h.

2008-11-22  Neal H. Walfield  <neal@gnu.org>

	* src/utils.c (uri_escape_string): Fix typo.
	Reported by Graham Cobb  <g+770@cobb.uk.net>.

2008-11-21  Neal H. Walfield  <neal@gnu.org>

	* src/player.c: Include "utils.h".
	(player_set_source): Use uri_escape_string.

2008-11-21  Neal H. Walfield  <neal@gnu.org>

	* src/lyrics.c: Include <libsoup/soup.h>, <stdbool.h> and
	<obstack.h>.
	(session): New global variable.
	(artist): Likewise.
	(title): Likewise.
	(view): Likewise.
	(extant): Likewise.
	(current_provider): Remove.
	(abort_extant): New function.
	(lyrcar_cook): Escape the parameters using uri_escape_string.
	(lyricwiki_cook): Escape the parameters using uri_escape_string.
	Upper case the initial letters in each word.
	(lyricwiki_parse): Rewrite.
	(lyrics_init): Likewise.  Create a table keyed on the artist and
	title, not the url.  Use the database "lyrics".
	(lyrics_set_provider): Remove function.
	(lyrics_select): Rewrite.  Remove parameter uri and content.
	Select based on the artist and title, not the url.  Return the
	content directly.  Update users.
	(lyrics_store): Rewrite.  Store the lyrics with the artist and
	title, not the url.
	(got_lyrics): Rewrite to handle parallel requests.  After one
	successful request, abort the remaining.
	(lyrics_display_with_uri): Remove function.
	(lyrics_display): Abort any extant messages.  Send one request per
	provider.
	(lyrics_cook_uri): Remove function.
	* src/lyrics.h: Don't include <libsoup/soup.h> or <stdbool.h>.
	(struct _Provider): Don't define.
	(Provider): Likewise.
	(provider_t): Likewise.
	(lyrics_set_provider): Remove declaration.
	(lyrics_get_provider): Likewise.
	(lyrics_display_with_uri): Likewise.
	(lyrics_select): Likewise.
	(lyrics_store): Likewise.
	(lyrics_cook_uri): Likewise.

	* src/utils.h (uri_escape_string): New declaration.
	(escape_spaces): Remove declaration.
	* src/utils.c (obstack_chunk_alloc): Include <obstack.h>.
	(obstack_chunk_alloc): Define.
	(obstack_chunk_free): Likewise.
	(escape_spaces): Remove function.
	(uri_escape_string): New function.

2008-11-20  Neal H. Walfield  <neal@gnu.org>

	* configure.ac: Depend on sqlite3.
	* src/musicdb.c (USE_SQLITE3): Define.
	[USE_SQLITE3]: Don't include <sqlite.h>.  Include <sqlite3.h>.	
	(sqlite) [USE_SQLITE3]: Define.
	(sqlite_open) [USE_SQLITE3]: New function.
	(sqlite_close) [USE_SQLITE3]: Define.
	(sqlite_exec) [USE_SQLITE3]: Likewise.
	(sqlite_freemem) [USE_SQLITE3]: Likewise.
	(sqlite_busy_handler) [USE_SQLITE3]: Likewise.
	(sqlite_mprintf) [USE_SQLITE3]: Likewise.
	(sqlite_last_insert_rowid) [USE_SQLITE3]: Likewise.
	(sqlite3_exec_printf) [USE_SQLITE3]: New function.
	(sqlite_exec_printf) [USE_SQLITE3]: Define.
	(busy_handler) [USE_SQLITE3]: Remove argument table.
	* src/starling.c (starling_run): Use db, not playlist.

2008-11-20  Neal H. Walfield  <neal@gnu.org>

	* src/player.c (playbin_ensure) [HILDON_VER == 0]: Only use
	playbinmaemo in this case.

2008-11-20  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (enum mdb_fields): Define MDB_DATE,
	MDB_VOLUME_NUMBER, MDB_VOLUME_COUNT, and MDB_PERFORMER.
	(struct music_db_info): Add fields date, volume_number,
	volume_count and performer.
	* src/musicdb.c (struct info_cache_entry): Add fields date,
	volume_number, volume_count and performer.
	(info_cache_evict): Free E->DATE and E->PERFORMER.
	(music_db_create_table): Add columns date, volume_number,
	volume_count and performer to the files tables.
	(music_db_get_info_internal): Read the date, volume_number,
	volume_count and performer columns.  Save them in E.  Return them
	if requested.
	(music_db_set_info_internal): Save the performer, volume_number,
	volume_count and date fields.
	(music_db_set_info_from_tags_internal): Likewise.
	(music_db_set_info_from_tags_internal): Free INFO.DATE and
	INFO.PERFORMER.
	* src/caption.c (build): Support printing the performer, date,
	volume number and volume count.
	* src/starling.c (change_caption_format): Note support for
	displaying the date, performer, volume number and volume_count.

2008-11-20  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h: Include <config.h>.
	(struct _MusicDBClass): Add field status_signal_id.
	* src/musicdb.c (struct _MusicDB): Add field status_source.
	(music_db_class_init): Initialize
	MUSIC_DB_CLASS->STATUS_SIGNAL_ID.
	(status_update): New function.
	(status_kick): Likewise.
	(meta_data_reader): Use it.
	(worker_thread): Likewise.
	* src/starling.c (struct _Starling): Add field status.
	(status_update): New function.
	(starling_run): Create a label, save it in ST->STATUS.  Add it to
	the main vbox.  Connect status_update to DB's "status" signal.

2008-11-19  Neal H. Walfield  <neal@gnu.org>

	* configure.ac: Check for gst_bus_timed_pop_filtered and
	gst_bus_timed_pop.
	* src/gst_bus_timed_pop.c: New file.
	* src/gst_bus_timed_pop_filtered.c: Likewise.
	* src/Makefile.am (AM_CFLAGS): Add $(BASE_CFLAGS).
	(starling_LDADD): Add $(LIBOBJS).
	(starling_catalog_LDADD): Likewise.

2008-11-19  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (enum mdb_fields): Add MDB_MTIME.
	(struct music_db_info): Add field mtime.
	* src/musicdb.c (struct info_cache_entry): Add field mtime.
	(music_db_get_info_internal): Return the mtime if requested.
	(meta_data_reader): If we successfully
	(worker_thread): When scanning the files, also check if their
	mtime has changed.  If so, add them to the DB->META_DATA_PENDING
	queue.

2008-11-12  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (starling_run): Disable searching in the
	ST->LIBRARY_VIEW and ST->QUEUE_VIEW.

	(try_seek): When printing the current length, cast it to an int.

	(starling_run): When printing ERR->MESSAGE, don't use it as the
	format, instead, use "%s".

2008-11-12  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_set_info_from_tags_internal): Always
	update the DATE_TAGS_UPDATED field.
	(meta_data_reader): Likewise.
	(worker_thread): Scan all local files for tags for which
	DATE_TAGS_UPDATED is NULL.

2008-11-11  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_set_info_from_tags_internal): Always at
	least update the date tags updated field.
	(meta_data_reader): Likewise.
	(worker_thread): Scan files for tags for which date_tags_updated
	is NULL.

2008-11-10  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (struct _MusicDB): Rename meta_data_reader_mutex
	to work_lock and change to a GMutex *.  Add fields worker, exit,
	work_cond, and dirs_pending.  Rename meta_data_reader_pending to
	meta_data_pending.  Update users.  Rename fs_scanner to
	worker_idle.  Update users.  Remove field meta_data_reader.
	(music_db_init): Initialize the thread package.  Initialize
	db->work_lock, db->work_cond, db->meta_data_pending and
	db->dirs_pending.
	(music_db_finalize): Join with the worker thread.  Destroy
	db->work_lock, db->work_cond, db->meta_data_pending and
	db->dirs_pending.
	(music_db_add): If we have added an entry to the queue, signal
	DB->WORK_COND.
	(music_db_add_recursive_internal): Don't call
	g_main_context_iteration.
	(music_db_add_recursive): Don't call
	music_db_add_recursive_internal.  Instead, add PATH to
	DB->DIRS_PENDING and signal DB->WORD_COND.
	(music_db_get_info_internal): New function.
	(music_db_get_info): Implement in terms of it.
	(music_db_set_info_internal): New function.
	(music_db_set_info): Implement in terms of it.
	(music_db_set_info_from_tags_internal): New function.
	(music_db_set_info_from_tags): Implement in terms of it.
	(struct fs_scanner): Rename from this...
	(struct worker): ... to this.  Update users.
	(fs_scanner_thread): Rename from this...
	(worker_thread): ... to this.  Update users.  Enter a loop waiting
	on DB->WORK_COND.  On signal, process DB->DIRS_PENDING and
	DB->META_DATA_PENDING.
	(fs_scanner): Rename from this...
	(worker_start): ... to this.  Update users.  Save the thread in
	DB->WORKER.  Make it joinable.
	(new_decoded_pad): New function.
	(meta_data_reader): Be more robust.  In particular, don't
	gst_bus_poll but gst_bus_timed_pop_filtered.  Don't reuse the
	pipeline but build a new pipeline for each track.  Ignore all
	messages that do not originate from PIPELINE.

2008-11-03  Neal H. Walfield  <neal@gnu.org>

	* moko-type.h: Remove file.
	* moko-finger-scroll.h: Likewise.
	* moko-finger-scroll.c: Likewise.
	* src/Makefile.am (starling_SOURCES): Don't add moko-type.h, 
	moko-finger-scroll.h, or moko-finger-scroll.c.
	* src/starling.c: [IS_HILDON]: Don't include
	<moko-finger-scroll.h>.
	(GtkScrolledWindow) [IS_HILDON]: Don't redefine.
	(gtk_scrolled_window_new) [IS_HILDON]: Likewise.
	(GTK_SCROLLED_WINDOW) [IS_HILDON]: Likewise.
	(gtk_scrolled_window_set_policy) [IS_HILDON]: Likewise.

2008-10-30  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (starling_load): If 90% of the song was played,
	increment its play count, set its last played field and update its
	duration.
	(position_update): Don't do it here.

2008-10-26  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (starling_load): Reset ST->CURRENT_LENGTH,
	ST->HAS_LYRICS, and ST->ENQUEUED.
	(player_state_changed): Don't do it here.

2008-10-26  Neal H. Walfield  <neal@gnu.org>

	* src/lyrics.h (lyrics_display): Take additional parameter
	force_download.  Update users.
	(lyrics_display_with_uri): Take additional parameters artist,
	title and force_download.  Update users.
	* src/lyrics.c (STORE_STATEMENT): Use INSERT OR REPLACE, not just
	INSERT.
	(lyrics_write_textview): Also display "No lyrics found" if CONTENT
	is the empty string.
	(lyrics_display): Take additional parameter force_download.  Pass
	it to lyrics_display_with_uri.
	(lyrics_display_with_uri): Take additional parameters artist,
	title and force_download.  Only select from the database if
	FORCE_DOWNLOAD is false.  Print nicer status messages.

2008-10-26  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (change_caption_format): Change box's child
	spacing to 0.
	(starling_run): Likewise.

2008-10-26  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (lyrics_download): New function.
	(starling_run): Create "download" button on lyrics tab.  Connect
	"clicked" signal to it.

2008-10-20  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (change_caption_format): Reformat dialog text.
	
2008-10-20  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (activated_cb): Handle the case where VIEW
	corresponds to the queue.
	(starling_run): Connect ST->QUEUE_VIEW's "row-activated" signal to
	activated_cb.

2008-10-20  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_play_list_query): Fix order of
	parameters.
	* src/starling.c (starling_advance): If random mode is enabled and
	the play queue is non-empty, choose a random element from the play
	queue.

2008-10-20  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct _Starling): Rename field scale to
	position_slider and scale_sliding to user_seeking.  Update users.
	(scale_sliding_update): Rename from this...
	(user_seeking_update): ... to this.  Update users.
	(scale_button_released_cb): Rename from this...
	(position_slider_button_released_cb): ... to this.  Update users.
	(scale_button_pressed_cb): Rename from this...
	(position_slider_button_pressed_cb): ... to this.  Update users.

	(position_slider_button_pressed_cb): Don't assert
	that ST->POSITION_SLIDING is 0.  Instead, only set up the timeout if
	ST->POSITION_SLIDING is 0.
	Reported by Thomas Schwinge <tschwinge@gnu.org>.

2008-10-07  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (remove_cb): Remove tracks from the right play
	list.
	(clear_cb): Clear the library, if that is the selected tab, or the
	queue, if that is the selected tab.
	(clear_queue_cb): Remove function.
	(starling_run): Rename menu item "Clear play list" to "Clear list".

2008-10-07  Neal H. Walfield  <neal@gnu.org>

	* src/caption.c (render): Account for that fact that S may be
	NULL.
	Reported by Thomas Schwinge <tschwinge@gnu.org>.

2008-10-07  Neal H. Walfield  <neal@gnu.org>

	* debian/control: Add libgstreamer-plugins-base0.10-dev and
	libhandoff-dev to Build-Depends.
	* README: Add libhandoff-dev build dependency.
	Reported by Thomas Schwinge <tschwinge@gnu.org>.

2008-10-07  Neal H. Walfield  <neal@gnu.org>

	* moko-type.h: New file.
	* moko-finger-scroll.h: Likewise.
	* moko-finger-scroll.c: Likewise.
	* src/Makefile.am (starling_SOURCES) [HILDON]: Add moko-type.h, 
	moko-finger-scroll.h and moko-finger-scroll.c.
	* src/starling.c [IS_HILDON]: Include <moko-finger-scroll.h>.
	(GtkScrolledWindow) [IS_HILDON]: Define.
	(gtk_scrolled_window_new) [IS_HILDON]: Likewise.
	(GTK_SCROLLED_WINDOW MOKO_FINGER_SCROLL) [IS_HILDON]: Likewise.
	(gtk_scrolled_window_set_policy) [IS_HILDON]: Likewise.

2008-10-07  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c: Include <gdk/gdk.h>.
	(library_tap_and_hold_cb) [IS_HILDON]: New function.
	(starling_run) [IS_HILDON]: Call gtk_widget_tap_and_hold_setup on
	ST->LIBRARY_VIEW.  Connect its "tap-and-hold" signal to
	library_tap_and_hold_cb.

2008-10-06  Neal H. Walfield  <neal@gnu.org>

	* configure.ac: Bump version to 0.9.2.

2008-10-06  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct _Starling): Add field
	playpause_toggled_signal_id.
	(player_state_changed): Block ST->PLAYPAUSE's toggled signal while
	toggling it.
	(starling_run): Save ST->PLAYPAUSE's "toggled" signal id in
	ST->PLAYPAUSE_TOGGLED_SIGNAL_ID.

	(starling_load): Set ST->PENDING_SEEK to -1 and ST->CURRENT_LENGTH
	to -1.
	(try_seek): New function.
	(scale_button_released_cb): Save the seek position in
	ST->PENDING_SEEK.  Call try_seek.
	(position_update): Be more robust.  If there is no current
	position but ST->PENDING_SEEK is not -1, use that.  Call TRY_SEEK
	if required.
	(player_state_changed): Call POSITION_UPDATE when enter
	GST_STATE_PAUSED or GST_STATE_NULL.  Call try_seek as required.
	(starling_run): Initialize ST->PENDING_SEEK to -1.

	(struct deserialize_bottom_half): Add field loaded_song.
	(deserialize_bottom_half): Load BH->LOADED_SONG if it is not 0.
	Be careful to preserve ST->PENDING_SEEK.
	(deserialize): Don't load the song here.  Save it in
	BH->LOADED_SONG.

2008-10-06  Neal H. Walfield  <neal@gnu.org>

	* src/player.c (player_pause): If PL->PLAYBIN is NULL, return.
	Print out some debugging information if setting the state fails.
	(player_unpause): Print out some debugging information if setting
	the state fails.
	(player_play_pause_toggle): Likewise.
	(player_playing): If PL->PLAYBIN is NULL, return FALSE.

2008-10-05  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (deserialize): Don't pass NULL as the iter
	parameter to gtk_list_store_insert_with_values.
	(search_text_save): Likewise.

2008-10-05  Neal H. Walfield  <neal@gnu.org>

	* src/player.c (player_set_source): Remove debugging output.

2008-10-05  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (search_text_save): Move search to the search of
	the list.

2008-10-05  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (fs_scanner_thread): Detect files by the presense
	of a leading /, not a "file://" prefix.
	(music_db_add): Likewise.
	(music_db_add_file_internal): Don't add a "file://" prefix.
	* src/player.c: Include <obstack.h>.
	(obstack_chunk_alloc): Define.
	(obstack_chunk_free): Likewise.
	(player_set_source): If the leading character is a '/', assume it
	is a file name and create a URI out of it.
	* configure.ac: Check for the availability of g_uri_escape_string.

2008-10-05  Neal H. Walfield  <neal@gnu.org>

	* src/caption.c (build): Fix negative conditional.

	* src/starling.c (deserialize): Add some default searches.

	(change_caption_format): Don't add the current format twice.

	(set_position_text): Use a local variable for the buffer.

	(position_update): Return if PLAYER_QUERY_POSITION returns false.

2008-10-03  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (play_list_combo_refresh): Call
	play_list_combo_changed before unblocking the signal handler if
	SAVE_OLD_CONFIG is false.

2008-10-03  Neal H. Walfield  <neal@gnu.org>

	* src/caption.c (struct chunk): Add fields cond_true, cond_false
	and bytes.
	(caption_create): Break the VM construction out of this function...
	(build): ... and put it in this new function.  Add support for
	conditionals, URL and left ellipsizing.
	(caption_render): Break the rendering out of this function...
	(render): ... and put it in this new function.  Add support for
	conditionals, URL and left ellipsizing.
	* src/caption.h (caption_create): Update documentation.
	* src/starling-catalog.c: Update documentation.
	* src/starling.c (change_caption_format): Update the default
	captions.  Update the documentation.

2008-10-03  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (change_caption_format): Only add the defaults
	that are not in the history.

2008-10-03  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (CAPTION_FMT_DEFAULT): Define.
	(KEY_TRACK_CAPTION): Rename from this...
	(KEY_CAPTION_FORMAT): ... to this.  Update users.
	(KEY_CAPTION_FORMAT_HISTORY): Define.
	(config_file_load): New function.
	(config_file_save): Likewise.
	(deserialize): Use them.
	(serialize): Likewise.
	(change_caption_format): New function.
	(title_data_func): Use CAPTION_FMT_DEFAULT.
	(starling_run): Create a menu item for changing the caption
	format.  Connect the "activate" signal to change_caption_format.

2008-10-03  Neal H. Walfield  <neal@gnu.org>

	* src/lastfm.c: Fix spelling, it's utils.h, not util.h.

2008-10-02  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (position_update): Remove extra 0.
	Update the track's duration.

2008-10-02  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_add): Don't scan recovered files.

2008-10-02  Neal H. Walfield  <neal@gnu.org>

	* src/md5.h: Restore file and update copy from glibc.
	* src/md5.c: Likewise.
	* src/Makefile.am: Add md5.h and md5.c.
	* src/lastfm.c (lastfm_md5): Don't use
	g_compute_chechsum_for_data.  Restore previous version.

2008-10-02  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (set_title): If ST->LOADED_SONG is not valid, set
	the title bar to "Starling".
	(play_list_combo_refresh): Don't call play_list_combo_changed
	explicitly.  Instead call gtk_combo_box_set_active after we
	unblock the changed signal.
	(clear_cb): If clearing the library, call player_pause.

2008-10-02  Graham Cobb  <g+770@cobb.uk.net>

	* src/Makefile.am (starling_CFLAGS): re-instate HILDON_CFLAGS and HILDON_LIBS
	* configure.ac: export HILDON_CFLAGS and HILDON_LIBS

2008-10-02  Neal H. Walfield  <neal@gnu.org>

	* src/starling.h (starling_come_to_front): New declaration.
	(starling_quit): Likewise.
	* src/starling.c (starling_come_to_front): New function.
	(starling_quit): Likewise.
	(do_quit): Remove function, replace uses with starling_quit.
	(x_quit): Likewise.
	(menu_quit): Likewise.
	* configure.ac (GUI_MODULES): Add libhandoff.
	* src/main.c: Include "config.h", <handoff.h> and <string.h>.
	(handoff_callback): New function.
	(handoff_serialize): Likewise.
	(osso_top_callback) [IS_HILDON]: Likewise.
	(main): Create a handoff instance.
	[IS_HILDON]: Register a top callback.

2008-10-02  Neal H. Walfield  <neal@gnu.org>

	* src/lyrics.h: Include <stdbool.h>.
	(lyrics_display): Take additional parameter try_to_download.
	Update users.
	(lyrics_display_with_uri): Likewise.
	* src/lyrics.c (lyrics_display): Take additional parameter
	try_to_download.  Pass it to lyrics_display_with_uri.
	(lyrics_display_with_uri): Take additional parameter
	try_to_download.  If the lyrics are not in the database, only try
	to download them if TRY_TO_DOWNLOAD is true.
	* src/starling.c (struct _Starling): Add field download_lyrics.
	(set_title): Pass the active state of ST->DOWNLOAD_LYRICS to
	lyrics_display.
	(KEY_LYRICS_DOWNLOAD): Define.
	(deserialize): Set ST->DOWNLOAD_LYRICS's active state according to
	KEY_LYRICS_DOWNLOAD.
	(serialize): Save ST->DOWNLOAD_LYRICS's active state according to
	KEY_LYRICS_DOWNLOAD.
	(starling_run): Create ST->DOWNLOAD_LYRICS and add it to the
	option menu.

2008-10-02  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_set_info_from_tags): If a duration tag
	is present, add it.
	* src/search.y (expand_term): Support searching on the duration.
	* src/caption.c (struct my_info): New structure.
	(caption_create): Support %s for seconds and %m for minutes.
	(caption_render): Support rendering seconds and minutes.
	* src/starling-catalog.c: Note that %s and %m are supported.  Fix
	example.

2008-10-02  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (enum mdb_fields): Add MDB_PRESENT.
	(struct music_db_info): Add field present.
	* src/musicdb.c (struct info_cache_entry): Add field present.
	(music_db_create_table): Add column removed to table FILES.
	(music_db_count): When counting the number of the tracks in the
	library, exclude tracks that are not present.
	(fs_scanner_thread): If a file is not found, don't remove it,
	instead, change its removed field to the current time.
	(music_db_add): If the track is just marked as removed, restore
	it.
	(music_db_get_info): Return whether the file is present.
	(music_db_for_each): When iterating over the main library, add the
	constraint that the track be present.
	* src/starling.c (starling_load): Check if the track is present.
	If not, return FALSE.
	(title_data_func): If the track is not present, render it in a
	lighter font.

	* src/musicdb.c (music_db_remove): Also remove reference to the
	track from other play lists.

	* src/starling.c (queue_cb): Only free S if NEED_FREE is true.

2008-10-01  Neal H. Walfield  <neal@gnu.org>

	* src/starling-catalog.c: Improve documentation.

2008-10-01  Neal H. Walfield  <neal@gnu.org>

	* configure.ac (DEP_MODULES): Break this into...
	(BASE_MODULES): ... this ...
	(GUI_MODULES): ... and this.  Update users.
	* src/Makefile.am (bin_PROGRAMS): Add starling-catalog.
	(starling_catalog_CFLAGS): New variable.
	(starling_catalog_LDADD): Likewise.
	(starling_catalog_SOURCES): Likewise.
	* src/starling-catalog.c: New file.

2008-10-01  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_for_each): If the field is not a string,
	don't lower-case the value.
	
	(music_db_get_info): Use g_strdup, not strdup.

2008-10-01  Neal H. Walfield  <neal@gnu.org>

	* configure.ac: Bump version to 0.9.1.

2008-10-01  Neal H. Walfield  <neal@gnu.org>

	* HACKING: Move build instructions...
	* README: ... to this new file.

2008-10-01  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (search_text_save): Use gtk_list_store_set to
	update the time stamp.
	
2008-10-01  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (deserialize): Extract searchs' time stamps.
	(serialize): Save searchs' time stamps.
	(search_text_save): Update the search's time stamp.
	(starling_run): Add a column to ST->SEARCHES for a search's time
	stamp.

2008-10-01  Neal H. Walfield  <neal@gnu.org>

	* src/lastfm.c: Don't include "md5.h".  Include "utils.h".
	(lastfm_md5): Don't use md5_buffer.  Instead use
	g_compute_checksum_for_data.
	* src/md5.h: Remove file.
	* src/md5.c: Likewise.
	* src/Makefile.am (starling_SOURCES): Remove md5.h and md5.c.

2008-10-01  Neal H. Walfield  <neal@gnu.org>

	* src/utils.h (gtk_tree_view_get_position): Remove declaration.
	(gtk_tree_model_get_iter_from_int): Likewise.
	* src/utils.c (gtk_tree_view_get_position): Remove function.
	(gtk_tree_model_get_iter_from_int): Likewise.

2008-10-01  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (player_state_changed): Don't mark the track as
	played here...
	(position_update): ... do it here if at least 90% of the track has
	been reached.  Submit to lastfm if this holds and the track is at
	least 30 seconds long.

2008-09-30  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (meta_data_reader): Break out of the loop if the
	queue is empty, not if it is not empty.

2008-09-30  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (KEY_TRACK_CAPTION): Define.
	(deserialize): Set ST->CAPTION based on KEY_TRACK_CAPTION.
	(title_data_func): If ST->CAPTION is NULL, create a simple
	caption.
	(starling_run): Don't initialize ST->CAPTION here.

2008-09-30  Neal H. Walfield  <neal@gnu.org>

	* src/caption.c: New file.
	* src/caption.c: Likewise.
	* src/Makefile.am (starling_SOURCES): Add caption.h and caption.c.
	* src/starling.c: Include "caption.h".
	(struct _Starling): Add field caption.
	(title_data_func): Use caption_render to generate the caption.
	(starling_run): Create ST->CAPTION.

2008-09-30  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (library_button_press_event): Correctly set
	FIRST_TITLE and FIRST_SOURCE.

2008-09-30  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct _Starling): Add fields rating and
	rating_change_signal_id.
	(set_title): Get the song's rating and set ST->RATING accordingly.
	(rating): New function.
	(starling_run): Create a combo box for the ratings.  Attach the
	"changed" signal to rating.  Save the signal id in
	ST->RATING_CHANGE_SIGNAL_ID.
	* src/search.y (expand_term): Treat a word with the "rating:"
	prefix as a request to search on the rating.

2008-09-30  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (enum mdb_fields): Add MDB_RATING.
	(music_db_get_info): Add parameter info.  Remove parameters
	source, artist, album, track, title, duration and genre.  Update
	users.
	* src/musicdb.c (struct info_cache_entry): Add fields play_count,
	date_added, date_last_played, date_tags_updated, and rating.
	(music_db_get_info): Add parameter info.  Remove parameters
	source, artist, album, track, title, duration and genre.  Get
	information for play_count, date_added, date_last_played,
	date_tags_updated, and rating as per INFO->FIELDS.  Save
	play_count, date_added, date_last_played, date_tags_updated, and
	rating in the cache entry.
	(music_db_set_info): Save play_count, date_added,
	date_last_played, date_tags_updated, and rating in the DB as per
	INFO->FIELDS.
	* src/playlist.h (PL_COL_PLAY_COUNT): Define.
	(PL_COL_DATE_ADDED): Likewise.
	(PL_COL_DATE_LAST_PLAYED): Likewise.
	(PL_COL_DATE_TAGS_UPDATED): Likewise.
	(PL_COL_RATING): Likewise.
	(play_list_get_info): Remove declaration.
	(play_list_index_to_uid): New declaration.  Update users of
	play_list_get_info to use this and music_db_get_info, as required.
	* src/playlist.c (play_list_idx_to_uid): Rename from this...
	(play_list_index_to_uid): ... to this.  Remove static qualifier.
	Update users.
	(play_list_get_info): Remove function.
	(get_value): Support PL_COL_PLAY_COUNT, PL_COL_DATE_ADDED,
	PL_COL_DATE_LAST_PLAYED, PL_COL_DATE_TAGS_UPDATED and
	PL_COL_RATING.

2008-09-30  Neal H. Walfield  <neal@gnu.org>

	* configure.ac: Add AC_PROG_YACC.

2008-09-30  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (queue_cb): Set ENTRY to activate the default
	button on enter.

	(starling_run): Replace the search entry with a combo box entry.

2008-09-30  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct _Starling): Add field searches.
	(KEY_SEARCHES): Define.
	(deserialize): Populate ST->SEARCHES based on the value of
	KEY_SEARCHES.
	(serialize): Save ST->SEARCHES to KEY_SEARCHES.
	(search_text_save_source): New variable.
	(search_text_save): New function.
	(search_text_gen): If SEARCH_TEXT_SAVE_SOURCE is non-zero, remove
	the variable.  If we create a non-empty constraint, set up a
	callback in 60 seconds to add it to the history.
	(starling_run): Initialize ST->SEARCHES.  Create an entry
	completion.  Associate it with ST->SEARCHES.  Attach it to
	ST->SEARCH_ENTRY.

2008-09-30  Neal H. Walfield  <neal@gnu.org>

	* src/search.y: New file.
	* src/Makefile.am (starling_SOURCES): Add search.y.
	(BUILT_SOURCES): Add search.h and search.c.
	(AM_YFLAGS): New define.
	* src/starling.c: Include "search.h".
	(search_text_gen): Call yyparse to parse the search string.

2008-09-30  Graham Cobb  <g+770@cobb.uk.net>

	* src/main.c: Add Hildon includes back in so osso_initialize can 
	be called.

2008-09-29  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (enum mdb_fields): Add MDB_INC_PLAY_COUNT.
	(struct music_db_info): Add field play_count.
	* src/musicdb.c (music_db_create_table): Add field play_count.
	(music_db_set_info): If MDB_INC_PLAY_COUNT is set, increment the
	play_count field.
	* src/starling.c (search_text_gen): Treat a word with the
	"play-count:" prefix as a request to search on the play count.
	(player_state_changed): Add MDB_INC_PLAY_COUNT to INFO.FIELDS.

2008-09-29  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (starling_scroll_to): Scroll the track to 0.33
	the vertical height, not 0.5.

2008-09-29  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (search_text_regen): If the search text is empty
	or disabled and the constraint is NULL, then do nothing.

	(set_position_text): New function.
	(starling_run): Create a button to clear the search text.

2008-09-29  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct _Starling): Add field search_enabled.
	(KEY_SEARCH_ENABLED): Define.
	(struct deserialize_bottom_half): Add field search_enabled.
	(deserialize_bottom_half): Set ST->SEARCH_ENABLED's active state
	according to BH->SEARCH_ENABLED.
	(deserialize): Set BH->SEARCH_ENABLED according to
	KEY_SEARCH_ENABLED.  Only search if BH->SEARCH_ENABLED is true.
	(serialize): Save ST->SEARCH_ENABLED's active state.
	(search_text_regen): If ST->SEARCH_ENABLED is active, generate the
	search text based on TEXT, other use NULL.
	(search_text_changed): Don't generate a search text menu item if
	ST->SEARCH_ENABLED is not enabled.
	(starling_run): Create a search enabled check button.  Attach
	search_text_changed to its "toggled" signal.

2008-09-29  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (search_text_gen): Enable searching on a
	particular field.

2008-09-29  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (enum mdb_fields): Add MDB_DATE_ADDED,
	MDB_DATE_LAST_PLAYED, MDB_DATE_TAGS_UPDATED,
	MDB_UPDATE_DATE_LAST_PLAYED and MDB_UPDATE_DATE_TAGS_UPDATED.
	(struct music_db_info): Add fields date_added, date_last_played
	and date_tags_updated.
	* src/musicdb.c (music_db_set_info): Update date_last_played if
	MDB_UPDATE_DATE_LAST_PLAYED is set in INFO.FLAGS.  Update
	date_tages_updated if MDB_UPDATE_DATE_TAGS_UPDATED is set in
	INFO.FLAGS.
	(music_db_set_info_from_tags): Set MDB_UPDATE_DATE_TAGS_UPDATED in
	INFO.FIELDS.
	* src/starling.c (search_text_gen): Treated a "played:" prefix as
	a request to search on the time since a track was last played.

2008-09-29  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_create_table): Add columns date_added,
	date_last_played and date_tags_update.
	(music_db_add): When inserting, also initialize the track's
	date_added value.
	* src/starling.c (search_text_gen): Treat "added:" as a request to
	search on the time since a track was added to the database.

2008-09-27  Neal H. Walfield  <neal@gnu.org>

	* configure.ac: Change maintainer's email address to
	gpe-list@linuxtogo.org.  Bump version to 0.9.

2008-09-27  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_create_table): Create playlists table
	correctly.

	* src/playlist.c (do_refresh): Set PL->TOTAL to -1.
	(play_list_set): Don't do it here.

	* src/starling.c (deserialize): Pass BH->SEARCH_TERMS to
	search_text_gen.

	(update_library_count): If SEARCH_TEXT is the empty string, don't
	display the count.

	(starling_run): Assign a default label to the library tab.

2008-09-27  Neal H. Walfield  <neal@gnu.org>

	* src/Makefile.am (starling_SOURCES): Add config.h

2008-09-27  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct play_list_view_config): Change position's
	type to an integer.  Update users.
	(struct deserialize_bottom_half): Add field search_terms.
	(deserialize_bottom_half): Set ST->SEARCH_ENTRY here based on
	BH->SEARCH_TERMS.
	(deserialize): Don't set ST->SEARCH_ENTRY here.  Call
	search_text_gen on the search terms and save it in
	BH->SEARCH_TERMS.  Make the selection a list of UIDs, not of a
	list of paths.
	(serialize): Treat the selection list as a list of UIDs, not a
	list of paths.
	(play_list_state_save): New function.
	(play_list_state_restore): Likewise.
	(play_list_combo_changed): Use them.
	(search_text_regen): Move state saving and restoration to the two
	new functions.  Move constraint generation to...
	(search_text_gen): ... this new function.
	(search_text_regen): Use them.

2008-09-27  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (clear_cb): Only call starling_load if we cleared
	the library.

2008-09-27  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (starling_scroll_to_playing): Rename from this...
	(starling_scroll_to): ... to this.  Take additional parameter idx.
	Update users.  Implement scrolling using
	gtk_tree_view_scroll_to_cell.
	(search_text_regen): Scroll the window so that the first selected
	track remains visible.  If there are no selected tracks, scroll so
	that the track in the first third is visible.

2008-09-27  Neal H. Walfield  <neal@gnu.org>

	* src/playlist.c (struct _PlayList): Remove field size.
	(do_refresh): Only allocate PL->COUNT elements for the
	PL->IDX_UID_MAP array.

2008-09-26  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (serialize): Free KEYFILE.

2008-09-26  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (fs_scanner_thread): Use %q for the file name, not
	%s.

2008-09-26  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (fs_scanner_thread): If an error occurs, print the
	error message and free the memory.

2008-09-26  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (library_button_press_event): Free STR.

2008-09-26  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (play_list_combo_changed): Also restore when
	ACTIVE is NULL.

	* src/lyrics.c (got_lyrics): Free URI.
	* src/player.c (player_bus_cb): Free TAGS.
	* src/playlist.c (do_refresh): Correctly PATH.
	(changed_entry): Likewise.
	(play_list_force_changed): Likewise.
	* src/starling.c (title_data_func): Free ARTIST.
	(library_button_press_event): Don't g_strdup ARTIST and ALBUM.
	(starling_run): Free DIR.

2008-09-26  Neal H. Walfield  <neal@gnu.org>

	* src/lyrics.c (lyrcar_parse): Add sanity checks.  Properly clean
	up and return NULL if those sanity checks fail.

2008-09-26  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct play_list_view_config): New structure.
	(struct _Starling): Add field playlists_conf.
	(KEY_LIBRARY_VIEW_POSITION): Remove define.
	(KEY_LIBRARY_SELECTION): Likewise.
	(KEY_PLAYLISTS_CONFIG): New define.
	(struct deserialize_bottom_half): Remove field vadj_val.  Add
	field playlist.
	(deserialize_bottom_half): Don't set the main window's vertical
	adjustment.  Instead, call play_list_combo_refresh with
	BH->PLAYLIST.
	(deserialize): Don't restore just current play list's position and
	selection, restore all play list's positions and selections.
	(serialize): Don't save just current play list's position and
	selection, save all play list's positions and selections.
	(play_list_combo_changed): Remove arguments combo and data.
	Replace with st and do_save.  Update callers.  Save the old
	playlist's config if DO_SAVE is true.  Restore the new play list's
	config.
	(play_list_combo_refresh): Take additional parameter
	save_old_config.  Update users.  Call gtk_combo_box_set_active
	before unblocking the changed signal.  Call
	play_list_combo_changed with save_old_config.
	(starling_run): Initialize ST->PLAYLISTS_CONF.  Connect
	play_list_combo_changed to ST->PLAYLIST's "change" signal using
	g_signal_connect_swapped, not g_signal_connect.

2008-09-26  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (remove_cb): Apply to current view.  Call
	play_list_combo_refresh.

2008-09-26  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (remove_cb): Remove all selected entries.

2008-09-26  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (deserialize): When parsing the selection value,
	use ',' as the delimiter.
	(enum menu_op): Add add_sel and add_count.
	(struct menu_info): Add field selection.
	(menu_destroy): Free INFO->SELECTION.
	(queue_cb): If the user cancels the new list dialog box, return.
	Handle add_sel.
	(library_button_press_event): Add a menu item for adding the
	selected items to a play list.
	(starling_run): Change ST->LIBRARY_VIEW's and ST->QUEUE_VIEW's
	selection mode to GTK_SELECTION_MULTIPLE.

2008-09-26  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (music_db_get_info): Add parameter genre.  Update
	users.
	(enum mdb_fields): Add MDB_GENRE.
	(struct music_db_info): Add field genre.
	* src/musicdb.c (struct info_cache_entry): Add field genre.
	(info_cache_evict): Free E->GENRE.
	(music_db_get_info): Add parameter GENRE.  Get the genre when
	doing the look up.  Save it in the cache entry.  Return it if
	GENRE is not NULL.
	(music_db_set_info_from_tags): If the tag "genre" is present, save
	it.
	* src/playlist.h (PL_COL_GENRE): Define.
	(play_list_get_info): Take additional parameter genre.
	* src/playlist.c (play_list_get_info): Take additional parameter
	genre.  Pass it to music_db_get_info.
	(get_column_type): Handle PL_COL_GENRE.
	(get_value): Likewise.
	* src/starling.c (search_text_regen): Also search on the genre.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/lastfm.c (lastfm_enqueue): Don't use g_return_if_fail, just
	return.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (starling_load): Invalidate the old song's row
	after updating ST->LOADED_SONG.

	(starling_run): Rename "Remove all" to "Clear play list".

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (update_library_count): Get the current
	constraint using play_list_constraint_get.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_for_each): If CONSTRAINT is the empty
	string, treat as if it were NULL.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (queue_cb): Don't include an and when building
	the constraint.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_for_each): If ORDER is NULL and this is
	a play list, order by playlists.ROWID.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/playlist.h (play_list_total): New declaration.
	* src/playlist.c (struct _PlayList): Add field total.
	(play_list_init): Set it to -1.
	(play_list_set): Likewise.
	(play_list_total): New function.
	* src/starling.c (update_library_count): Include total if there
	are search terms.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (music_db_count): Take additional parameter list.
	Update users.
	(music_db_for_each): Likewise.
	(music_db_play_list_count): Remove declaration.  Update callers to
	use music_db_count.
	(music_db_play_list_for_each): Remove declaration.  Update callers
	to use music_db_for_each.
	* src/musicdb.c (music_db_play_lists_for_each): Merge this
	function...
	(music_db_for_each): ... into this one.  Take additional parameter
	list.
	(music_db_play_list_count): Merge this function...
	(music_db_count): ... into this one.  Take additional parameter
	list.
	* src/playlist.h (play_list_set): New declaration.
	(play_list_get): Likewise.
	* src/playlist.c (new_entry): Only call
	play_list_idx_uid_refresh_schedule if PL->LIST is NULL.
	(added_to_play_list): Only call play_list_idx_uid_refresh_schedule
	if PL->LIST matches LIST.
	(removed_from_play_list): Likewise.
	(play_list_new): Always connect to DB's "new-entry",
	"added-to-play-list" and "removed-from-play-list"'s signals.
	(play_list_set): New function.
	(play_list_get): Likewise.
	* src/starling.c (struct _Starling): Add fields playlist_tab,
	playlist, playlist_count and playlist_changed_signal.
	(KEY_CURRENT_PLAYLIST): New define.
	(deserialize): Restore the current play list.
	(serialize): Save the current play list.
	(play_list_combo_changed): New function.
	(play_list_combo_refresh): Likewise.
	(clear_cb): Clear according to the current play list.  Refresh the
	play list.
	(enum menu_op): New enum.
	(struct menu_info): Add fields list, op and next.
	(menu_destroy): Free all menu_infos.
	(queue_song_cb): Merge this..
	(queue_album_cb): ... and this...
	(queue_artist_cb): ... and this...
	(queue_all_cb): ... and this...
	(queue_cb): ... into this.
	(library_button_press_event): Make the queue song, album, artist
	and all into submenus.  Attach a the play lists to each submenu.
	(starling_run): Rename "Clear all" to "Remove all".  Create a
	combo box for the play lists.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (struct _MusicDBClass): Rename field
	added_to_queue_signal_id to added_to_play_list_signal_id.  Update
	users.  Rename field removed_from_queue_signal_id to
	removed_from_play_list_signal_id.  Update users.
	(music_db_play_queue_enqueue): Rename from this...
	(music_db_play_list_enqueue): ... to this.  Take additional
	parameter list.  Update users.
	(music_db_play_queue_dequeue): Rename from this...
	(music_db_play_list_dequeue): ... to this.  Take additional
	parameter list.  Update users.
	(music_db_play_queue_count): Rename from this...
	(music_db_play_list_count): ... to this.  Take additional
	parameter list.  Update users.
	(music_db_play_queue_query): Rename from this...
	(music_db_play_list_query): ... to this.  Take additional
	parameter list.  Update users.
	(music_db_play_queue_remove): Rename from this...
	(music_db_play_list_remove): ... to this.  Take additional
	parameter list.  Update users.
	(music_db_play_queue_clear): Rename from this...
	(music_db_play_list_clear): ... to this.  Take additional
	parameter list.  Update users.
	(music_db_play_queue_for_each): Rename from this...
	(music_db_play_list_for_each): ... to this.  Take additional
	parameter list.  Update users.
	(music_db_play_lists_for_each): New declaration.
	* src/musicdb.c: Include "marshal.h".
	(music_db_class_init): Add parameter to signal
	"added-to-play-list" and "removed-from-play-list". Update
	closures.
	(music_db_create_table): Remove table queue.  Add table playlists.
	(music_db_play_queue_enqueue): Rename from this...
	(music_db_play_list_enqueue): ... to this.  Take additional
	parameter list.  Use it.
	(music_db_play_queue_dequeue): Rename from this...
	(music_db_play_list_dequeue): ... to this.  Take additional
	parameter list.  Use it.
	(music_db_play_queue_count): Rename from this...
	(music_db_play_list_count): ... to this.  Take additional
	parameter list.  Use it.
	(music_db_play_queue_query): Rename from this...
	(music_db_play_list_query): ... to this.  Take additional
	parameter list.  Use it.
	(music_db_play_queue_remove): Rename from this...
	(music_db_play_list_remove): ... to this.  Take additional
	parameter list.  Use it.
	(music_db_play_queue_clear): Rename from this...
	(music_db_play_list_clear): ... to this.  Take additional
	parameter list.  Use it.
	(music_db_play_queue_for_each): Rename from this...
	(music_db_play_list_for_each): ... to this.  Take additional
	parameter list.  Use it.
	(music_db_play_lists_for_each): New function.
	* src/playlist.h (enum play_list_mode): Remove enum.
	(play_list_new): Replace parameter mode with parameter list.
	Update users.
	* src/playlist.c (struct _PlayList): Replace field mode with field
	list.  Update users.
	(struct _PlayList): Replace field added_to_queue_signal_id with
	added_to_play_list_signal_id and removed_from_queue_signal_id with
	removed_from_play_list_signal_id.  Update users.
	(play_list_finalize): Free PL->LIST.
	(removed_from_queue): Replace this function...
	(removed_from_play_list): ... with this one.  Update users.
	(added_to_queue): Replace this function...
	(added_to_play_list): ... with this one.  Update users.
	(play_list_new): Replace parameter mode with parameter list.  Use
	it.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (KEY_CURRENT_PAGE): Define.
	(struct deserialize_bottom_half): Add field page.
	(deserialize_bottom_half): Set the current page.
	(deserialize): Initialize BH->PAGE.
	(serialize): Save the current page.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct _Starling): Remove field scale_pressed.
	Add field scale_sliding.
	(set_position_text): New function.
	(scale_sliding_update): Likewise.
	(scale_button_released_cb): Remove the source ST->SCALE_SLIDING.
	(scale_button_pressed_cb): Set a timeout to call
	scale_sliding_update.
	(position_update): If ST->SCALE_SLIDING is true, just return.
	Don't update the position text here.  Call set_position_text
	instead.
	(starling_run): Don't unnecessarily initialize ST's fields to 0.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/lyrics.h (lyrics_select): Take additional parameter content.
	Change return type to an int.  Update users.
	* src/lyrics.c (lyricwiki_parse): Set LINE to NULL.
	(lyrics_select): Take additional parameter content.  Return
	content in *CONTENT.  Change return type to an int.  If the
	content does not exist in the DB, return 0.  Otherwise, 1.  If
	SQLOUT[0] is NULL, don't g_strdup, just set *CONTENT to NULL.
	(lyrics_write_textview): If CONTENT is NULL, use _("No lyrics
	found.").
	(got_lyrics): Don't special case LYRICS == NULL.
	(lyrics_display_with_uri): Only retreive the lyrics if
	lyrics_select returns 0.
	(lyrics_store): On failure, clean up VM.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (queue_album_cb): Remove asserts.  Don't match
	using '=' but 'like'.
	(queue_artist_cb): Likewise.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct _Starling): Add field library_tab.
	Rename field pl to library.  Update users.
	(update_queue_count): Cache last count and only update text if
	different.
	(update_library_count): New function.
	(starling_run): Connect update_queue_count to ST->QUEUE's
	"row-inserted" and "row-deleted" signals, not ST->DB's "cleared",
	"added-to-queue" and "removed-from-queue" signals.  Connect
	update_library_count to ST->QUEUE's "row-inserted" and
	"row-deleted" signals.  Save the library tab's direct child in
	ST->LIBRARY_TAB.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (struct _MusicDB): Add field
	meta_data_reader_mutex.
	(meta_data_reader): Lock access to DB->META_DATA_READER_PENDING.
	(music_db_add): Likewise.  Create idle handler after creating the
	queue.

	(fs_scanner_thread): Check for dead files.

	(music_db_open): Set SQLITEH's busy handler.

2008-09-25  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct _Starling): Add fields position_update
	and pending_seek.
	(starling_load): Call set_title.
	(KEY_LOADED_SONG_POSITION): Define.
	(deserialize): Load the current song's position.
	(serialize): Save the current song's position.
	(scale_update_cb): Rename from this...
	(position_update): ... to this.  Move title updater from here
	(set_title): ... to this new function.  If no longer playing,
	remove the position updater.  If now playing, start the position
	updater.  If ST->PENDING_SEEK is non-negative, seek.
	(starling_run): Don't setup a timer connected to scale_update_cb.
	* src/player.c (player_set_source): After setting the URI, change
	the player to GST_STATE_PAUSED.

2008-09-24  Neal H. Walfield  <neal@gnu.org>

	* src/playlist.c (play_list_idx_uid_refresh_schedule): If NOW is
	true, then clear PL->LAST_REFRESH.

2008-09-24  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (search_text_regen): If the search text is empty,
	set the constraint to the empty string.

2008-09-24  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (scale_update_cb): Use music_db_get_info, not
	play_list_get_info.

2008-09-24  Neal H. Walfield  <neal@gnu.org>

	* src/playlist.c: Include <sys/time.h>.
	(struct _PlayList): Add field last_refresh.
	(timeval_subtract): New function.  Take from Glibc's manual.
	(do_refresh): Only perform a refresh is the last refresh was more
	than a second ago.

2008-09-24  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_for_each): Sort NULLs at the end.  Do a
	case insensitive sort.

2008-09-23  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct _Starling): Add field queue_tab.
	(player_state_changed): New function.
	(starling_run): Connect update_queue_count to ST->DB's "cleared",
	"added-to-queue" and "removed-from-queue" signals.  Save the queue
	tab's child in ST->QUEUE_TAB.  Call update_queue_count to set the
	tab's label.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (KEY_LIBRARY_SELECTION): Define.
	(deserialize): Restore the selection.
	(serialize): Save the selection.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (KEY_SEARCH_TEXT): Define.
	(deserialize): Restore search string.
	(serialize): Save search string.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c: Include <obstack.h> and <stdio.h>.
	(_GNU_SOURCE): Define.
	(obstack_chunk_alloc): Likewise.
	(obstack_chunk_free): Likewise.
	(struct _Starling): Add field loaded_song.
	(starling_load): Add parameter UID.  Use UID rather than the
	currently selected entity.  Set ST->LOADED_SONG to UID.  On
	success, update the display.
	(starling_play): Don't call starling_load.
	(do_goto): Remove function.
	(starling_advance): Take the current song from ST->LOADED_SONG.
	Don't call do_goto.  Instead call starling_load and starling_play
	directly.
	(KEY_POSITION): Rename from this...
	(KEY_LIBRARY_VIEW_POSITION): ... to this.  Update users.
	(KEY_CURRENT_ENTRY): Rename from this...
	(KEY_LOADED_SONG): ... to this.  Update users.
	(deserialize): Don't use play_list_goto.  Instead call
	starling_load.
	(serialize): Save the UID of the current song, not its index.
	(starling_scroll_to_playing): Use ST->LOADED_SONG.  Map it to an
	index using play_list_uid_to_index.
	(clear_cb): Call starling_load to clear the current song.
	(activated_cb): Don't call do_goto.  Instead, get the uid of the
	selected song and load and play it.
	(title_data_func): Set the background if UID matches
	ST->LOADED_SONG.
	(starling_run): Pass ST as the user data to
	gtk_cell_layout_set_cell_data_func.
	* src/playlist.h (play_list_constraint_get): New declaration.
	(play_list_get_current): Remove declaration.
	(play_list_goto): Likewise.
	(play_list_get_info): Change declaration to return a bool.
	(play_list_force_changed): New declaration.
	* src/playlist.c (struct _PlayList): Remove field position.
	(play_list_constraint_get): New function.
	(play_list_get_current): Remove function.
	(play_list_goto): Likewise.
	(play_list_force_changed): New function.
	(play_list_get_info): Return a bool.  Don't special case IDX ==
	-1.  If UID is -1, return false.  If source, artist, album, track,
	title and duration are NULL, don't call music_db_get_info.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (key_press_event): On control-l, activate the
	search box.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (sort_order): New variable.
	(queue_album_cb): Use SORT_ORDER.  If INFO->ARTIST is NULL, only
	search for the album.
	(queue_artist_cb): Use SORT_ORDER.
	(queue_all_cb): New function.
	(library_button_press_event): Get the entry's source.  If TITLE is
	NULL, use SOURCE instead.  If INFO->ALBUM is NULL, don't create
	the queue this album menu item.  If INFO->ARTIST is NULL, don't
	create the queue this artist menu item.  Create a button for
	queueing all tracks matching the current search terms.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct _Starling): Add field search_entry.
	(regen_source): New variable.
	(search_text_changed): Move body from here...
	(search_text_regen): ... to this new function.  Don't treat the
	search text as a single string, instead, search for the occurance
	of each word.
	(search_text_changed): If REGEN_SOURCE is not 0, remove the
	timeout.  Set a timeout to call search_text_regen.
	(starling_run): Save the search entry in ST->SEARCH_ENTRY.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (music_db_play_queue_clear): New declaration.
	* src/musicdb.c (music_db_play_queue_clear): New function.
	* src/starling.c (clear_queue_cb): New function.
	(starling_run): In the clear all menu item, make the a the active
	key.  Create a new menu item for clearing the queue, connect
	clear_queue_cb to it.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/player.c (player_get_source): Call g_object_get, not
	g_object_set.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (whitelist): Add ".flac" and ".FLAC".

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (music_db_count): Take additional parameter
	constraint.
	* src/musicdb.c (struct _MusicDB): Remove field count.
	(music_db_init): Don't initialize DB->COUNT.
	(music_db_count): Take additional parameter constraint.  If not
	NULL or the empty string, add to the SQL query.  Don't save result
	in DB->COUNT.
	(music_db_add): Don't update DB->COUNT.
	(music_db_remove): Likewise.
	(music_db_clear): Likewise.
	(music_db_for_each): If CONSTRAINT is the empty string, treat it
	as if it were NULL.
	* src/playlist.h (play_list_constrain): New declaration.
	* src/playlist.c (struct _PlayList): Add field constraint.
	(play_list_dispose): Free PL->CONSTRAINT.
	(do_refresh): Pass PL->CONSTRAINT to music_db_count and
	music_db_for_each.
	(play_list_constrain): New function.
	* src/starling.c (search_text_changed): New function.
	(starling_run): Add a search box.  Connect it to
	search_text_changed.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct _Starling): Add field notebook.
	(jump_to_current): New function.
	(starling_run): Put the title and "jump to current" button in the
	main box, not in the player tab.  Connect the jump_to button's
	clicked event to jump_to_current.  Save the notebook in
	ST->NOTEBOOK.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (music_db_for_each): Add parameter constraint.
	Update users.
	* src/musicdb.c (music_db_for_each): Add parameter constraint.  If
	not NULL, use it when constructing the SQL statement.
	* src/starling.c (queue_album_cb): Don't match in the callback
	function, use music_db_for_each's constraint parameter.
	(queue_artist_cb): Likewise.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (struct _MusicDBClass): Add fields
	added_to_queue_signal_id and removed_from_queue_signal_id.
	* src/musicdb.c (music_db_class_init): Register signals
	"added-to-queue" and "removed-from-queue".
	(music_db_play_queue_enqueue): On success, emit the
	"added-to-queue" signal.
	(music_db_play_queue_dequeue): On success, emit the
	"removed-from-queue" signal.
	(music_db_play_queue_remove): Likewise.
	* src/playlist.c (struct _PlayList): Add fields
	added_to_queue_signal_id, and removed_from_queue_signal_id.
	(play_list_dispose): Disconnect the signal
	PL->ADDED_TO_QUEUE_SIGNAL_ID and PL->REMOVED_FROM_QUEUE_SIGNAL_ID.
	(added_to_queue): New function.
	(removed_from_queue): Likewise.
	(play_list_new): Only connect to DB's "new-entry" signal if in
	library mode.  Connect to DB's "added-to-queue" and DB's
	"removed-from-queue" signals.

2008-09-22  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_create_table): Remove extra comma.

2008-09-21  Neal H. Walfield  <neal@gnu.org>

	* src/starling.c (struct menu_info): New structure.
	(menu_destroy): New function.
	(queue_song_cb): Likewise.
	(queue_album_cb): Likewise.
	(queue_artist_cb): Likewise.
	(library_button_press_event): Likewise.
	(starling_run): Connect library_button_press_event to
	ST->LIBRARY_VIEW's "button-press-event" event.

2008-09-21  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_create_table): Drop table queue.
	(music_db_play_queue_enqueue): Correct sql syntax.

2008-09-21  Neal H. Walfield  <neal@gnu.org>

	* src/player.c (player_unpause): If PL->PLAYBIN is false, emit an
	"eos" signal.

2008-09-21  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.h (music_db_play_queue_enqueue): New declaration.
	(music_db_play_queue_dequeue): Likewise.
	(music_db_play_queue_count): Likewise.
	(music_db_play_queue_query): Likewise.
	(music_db_play_queue_remove): Likewise.
	(music_db_queue_for_each): Likewise.
	* src/musicdb.c (music_db_create_table): Create table queue.
	(struct info_callback_data): New structure.
	(music_db_for_each.callback): Move from here...
	(info_callback): ... to here.  Interpret the first argument as a
	struct info_callback_data.  Use it.  Update callers.
	(music_db_play_queue_enqueue): New function.
	(music_db_play_queue_dequeue): Likewise.
	(music_db_play_queue_count): Likewise.
	(music_db_play_queue_query): Likewise.
	(music_db_play_queue_remove): Likewise.
	(music_db_queue_for_each): Likewise.
	* src/playlist.h (enum play_list_mode): New enumeration.
	(play_list_new): Take additional parameter mode.  Update callers.
	(play_list_uid_to_index): New declaration.
	* src/playlist.c (struct _PlayList): Add field mode.
	(do_refresh): If PL->MODE is PLAY_LIST_QUEUE, set PL->COUNT to the
	result of music_db_play_queue_count, and call
	music_db_queue_for_each instead of music_db_for_each.
	(play_list_uid_to_idx): Rename from this...
	(play_list_uid_to_index): ... to this.  Make extern.  If UID does
	not exist in the hash, return -1.  Update callers.
	(changed_entry): If play_list_uid_to_index returns -1, just
	return.
	(play_list_new): Take additional parameter mode.  Save in PL->MODE.
	(play_list_remove): If PL->MODE is PLAY_LIST_QUEUE, call
	music_db_play_queue_remove instead of music_db_remove.
	* src/starling.c (struct _Starling): Rename field treeview_window
	to library_view_window, treeview to library_view, and mdb to db.
	Update users.  Add fields queue_view_window, queue_view, and
	queue.
	(starling_play): Move loading functionality...
	(starling_load): ... to this new function.
	(starling_next): Move advancement functionality...
	(starling_advance): ... to this new function.  Take from the play
	queue if it is not empty.
	(starling_prev): Implement in terms of starling_advance.
	(deserialize): When restoring the select entry, load it.
	(starling_run): Set ST->QUEUE to a a new play list in queue mode.
	Create a notebook tab for the play queue.

2008-09-20  Neal H. Walfield  <neal@gnu.org>

	* src/playlist.c (changed_entry): Schedule a refresh.

2008-09-20  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (struct _MusicDB): Add field fs_scanner.
	(music_db_finalize): If DB->FS_SCANNER is not 0, remove the
	source.
	(struct fs_scanner): New structure.
	(busy_handler): New function.
	(music_db_open): Set DB->SQLITEH's busy handler to it.  Set up an
	idle call back to fs_scanner.  Allocate an extra sqlite instance
	for it.
	(fs_scanner_thread): New function.
	(fs_scanner): Likewise.
	(music_db_add): Take additional parameter sqliteh.  Use it instead
	of DB->SQLITEH.  Update callers.
	(music_db_add_file): Move body of this function to...
	(music_db_add_file_internal): ... this new function.
	(music_db_add_file): Implement in terms of the new function.
	(music_db_add_recursive_internal): Take additional parameter
	sqliteh.  Use it instead of DB->SQLITEH.  Update callers.
	(music_db_add_recursive): Don't append a '/' to PATH when
	inserting in the database.  Update path matching code accordingly.

2008-09-20  Neal H. Walfield  <neal@gnu.org>

	* src/musicdb.c (music_db_add_recursive): Move body of
	functionality from here...
	(music_db_add_recursive_internal): ... to this new function.
	Update to call this function, not music_db_add_recursive,
	recursively.
	(music_db_add_recursive): Add FILENAME to the dirs table if it (or
	a filename that dominates it) is not already there.  Remove any
	filenames that PATH dominates.

2008-09-20  Neal H. Walfield  <neal@gnu.org>

	* config.h: Restore file.  Only define CONFIGDIR.
	* src/starling.h: Don't include <libintl.h>.
	(_): Move from here...
	* src/config.h: ... to here.
	* src/starling.h (gettext_noop): Move from here...
	* src/config.h: ... to here.
	* src/starling.h (N_): Move from here...
	* src/config.h: ... to here.
	* src/starling.c (CONFIG_FILE): Define.
	* src/lastfm.c: Include "starling.h".

2008-09-19  Neal H. Walfield  <neal@gnu.org>

	Split playlist.c into playlist.c, musicdb.c, player.c and
	starling.c.  Move main.c and config.c into starling.c.
	* src/playlist.h: Include "musicdb.h".
	(struct _PlayListClass): Remove fields new_stream_signal_id,
	deleted_stream_signal_id, cleared_signal_id, swap_signal_id,
	state_changed_signal_id, and eos_signal_id.
	(play_list_open): Move declaration from here...
	* src/musicdb.h (music_db_open): ... to this file.  Update users.
	* src/playlist.h (play_list_new): New declaration.
	(play_list_set_random): Move declaration from here...
	* src/starling.h (starling_random_set): ... to here.
	* src/playlist.h (play_list_get_random): Move declaration from
	here...
	* src/starling.h (starling_random): ... to here.
	* src/playlist.h (play_list_play): Move declaration from here...
	* src/player.h (player_play): ... to here.
	* src/playlist.h (play_list_pause): Move declaration from here...
	* src/player.h (player_pause): ... to here.
	* src/playlist.h (play_list_unpause): Move declaration from
	here...
	* src/player.h (player_unpause): ... to here.
	* src/playlist.h (play_list_play_pause_toggle): Move declaration
	from here...
	* src/player.h (player_play_pause_toggle): ... to here.
	* src/playlist.h (play_list_next): Move declaration from here...
	* src/starling.h (starling_next): ... to here.
	* src/playlist.h (play_list_prev): Move declaration from here...
	* src/starling.h (starling_prev): ... to here.
	* src/playlist.h (play_list_seek): Move declaration from here...
	* src/starling.h (player_seek): ... to here.
	* src/playlist.h (play_list_query_position): Move declaration from
	here...
	* src/starling.h (player_query_position): ... to here.
	* src/playlist.h (play_list_query_duration): Move declaration from
	here...
	* src/starling.h (player_query_duration): ... to here.
	* src/playlist.h (play_list_add_m3u): Move declaration from
	here...
	* src/musicdb.h (music_db_add_m3u): ... to here.
	* src/playlist.h (play_list_add_uri): Move declaration from
	here...
	* src/musicdb.h (music_db_add_uri): ... to here.
	* src/playlist.h (play_list_add_file): Move declaration from
	here...
	* src/musicdb.h (music_db_add_file): ... to here.
	* src/playlist.h (play_list_add_recursive): Move declaration from
	here...
	* src/musicdb.h (music_db_add_recursive): ... to here.
	* src/playlist.h (play_list_remove): Move declaration from
	here...
	* src/musicdb.h (music_db_remove): ... to here.
	* src/playlist.c: Don't include "cache.h".  Include "musicdb.h".
	(struct info_cache_entry, info_cache_evict, info_cache)
	(info_cache_constructor): Move from here...
	* src/musicdb.c: ... to this new file.
	* src/playlist.c (struct _PlayList): Remove fields sqliteh,
	playbin, last_state, random, meta_data_reader,
	meta_data_reader_pending.  Add fields db, new_entry_signal_id
	changed_entry_signal_id, deleted_entry_signal_id,
	cleared_signal_id, reschedule_timeout, and reschedule_requests.
	(play_list_class_init): Move initialization for "state-changed"
	and "eos" signals from here...
	* src/player.c (player_class_init): ... to here.
	* src/playlist.c (play_list_init): Move gstreamer initialization
	from here...
	* src/player.c (player_init): ... to here.
	* src/playlist.c (play_list_dispose): Disconnect the signal
	handlers connected to PL->DB.  Remove any reschedule timeout.
	Unref PL->DB.
	(play_list_finalize): Move meta-data clean up, sqlite clean up and
	playbin clean up from here...
	* src/player.c (music_db_finalize): ... to here.
	* src/playlist.c (play_list_idx_uid_refresh): Move functionality
	from this function...
	(do_refresh): ... to this new function.  Only execute if
	PL->RESCHEDULE_REQUEST is less than or equal to 10.  If so, divide
	by 2 and then return scheduling another call.  Don't access the
	database directly, instead use music_db_for_each.  Update
	PL->COUNT correctly.  Clear PL->RESCHEDULE_TIMEOUT and
	PL->RESCHEDULE_REQUESTS.
	(play_list_idx_uid_refresh): Schedule a call to do_refresh.  Take
	additional parameter now.  If true, refresh immediately otherwise,
	do so lazily.
	(parse_tags): Move from here...
	* src/musicdb.c (parse_tags): ... to here.  Don't access database
	directly, instead call music_db_set_info_from_tags.
	* src/playlist.c (play_list_bus_cb): Move from here...
	* src/player.c (player_bus_cb): ... to here.  On tag availability,
	emit a "tags" signal.  Update "state-changed" and "eos" signal
	invocations.
	* src/playlist.c (new_entry): New function.
	(changed_entry): Likewise.
	(deleted_entry): Likewise.
	(cleared): Likewise.
	(play_list_create_table): Move from here...
	* src/musicdb.c (music_db_create_table): ... to here.
	* src/playlist.c (play_list_open): Move from here...
	* src/musicdb.c (music_db_open): ... to here.  Don't create the
	config table.
	* src/playlist.c (playbin_ensure): Move from here...
	* src/player.c (playbin_ensure): ... to here.
	* src/playlist.c (play_list_set_sink): Move from here...
	* src/player.c (player_set_sink): ... to here.
	* src/playlist.c (play_list_new): New function.
	(play_list_set_random): Remove function.
	(play_list_get_random): Likewise.
	* src/playlist.c (playlist_play): Move from here...
	* src/starling.c (starling_play): ... to here.  Take a Starling *,
	not a Playlist *.  Change to use player_set_source and
	player_play.
	* src/playlist.c (play_list_pause): Move from here...
	* src/starling.c (player_pause): ... to here.
	* src/playlist.c (play_list_unpause): Move from here...
	* src/starling.c (player_unpause): ... to here.
	* src/playlist.c (play_list_play_pause_toggle): Move from here...
	* src/starling.c (player_play_pause_toggle): ... to here.
	* src/playlist.c (play_list_playing): Move from here...
	* src/starling.c (player_playing): ... to here.
	* src/playlist.c (do_goto): Move body from here...
	(play_list_goto): ... to here.  Don't start playing.
	* src/playlist.c (play_list_random_next): Move from here...
	* src/starling.c (do_random_next): ... to here.
	* src/playlist.c (play_list_next): Move from here...
	* src/starling.c (starling_next): ... to here.
	* src/playlist.c (play_list_prev): Move from here...
	* src/starling.c (starling_prev): ... to here.
	* src/playlist.c (play_list_seek): Move from here...
	* src/starling.c (player_seek): ... to here.
	* src/playlist.c (play_list_query_position): Move from here...
	* src/starling.c (player_query_position): ... to here.
	* src/playlist.c (play_list_query_duration): Move from here...
	* src/starling.c (player_query_duration): ... to here.
	* src/playlist.c (meta_data_reader): Move from here...
	* src/musicdb.c (meta_data_reader): ... to here.  When tags are
	available, call music_db_set_info_from_tags to save the tags.
	* src/playlist.c (play_list_add): Move from here...
	* src/musicdb.c (music_db_add): ... to here.  Don't update the
	model.  Instead, emit a "new-entry" signal.
	* src/playlist.c (play_list_add_m3u): Move from here...
	* src/musicdb.c (music_db_add_m3u): ... to here.
	* src/playlist.c (play_list_add_uri): Move from here...
	* src/musicdb.c (music_db_add_uri): ... to here.
	* src/playlist.c (play_list_add_file): Move from here...
	* src/musicdb.c (music_db_add_file): ... to here.
	* src/playlist.c (has_audio_extension): Move from here...
	* src/musicdb.c (has_audio_extension): ... to here.
	* src/playlist.c (play_list_add_recursive): Move from here...
	* src/musicdb.c (music_db_add_recursive): ... to here.
	* src/playlist.c (play_list_save_m3u): Remove function.
	* src/playlist.c (play_list_remove): Move from here...
	* src/musicdb.c (music_db_remove): ... to here.  Don't update the
	model or index map.  Instead, emit a "deleted-entry" signal.
	Don't drop the cache, just shootdown the entry.
	* src/playlist.c (play_list_clear): Move from here...
	* src/musicdb.c (music_db_clear): ... to here.
	* src/playlist.c (play_list_get_info_by_uid): Move from here...
	* src/musicdb.c (music_db_get_info): ... to here.
	* src/playlist.c (play_list_get_info): Implement in terms of
	music_db_get_info.
	* src/playlist.c (get_iter): If PATH's depth is not 1, return
	FALSE.  If INDICES is NULL, return FALSE.
	* src/playlist.c (get_value): Call play_list_idx_to_uid to get the
	uid associated with the entry at position I.  Call
	music_db_get_info, not play_list_get_info to get the info.
	* src/main.c: Move all functions except main from this file to...
	* src/starling.c: ... this new file.
	* src/main.c (main): Just perform general initialization,
	instantiate a starling instance and start the gtk main loop.
	* src/starling.h (struct _Starling): Move definition from here...
	* src/starling.c: ... to here.  Add fields player, mdb and pl.
	Remove field keyfile and random.
	(starling_random): New function.
	(starling_random_set): Likewise.
	* src/config.c (KEYRANDOM, KEYLASTPATH, KEYSINK, KEYLFMUSER)
	(KEYLFMPASSWD, KEY_WIDTH, KEY_HEIGHT): Move from here...
	* src/starling.c: ... to here.
	* src/config.c (config_load): Move from here...
	* src/starling.c (deserialize): ... to here.  Only keep the key
	file around for the duration of the function.  Also restore the
	view's position and current track.  Update users.
	* src/config.c (config_save, config_store_lastfm): Move from
	here...
	* src/starling.c (serialize): ... to here.  Only keep the key
	file around for the duration of the function.  Also save the
	view's position and current track.  Update users.
	* src/config.c: Remove file.
	* src/config.h: Remove file.
	* src/marshal.list (VOID:OBJECT,INT): Remove interface.
	(VOID:INT,INT): Likewise.
	(VOID:POINTER,INT): New interface.
	(VOID:POINTER,OBJECT): Likewise.
	* src/Makefile.am: Remove files config.h, and config.c.  Add fiels
	starling.c, musicdb.h, musicdb.c, player.h, player.c, marshal.c,
	and marshal.h.
	(nodist_starling_SOURCES): Remove variable.
	* src/config.c: Remove file.
	* src/config.h: Likewise.

2008-09-06  Neal H. Walfield  <neal@gnu.org>

	* src/playlist.h (PL_COL_TRACK): Define.
	(play_list_add_m3u): Remove parameter index.  Update users.
	(void play_list_add_uri): Likewise.
	(play_list_add_file): Likewise.
	(play_list_add_recursive): Likewise.
	(play_list_swap_pos): Remove function.
	(play_list_get_info): Change UID to an int *.  Add parameter
	track.  Update callers.
	* src/playlist.c (struct info_cache_entry): Add field track.
	Remove field uid.
	(info_cache_evict): Don't free E->UID.
	(play_list_get_info_by_uid): Update declaration to take additional
	parameter TRACK and to remove parameter INDEX.
	(struct _PlayList): Add fields SIZE, IDX_UID_MAP and UID_IDX_HASH.
	(play_list_init): Don't set PL->COUNT to -1.
	(play_list_finalize): Free PL->IDX_UID_MAP and PL->UID_IDX_HASH.
	(play_list_idx_uid_refresh): New function.
	(play_list_idx_to_uid): Likewise.
	(play_list_uid_to_idx): Likewise.
	(play_list_idx_uid_refresh): Also save the track number.  Assume
	UID is valid.  Update callers to make this so.  Invalidate the
	model as appropriate.  Call play_list_idx_to_uid_refresh.
	(play_list_bus_cb): Pass the correct UID when calling PARSE_TAGS.
	(play_list_create_table): Rename playlist table to files.  Add
	table dirs.  Update schema.  Bump version number.
	(play_list_count): If PL->IDX_UID_MAP is not valid, call
	PLAY_LIST_IDX_TO_UID_REFRESH and then return whatever PL->COUNT is.
	(play_list_play): Don't access the database directly.  Instead use
	play_list_get_info.
	(make_uid): Remove function.
	(meta_data_reader): Assume PL->META_DATA_READER_PENDING contains
	integers, not strings.
	(play_list_add): Remove parameter COUNT.  Use the new row's ROWID
	as its UID.  Update PL->IDX_UID_MAP and PL->UID_IDX_HAHS
	appropriately.  Update model.
	(play_list_add_m3u): Remove parameter POS.
	(play_list_add_uri): Remove parameter INDEX.
	(play_list_add_file): Remove parameter INDEX.
	(play_list_add_recursive): Remove parameter POS.
	(play_list_swap_pos): Remove function.
	(play_list_remove): Don't drop the cache.  Just shootdown the
	entry with uid UID.  Update PL->IDX_UID_MAP and PL->UID_IDX_HASH.
	(play_list_clear): Don't update the mode.  Just call
	play_list_idx_uid_refresh.
	(play_list_get_info_by_uid): Manage the entry cache by UIDs, not
	INDEXes.  Update appropriately.
	(play_list_get_info): Implement in terms of
	play_list_get_info_by_uid.
	(get_value): Don't include GTK_TREE_MODEL_ITERS_PERSIST in the
	flags that we support.
	(get_column_type): Support PL_COL_TRACK.  Return G_TYPE_INT for
	PL_COL_UID.
	(get_value): Support PL_COL_TRACK.  Return PL_COL_UID as an int.

2008-09-06  Neal H. Walfield  <neal@gnu.org>

	* src/main.c (main): Put ST->TREEVIEW in fixed height mode.  Set
	its column's sizing to be fixed.

2008-09-04  Neal H. Walfield  <neal@gnu.org>

	* src/Makefile.am (AM_CFLAGS): New variable.
	(starling_SOURCES): Add cache.h and cache.c.
	* src/cache.h: New file.
	* src/cache.c: Likewise.
	* src/playlist.c: Include "cache.h".
	(struct info_cache_entry): New struction.
	(info_cache_evict): New function.
	(info_cache): New local variable.
	(parse_tags): Shootdown affected entries.
	(play_list_add):
	(play_list_swap_pos): Likewise.
	(play_list_remove): Likewise.
	(play_list_clear): Likewise.
	(play_list_get_info): See if the entry is in the cache.  If so,
	use it.  If not and the entry exists, add it to the cache.

	(play_list_add): Emit TOTAL number of row-inserted events.
	(has_audio_extension): If we complete the loop, just return 0.

2008-09-04  Neal H. Walfield  <neal@gnu.org>

	* src/playlist.c (play_list_add): Don't add files that are already
	present in the database.

2008-09-04  Neal H. Walfield  <neal@gnu.org>

	* mkinstalldirs: Remove file.

2008-09-03  Neal H. Walfield  <neal@gnu.org>

	* HACKING: List required packages and note that autogen.sh needs
	to be run.

2008-09-03  Neal H. Walfield  <neal@gnu.org>

	* src/playlist.c (has_audio_extension): New function.
	(play_list_add_recursive): If we fail to open PATH as a directory,
	check if it is a regular, readable file.  Also check if PATH has a
	known file extension.

2008-05-20  Florian Boor  <florian.boor@kernelconcepts.de>

	* Release 0.3

2008-04-16  Neal H. Walfield  <neal@gnu.org>

        * src/playlist.c (IS_HILDON): Don't undefine.
        (struct _PlayList) [IS_HILDON]: remove field source.
        (playbin_ensure) [IS_HILDON]: Use playbinmaemo rather than
        playbin.
        (play_list_set_sink) [IS_HILDON]: Implement in the usual fashion.
        (play_list_play) [IS_HILDON]: Use the "uri", not the "location",
        property.

2008-03-28  Florian Boor  <florian.boor@kernelconcepts.de>

	* src/playlist.c (toplevel): Activate playbin for Maemo since it is
	  supposed to work again.

2008-01-11  Graham Cobb  <g+770@cobb.uk.net>

	* src/lastfm.c (HANDSHAKE_URI): Move to V1.2 of Audioscrobbler
	Realtime Submission Protocol (last.fm)

	* src/main.c (main): Create menu not menubar in chinook

2007-11-06  Graham Cobb  <g+770@cobb.uk.net>

	* src/main.c (main): changes for hildonprogram/hildonwindow in chinook

2007-11-04  Graham Cobb  <g+770@cobb.uk.net>

	* debian/rules (DEB_CONFIGURE_USER_FLAGS): use --enable-gpe

	* configure.ac, src/Makefile.am, src/main.c: build and compile
	changes for new hildon libraries in chinook

2007-07-23  Graham Cobb  <g+770@cobb.uk.net>

	* mkinstalldirs: add file

	* debian/rules: add options for maemo builds
	(this assumes the debian directory is not used for anything else)

2007-06-07  Florian Boor  <florian@linuxtogo.org>

	* Release 0.2
	* Rename configure.in to configure.ac like in all other bits.
	* Update i18n support in build tools to work with desktop file 
        and to pass distcheck.
	* refresh POTFILES.in

2007-02-25  Neal H. Walfield  <neal@gnu.org>

	* src/playlist.c (meta_data_reader): If possible, just set to
	GST_STATE_PAUSED to get the stream tags.  Break out of the loop
	once we reach our target state.

	(play_list_add_recursive): More aggressively yield.  Don't
	consider m3u files.

	* src/main.c (playlist_state_changed_cb): Simplify.
	(main): Call the quite menu item "Quit", not close.  Make the
	label containing the currently playing song ellipsizable.

2007-02-24  Neal H. Walfield  <neal@gnu.org>

	* src/main.c (playlist_add_cb): Use a file chooser.  Take an
	additional argument to determine whether to choose a file or a
	directory.
	(playlist_add_file_cb): New function.
	(playlist_add_directory_cb): New function.
	(main): Don't provide just an import menu item.  Provide both
	import file and an import directory items.
	[IS_HILDON]: Don't display a file menu.  Just add the menu items
	to the main menu.
	* src/starling.h: Remove field fs.

2007-02-23  Neal H. Walfield  <neal@gnu.org>

	* src/main.c: Include
	<hildon-fm/hildon-widgets/hildon-file-chooser-dialog.h>.
	(fs_cancel_cb): Remove function.
	(fs_accept_cb): Remove function.  Move body from here...
	(playlist_add_cb): ... to here.  Port to Maemo.

	(key_press_event) [IS_HILDON]: Make fullscreen button a play/pause
	button.  Map F8 to previous.

	* src/playlist.c [IS_HILDON]: Add field source.
	(play_list_play): Move playbin creation from here...
	(playbin_ensure): ... to this new function.
	[IS_HILDON]: Don't use a playbin but our own "special" pipeline.
	(play_list_set_sink) [IS_HILDON]: Don't do anything.
	[! IS_HILDON]: Ensure PL->PLAYBIN is valid.
	[IS_HILDON]: Set the "location" property on PL->SOURCE.

	(meta_data_reader): Don't reference PL.  Decode into a fakesink.
	Unref the bus.

	(play_list_bus_cb): Correctly case PL->PLAYBIN to a GST_OBJECT.

	* data/Makefile.am (desktop_DATA): Don't install starling.desktop
	on hildon.
	(pixmapdir): New variable.
	(pixmap_DATA): Likewise.
	(EXTRA_DIST): Add bass.png.
	* data/bass.png: New file, stolen from gpe-icons/default/bass.png.
	* data/starling.desktop.in (Icon): Change to bass.png.

2007-02-23  Neal H. Walfield  <neal@gnu.org>

	* configure.in: Don't require libsoup-2.2 version 2.2.94 or
	greater; just depend on libsoup-2.2.

	* Makefile.am (EXTRA_DIST): Add debian/changelog, debian/compat,
	debian/control and debian/rules.

	* debian/compat: Change it to 4.

	* debian/control (Build-Depends): Add it.
	(Depends): Correctly enumerate them.

	* hildon/Makefile.am (install-data-hook): Make
	$(DESTDIR)/etc/others-menu if it doesn't exist.

	* hildon/com.nokia.starling.service.in (Exec): It's
	@prefix@/bin/starling, not @prefix@/starling.
	* hildon/starling.desktop.in (Exec): Likewise.

2007-02-23  Neal H. Walfield  <neal@gnu.org>

	* src/main.c: Include <glib.h>.
	(main): Put the playlist in ~/.starling, not ~/.gpe.  Ensure this
	directory exists.

2007-02-23  Neal H. Walfield  <neal@gnu.org>

	* src/errorbox.c (starling_error_box): It's GTK_BUTTONS_OK, not
	GTK_RESPONSE_OK.

2007-02-22  Neal H. Walfield  <neal@gnu.org>

	* debian/changelog: New file.
	* debian/compat: New file.
	* debian/control: New file.
	* debian/rules: New file.

2007-02-22  Neal H. Walfield  <neal@gnu.org>

	* configure.in: Determine GLIB_GENMARSHAL after checking for
	pkg-config.

	* src/Makefile.am (starling_SOURCES): Don't forget a trailing \.

2007-02-22  Neal H. Walfield  <neal@gnu.org>

	* hildon/Makefile.am (install-data-hook): Respect $(DESTDIR).

2007-02-22  Neal H. Walfield  <neal@gnu.org>

	* configure.in: Use AC_CHECK_LIB, not AC_CHECK_FUNC, to check for
	hildon.  Generate hildon/starling.desktop
	hildon/com.nokia.starling.service hildon/Makefile.
	* Makefile.am [HILDON] (SUBDIRS): Add hildon.
	* hildon/Makefile.am: New file.
	* hildon/com.nokia.starling.service.in: Likewise.
	* hildon/starling.desktop.in: Likewise.

	* src/callbacks.h: Remove file.
	* src/callbacks.c: Remove file and move contents...
	* src/main.c: ... to this file.  Don't include include
	"callbacks.h".  Include "utils.h" and <gdk/gdkkeysyms.h>.
	(scroll_to_current): New function.
	(key_press_event): Likewise.
	(main): Change open, random, remove selected and clear all to the
	menu.  Add a quit menu entry.  Display the title and artist in the
	title bar.  Add a jump to button to the right of the title and
	artist display.
	(playlist_next_cb): Scroll to the new entry.
	(playlist_prev_cb): Likewise.
	* src/Makefile.am (starling_SOURCES): Remove callbacks.h and
	callbacks.c.
	* src/starling.h (struct _Starling): Remove files notebook, stop,
	next, prev, up, down, add, clear, save and remove.  Add field
	treeview_window.
	[IS_HILDON] (struct _Starling): Add field fullscreen.

	* src/config.c (config_save): Only save ST->FS_LAST_PATH if
	non-NULL.

	* src/playlist.c (play_list_random_next): If empty, immediately
	return 0.

2007-02-22  Neal H. Walfield  <neal@gnu.org>

	* src/main.c: Don't include "interface.h".
	* src/callbacks.c: Likewise.
	
2007-02-22  Neal H. Walfield  <neal@gnu.org>

	* src/Makefile.am (starling_SOURCES): Remove interface.c and
	interface.h.
	* src/interface.h: Remove file.
	* src/interface.c: Remove file and move contents...
	* src/main.c: ... into this file.
	[IS_HILDON]: Include <hildon-widgets/hildon-app.h>,
	<hildon-widgets/hildon-appview.h> and <libosso.h>.
	[IS_HILDON] (APPLICATION_DBUS_SERVICE): Define.
	[IS_HILDON] (main): Initialize osso.  Use basic Hildon widgets
	where appropriate.  Use a toolbar for the previous, play/pause,
	next and random buttons.  Update users.  Likewise for the position
	scale.  Split ST->TIME into ST->POSITION and ST->DURATION.  Join
	the artist and title labels.
	* src/starling.h: Don't include <gtk/gtkwidget.h> or
	<gtk/gtkliststore.h>.  Include <gtk/gtk.h>.  Remove field time,
	add fields position and duration.  Remove field artist and bolded.
	* src/config.c (config_save): Get the random mode correctly.
	* src/callbacks.c (playlist_state_changed_cb): Don't change the
	play/pause button's image.  Update the play/pause buttons state as
	required.  Render the title correctly.

	* src/playlist.h (play_list_unpause): New prototype.
	* src/playlist.c (play_list_unpause): New function.
	* src/callbacks.c (playlist_playpause_cb): Don't just toggle the
	state; call either play_list_unpause or play_list_pause as a
	function of the button's state.
	
	* src/playlist.c (play_list_init): Don't initialize PL->POSITION
	to -1.
	(play_list_bus_cb): Only emit the changed signal if we have
	reached the target state.
	(play_list_seek): Ignore request if no stream is loaded.
	(play_list_query_duration): Don't return success if we haven't
	loaded a stream.
	(struct _PlayList): Add field last_state.
	(play_list_pause): If already playing, do nothing.
	(play_list_unpause): If already paused, do nothing.
	(play_list_bus_cb): Save state in PL->LAST_STATE.

	* src/callbacks.c (playlist_move_up_cb): Check that the swap is
	valid.
	(playlist_move_down_cb): Likewise.
	(scale_update_cb): If we fail to get the duration, just return.
	(playlist_state_changed_cb): If ARTIST or TITLE is NULL, don't
	fetch the lyrics.  On a new song, reset ST->CURRENT_LENGTH,
	ST->HAS_LYRICS and ST->ENQUEUED.

	* src/lastfm.h: Include "starling.h", not "startling.h".

	* src/lyrics.h: Include <libsoup/soup.h>.

	* src/config.c (KEY_WIDTH): New define.
	(KEY_HEIGHT): Likewise.
	(config_load): Correctly free memory.  Restore the size of the
	main window.
	(config_save): Save the size of the main window.

2007-02-22  Neal H. Walfield  <neal@gnu.org>

	* configure.in (starling_localedir): Don't use this.
	(PACKAGE_LOCALE_DIR): ... use this.
	(ENABLE_HILDON, IS_HILDON): Define according to whether we detect
	hildon.
	(GTK_CFLAGS): Don't AC_SUBST.
	(SQLITE_CFLAGS): Likewise.
	(LIBSOUP_CFLAGS): Likewise.
	(GPE_CFLAGS): Likewise.
	(DEPS_CFLAGS): AC_SUBST instead.
	(GTK_LIBS): Don't AC_SUBST.
	(SQLITE_LIBS): Likewise.
	(LIBSOUP_LIBS): Likewise.
	(GPE_LIBS): Likewise.
	(DEPS_LIBS): AC_SUBST instead.
	* src/Makefile.am (starling_LDADD): New variable.
	(noinst_HEADERS): Fold this...
	(starling_SOURCES): ... into this.
	(INCLUDES): Define.
	(starling_CFLAGS): Don't define.
	(starling_LDADD): Change to just $(DEPS_LIBS).

2007-02-22  Neal H. Walfield  <neal@gnu.org>

	* src/playlist.h: Rewrite.
	* src/playlist.c: Rewrite to make PlayList implement GtkTreeModel
	and, rather than keep everything in memory, use an sqlite DB as
	its backend.
	* src/stream.h: Remove file.
	* src/stream.c: Likewise.
	* src/Makefile.am (starling_SOURCES): Remove stream.c.
	(noinst_HEADERS): Remove stream.h.
	* src/callbacks.c: Don't include <gtk/gtkfilesel.h>,
	<gtk/gtktogglebutton.h>, <gtk/gtkrange.h>, <gtk/gtktreeview.h>,
	<gtk/gtkmain.h>, <gtk/gtkdialog.h>, <gtk/gtkentry.h>,
	<gtk/gtklabel.h>, <gtk/gtkstock.h> or <gtk/gtktextview.h>.
	Include <gtk/gtk.h> and "errorbox.h".
	(fs_accept_cb): Report errors.
	(playlist_remove_cb): Only remove selected rows.
	(playlist_activated_cb): Use play_list_goto.
	(playlist_playpause_cb): Use play_list_play_pause_toggle.
	(scale_update_cb): Use play_list_get_info.
	(new_tag_cb): Remove function.
	(new_stream_cb): Likewise.
	(deleted_stream_cb): Likewise.
	(playlist_cleared_cb): Likewise.
	(playlist_swap_cb): Likewise.
	(playlist_bold_item): Likewise.
	(callbacks_setup): Don't listen for the "new-stream",
	"deleted-stream", "cleared" or "swap" signals on ST->PL.
	* src/config.c (KEYLOADPLAYLIST): Don't define.
	(DEFKEYLOADPLAYLIST): Likewise.
	(config_init): Don't set the KEYLOADPLAYLIST group.
	(config_load): Don't read the KEYLOADPLAYLIST group.
	* src/interface.h: Don't enumerate columns.
	(player_init): Don't declare.
	* src/interface.c Don't include <gtk/gtkwindow.h>,
	<gtk/gtkstock.h>, <gtk/gtkhscale.h>, <gtk/gtkcellrenderertext.h>,
	<gtk/gtkscrolledwindow.h>, <gtk/gtklabel.h>, <gtk/gtkhbox.h>,
	<gtk/gtkvbox.h>, <gtk/gtkcheckbutton.h>, <gtk/gtkvseparator.h>,
	<gtk/gtkhseparator.h>, <gtk/gtkalignment.h>, <gtk/gtktreeview.h>,
	<gtk/gtknotebook.h>, <gtk/gtktextview.h> or <gtk/gtkentry.h>.
	Include <string.h> and <gtk/gtk.h>.
	(title_data_func): New function.
	(interface_init): Use ST->PL as the tree view.  Use
	title_data_func to render the cells.
	(player_init): Move from here...
	* src/main.c (main): ... into this function.  Use it before
	calling interface_init.
	Include "starling.h".
	* src/utils.h: Don't include "stream.h".
	(pretty_stream_name): Remove prototype.
	* src/utils.c (escape_spaces): Remove function.

	* NEWS: New file.

2007-02-19  Neal H. Walfield  <neal@gnu.org>

	* configure.in: Check for gstreamer-plugins-base-0.10.

	* src/main.c: Include <locale.h>.

	* src/errorbox.c: Include <stdio.h>.

	* src/callbacks.h (CALLBACKS_H): It's CALLBACKS_H, not
	cALLBACKS_H.

