changeset 1267:d5361c48bb18 trunk

[svn] - more fun
author nenolod
date Thu, 15 Jun 2006 22:13:55 -0700
parents c50f758510f3
children 97fd96ee4b84
files ChangeLog audacious/ui_fileinfo.c audacious/ui_fileinfo.h
diffstat 3 files changed, 44 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 <nenolod@nenolod.net>
+  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 <nenolod@nenolod.net>
   revision [1444]
   - hookup musepack tuple builder (oopsies)
--- 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);
+}
--- 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