# HG changeset patch # User nenolod # Date 1150434835 25200 # Node ID d5361c48bb18c58e9efa1c315a91a9a14d7bb32a # Parent c50f758510f330168618401369568cbf59ee501c [svn] - more fun diff -r c50f758510f3 -r d5361c48bb18 ChangeLog --- a/ChangeLog Thu Jun 15 22:01:34 2006 -0700 +++ b/ChangeLog Thu Jun 15 22:13:55 2006 -0700 @@ -1,3 +1,12 @@ +2006-06-16 05:01:34 +0000 William Pitcock + revision [1446] + - the fileinfo window is not visible by default + + + Changes: Modified: + +0 -1 trunk/audacious/glade/fileinfo.glade + + 2006-06-16 05:00:30 +0000 William Pitcock revision [1444] - hookup musepack tuple builder (oopsies) diff -r c50f758510f3 -r d5361c48bb18 audacious/ui_fileinfo.c --- a/audacious/ui_fileinfo.c Thu Jun 15 22:01:34 2006 -0700 +++ b/audacious/ui_fileinfo.c Thu Jun 15 22:13:55 2006 -0700 @@ -89,6 +89,21 @@ g_free(text); } +void fileinfo_hide(gpointer unused) +{ + gtk_widget_hide(fileinfo_win); + + /* Clear it out. */ + fileinfo_entry_set_text("entry_title", ""); + fileinfo_entry_set_text("entry_artist", ""); + fileinfo_entry_set_text("entry_album", ""); + fileinfo_entry_set_text("entry_comment", ""); + fileinfo_entry_set_text("entry_genre", ""); + fileinfo_entry_set_text("entry_year", ""); + fileinfo_entry_set_text("entry_track", ""); + fileinfo_entry_set_text("entry_location", ""); +} + void create_fileinfo_window(void) { @@ -106,6 +121,9 @@ widget = glade_xml_get_widget(xml, "image_artwork"); gtk_image_set_from_file(GTK_IMAGE(widget), DATA_DIR "/images/audio.png"); + + widget = glade_xml_get_widget(xml, "btn_close"); + g_signal_connect(G_OBJECT(widget), "clicked", (GCallback) fileinfo_hide, NULL); } void @@ -121,6 +139,7 @@ fileinfo_entry_set_text("entry_album", tuple->album_name); fileinfo_entry_set_text("entry_comment", tuple->comment); fileinfo_entry_set_text("entry_genre", tuple->genre); + fileinfo_entry_set_text("entry_location", tuple->file_path); if (tuple->year != 0) fileinfo_entry_set_text_free("entry_year", g_strdup_printf("%d", tuple->year)); @@ -130,3 +149,17 @@ gtk_widget_show(fileinfo_win); } + +void +fileinfo_show_for_filepath(const gchar *path) +{ + TitleInput *tuple = input_get_song_tuple(path); + + /* FIXME: what to do here? */ + if (tuple == NULL) + return; + + fileinfo_show_for_tuple(tuple); + + bmp_title_input_free(tuple); +} diff -r c50f758510f3 -r d5361c48bb18 audacious/ui_fileinfo.h --- a/audacious/ui_fileinfo.h Thu Jun 15 22:01:34 2006 -0700 +++ b/audacious/ui_fileinfo.h Thu Jun 15 22:13:55 2006 -0700 @@ -22,5 +22,7 @@ #define _UI_FILEINFO_H_ void create_fileinfo_window(void); +void fileinfo_show_for_tuple(TitleInput *tuple); +void fileinfo_show_for_path(gchar *path); #endif