2003-09-27 Johan Dahlin <jdahlin@async.com.br> * jamboree.spec.in (Requires): Increased version * jamboree.desktop.in (Categories): Add Icon field 2003-08-27 Johan Dahlin <jdahlin@async.com.br> * src/main-window.c (load_glade_gui): Set prev/next buttons. (main_window_init): (struct _MainWindowPriv): (menu_items, update_playing_info): Add next/prev buttons for the menu. * src/song-list-model.[ch] (song_list_model_has_next) (song_list_model_has_prev): New functions. * src/main-window.c (update_playing_info): Update sensitivity next/prev buttons. 2003-08-18 Richard Hult <richard@imendio.com> * src/main-window.c: (song_tree_row_activated_cb), (actions_play_cb), (actions_prev_cb), (actions_next_cb), (handle_next), (handle_prev), (handle_play): Make double clicking work again. 2003-08-17 Richard Hult <richard@imendio.com> * src/Makefile.am: Comment out the jb-stuff. * src/main-window.c: * src/player.c: * src/song-list-model.c: Move play order handling back to the list model. Try putting the playing indication icon in the title column. 2003-08-15 Johan Dahlin <jdahlin@async.com.br> * src/main-window.c (restore_gconf_prefs, store_gconf_prefs) (main_window_destroy): Store/Restore the view. * src/song-list-view.c: Add GConf support for saving columns. * src/song-list-model.h: add SONG_SORT_ID_NO_COLUMNS. * src/player.c (player_next, player_prev): Call player_set_song instead of player_play_song. * configure.in: Better GConf checks and beautify a little. * Makefile.am (schemadir): Add intltool rules * jamboree.schemas.in: New file. * .cvsignore: Add jamboree.schemas 2003-08-09 Richard Hult <richard@imendio.com> * TODO: Add stuff. * src/jb-util.c: (remove_file), (main): Update for song-db API change. * src/main-window.c: (song_tree_row_activated_cb), (context_play_cb), (context_properties_cb), (context_remove_cb), (song_tree_row_button_press_event_cb), (song_playing_func): Ressurect code to get current song. Fix removing songs. (add_folder_cb), (add_paths): * src/song-db.c: (song_db_add_dir), (song_db_add_file), (song_db_remove_song): * src/song-db.h: Change song-db API to make a bit more sense. * src/song-list-model.c: (song_list_model_get_songs), (remove_ptr): Fix. 2003-08-09 Richard Hult <richard@imendio.com> * src/main-window.c (song_playing_func): Show pause icon when the song is paused. * data/images: Add small pause. 2003-08-09 Richard Hult <richard@imendio.com> * src/main-window.c: Sort albums and artist by the collate key to get UTF-8 and "the" sorting working. Always check the result from ..._get_iter before accessing the iter. (update_playing_info), (song_tree_row_activated_cb), (context_play_cb), (context_properties_cb): (song_tree_row_button_press_event_cb), (song_playing_func): Remove broken code that checks if the song is the current one. Needs to be moved to player.c (load_glade_gui): Remove commented cruft. * src/song-list-model.c: Fix assertions. (song_list_model_song_get_iter), (song_list_model_get_song), (remove_ptr), (song_list_model_remove_delta): Fix the delta stuff. 2003-08-07 Richard Hult <richard@imendio.com> * TODO: * src/main-window.c: (main_window_init), (player_error_cb), (player_state_changed_cb), (context_pause_cb), (context_remove_cb), (song_playing_func), (query_update_func): * src/player.c: (player_class_init), (player_init), (gst_state_to_player_state), (player_get_state), (error_idle), (error_cb), (state_change_cb): * src/song-list-model.c: (song_list_model_get_path), (song_list_model_multi_drag_data_get), (song_list_model_get_song), (song_list_model_get_songs), (remove_ptr), (song_list_model_remove_delta): * src/song-list-model.h: * src/utils.c: (format_length_for_display), (create_message_dialog), (show_message_dialog), (details_dialog_response_callback), (show_ok_dialog), (eel_show_error_dialog), (eel_show_error_dialog_with_details): * src/utils.h: Commit patch from Johan plus some fixes. 2003-08-05 Richard Hult <richard@imendio.com> * src/main-window.c: (load_glade_gui): * src/player.c: (player_set_songs), (player_set_song), (player_next), (player_prev), (player_set_shuffle): Fix initial volume level and shuffle. 2003-08-05 Richard Hult <richard@imendio.com> * src/player.c: (end_of_stream_idle): Fix warning. * src/utils.c: (event_filter), (grab_keys): Tweak. * src/volume-button.c: Remove dead code. 2003-08-05 Johan Dahlin <jdahlin@async.com.br> * src/player.c (player_is_playing): New function. * src/song-db.c (song_db_remove_song): New function. * src/main-window.c: Add context menu to song-list-view. 2003-08-04 Richard Hult <richard@imendio.com> * configure.in: Add some checks for GTK+/GObject 2.2.x and the GST volume element. * src/jb-player.c: * src/main.c: Fix disable_gst variable. * src/main.h: Remove. * src/player.c: (player_get_type), (player_init), (player_finalize), (player_new), (end_of_stream_idle), (state_change_cb), (player_set_songs), (player_setup_decoder), (player_set_song), (player_get_song), (player_play), (player_play_song), (player_pause), (player_toggle_play), (player_set_volume), (player_get_volume), (randomize_list): Fixup preconditions and make things a bit more consistant. Don't use GRand. * src/volume-button.c: (volume_button_class_init), (volume_button_init), (volume_button_finalize): Add finalizer and remove GConf notify there (not needed really but looks nicer). * src/main-window.c (grab_key_cb): Add missing breaks in the switch. 2003-08-04 Richard Hult <richard@imendio.com> * src/main-window.c: (clear_songs_info), (update_playing_info), (query_update_func): * src/query.c: (query_run): Tweak query runs. 2003-08-03 Johan Dahlin <jdahlin@async.com.br> * src/query.c (query_create_default_queries): New function. * src/player.c: More cleanups, almost there now. 2003-08-03 Richard Hult <richard@imendio.com> * src/player.c: (player_init), (create_source), (create_sink), (player_get_state): Be a bit more robust when we can't create elements, just disable GST and keep running. 2003-08-03 Richard Hult <richard@imendio.com> * src/player.c: (player_set_songs), (compare_int), (randomize_list): Implement. 2003-08-03 Richard Hult <richard@imendio.com> * data/glade/jamboree.glade: * data/images/Makefile.am: * data/images/jamboree-volume-max.png: * data/images/jamboree-volume-zero.png: * src/stock-icons.c: * src/volume-button.[ch]: Replace volume slider with slider button. * src/main-window.c: (main_window_init), (update_playing_info), (load_glade_gui), (gconf_notify_cb): Tweak burst size and use the new volume button. * src/utils.[ch]: * src/main.c: Add gconf dir and share the same gconf_client properly, throughout. 2003-08-03 Johan Dahlin <jdahlin@async.com.br> * src/player.c (player_set_songs): Call player_set_song for the first song here. * src/song-list-model.[ch]: Remove _next, _prev * src/Makefile.am: Put back some stuff * src/song-list-model.c (song_list_model_get_songs): New function. * src/song-db.c (song_db_remove): New function. * src/jb-player.c: New player program. * src/jb-util.c: New utility program. * src/main-window.c: Simplify for the new player API. * src/player.c: Rewrite. 2003-08-02 Richard Hult <richard@imendio.com> * src/song-list-model.c: Use GSequence to scale better than a GList. * src/main-window.c (main_window_new, first_browse_func): Delay the initial browse query until after the window is shown, makes it look a lot better. Tweak BURST. * src/test-db.c: Bring up-to-date and make it do something useful (create a test db from random values). 2003-08-02 Richard Hult <richard@imendio.com> * TODO: Update. * src/smart-playlist-dialog.c: (smart_playlist_dialog_init), (name_entry_changed_cb), (smart_playlist_dialog_get_query), (smart_playlist_dialog_set_query): Fix warnings and indentation and make OK button insensitive when there is no name. 2003-08-01 Johan Dahlin <jdahlin@async.com.br> * src/utils.[ch] (format_time_for_display) (format_time_nicely_for_display, format_file_size_for_display): New functions. * src/song-list-view.c (song_time_func): Use format_time_for_display here. * src/song-db.c (song_db_new): Use DB_BTREE instead of DB_HASH for the database. (add_song): Call db->key_range to see if they key exists before trying to insteart. Some refactorization here too. 2003-08-01 Richard Hult <richard@imendio.com> * src/main-window.c (add_progress_callback): Fix utf-8 conversion and catch errors, don't access string after it's freed. 2003-08-01 Johan Dahlin <jdahlin@async.com.br> * src/utils.[ch]: New files, move out stuff from main-window.c here. * src/song-db.c (add_song): Check if the file exist before adding it. * src/expr.c (variable_*, constant_*): Make public and make the API nicer. * src/smart-playlist-dialog.c (smart_playlist_dialog_set_query): Cleanup, add support for range constant types and selection_types and make the match_type and limit_type work properly. (expr_to_list): Simplify. (limit_values, selection_values): Make sure the order of the items is the same as the one for the enum values (eek!) 2003-07-30 Richard Hult <richard@imendio.com> * src/main-window.c: Remove browse button stuff. Uncomment tick/length label stuff. Very ugly for now. 2003-07-30 Richard Hult <richard@imendio.com> * src/main-window.c (player_end_of_stream_cb): Don't use the playlist to get the query, that's not right since 1) "all songs" doesn't have a playlist, 2) when you browse the query is completely different. (priv->query can be NULL but we should fix that instead so it always shows the current song list instead). 2003-07-30 Richard Hult <richard@imendio.com> * data/glade/jamboree.glade: * src/main-window.c: (update_playing_info), (load_glade_gui): Remove unused playing label and tweak paddings and border widths to make things look a bit better. * src/song-list-model.c (song_list_model_remove): Remove comment, change assert into regular check + warning, remove check for current != NULL. 2003-07-30 Johan Dahlin <jdahlin@async.com.br> * src/song-list-model.c (song_list_model_remove): Use model->songs instead of model->current. * src/main-window.c (player_end_of_stream_cb): Remove the song if it doesn't evaluate here. * src/*.c: Add proper support for range and match types. * src/smart-playlist-dialog.c (smart_playlist_dialog_set_query): Work in progress. (smart_playlist_dialog_get_query): Update * src/song-list-model.c (song_list_model_remove): Impl. (song_compare_func): Add SONG_SORT_ID_PLAY_COUNT handling. * src/song-list-view.c (song_play_count_func): Make it do something useful. 2003-07-29 Richard Hult <richard@imendio.com> * src/song-list-view.c (drag_drop_cb): Add to get rid of warning. 2003-07-27 Richard Hult <richard@imendio.com> * src/main-window.c (create_regular_playlist_query): Implement. (setup_playlists): Refactory and set up regular and smart playlists. * src/expr.c (variable_get_string_value): Implement genre. (evaluate_comparison): Implement playlist hack. * src/player.c (player_tell, player_seek): Implement in preparation for pause fixing. * src/main-window.c (add_song): Rename and make static. (update_playing_info): Scroll to the playing song. (add_paths): Select the playlist again after importing to update the song list. Also unbreak playey and main-window with regards to play/pause/stop and start implementing drag and drop for playlists. 2003-07-27 Richard Hult <richard@imendio.com> * Makefile.am: Remove egg column chooser. * data/glade: Tweak main window and add our own column chooser. * data/images: Tweak volume images and add images for different playlists. * src/main-window.c: Various cleanups and fixes: scroll to the top after clearing the tree views, string fixes, change the playing pixbuf, add regular playlists. * src/song-list-model.c: * src/song-list-view.c: Add columns, implement column chooser. 2003-07-27 Richard Hult <richard@imendio.com> * src/song-list-view.c: Clean up, remove redundant model in the object struct. Add columns, add column chooser. 2003-07-26 Richard Hult <richard@imendio.com> * src/main-window.c (add_progress_callback): Shorten the folder name if it's really long. (grab_keys, grab_key, event_filter): (main_window_init): Add keyboard crack. * src/song.c (song_free): Plug leaks. 2003-07-23 Richard Hult <richard@imendio.com> * src/main-window.c: Add some crack to export to m3u playlist. Safely guared by #ifdef CRACK ;) * src/song-list-model.c (song_compare_func, compare_int) (sort_artist_album_track, sort_album_track): More refactoring, cut down number of lines and implement rating compare. * src/song.h (struct _Song): * src/query.c (apply_limits, compare_func, query_run): Implement random selection. * src/playlist.c (playlist_new): Don't make playlist names editable. * src/main-window.c (load_glade_gui): Restore volume. (volume_changed_cb): Save volume. * src/smart-playlist-dialog.c (smart_playlist_dialog_get_query): Only build expr if match checkbutton is active. Get limit values from dialog if limit checkbutton is active. (setup_option_menu, create_option_menu): Refactor so we can use this code for the limit option menus. + Some other small fixes. * src/query.c (apply_limits): Implement. 2003-07-22 Johan Dahlin <jdahlin@async.com.br> * src/song-db.c (song_db_update_song): Set date_modified here. * src/smart-playlist-dialog.c: Mark all structures for translation. * src/expr.c (constant_get_date_value): Move time () call here. Add CONSTANT_TYPE_RATING all over the place. 2003-07-22 Richard Hult <richard@imendio.com> * src/query.c (query_run): Reset the previous hit lits. * src/main-window.c (setup_album_view, setup_artist_view) (query_update_func): Rename update_... to setup_... to better reflect what they actually do, and remove most of the arguments since they are not needed. 2003-07-22 Richard Hult <richard@imendio.com> * src/main-window.c: (start_browse_query), (genre_selection_changed_cb), (artist_selection_changed_cb), (album_selection_changed_cb), (search_entry_activate_cb), (search_entry_timeout_cb), (load_smart_playlists), (main_window_new), (playlist_selection_changed_cb), (edit_smart_playlist_cb), (query_update_func), (start_query): * src/query.c: (query_free), (query_ref), (update_timeout_cb), (update_destroy_notify), (query_run), (query_cancel): Fix life cycle issues with queries. * src/main.c: (main): * src/player.c: (player_init), (player_set_volume), (player_get_volume): Add support for running with no gstreamer code paths, to be able to run with valgrind (start with env.var. NOGST=1). 2003-07-22 Johan Dahlin <jdahlin@async.com.br> * src/query-xml.c (start_element_handler): Fix CONSTANT_TYPE_DATE. 2003-07-22 Richard Hult <richard@imendio.com> * src/query-xml.c (handle_expr): Refactor some and break out expr handling. (start_element_handler): ...and use it for exprs and recursive exprs. (end_element_handler): Create binary and unary ops and push them on the stack. Pop the expr when we're done. 2003-07-22 Richard Hult <richard@imendio.com> * data/glade/smart-playlist-dialog.glade: Change name for name entry. * src/main-window.c: (new_smart_playlist_cb): Save query. * src/query-xml.c: (query_save): Implement. * src/smart-playlist-dialog.c: (smart_playlist_dialog_init): Get name entry. (smart_playlist_dialog_get_query): Get name. 2003-07-22 Richard Hult <richard@imendio.com> * src/smart-playlist-dialog.c: More cleanup, remove uneccessary G_OBJECT() casts. Remove backslashes, this is not Python. Remove loads of unecessary casts, no need to cast a widget to a widget. 2003-07-22 Richard Hult <richard@imendio.com> * src/Makefile.am: Add test-expr and remove expr-xml.[ch]. * src/expr-xml.c: * src/expr-xml.h: Remove. * src/expr.c: (operator_from_string), (constant_type_from_string), (variable_from_string): Implement. (expr_new, expr_set_binary_op), (expr_set_unary_op), (expr_set_constant_op), (expr_set_variable_op), (expr_clear), (expr_free), (constant_free), (variable_get_string_value): Lots of small bug fixes. * src/main-window.c: (main_window_add_song), (run_browse_query), (load_smart_playlists), (playlist_selection_changed_cb), (new_smart_playlist_cb), (query_update_func): Cancel queries properly and unref them after they're done. * src/query-xml.c: (push_expr), (pop_expr), (push_state), (pop_state), (peek_state, (set_error), (get_attribute_value), (start_element_handler), (end_element_handler), (error_handler), (query_from_xml), (string_append_padding), (output_constant), (output_expr, (output_limit), (query_to_xml): Move over xml handling here and implement the new parser. (query_load_queries): Implement. * src/smart-playlist-dialog.c (smart_playlist_dialog_get_query): s/g_assert/g_return_val_if_fail/. Rename from ..._expr, and return a query. Get the current time once and use it throughout. * src/smart-playlist-dialog.c: (smart_playlist_dialog_init), (check_match_toggled_cb), (check_limit_toggled_cb), (create_row), (option_menu_get_active_child), (option_menu_get_value), (add_row_at_pos), (remove_row_from_pos), (add_button_clicked_cb), (remove_button_clicked_cb), (option_menu_changed_cb), (update_option_menu), (smart_playlist_dialog_get_query): Fix style issues, like s/gint/int/, s/gchar/char/, remove unnecessary g_asserts. 2003-07-21 Richard Hult <richard@imendio.com> * src/expr.c (variable_get_string_value): Cast time_t to int to avoid warning. 2003-07-21 Richard Hult <richard@imendio.com> * src/main-window.c: (main_window_init), (main_window_query), (run_browse_query), (search_entry_activate_cb), (search_entry_timeout_cb), (load_smart_playlists), (new_smart_playlist_cb): Update for new query API. * src/playlist.c: (playlist_free), (playlist_set_query): Ref/unref query. * src/query.c: (query_free), (query_new), (query_ref), (query_unref), (update_done_cb), (query_run): * src/query.h: Make refcounted and unref when a query is completed. Solves lifetime cycle for queries nicely. 2003-07-21 Johan Dahlin <jdahlin@async.com.br> * src/song-db.c (unpack_song, pack_song): Pack song->play_count, song->date_modifed and date_added in the db. (song_db_update_song): New function. * src/smart-playlist-dialog.c (smart_playlist_dialog_get_expr): Add DEBUG sections and more comments. (smart_playlist_dialog_get_expr): Also add proper support for CONSTANT_TYPE_DATE. * src/main-window.c (player_end_of_stream_cb): Update song->play_count and song->last_played. (new_smart_playlist_cb): Call query_set_expr on priv->query. * src/expr.c (operator_to_string, variable_to_string): Make public. Add support for VARIABLE_PLAY_COUNT, VARIABLE_DATE_ADDED and VARIABLE_DATE_MODIFED * src/expr-xml.c (output_constant): Add support for CONSTANT_TYPE_DATE. (output_variable): Remove in favor of variable_to_string. (output_binary_op): Remove in favor of operator_to_string. 2003-07-21 Richard Hult <richard@imendio.com> * src/query.c: (query_set_selection_type), (query_get_selection_type), (query_set_limit_type), (query_get_limit_type), (query_set_limit), (query_get_limit): * src/query.h: Implement setters and getters. 2003-07-21 Richard Hult <richard@imendio.com> * src/expr.h: Move limit/selection from here... * src/query.h: ...to here. Flesh out the API a bit as well. * src/query.c: (update_timeout_cb), (query_run): Don't keep the update function and user data in the struct, pass it for every time we perform a run. * src/main-window.c: (main_window_init), (main_window_query), (run_browse_query), (search_entry_activate_cb), (search_entry_timeout_cb): Adapt to the above change. 2003-07-21 Richard Hult <richard@imendio.com> * src/expr.h: LIMIT_TYPE... instead of LIMIT_... Add SelectionType. * src/main.c (main): Get default gconf client, and unref it when we quit.. * src/main-window.c (add_folder_cb): Keep the dir we added in a gconf key and use it the next time. 2003-07-21 Richard Hult <richard@imendio.com> * src/song-list-model.c: (song_compare_func): * src/song-list-view.c: (song_list_view_init): s/name/title/ and s/number/track_number/ in a few places. 2003-07-21 Richard Hult <richard@imendio.com> * src/song-list-view.c (song_title_func): Rename from song_name_func. * src/song-list-model.c (song_track_number_func): Rename from song_number_func. Also don't check if year > 0, that broke things totally. Why did we do that? 2003-07-21 Richard Hult <richard@imendio.com> * src/song-list-view.c (song_column_clicked_cb): Cycle between ascending, descending and default sort. Add missing config.h. * src/song-list-model.c (sort_artist_album_track) (sort_album_track, song_compare_func): Fix sorting to always have secondary/tertiary criteria. Do it slightly different from how it was implemented for default sorting before (only reverse primary sort for descending sort). Also use the same sorting for default sort as artist (doesn't make sense to do it any other way...). * src/song-list-view.c (song_list_view_init, setup_column): Take a good cut of the number of lines here by refactoring a bit. Don't make the playing column sortable. * src/main-window.c (query_update_func): * src/query.c (update_timeout_cb, query_run): Change prototype for update function to specify if it's the first burst, since we need to set things up. 2003-07-20 Richard Hult <richard@imendio.com> * src/main-window.c (query_update_func): Don't crash if we only get one burst. 2003-07-20 Richard Hult <richard@imendio.com> * src/main-window.c: (main_window_init), (main_window_query), (main_window_add_song), (update_songs_info), (update_artist_view), (run_browse_query), (album_sort_func), (search_entry_activate_cb), (search_entry_timeout_cb), (load_glade_gui), (new_smart_playlist_cb), (query_update_func): * src/query.c: (query_free), (query_new), (query_set_name), (query_get_name), (query_set_expr), (query_get_expr), (query_set_update_func), (query_set_simple), (update_timeout_cb), (query_run), (query_cancel): Break out query functionality from main window and put it in query. 2003-07-20 Johan Dahlin <jdahlin@async.com.br> * src/smart-playlist-dialog.c (smart_playlist_dialog_get_expr): Fetch the data from the interface and create an expression object. (smart_playlist_dialog_init): Move add button so it's only on one row. Rename row->condition to row->operator. * src/main-window.c (new_smart_playlist_cb): Fetch the query * src/expr.c: Add support for CONSTANT_TYPE_SIZE, a few VARIABLE_* constants and make constant_type_to_string public * src/smart-playlist-dialog.c: Fix includes and add GPL header. (smart_playlist_dialog_new): Add this function. * src/main-window.c (new_smart_playlist_cb): Add some code to show the smart playlist dialog. * src/id3-tag.c: Reformat for 80 columns. * src/expr.h: Add a few new fields and rename another few. (LimitType): New enum. * src/main-window.c (load_glade_gui): Move part of the stock icon logic here instead of the glade file, since glade can't really handle stock icons that well * src/*.[ch]: for Song: rename name -> title, name_key to title_key and number -> track_number. * data/glade/smart-playlist-dialog.glade: New file. * src/smart-playlist-dialog.[ch]: Rewrite