Mercurial > audlegacy
annotate audacious/ui_fileinfo.c @ 1407:b94847e68f33 trunk
[svn] Newer libmms, from their CVS. Needs to be hooked up properly as it wants more arguments to its functions.
author | chainsaw |
---|---|
date | Sat, 15 Jul 2006 16:39:37 -0700 |
parents | 1abfc389ecc6 |
children | 878c7f8d0a8c |
rev | line source |
---|---|
1262 | 1 /* |
2 * Audacious: A cross-platform multimedia player | |
3 * Copyright (c) 2006 William Pitcock, Tony Vroon, George Averill, | |
4 * Giacomo Lozito, Derek Pomery and Yoshiki Yazawa. | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
19 */ | |
20 | |
21 #ifdef HAVE_CONFIG_H | |
22 # include "config.h" | |
23 #endif | |
24 | |
25 #include <glib.h> | |
26 #include <glib/gi18n.h> | |
27 #include <gtk/gtk.h> | |
28 #include <glade/glade.h> | |
29 #include <string.h> | |
30 #include <stddef.h> | |
31 #include <stdio.h> | |
32 #include <sys/types.h> | |
33 #include <dirent.h> | |
34 #include <unistd.h> | |
35 #include <errno.h> | |
36 #include <sys/types.h> | |
37 #include <sys/stat.h> | |
38 | |
39 #include "glade.h" | |
40 | |
41 #include "plugin.h" | |
42 #include "pluginenum.h" | |
43 #include "input.h" | |
44 #include "effect.h" | |
45 #include "general.h" | |
46 #include "output.h" | |
47 #include "visualization.h" | |
48 | |
49 #include "main.h" | |
50 #include "skin.h" | |
51 #include "urldecode.h" | |
52 #include "util.h" | |
53 #include "dnd.h" | |
54 #include "libaudacious/configdb.h" | |
55 #include "libaudacious/titlestring.h" | |
56 | |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
57 #include "playlist.h" |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
58 |
1262 | 59 #include "mainwin.h" |
60 #include "ui_playlist.h" | |
61 #include "skinwin.h" | |
62 #include "playlist_list.h" | |
63 #include "build_stamp.h" | |
64 #include "ui_fileinfo.h" | |
1284 | 65 #include "ui_playlist.h" |
1262 | 66 |
67 GtkWidget *fileinfo_win; | |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
68 GtkWidget *filepopup_win; |
1341 | 69 GdkPixbuf *filepopup_pixbuf; |
1262 | 70 |
71 static void | |
72 fileinfo_entry_set_text(const char *entry, const char *text) | |
73 { | |
74 GladeXML *xml = g_object_get_data(G_OBJECT(fileinfo_win), "glade-xml"); | |
75 GtkWidget *widget = glade_xml_get_widget(xml, entry); | |
76 | |
77 if (xml == NULL || widget == NULL) | |
78 return; | |
79 | |
80 gtk_entry_set_text(GTK_ENTRY(widget), text); | |
81 } | |
82 | |
83 static void | |
84 fileinfo_entry_set_text_free(const char *entry, char *text) | |
85 { | |
86 GladeXML *xml = g_object_get_data(G_OBJECT(fileinfo_win), "glade-xml"); | |
87 GtkWidget *widget = glade_xml_get_widget(xml, entry); | |
88 | |
89 if (xml == NULL || widget == NULL) | |
90 return; | |
91 | |
92 gtk_entry_set_text(GTK_ENTRY(widget), text); | |
93 | |
94 g_free(text); | |
95 } | |
96 | |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
97 static void |
1296 | 98 fileinfo_entry_set_image(const char *entry, const char *text) |
99 { | |
100 GladeXML *xml = g_object_get_data(G_OBJECT(fileinfo_win), "glade-xml"); | |
101 GtkWidget *widget = glade_xml_get_widget(xml, entry); | |
1299 | 102 GdkPixbuf *pixbuf; |
1296 | 103 |
104 if (xml == NULL || widget == NULL) | |
105 return; | |
106 | |
1299 | 107 pixbuf = gdk_pixbuf_new_from_file(text, NULL); |
108 | |
109 if (pixbuf == NULL) | |
110 return; | |
111 | |
112 if (gdk_pixbuf_get_height(GDK_PIXBUF(pixbuf)) > 150) | |
113 { | |
114 GdkPixbuf *pixbuf2 = gdk_pixbuf_scale_simple(GDK_PIXBUF(pixbuf), 150, 150, GDK_INTERP_BILINEAR); | |
115 g_object_unref(G_OBJECT(pixbuf)); | |
116 pixbuf = pixbuf2; | |
117 } | |
118 | |
119 gtk_image_set_from_pixbuf(GTK_IMAGE(widget), GDK_PIXBUF(pixbuf)); | |
1326 | 120 g_object_unref(G_OBJECT(pixbuf)); |
1296 | 121 } |
122 | |
123 static void | |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
124 filepopup_entry_set_text(const char *entry, const char *text) |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
125 { |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
126 GladeXML *xml = g_object_get_data(G_OBJECT(filepopup_win), "glade-xml"); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
127 GtkWidget *widget = glade_xml_get_widget(xml, entry); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
128 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
129 if (xml == NULL || widget == NULL) |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
130 return; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
131 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
132 gtk_label_set_text(GTK_LABEL(widget), text); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
133 } |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
134 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
135 static void |
1296 | 136 filepopup_entry_set_image(const char *entry, const char *text) |
137 { | |
138 GladeXML *xml = g_object_get_data(G_OBJECT(filepopup_win), "glade-xml"); | |
139 GtkWidget *widget = glade_xml_get_widget(xml, entry); | |
1299 | 140 GdkPixbuf *pixbuf; |
1296 | 141 |
142 if (xml == NULL || widget == NULL) | |
143 return; | |
144 | |
1299 | 145 pixbuf = gdk_pixbuf_new_from_file(text, NULL); |
146 | |
147 if (pixbuf == NULL) | |
148 return; | |
149 | |
150 if (gdk_pixbuf_get_height(GDK_PIXBUF(pixbuf)) > 150) | |
151 { | |
152 GdkPixbuf *pixbuf2 = gdk_pixbuf_scale_simple(GDK_PIXBUF(pixbuf), 150, 150, GDK_INTERP_BILINEAR); | |
153 g_object_unref(G_OBJECT(pixbuf)); | |
154 pixbuf = pixbuf2; | |
155 } | |
156 | |
157 gtk_image_set_from_pixbuf(GTK_IMAGE(widget), GDK_PIXBUF(pixbuf)); | |
1326 | 158 g_object_unref(G_OBJECT(pixbuf)); |
1296 | 159 } |
160 | |
161 static void | |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
162 filepopup_entry_set_text_free(const char *entry, char *text) |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
163 { |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
164 GladeXML *xml = g_object_get_data(G_OBJECT(filepopup_win), "glade-xml"); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
165 GtkWidget *widget = glade_xml_get_widget(xml, entry); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
166 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
167 if (xml == NULL || widget == NULL) |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
168 return; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
169 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
170 gtk_label_set_text(GTK_LABEL(widget), text); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
171 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
172 g_free(text); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
173 } |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
174 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
175 static gboolean |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
176 filepopup_pointer_check_iter(gpointer unused) |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
177 { |
1312 | 178 gint x, y, pos; |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
179 TitleInput *tuple; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
180 static gint prev_x = 0, prev_y = 0, ctr = 0; |
1300
a5c4e748d557
[svn] - don't call filepopup_show_for_tuple() more than once
nenolod
parents:
1299
diff
changeset
|
181 gboolean skip = FALSE; |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
182 |
1401
3bc53d7f9012
[svn] - now filepopup_pointer_check_iter() returns immediately if cfg.show_filepopup_for_tuple is FALSE.
yaz
parents:
1389
diff
changeset
|
183 if (!cfg.show_filepopup_for_tuple || playlistwin_is_shaded() |
3bc53d7f9012
[svn] - now filepopup_pointer_check_iter() returns immediately if cfg.show_filepopup_for_tuple is FALSE.
yaz
parents:
1389
diff
changeset
|
184 || playlistwin_list->pl_tooltips == FALSE |
1341 | 185 || gdk_window_at_pointer(NULL, NULL) != GDK_WINDOW(playlistwin->window) |
1331
8e3f13cc95ff
[svn] - Don't show popups if the pointer isn't even in the playlist window.
nhjm449
parents:
1330
diff
changeset
|
186 || gdk_window_at_pointer(NULL, NULL) == NULL) |
1284 | 187 { |
188 ctr = 0; | |
1389
c19443be579d
[svn] ensure that the fileinfo popup in playlist disappears when the cursor is moved again
giacomo
parents:
1371
diff
changeset
|
189 if ( filepopup_win->window != NULL && |
c19443be579d
[svn] ensure that the fileinfo popup in playlist disappears when the cursor is moved again
giacomo
parents:
1371
diff
changeset
|
190 gdk_window_is_viewable(GDK_WINDOW(filepopup_win->window)) ) |
c19443be579d
[svn] ensure that the fileinfo popup in playlist disappears when the cursor is moved again
giacomo
parents:
1371
diff
changeset
|
191 filepopup_hide(NULL); |
1284 | 192 return TRUE; |
193 } | |
194 | |
1286 | 195 gdk_window_get_pointer(playlistwin->window, &x, &y, NULL); |
196 | |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
197 if (prev_x == x && prev_y == y) |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
198 ctr++; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
199 else |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
200 { |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
201 ctr = 0; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
202 prev_x = x; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
203 prev_y = y; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
204 filepopup_hide(NULL); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
205 return TRUE; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
206 } |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
207 |
1300
a5c4e748d557
[svn] - don't call filepopup_show_for_tuple() more than once
nenolod
parents:
1299
diff
changeset
|
208 if (filepopup_win->window == NULL) |
a5c4e748d557
[svn] - don't call filepopup_show_for_tuple() more than once
nenolod
parents:
1299
diff
changeset
|
209 skip = TRUE; |
a5c4e748d557
[svn] - don't call filepopup_show_for_tuple() more than once
nenolod
parents:
1299
diff
changeset
|
210 |
a5c4e748d557
[svn] - don't call filepopup_show_for_tuple() more than once
nenolod
parents:
1299
diff
changeset
|
211 if (ctr >= 20 && (skip == TRUE || gdk_window_is_viewable(GDK_WINDOW(filepopup_win->window)) != TRUE)) |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
212 { |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
213 pos = playlist_list_get_playlist_position(playlistwin_list, x, y); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
214 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
215 if (pos == -1) |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
216 { |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
217 filepopup_hide(NULL); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
218 return TRUE; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
219 } |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
220 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
221 tuple = playlist_get_tuple(pos); |
1401
3bc53d7f9012
[svn] - now filepopup_pointer_check_iter() returns immediately if cfg.show_filepopup_for_tuple is FALSE.
yaz
parents:
1389
diff
changeset
|
222 filepopup_show_for_tuple(tuple); |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
223 } |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
224 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
225 return TRUE; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
226 } |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
227 |
1267 | 228 void fileinfo_hide(gpointer unused) |
229 { | |
230 gtk_widget_hide(fileinfo_win); | |
231 | |
232 /* Clear it out. */ | |
233 fileinfo_entry_set_text("entry_title", ""); | |
234 fileinfo_entry_set_text("entry_artist", ""); | |
235 fileinfo_entry_set_text("entry_album", ""); | |
236 fileinfo_entry_set_text("entry_comment", ""); | |
237 fileinfo_entry_set_text("entry_genre", ""); | |
238 fileinfo_entry_set_text("entry_year", ""); | |
239 fileinfo_entry_set_text("entry_track", ""); | |
240 fileinfo_entry_set_text("entry_location", ""); | |
1307
63d30ae1db33
[svn] - reset the album art back to the default icon
nenolod
parents:
1306
diff
changeset
|
241 |
63d30ae1db33
[svn] - reset the album art back to the default icon
nenolod
parents:
1306
diff
changeset
|
242 fileinfo_entry_set_image("image_artwork", DATA_DIR "/images/audio.png"); |
1267 | 243 } |
244 | |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
245 void filepopup_hide(gpointer unused) |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
246 { |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
247 gtk_widget_hide(filepopup_win); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
248 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
249 filepopup_entry_set_text("label_title", ""); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
250 filepopup_entry_set_text("label_artist", ""); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
251 filepopup_entry_set_text("label_album", ""); |
1296 | 252 filepopup_entry_set_text("label_genre", ""); |
253 filepopup_entry_set_text("label_track", ""); | |
254 filepopup_entry_set_text("label_year", ""); | |
255 filepopup_entry_set_text("label_length", ""); | |
1297 | 256 |
1307
63d30ae1db33
[svn] - reset the album art back to the default icon
nenolod
parents:
1306
diff
changeset
|
257 filepopup_entry_set_image("image_artwork", DATA_DIR "/images/audio.png"); |
63d30ae1db33
[svn] - reset the album art back to the default icon
nenolod
parents:
1306
diff
changeset
|
258 |
1297 | 259 gtk_window_resize(GTK_WINDOW(filepopup_win), 1, 1); |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
260 } |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
261 |
1262 | 262 void |
263 create_fileinfo_window(void) | |
264 { | |
1263 | 265 const gchar *glade_file = DATA_DIR "/glade/fileinfo.glade"; |
1262 | 266 GladeXML *xml; |
267 GtkWidget *widget; | |
268 | |
269 xml = glade_xml_new_or_die(_("Track Information Window"), glade_file, NULL, NULL); | |
270 | |
271 glade_xml_signal_autoconnect(xml); | |
272 | |
273 fileinfo_win = glade_xml_get_widget(xml, "fileinfo_win"); | |
274 g_object_set_data(G_OBJECT(fileinfo_win), "glade-xml", xml); | |
275 gtk_window_set_transient_for(GTK_WINDOW(fileinfo_win), GTK_WINDOW(mainwin)); | |
276 | |
277 widget = glade_xml_get_widget(xml, "image_artwork"); | |
278 gtk_image_set_from_file(GTK_IMAGE(widget), DATA_DIR "/images/audio.png"); | |
1267 | 279 |
280 widget = glade_xml_get_widget(xml, "btn_close"); | |
281 g_signal_connect(G_OBJECT(widget), "clicked", (GCallback) fileinfo_hide, NULL); | |
1262 | 282 } |
283 | |
284 void | |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
285 create_filepopup_window(void) |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
286 { |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
287 const gchar *glade_file = DATA_DIR "/glade/fileinfo_popup.glade"; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
288 GladeXML *xml; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
289 GtkWidget *widget; |
1287
e778f43a74fb
[svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents:
1286
diff
changeset
|
290 |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
291 xml = glade_xml_new_or_die(_("Track Information Popup"), glade_file, NULL, NULL); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
292 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
293 glade_xml_signal_autoconnect(xml); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
294 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
295 filepopup_win = glade_xml_get_widget(xml, "win_pl_popup"); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
296 g_object_set_data(G_OBJECT(filepopup_win), "glade-xml", xml); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
297 gtk_window_set_transient_for(GTK_WINDOW(filepopup_win), GTK_WINDOW(mainwin)); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
298 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
299 widget = glade_xml_get_widget(xml, "image_artwork"); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
300 gtk_image_set_from_file(GTK_IMAGE(widget), DATA_DIR "/images/audio.png"); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
301 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
302 g_timeout_add(50, filepopup_pointer_check_iter, NULL); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
303 } |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
304 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
305 void |
1262 | 306 fileinfo_show_for_tuple(TitleInput *tuple) |
307 { | |
1402
1abfc389ecc6
[svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents:
1401
diff
changeset
|
308 gchar *tmp = NULL; |
1296 | 309 |
1262 | 310 if (tuple == NULL) |
311 return; | |
312 | |
313 gtk_widget_realize(fileinfo_win); | |
314 | |
315 fileinfo_entry_set_text("entry_title", tuple->track_name); | |
316 fileinfo_entry_set_text("entry_artist", tuple->performer); | |
317 fileinfo_entry_set_text("entry_album", tuple->album_name); | |
318 fileinfo_entry_set_text("entry_comment", tuple->comment); | |
319 fileinfo_entry_set_text("entry_genre", tuple->genre); | |
1402
1abfc389ecc6
[svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents:
1401
diff
changeset
|
320 |
1abfc389ecc6
[svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents:
1401
diff
changeset
|
321 tmp = g_strdup_printf("%s/%s", tuple->file_path, tuple->file_name); |
1abfc389ecc6
[svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents:
1401
diff
changeset
|
322 if(tmp){ |
1abfc389ecc6
[svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents:
1401
diff
changeset
|
323 fileinfo_entry_set_text_free("entry_location", str_to_utf8(tmp)); |
1abfc389ecc6
[svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents:
1401
diff
changeset
|
324 g_free(tmp); |
1abfc389ecc6
[svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents:
1401
diff
changeset
|
325 tmp = NULL; |
1abfc389ecc6
[svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents:
1401
diff
changeset
|
326 } |
1262 | 327 |
328 if (tuple->year != 0) | |
329 fileinfo_entry_set_text_free("entry_year", g_strdup_printf("%d", tuple->year)); | |
330 | |
331 if (tuple->track_number != 0) | |
332 fileinfo_entry_set_text_free("entry_track", g_strdup_printf("%d", tuple->track_number)); | |
333 | |
1371
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
334 tmp = fileinfo_recursive_get_image(tuple->file_path, 0); |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
335 |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
336 if(tmp) |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
337 { |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
338 fileinfo_entry_set_image("image_artwork", tmp); |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
339 g_free(tmp); |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
340 } |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
341 |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
342 gtk_widget_show(fileinfo_win); |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
343 } |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
344 |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
345 gchar* |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
346 fileinfo_recursive_get_image(const gchar* path, gint depth) |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
347 { |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
348 GDir *d; |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
349 |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
350 if(depth > 3) |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
351 return NULL; |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
352 |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
353 d = g_dir_open(path, 0, NULL); |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
354 |
1306
d44e5df149dc
[svn] - not sure what all of that cur_dir stuff was, but I think somebody was smoking crack
nenolod
parents:
1304
diff
changeset
|
355 if (d) |
1303 | 356 { |
1306
d44e5df149dc
[svn] - not sure what all of that cur_dir stuff was, but I think somebody was smoking crack
nenolod
parents:
1304
diff
changeset
|
357 const gchar *f = g_dir_read_name(d); |
1371
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
358 |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
359 while (f) |
1306
d44e5df149dc
[svn] - not sure what all of that cur_dir stuff was, but I think somebody was smoking crack
nenolod
parents:
1304
diff
changeset
|
360 { |
1371
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
361 gchar *newpath = g_strdup_printf("%s/%s", path, f); |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
362 |
1306
d44e5df149dc
[svn] - not sure what all of that cur_dir stuff was, but I think somebody was smoking crack
nenolod
parents:
1304
diff
changeset
|
363 /* ok. why did I not have strcasestr, thought glib had that one */ |
1314 | 364 if ((strstr(f,".jpg") || strstr(f,".jpeg") || strstr(f,".png") || strstr(f,".JPG") || strstr(f,".JPEG") || strstr(f,".PNG")) && !strstr(f,"back") && !strstr(f,"Back") && !strstr(f,"BACK")) |
1303 | 365 { |
1371
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
366 /* We found a suitable file in the current directory, use that. The string will be freed by the caller */ |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
367 return newpath; |
1303 | 368 } |
1306
d44e5df149dc
[svn] - not sure what all of that cur_dir stuff was, but I think somebody was smoking crack
nenolod
parents:
1304
diff
changeset
|
369 else |
d44e5df149dc
[svn] - not sure what all of that cur_dir stuff was, but I think somebody was smoking crack
nenolod
parents:
1304
diff
changeset
|
370 { |
1371
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
371 /* File/directory wasn't suitable, try and recurse into it. |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
372 * This should either return a filename for a image file, |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
373 * or NULL if there was no suitable file, or 'f' wasn't a dir. |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
374 */ |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
375 gchar *tmp = fileinfo_recursive_get_image(newpath, depth+1); |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
376 |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
377 if(tmp) |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
378 { |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
379 g_free(newpath); |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
380 return tmp; |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
381 } |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
382 else |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
383 { |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
384 /* Not got anything, move onto the next item in the directory */ |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
385 f = g_dir_read_name(d); |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
386 } |
1306
d44e5df149dc
[svn] - not sure what all of that cur_dir stuff was, but I think somebody was smoking crack
nenolod
parents:
1304
diff
changeset
|
387 } |
1303 | 388 } |
1371
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
389 |
1306
d44e5df149dc
[svn] - not sure what all of that cur_dir stuff was, but I think somebody was smoking crack
nenolod
parents:
1304
diff
changeset
|
390 g_dir_close(d); |
1296 | 391 } |
1371
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
392 |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
393 return NULL; |
1262 | 394 } |
1267 | 395 |
396 void | |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
397 filepopup_show_for_tuple(TitleInput *tuple) |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
398 { |
1296 | 399 gchar *tmp; |
1312 | 400 gint x, y, x_off = 3, y_off = 3, h, w; |
1296 | 401 |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
402 if (tuple == NULL) |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
403 return; |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
404 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
405 gtk_widget_realize(filepopup_win); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
406 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
407 filepopup_entry_set_text("label_title", tuple->track_name); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
408 filepopup_entry_set_text("label_artist", tuple->performer); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
409 filepopup_entry_set_text("label_album", tuple->album_name); |
1287
e778f43a74fb
[svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents:
1286
diff
changeset
|
410 filepopup_entry_set_text("label_genre", tuple->genre); |
1309
816ea8bbde1c
[svn] - if tuple->length == -1 then don't show a length
nenolod
parents:
1307
diff
changeset
|
411 |
816ea8bbde1c
[svn] - if tuple->length == -1 then don't show a length
nenolod
parents:
1307
diff
changeset
|
412 if (tuple->length != -1) |
816ea8bbde1c
[svn] - if tuple->length == -1 then don't show a length
nenolod
parents:
1307
diff
changeset
|
413 filepopup_entry_set_text_free("label_length", g_strdup_printf("%d:%02d", tuple->length / 60000, (tuple->length / 1000) % 60)); |
1287
e778f43a74fb
[svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents:
1286
diff
changeset
|
414 |
e778f43a74fb
[svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents:
1286
diff
changeset
|
415 if (tuple->year != 0) |
e778f43a74fb
[svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents:
1286
diff
changeset
|
416 filepopup_entry_set_text_free("label_year", g_strdup_printf("%d", tuple->year)); |
e778f43a74fb
[svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents:
1286
diff
changeset
|
417 |
e778f43a74fb
[svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents:
1286
diff
changeset
|
418 if (tuple->track_number != 0) |
e778f43a74fb
[svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents:
1286
diff
changeset
|
419 filepopup_entry_set_text_free("label_track", g_strdup_printf("%d", tuple->track_number)); |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
420 |
1371
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
421 tmp = fileinfo_recursive_get_image(tuple->file_path, 0); |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
422 |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
423 if(tmp) |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
424 { |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
425 filepopup_entry_set_image("image_artwork", tmp); |
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
426 g_free(tmp); |
1296 | 427 } |
1371
ca4f3115d33c
[svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents:
1358
diff
changeset
|
428 |
1312 | 429 gdk_window_get_pointer(NULL, &x, &y, NULL); |
430 gtk_window_get_size(GTK_WINDOW(filepopup_win), &w, &h); | |
431 if (gdk_screen_width()-(w+3) < x) x_off = (w*-1)-3; | |
432 if (gdk_screen_height()-(h+3) < y) y_off = (h*-1)-3; | |
433 gtk_window_move(GTK_WINDOW(filepopup_win), x + x_off, y + y_off); | |
434 | |
1283
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
435 gtk_widget_show(filepopup_win); |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
436 } |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
437 |
19b1d3f22e10
[svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents:
1270
diff
changeset
|
438 void |
1269 | 439 fileinfo_show_for_path(gchar *path) |
1267 | 440 { |
441 TitleInput *tuple = input_get_song_tuple(path); | |
442 | |
443 if (tuple == NULL) | |
1268 | 444 return input_file_info_box(path); |
1267 | 445 |
446 fileinfo_show_for_tuple(tuple); | |
447 | |
448 bmp_title_input_free(tuple); | |
449 } |