annotate audacious/ui_fileinfo.c @ 2178:64ff5aaf0b18 trunk

[svn] - key bindings for Save List and Save Default List had been changed accidentally.
author yaz
date Tue, 19 Dec 2006 08:26:05 -0800
parents f18a5b617c34
children d507d2c1f75c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
1 /*
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
2 * Audacious: A cross-platform multimedia player
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
3 * Copyright (c) 2006 William Pitcock, Tony Vroon, George Averill,
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
4 * Giacomo Lozito, Derek Pomery and Yoshiki Yazawa.
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
5 *
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
2105
f18a5b617c34 [svn] - move to GPLv2-only. Based on my interpretation of the license, we are
nenolod
parents: 2092
diff changeset
8 * the Free Software Foundation; under version 2 of the License.
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
9 *
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
13 * GNU General Public License for more details.
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
14 *
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
16 * along with this program; if not, write to the Free Software
1956
fb61da4f4c23 [svn] - remove unused declaration "filepopup_pixbuf".
nenolod
parents: 1889
diff changeset
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
fb61da4f4c23 [svn] - remove unused declaration "filepopup_pixbuf".
nenolod
parents: 1889
diff changeset
18 * 02110-1301, USA.
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
19 */
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
20
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
21 #ifdef HAVE_CONFIG_H
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
22 # include "config.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
23 #endif
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
24
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
25 #include <glib.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
26 #include <glib/gi18n.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
27 #include <gtk/gtk.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
28 #include <glade/glade.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
29 #include <string.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
30 #include <stddef.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
31 #include <stdio.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
32 #include <sys/types.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
33 #include <dirent.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
34 #include <unistd.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
35 #include <errno.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
36 #include <sys/types.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
37 #include <sys/stat.h>
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
38
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
39 #include "glade.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
40
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
41 #include "plugin.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
42 #include "pluginenum.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
43 #include "input.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
44 #include "effect.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
45 #include "general.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
46 #include "output.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
47 #include "visualization.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
48
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
49 #include "main.h"
2073
25308f10b50f [svn] - fix urldecode dependencies
nenolod
parents: 2055
diff changeset
50 #include "libaudacious/urldecode.h"
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
51 #include "util.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
52 #include "dnd.h"
1755
3434eb44b304 [svn] - version bump to 1.2.0-rc2
nenolod
parents: 1710
diff changeset
53 #include "titlestring.h"
3434eb44b304 [svn] - version bump to 1.2.0-rc2
nenolod
parents: 1710
diff changeset
54
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
55 #include "libaudacious/configdb.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
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
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
59 #include "mainwin.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
60 #include "ui_playlist.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
61 #include "skinwin.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
62 #include "build_stamp.h"
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
63 #include "ui_fileinfo.h"
1284
13d5b542f4fd [svn] - kludge
nenolod
parents: 1283
diff changeset
64 #include "ui_playlist.h"
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
65
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
66 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
67 GtkWidget *filepopup_win;
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
68
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
69 static void
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
70 fileinfo_entry_set_text(const char *entry, const char *text)
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
71 {
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
72 GladeXML *xml = g_object_get_data(G_OBJECT(fileinfo_win), "glade-xml");
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
73 GtkWidget *widget = glade_xml_get_widget(xml, entry);
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
74
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
75 if (xml == NULL || widget == NULL)
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
76 return;
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
77
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
78 gtk_entry_set_text(GTK_ENTRY(widget), text);
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
79 }
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
80
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
81 static void
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
82 fileinfo_entry_set_text_free(const char *entry, char *text)
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
83 {
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
84 GladeXML *xml = g_object_get_data(G_OBJECT(fileinfo_win), "glade-xml");
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
85 GtkWidget *widget = glade_xml_get_widget(xml, entry);
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
86
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
87 if (xml == NULL || widget == NULL)
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
88 return;
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
89
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
90 gtk_entry_set_text(GTK_ENTRY(widget), text);
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
91
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
92 g_free(text);
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
93 }
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
94
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
95 static void
1296
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
96 fileinfo_entry_set_image(const char *entry, const char *text)
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
97 {
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
98 GladeXML *xml = g_object_get_data(G_OBJECT(fileinfo_win), "glade-xml");
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
99 GtkWidget *widget = glade_xml_get_widget(xml, entry);
1299
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
100 GdkPixbuf *pixbuf;
1710
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
101 int width, height;
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
102 double aspect;
2055
8feb3d69b5be [svn] - cleanups from oliver@freebsd.org
nenolod
parents: 2006
diff changeset
103 GdkPixbuf *pixbuf2;
1296
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
104
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
105 if (xml == NULL || widget == NULL)
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
106 return;
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
107
1299
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
108 pixbuf = gdk_pixbuf_new_from_file(text, NULL);
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
109
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
110 if (pixbuf == NULL)
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
111 return;
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
112
1710
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
113 width = gdk_pixbuf_get_width(GDK_PIXBUF(pixbuf));
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
114 height = gdk_pixbuf_get_height(GDK_PIXBUF(pixbuf));
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
115
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
116 if(strcmp(DATA_DIR "/images/audio.png", text))
1299
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
117 {
1710
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
118 if(width == 0)
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
119 width = 1;
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
120 aspect = (double)height / (double)width;
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
121 if(aspect > 1.0) {
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
122 height = (int)(cfg.filepopup_pixelsize * aspect);
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
123 width = cfg.filepopup_pixelsize;
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
124 } else {
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
125 height = cfg.filepopup_pixelsize;
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
126 width = (int)(cfg.filepopup_pixelsize / aspect);
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
127 }
2055
8feb3d69b5be [svn] - cleanups from oliver@freebsd.org
nenolod
parents: 2006
diff changeset
128 pixbuf2 = gdk_pixbuf_scale_simple(GDK_PIXBUF(pixbuf), width, height, GDK_INTERP_BILINEAR);
1299
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
129 g_object_unref(G_OBJECT(pixbuf));
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
130 pixbuf = pixbuf2;
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
131 }
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
132
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
133 gtk_image_set_from_pixbuf(GTK_IMAGE(widget), GDK_PIXBUF(pixbuf));
1326
41b498d5ae4b [svn] - avoid a memory leak with images
nenolod
parents: 1314
diff changeset
134 g_object_unref(G_OBJECT(pixbuf));
1296
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
135 }
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
136
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
137 static void
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
138 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
139 {
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
140 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
141 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
142
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
143 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
144 return;
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
145
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
146 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
147 }
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
148
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
149 static void
1296
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
150 filepopup_entry_set_image(const char *entry, const char *text)
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
151 {
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
152 GladeXML *xml = g_object_get_data(G_OBJECT(filepopup_win), "glade-xml");
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
153 GtkWidget *widget = glade_xml_get_widget(xml, entry);
1299
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
154 GdkPixbuf *pixbuf;
1710
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
155 int width, height;
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
156 double aspect;
2055
8feb3d69b5be [svn] - cleanups from oliver@freebsd.org
nenolod
parents: 2006
diff changeset
157 GdkPixbuf *pixbuf2;
1296
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
158
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
159 if (xml == NULL || widget == NULL)
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
160 return;
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
161
1299
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
162 pixbuf = gdk_pixbuf_new_from_file(text, NULL);
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
163
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
164 if (pixbuf == NULL)
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
165 return;
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
166
1710
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
167 width = gdk_pixbuf_get_width(GDK_PIXBUF(pixbuf));
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
168 height = gdk_pixbuf_get_height(GDK_PIXBUF(pixbuf));
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
169
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
170 if(strcmp(DATA_DIR "/images/audio.png", text))
1299
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
171 {
1710
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
172 if(width == 0)
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
173 width = 1;
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
174 aspect = (double)height / (double)width;
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
175 if(aspect > 1.0) {
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
176 height = (int)(cfg.filepopup_pixelsize * aspect);
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
177 width = cfg.filepopup_pixelsize;
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
178 } else {
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
179 height = cfg.filepopup_pixelsize;
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
180 width = (int)(cfg.filepopup_pixelsize / aspect);
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
181 }
2055
8feb3d69b5be [svn] - cleanups from oliver@freebsd.org
nenolod
parents: 2006
diff changeset
182 pixbuf2 = gdk_pixbuf_scale_simple(GDK_PIXBUF(pixbuf), width, height, GDK_INTERP_BILINEAR);
1299
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
183 g_object_unref(G_OBJECT(pixbuf));
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
184 pixbuf = pixbuf2;
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
185 }
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
186
ead95abdf9bc [svn] - downsize images larger than 150px
nenolod
parents: 1298
diff changeset
187 gtk_image_set_from_pixbuf(GTK_IMAGE(widget), GDK_PIXBUF(pixbuf));
1326
41b498d5ae4b [svn] - avoid a memory leak with images
nenolod
parents: 1314
diff changeset
188 g_object_unref(G_OBJECT(pixbuf));
1296
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
189 }
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
190
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
191 static void
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
192 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
193 {
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
194 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
195 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
196
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
197 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
198 return;
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
199
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
200 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
201
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
202 g_free(text);
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
203 }
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
204
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
205 static gboolean
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
206 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
207 {
1312
f7244db08f40 [svn] - solve the blink issue
nenolod
parents: 1309
diff changeset
208 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
209 TitleInput *tuple;
1605
ce3ce44d6814 [svn] - filepopup follows change of pointed song, i.e. it will hide while scrolling.
yaz
parents: 1588
diff changeset
210 static gint prev_x = 0, prev_y = 0, ctr = 0, prev_pos = -1;
1775
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
211 static gint shaded_pos = -1, shaded_prev_pos = -1;
1300
a5c4e748d557 [svn] - don't call filepopup_show_for_tuple() more than once
nenolod
parents: 1299
diff changeset
212 gboolean skip = FALSE;
1605
ce3ce44d6814 [svn] - filepopup follows change of pointed song, i.e. it will hide while scrolling.
yaz
parents: 1588
diff changeset
213 GdkWindow *win;
2092
79b077f6234b [svn] - update to new API
nenolod
parents: 2073
diff changeset
214 Playlist *playlist = playlist_get_active();
1605
ce3ce44d6814 [svn] - filepopup follows change of pointed song, i.e. it will hide while scrolling.
yaz
parents: 1588
diff changeset
215
ce3ce44d6814 [svn] - filepopup follows change of pointed song, i.e. it will hide while scrolling.
yaz
parents: 1588
diff changeset
216 win = gdk_window_at_pointer(NULL, NULL);
ce3ce44d6814 [svn] - filepopup follows change of pointed song, i.e. it will hide while scrolling.
yaz
parents: 1588
diff changeset
217 gdk_window_get_pointer(GDK_WINDOW(playlistwin->window), &x, &y, NULL);
ce3ce44d6814 [svn] - filepopup follows change of pointed song, i.e. it will hide while scrolling.
yaz
parents: 1588
diff changeset
218 pos = playlist_list_get_playlist_position(playlistwin_list, x, y);
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
219
1605
ce3ce44d6814 [svn] - filepopup follows change of pointed song, i.e. it will hide while scrolling.
yaz
parents: 1588
diff changeset
220 if (win == NULL
ce3ce44d6814 [svn] - filepopup follows change of pointed song, i.e. it will hide while scrolling.
yaz
parents: 1588
diff changeset
221 || cfg.show_filepopup_for_tuple == FALSE
1401
3bc53d7f9012 [svn] - now filepopup_pointer_check_iter() returns immediately if cfg.show_filepopup_for_tuple is FALSE.
yaz
parents: 1389
diff changeset
222 || playlistwin_list->pl_tooltips == FALSE
1605
ce3ce44d6814 [svn] - filepopup follows change of pointed song, i.e. it will hide while scrolling.
yaz
parents: 1588
diff changeset
223 || pos != prev_pos
1775
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
224 || win != GDK_WINDOW(playlistwin->window))
1284
13d5b542f4fd [svn] - kludge
nenolod
parents: 1283
diff changeset
225 {
1605
ce3ce44d6814 [svn] - filepopup follows change of pointed song, i.e. it will hide while scrolling.
yaz
parents: 1588
diff changeset
226 prev_pos = pos;
1284
13d5b542f4fd [svn] - kludge
nenolod
parents: 1283
diff changeset
227 ctr = 0;
1389
c19443be579d [svn] ensure that the fileinfo popup in playlist disappears when the cursor is moved again
giacomo
parents: 1371
diff changeset
228 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
229 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
230 filepopup_hide(NULL);
1284
13d5b542f4fd [svn] - kludge
nenolod
parents: 1283
diff changeset
231 return TRUE;
13d5b542f4fd [svn] - kludge
nenolod
parents: 1283
diff changeset
232 }
13d5b542f4fd [svn] - kludge
nenolod
parents: 1283
diff changeset
233
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
234 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
235 ctr++;
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
236 else
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
237 {
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
238 ctr = 0;
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
239 prev_x = x;
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
240 prev_y = y;
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
241 filepopup_hide(NULL);
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
242 return TRUE;
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
243 }
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
244
1300
a5c4e748d557 [svn] - don't call filepopup_show_for_tuple() more than once
nenolod
parents: 1299
diff changeset
245 if (filepopup_win->window == NULL)
a5c4e748d557 [svn] - don't call filepopup_show_for_tuple() more than once
nenolod
parents: 1299
diff changeset
246 skip = TRUE;
a5c4e748d557 [svn] - don't call filepopup_show_for_tuple() more than once
nenolod
parents: 1299
diff changeset
247
1775
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
248 if (playlistwin_is_shaded()) {
2092
79b077f6234b [svn] - update to new API
nenolod
parents: 2073
diff changeset
249 shaded_pos = playlist_get_position(playlist);
1775
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
250 if (shaded_prev_pos != shaded_pos)
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
251 skip = TRUE;
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
252 }
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
253
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
254 if (ctr >= cfg.filepopup_delay && (skip == TRUE || gdk_window_is_viewable(GDK_WINDOW(filepopup_win->window)) != TRUE)) {
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
255 if (pos == -1 && !playlistwin_is_shaded()) {
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
256 filepopup_hide(NULL);
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
257 return TRUE;
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
258 }
1775
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
259 else { /* shaded mode */
2092
79b077f6234b [svn] - update to new API
nenolod
parents: 2073
diff changeset
260 tuple = playlist_get_tuple(playlist, shaded_pos);
1775
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
261 filepopup_hide(NULL);
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
262 filepopup_show_for_tuple(tuple);
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
263 shaded_prev_pos = shaded_pos;
7d32dff734da [svn] improvement of shaded playlist window
yaz
parents: 1755
diff changeset
264 }
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
265
1605
ce3ce44d6814 [svn] - filepopup follows change of pointed song, i.e. it will hide while scrolling.
yaz
parents: 1588
diff changeset
266 prev_pos = pos;
ce3ce44d6814 [svn] - filepopup follows change of pointed song, i.e. it will hide while scrolling.
yaz
parents: 1588
diff changeset
267
2092
79b077f6234b [svn] - update to new API
nenolod
parents: 2073
diff changeset
268 tuple = playlist_get_tuple(playlist, pos);
1401
3bc53d7f9012 [svn] - now filepopup_pointer_check_iter() returns immediately if cfg.show_filepopup_for_tuple is FALSE.
yaz
parents: 1389
diff changeset
269 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
270 }
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
271
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
272 return TRUE;
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
273 }
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
274
1267
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
275 void fileinfo_hide(gpointer unused)
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
276 {
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
277 gtk_widget_hide(fileinfo_win);
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
278
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
279 /* Clear it out. */
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
280 fileinfo_entry_set_text("entry_title", "");
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
281 fileinfo_entry_set_text("entry_artist", "");
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
282 fileinfo_entry_set_text("entry_album", "");
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
283 fileinfo_entry_set_text("entry_comment", "");
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
284 fileinfo_entry_set_text("entry_genre", "");
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
285 fileinfo_entry_set_text("entry_year", "");
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
286 fileinfo_entry_set_text("entry_track", "");
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
287 fileinfo_entry_set_text("entry_location", "");
1307
63d30ae1db33 [svn] - reset the album art back to the default icon
nenolod
parents: 1306
diff changeset
288
63d30ae1db33 [svn] - reset the album art back to the default icon
nenolod
parents: 1306
diff changeset
289 fileinfo_entry_set_image("image_artwork", DATA_DIR "/images/audio.png");
1267
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
290 }
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
291
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
292 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
293 {
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
294 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
295
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
296 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
297 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
298 filepopup_entry_set_text("label_album", "");
1296
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
299 filepopup_entry_set_text("label_genre", "");
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
300 filepopup_entry_set_text("label_track", "");
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
301 filepopup_entry_set_text("label_year", "");
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
302 filepopup_entry_set_text("label_length", "");
1297
f2e1a954237f [svn] - la la la, resize
nenolod
parents: 1296
diff changeset
303
1307
63d30ae1db33 [svn] - reset the album art back to the default icon
nenolod
parents: 1306
diff changeset
304
1297
f2e1a954237f [svn] - la la la, resize
nenolod
parents: 1296
diff changeset
305 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
306 }
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
307
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
308 void
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
309 create_fileinfo_window(void)
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
310 {
1263
ccf616f86fb4 [svn] some minor tweaks
nenolod
parents: 1262
diff changeset
311 const gchar *glade_file = DATA_DIR "/glade/fileinfo.glade";
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
312 GladeXML *xml;
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
313 GtkWidget *widget;
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
314
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
315 xml = glade_xml_new_or_die(_("Track Information Window"), glade_file, NULL, NULL);
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
316
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
317 glade_xml_signal_autoconnect(xml);
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
318
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
319 fileinfo_win = glade_xml_get_widget(xml, "fileinfo_win");
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
320 g_object_set_data(G_OBJECT(fileinfo_win), "glade-xml", xml);
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
321 gtk_window_set_transient_for(GTK_WINDOW(fileinfo_win), GTK_WINDOW(mainwin));
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
322
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
323 widget = glade_xml_get_widget(xml, "image_artwork");
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
324 gtk_image_set_from_file(GTK_IMAGE(widget), DATA_DIR "/images/audio.png");
1267
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
325
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
326 widget = glade_xml_get_widget(xml, "btn_close");
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
327 g_signal_connect(G_OBJECT(widget), "clicked", (GCallback) fileinfo_hide, NULL);
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
328 }
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
329
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
330 void
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
331 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
332 {
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
333 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
334 GladeXML *xml;
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
335 GtkWidget *widget;
1287
e778f43a74fb [svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents: 1286
diff changeset
336
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
337 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
338
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
339 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
340
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
341 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
342 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
343 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
344
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
345 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
346 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
347
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
348 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
349 }
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
350
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
351 void
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
352 fileinfo_show_for_tuple(TitleInput *tuple)
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
353 {
1402
1abfc389ecc6 [svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents: 1401
diff changeset
354 gchar *tmp = NULL;
1296
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
355
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
356 if (tuple == NULL)
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
357 return;
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
358
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
359 gtk_widget_realize(fileinfo_win);
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
360
1864
0f39dea9f26e [svn] - some fixes via alxorlov on the forums
nenolod
parents: 1775
diff changeset
361 if (tuple->track_name)
0f39dea9f26e [svn] - some fixes via alxorlov on the forums
nenolod
parents: 1775
diff changeset
362 fileinfo_entry_set_text("entry_title", tuple->track_name);
0f39dea9f26e [svn] - some fixes via alxorlov on the forums
nenolod
parents: 1775
diff changeset
363 if (tuple->performer)
0f39dea9f26e [svn] - some fixes via alxorlov on the forums
nenolod
parents: 1775
diff changeset
364 fileinfo_entry_set_text("entry_artist", tuple->performer);
0f39dea9f26e [svn] - some fixes via alxorlov on the forums
nenolod
parents: 1775
diff changeset
365 if (tuple->album_name)
0f39dea9f26e [svn] - some fixes via alxorlov on the forums
nenolod
parents: 1775
diff changeset
366 fileinfo_entry_set_text("entry_album", tuple->album_name);
0f39dea9f26e [svn] - some fixes via alxorlov on the forums
nenolod
parents: 1775
diff changeset
367 if (tuple->comment)
0f39dea9f26e [svn] - some fixes via alxorlov on the forums
nenolod
parents: 1775
diff changeset
368 fileinfo_entry_set_text("entry_comment", tuple->comment);
0f39dea9f26e [svn] - some fixes via alxorlov on the forums
nenolod
parents: 1775
diff changeset
369 if (tuple->genre)
0f39dea9f26e [svn] - some fixes via alxorlov on the forums
nenolod
parents: 1775
diff changeset
370 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
371
1abfc389ecc6 [svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents: 1401
diff changeset
372 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
373 if(tmp){
1abfc389ecc6 [svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents: 1401
diff changeset
374 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
375 g_free(tmp);
1abfc389ecc6 [svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents: 1401
diff changeset
376 tmp = NULL;
1abfc389ecc6 [svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string"
yaz
parents: 1401
diff changeset
377 }
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
378
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
379 if (tuple->year != 0)
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
380 fileinfo_entry_set_text_free("entry_year", g_strdup_printf("%d", tuple->year));
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
381
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
382 if (tuple->track_number != 0)
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
383 fileinfo_entry_set_text_free("entry_track", g_strdup_printf("%d", tuple->track_number));
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
384
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
385 tmp = fileinfo_recursive_get_image(tuple->file_path, tuple->file_name, 0);
1371
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
386
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
387 if(tmp)
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
388 {
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
389 fileinfo_entry_set_image("image_artwork", tmp);
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
390 g_free(tmp);
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
391 }
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 gtk_widget_show(fileinfo_win);
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
394 }
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
395
1413
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
396 static gboolean
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
397 has_front_cover_extension(const gchar *name)
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
398 {
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
399 char *ext;
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
400
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
401 ext = strrchr(name, '.');
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
402 if (!ext) {
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
403 /* No file extension */
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
404 return FALSE;
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
405 }
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
406
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
407 return g_strcasecmp(ext, ".jpg") == 0 ||
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
408 g_strcasecmp(ext, ".jpeg") == 0 ||
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
409 g_strcasecmp(ext, ".png") == 0;
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
410 }
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
411
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
412 static gboolean
1413
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
413 cover_name_filter(const gchar *name, const gchar *filter, const gboolean ret_on_empty)
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
414 {
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
415 gboolean result = FALSE;
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
416 gchar **splitted;
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
417 gchar *current;
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
418 gchar *lname;
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
419 gint i;
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
420
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
421 if (!filter || strlen(filter) == 0) {
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
422 return ret_on_empty;
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
423 }
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
424
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
425 splitted = g_strsplit(filter, ",", 0);
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
426
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
427 lname = g_strdup(name);
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
428 g_strdown(lname);
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
429
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
430 for (i = 0; !result && (current = splitted[i]); i++) {
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
431 gchar *stripped = g_strstrip(g_strdup(current));
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
432 g_strdown(stripped);
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
433
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
434 result = result || strstr(lname, stripped);
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
435
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
436 g_free(stripped);
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
437 }
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
438
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
439 g_free(lname);
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
440 g_strfreev(splitted);
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
441
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
442 return result;
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
443 }
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
444
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
445 /* Check wether it's an image we want */
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
446 static gboolean
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
447 is_front_cover_image(const gchar *imgfile)
1413
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
448 {
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
449 return cover_name_filter(imgfile, cfg.cover_name_include, TRUE) &&
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
450 !cover_name_filter(imgfile, cfg.cover_name_exclude, FALSE);
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
451 }
1413
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
452
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
453 static gboolean
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
454 is_file_image(const gchar *imgfile, const gchar *file_name)
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
455 {
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
456 char *imgfile_ext, *file_name_ext;
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
457 size_t imgfile_len, file_name_len;
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
458 gboolean matches;
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
459
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
460 imgfile_ext = strrchr(imgfile, '.');
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
461 if (!imgfile_ext) {
1413
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
462 /* No file extension */
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
463 return FALSE;
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
464 }
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
465
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
466 file_name_ext = strrchr(file_name, '.');
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
467 if (!file_name_ext) {
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
468 /* No file extension */
1413
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
469 return FALSE;
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
470 }
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
471
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
472 imgfile_len = (imgfile_ext - imgfile);
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
473 file_name_len = (file_name_ext - file_name);
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
474
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
475 if (imgfile_len == file_name_len) {
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
476 return (g_ascii_strncasecmp(imgfile, file_name, imgfile_len) == 0);
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
477 } else {
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
478 return FALSE;
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
479 }
1413
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
480 }
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
481
1371
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
482 gchar*
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
483 fileinfo_recursive_get_image(const gchar* path,
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
484 const gchar* file_name, gint depth)
1371
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
485 {
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
486 GDir *d;
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
487
1429
a360afd8df52 [svn] Make annoying recursion that consistently returns wrong art, optional.
nemo
parents: 1413
diff changeset
488 if (cfg.recurse_for_cover && depth > cfg.recurse_for_cover_depth)
1371
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
489 return NULL;
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
490
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
491 d = g_dir_open(path, 0, NULL);
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
492
1666
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
493 if (d) {
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
494 const gchar *f;
1413
878c7f8d0a8c [svn] - filepopup albumart stuff, via hansmi
nenolod
parents: 1402
diff changeset
495
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
496 if (cfg.use_file_cover && file_name) {
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
497 /* Look for images matching file name */
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
498 while(f = g_dir_read_name(d)) {
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
499 gchar *newpath = g_strconcat(path, "/", f, NULL);
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
500
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
501 if (!g_file_test(newpath, G_FILE_TEST_IS_DIR) &&
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
502 has_front_cover_extension(f) &&
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
503 is_file_image(f, file_name)) {
1666
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
504 g_dir_close(d);
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
505 return newpath;
1371
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
506 }
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
507
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
508 g_free(newpath);
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
509 }
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
510 g_dir_rewind(d);
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
511 }
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
512
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
513 /* Search for files using filter */
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
514 while (f = g_dir_read_name(d)) {
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
515 gchar *newpath = g_strconcat(path, "/", f, NULL);
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
516
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
517 if (!g_file_test(newpath, G_FILE_TEST_IS_DIR) &&
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
518 has_front_cover_extension(f) &&
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
519 is_front_cover_image(f)) {
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
520 g_dir_close(d);
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
521 return newpath;
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
522 }
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
523
1666
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
524 g_free(newpath);
1303
a9aba74678fc [svn] - nemo's patch applied to fileinfo
nenolod
parents: 1302
diff changeset
525 }
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
526 g_dir_rewind(d);
1666
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
527
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
528 /* checks whether recursive or not. */
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
529 if (!cfg.recurse_for_cover) {
1666
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
530 g_dir_close(d);
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
531 return NULL;
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
532 }
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
533
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
534 /* Descend into directories recursively. */
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
535 while (f = g_dir_read_name(d)) {
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
536 gchar *newpath = g_strconcat(path, "/", f, NULL);
1666
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
537
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
538 if(g_file_test(newpath, G_FILE_TEST_IS_DIR)) {
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
539 gchar *tmp = fileinfo_recursive_get_image(newpath,
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
540 NULL, depth + 1);
1666
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
541 if(tmp) {
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
542 g_free(newpath);
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
543 g_dir_close(d);
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
544 return tmp;
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
545 }
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
546 }
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
547
1666
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
548 g_free(newpath);
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
549 }
77baac5f7439 [svn] - make fileinfo_recursive_get_image() breadth first search.
yaz
parents: 1611
diff changeset
550
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
551 g_dir_close(d);
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
552 }
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
553
1371
ca4f3115d33c [svn] - recursively locate album art, by external contributor Oliver Lumpton.
nenolod
parents: 1358
diff changeset
554 return NULL;
1262
186f774fa30b [svn] - ui_fileinfo goodness (not hooked up yet)
nenolod
parents:
diff changeset
555 }
1267
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
556
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
557 void
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
558 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
559 {
2006
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
560 gchar *tmp = NULL;
1312
f7244db08f40 [svn] - solve the blink issue
nenolod
parents: 1309
diff changeset
561 gint x, y, x_off = 3, y_off = 3, h, w;
1296
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
562
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
563 static gchar *last_artwork = NULL;
2006
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
564 const static char default_artwork[] = DATA_DIR "/images/audio.png";
1710
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
565
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
566 if (tuple == NULL)
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
567 return;
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
568
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
569 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
570
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
571 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
572 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
573 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
574 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
575
816ea8bbde1c [svn] - if tuple->length == -1 then don't show a length
nenolod
parents: 1307
diff changeset
576 if (tuple->length != -1)
816ea8bbde1c [svn] - if tuple->length == -1 then don't show a length
nenolod
parents: 1307
diff changeset
577 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
578
e778f43a74fb [svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents: 1286
diff changeset
579 if (tuple->year != 0)
e778f43a74fb [svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents: 1286
diff changeset
580 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
581
e778f43a74fb [svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents: 1286
diff changeset
582 if (tuple->track_number != 0)
e778f43a74fb [svn] - make tuples more verbose (they might be a bit big though)
nenolod
parents: 1286
diff changeset
583 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
584
2006
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
585 tmp = fileinfo_recursive_get_image(tuple->file_path, tuple->file_name, 0);
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
586 if (tmp) { // picture found
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
587 if (!last_artwork || strcmp(last_artwork, tmp)) { // new picture
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
588 filepopup_entry_set_image("image_artwork", tmp);
1964
f027afc2ca2e [svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents: 1960
diff changeset
589 g_free(last_artwork);
2006
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
590 last_artwork = tmp;
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
591 }
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
592 else { // same picture
1710
43ae2a1bfdee [svn] improvement of filepopup:
yaz
parents: 1666
diff changeset
593 }
1296
b7d8e6e77ba6 [svn] - initial album art support
nenolod
parents: 1292
diff changeset
594 }
2006
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
595 else { // no picture found
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
596 if (!last_artwork || strcmp(last_artwork, default_artwork)) {
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
597 filepopup_entry_set_image("image_artwork", default_artwork);
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
598 g_free(last_artwork);
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
599 last_artwork = g_strdup(default_artwork);
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
600 }
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
601 else {
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
602 }
beaeb1990cb4 [svn] - now filepopup can find newly added images immediately.
yaz
parents: 1964
diff changeset
603 }
1889
597bd579d9af [svn] Patch by Michael Hanselmann to fetch a per-song image file.
nemo
parents: 1864
diff changeset
604
1312
f7244db08f40 [svn] - solve the blink issue
nenolod
parents: 1309
diff changeset
605 gdk_window_get_pointer(NULL, &x, &y, NULL);
f7244db08f40 [svn] - solve the blink issue
nenolod
parents: 1309
diff changeset
606 gtk_window_get_size(GTK_WINDOW(filepopup_win), &w, &h);
f7244db08f40 [svn] - solve the blink issue
nenolod
parents: 1309
diff changeset
607 if (gdk_screen_width()-(w+3) < x) x_off = (w*-1)-3;
f7244db08f40 [svn] - solve the blink issue
nenolod
parents: 1309
diff changeset
608 if (gdk_screen_height()-(h+3) < y) y_off = (h*-1)-3;
f7244db08f40 [svn] - solve the blink issue
nenolod
parents: 1309
diff changeset
609 gtk_window_move(GTK_WINDOW(filepopup_win), x + x_off, y + y_off);
f7244db08f40 [svn] - solve the blink issue
nenolod
parents: 1309
diff changeset
610
1283
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
611 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
612 }
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
613
19b1d3f22e10 [svn] - when hovering over a playlist tuple, describe the tuple via a tooltip-like popup
nenolod
parents: 1270
diff changeset
614 void
1269
681b629322c4 [svn] - hook up fileinfo box stuff
nenolod
parents: 1268
diff changeset
615 fileinfo_show_for_path(gchar *path)
1267
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
616 {
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
617 TitleInput *tuple = input_get_song_tuple(path);
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
618
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
619 if (tuple == NULL)
1268
97fd96ee4b84 [svn] - generic info box support
nenolod
parents: 1267
diff changeset
620 return input_file_info_box(path);
1267
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
621
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
622 fileinfo_show_for_tuple(tuple);
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
623
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
624 bmp_title_input_free(tuple);
1588
15d92c51bde6 [svn] - modified time (mtime) has been introduced into tuple
yaz
parents: 1541
diff changeset
625 tuple = NULL;
1267
d5361c48bb18 [svn] - more fun
nenolod
parents: 1263
diff changeset
626 }