Mercurial > audlegacy-plugins
annotate src/madplug/fileinfo.c @ 1328:38fb3bb3e21e
- make probing for tuple completely reuse fd.
- fix bugs in __audmad_get_song_tuple() against remote sources.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Sun, 22 Jul 2007 04:28:20 +0900 |
parents | a0320227c751 |
children | 4b07404814ca |
rev | line source |
---|---|
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
1 /* |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
2 * mad plugin for audacious |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
3 * Copyright (C) 2005-2007 William Pitcock, Yoshiki Yazawa |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
4 * |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
5 * Portions derived from xmms-mad: |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
6 * Copyright (C) 2001-2002 Sam Clegg - See COPYING |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
7 * |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
8 * This program is free software; you can redistribute it and/or modify |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
10 * the Free Software Foundation; under version 2 of the License. |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
11 * |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
15 * GNU General Public License for more details. |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
16 * |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
17 * You should have received a copy of the GNU General Public License |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
18 * along with this program; if not, write to the Free Software |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
20 */ |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
21 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
22 #include "config.h" |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
23 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
24 #include "plugin.h" |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
25 #include "input.h" |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
26 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
27 #include "mp3.xpm" |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
28 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
29 #include <math.h> |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
30 #include <audacious/util.h> |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
31 #include <gtk/gtk.h> |
1319
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
32 #include <gdk/gdkkeysyms.h> |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
33 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
34 /* yaz */ |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
35 #include <langinfo.h> |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
36 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
37 #ifndef NOGUI |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
38 static GtkWidget *window = 0; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
39 static GtkWidget *filename_entry, *id3_frame; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
40 static GtkWidget *title_entry, *artist_entry, *album_entry; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
41 static GtkWidget *year_entry, *tracknum_entry, *comment_entry; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
42 static GtkWidget *genre_combo; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
43 static GtkWidget *mpeg_level, *mpeg_bitrate, *mpeg_samplerate, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
44 *mpeg_frames, *mpeg_duration, *mpeg_flags; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
45 static GtkWidget *mpeg_fileinfo, *mpeg_replaygain, *mpeg_replaygain2, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
46 *mpeg_replaygain3, *mpeg_replaygain4, *mp3gain1, *mp3gain2; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
47 #endif /* !NOGUI */ |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
48 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
49 static GList *genre_list = 0; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
50 static struct mad_info_t info; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
51 struct id3_frame *id3_frame_new(const char *str); |
645 | 52 id3_ucs4_t *mad_parse_genre(const id3_ucs4_t *string); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
53 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
54 #ifndef NOGUI |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
55 static void |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
56 update_id3_frame(struct id3_tag *tag, const char *frame_name, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
57 const char *data) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
58 { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
59 int res; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
60 struct id3_frame *frame; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
61 union id3_field *field; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
62 id3_ucs4_t *ucs4; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
63 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
64 if (data == NULL) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
65 return; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
66 |
611 | 67 /* printf ("updating id3: %s: %s\n", frame_name, data); */ |
68 | |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
69 /* |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
70 * An empty string removes the frame altogether. |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
71 */ |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
72 if (strlen(data) == 0) { |
629 | 73 while ((frame = id3_tag_findframe(tag, frame_name, 0))) { |
74 #ifdef DEBUG | |
75 printf("detachframe\n"); | |
76 #endif | |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
77 id3_tag_detachframe(tag, frame); |
629 | 78 } |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
79 return; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
80 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
81 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
82 frame = id3_tag_findframe(tag, frame_name, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
83 if (!frame) { |
629 | 84 #ifdef DEBUG |
85 printf("frame_new\n"); | |
86 #endif | |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
87 frame = id3_frame_new(frame_name); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
88 id3_tag_attachframe(tag, frame); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
89 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
90 |
611 | 91 // setup ucs4 string |
92 if(audmad_config.sjis) { | |
93 ucs4 = id3_latin1_ucs4duplicate((id3_latin1_t *) data); | |
94 } | |
95 else { | |
96 ucs4 = id3_utf8_ucs4duplicate((id3_utf8_t *) data); | |
97 } | |
98 | |
99 // set encoding | |
100 field = id3_frame_field(frame, 0); | |
101 id3_field_settextencoding(field, audmad_config.sjis ? ID3_FIELD_TEXTENCODING_ISO_8859_1 : | |
102 ID3_FIELD_TEXTENCODING_UTF_8); | |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
103 |
611 | 104 // setup genre code |
105 if (!strcmp(frame_name, ID3_FRAME_GENRE)) { | |
106 char *tmp; | |
107 int index = id3_genre_number(ucs4); | |
108 g_free(ucs4); | |
730
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
109 |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
110 if(index == -1) { // unknown genre. remove TCON frame. |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
111 #ifdef DEBUG |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
112 printf("remove genre frame\n"); |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
113 #endif |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
114 id3_tag_detachframe(tag, frame); |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
115 } |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
116 else { // meaningful genre |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
117 tmp = g_strdup_printf("%d", index); |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
118 ucs4 = id3_latin1_ucs4duplicate((unsigned char *) tmp); |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
119 } |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
120 |
611 | 121 } |
122 | |
123 // write string | |
124 if (!strcmp(frame_name, ID3_FRAME_COMMENT)) { | |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
125 field = id3_frame_field(frame, 3); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
126 field->type = ID3_FIELD_TYPE_STRINGFULL; |
611 | 127 res = id3_field_setfullstring(field, ucs4); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
128 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
129 else { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
130 field = id3_frame_field(frame, 1); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
131 field->type = ID3_FIELD_TYPE_STRINGLIST; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
132 res = id3_field_setstrings(field, 1, &ucs4); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
133 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
134 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
135 if (res != 0) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
136 g_print("error setting id3 field: %s\n", frame_name); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
137 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
138 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
139 static void close_window(GtkWidget * w, gpointer data) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
140 { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
141 input_term(&info); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
142 gtk_widget_destroy(window); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
143 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
144 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
145 static void save_cb(GtkWidget * w, gpointer data) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
146 { |
629 | 147 gchar *text, *text2; |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
148 struct id3_file *id3file; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
149 struct id3_tag *id3tag; |
611 | 150 char *encoding; |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
151 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
152 if (info.remote) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
153 return; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
154 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
155 /* read tag from file */ |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
156 id3file = id3_file_open(info.filename, ID3_FILE_MODE_READWRITE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
157 if (!id3file) { |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
158 xmms_show_message(_("File Info"), _("Couldn't open file!"), _("Ok"), |
629 | 159 FALSE, NULL, NULL); |
160 return; | |
161 } | |
162 | |
163 id3tag = id3_file_tag(id3file); | |
164 if (!id3tag) { | |
165 #ifdef DEBUG | |
166 printf("no id3tag\n. append new tag.\n"); | |
167 #endif | |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
168 id3tag = id3_tag_new(); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
169 id3_tag_clearframes(id3tag); |
629 | 170 id3tag->options |= ID3_TAG_OPTION_APPENDEDTAG | ID3_TAG_OPTION_ID3V1; |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
171 } |
629 | 172 |
611 | 173 id3_tag_options(id3tag, ID3_TAG_OPTION_ID3V1, ~0); /* enables id3v1 */ |
629 | 174 // id3_tag_options(id3tag, ID3_TAG_OPTION_ID3V1, 0); /* diable id3v1 */ |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
175 |
611 | 176 encoding = audmad_config.sjis ? "SJIS" : "UTF-8"; |
177 | |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
178 text = gtk_editable_get_chars(GTK_EDITABLE(title_entry), 0, -1); |
629 | 179 text2 = g_convert(text, strlen(text), encoding, "UTF-8", NULL, NULL, NULL); |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
180 |
629 | 181 update_id3_frame(id3tag, ID3_FRAME_TITLE, text2); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
182 free(text); |
629 | 183 free(text2); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
184 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
185 text = gtk_editable_get_chars(GTK_EDITABLE(artist_entry), 0, -1); |
629 | 186 text2 = g_convert(text, strlen(text), encoding, "UTF-8", NULL, NULL, NULL); |
187 update_id3_frame(id3tag, ID3_FRAME_ARTIST, text2); | |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
188 free(text); |
629 | 189 free(text2); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
190 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
191 text = gtk_editable_get_chars(GTK_EDITABLE(album_entry), 0, -1); |
629 | 192 text2 = |
611 | 193 g_convert(text, strlen(text), encoding, "UTF-8", NULL, NULL, NULL); |
629 | 194 update_id3_frame(id3tag, ID3_FRAME_ALBUM, text2); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
195 free(text); |
629 | 196 free(text2); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
197 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
198 text = gtk_editable_get_chars(GTK_EDITABLE(year_entry), 0, -1); |
629 | 199 text2 = |
611 | 200 g_convert(text, strlen(text), encoding, "UTF-8", NULL, NULL, NULL); |
629 | 201 update_id3_frame(id3tag, ID3_FRAME_YEAR, text2); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
202 free(text); |
629 | 203 free(text2); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
204 |
738 | 205 // update TLEN frame |
206 text = g_strdup_printf("%ld", mad_timer_count(info.duration, MAD_UNITS_MILLISECONDS)); | |
207 update_id3_frame(id3tag, "TLEN", text); | |
208 free(text); | |
209 | |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
210 text = gtk_editable_get_chars(GTK_EDITABLE(comment_entry), 0, -1); |
629 | 211 text2 = |
611 | 212 g_convert(text, strlen(text), encoding, "UTF-8", NULL, NULL, NULL); |
629 | 213 update_id3_frame(id3tag, ID3_FRAME_COMMENT, text2); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
214 free(text); |
629 | 215 free(text2); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
216 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
217 text = gtk_editable_get_chars(GTK_EDITABLE(tracknum_entry), 0, -1); |
629 | 218 text2 = |
611 | 219 g_convert(text, strlen(text), encoding, "UTF-8", NULL, NULL, NULL); |
629 | 220 update_id3_frame(id3tag, ID3_FRAME_TRACK, text2); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
221 free(text); |
629 | 222 free(text2); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
223 |
611 | 224 text = gtk_editable_get_chars(GTK_EDITABLE(GTK_COMBO(genre_combo)->entry), |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
225 0, -1); |
730
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
226 #ifdef DEBUG |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
227 g_print("genre entry = %s\n", text); |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
228 #endif |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
229 update_id3_frame(id3tag, ID3_FRAME_GENRE, text); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
230 free(text); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
231 |
730
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
232 #ifdef DEBUG |
629 | 233 printf("about to write id3tag\n"); |
730
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
234 #endif |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
235 if (id3_file_update(id3file) != 0) { |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
236 xmms_show_message(_("File Info"), _("Couldn't write tag!"), _("Ok"), FALSE, |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
237 NULL, NULL); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
238 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
239 id3_file_close(id3file); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
240 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
241 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
242 static void remove_id3_cb(GtkWidget * w, gpointer data) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
243 { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
244 struct id3_file *id3file; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
245 struct id3_tag *id3tag; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
246 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
247 id3file = id3_file_open(info.filename, ID3_FILE_MODE_READWRITE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
248 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
249 if (id3file == NULL) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
250 return; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
251 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
252 id3tag = id3_file_tag(id3file); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
253 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
254 if (id3tag == NULL) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
255 { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
256 id3_file_close(id3file); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
257 return; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
258 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
259 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
260 id3_tag_clearframes(id3tag); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
261 id3_file_update(id3file); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
262 id3_file_close(id3file); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
263 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
264 gtk_entry_set_text(GTK_ENTRY(title_entry), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
265 gtk_entry_set_text(GTK_ENTRY(artist_entry), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
266 gtk_entry_set_text(GTK_ENTRY(album_entry), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
267 gtk_entry_set_text(GTK_ENTRY(comment_entry), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
268 gtk_entry_set_text(GTK_ENTRY(year_entry), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
269 gtk_entry_set_text(GTK_ENTRY(tracknum_entry), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
270 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(genre_combo)->entry), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
271 gtk_widget_set_sensitive(GTK_WIDGET(w), FALSE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
272 gtk_widget_set_sensitive(GTK_WIDGET(data), FALSE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
273 } |
611 | 274 |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
275 static void |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
276 change_buttons(GtkWidget * object) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
277 { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
278 gtk_widget_set_sensitive(GTK_WIDGET(object), TRUE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
279 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
280 |
1319
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
281 #ifndef NOGUI |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
282 static gboolean |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
283 on_fileinfo_window_key_press (GtkWidget *widget, GdkEventKey *event, gpointer data) |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
284 { |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
285 g_return_val_if_fail(GTK_IS_WIDGET (widget), FALSE); |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
286 |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
287 if (event->keyval == GDK_Escape) |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
288 { |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
289 gtk_widget_hide(widget); |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
290 } |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
291 |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
292 return FALSE; |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
293 } |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
294 #endif |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
295 |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
296 void create_window() |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
297 { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
298 GtkWidget *vbox, *hbox, *left_vbox, *table; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
299 GtkWidget *mpeg_frame, *mpeg_box; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
300 GtkWidget *label, *filename_hbox; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
301 GtkWidget *bbox, *save, *remove_id3, *cancel; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
302 GtkWidget *pixmapwid; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
303 GdkPixbuf *pixbuf; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
304 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
305 window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
306 gtk_window_set_type_hint(GTK_WINDOW(window), |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
307 GDK_WINDOW_TYPE_HINT_DIALOG); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
308 gtk_window_set_resizable(GTK_WINDOW(window), FALSE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
309 gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
310 g_signal_connect(G_OBJECT(window), "destroy", |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
311 G_CALLBACK(close_window), &window); |
1319
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
312 g_signal_connect(G_OBJECT(window), "key-press-event", |
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
313 G_CALLBACK(on_fileinfo_window_key_press), &window); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
314 gtk_container_set_border_width(GTK_CONTAINER(window), 10); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
315 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
316 vbox = gtk_vbox_new(FALSE, 10); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
317 gtk_container_add(GTK_CONTAINER(window), vbox); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
318 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
319 filename_hbox = gtk_hbox_new(FALSE, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
320 gtk_box_pack_start(GTK_BOX(vbox), filename_hbox, FALSE, TRUE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
321 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
322 pixbuf = gdk_pixbuf_new_from_xpm_data((const gchar **) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
323 gnome_mime_audio_xpm); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
324 pixmapwid = gtk_image_new_from_pixbuf(pixbuf); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
325 g_object_unref(pixbuf); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
326 gtk_misc_set_alignment(GTK_MISC(pixmapwid), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
327 gtk_box_pack_start(GTK_BOX(filename_hbox), pixmapwid, FALSE, FALSE, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
328 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
329 |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
330 label = gtk_label_new(_("<b>Name:</b>")); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
331 gtk_label_set_use_markup(GTK_LABEL(label), TRUE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
332 gtk_box_pack_start(GTK_BOX(filename_hbox), label, FALSE, TRUE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
333 filename_entry = gtk_entry_new(); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
334 gtk_editable_set_editable(GTK_EDITABLE(filename_entry), FALSE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
335 gtk_box_pack_start(GTK_BOX(filename_hbox), filename_entry, TRUE, TRUE, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
336 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
337 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
338 hbox = gtk_hbox_new(FALSE, 10); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
339 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
340 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
341 left_vbox = gtk_table_new(2, 4, FALSE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
342 gtk_box_pack_start(GTK_BOX(hbox), left_vbox, FALSE, FALSE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
343 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
344 mpeg_frame = gtk_frame_new(_(" MPEG Info ")); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
345 gtk_table_attach(GTK_TABLE(left_vbox), mpeg_frame, 0, 2, 0, 1, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
346 GTK_FILL, GTK_FILL, 5, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
347 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
348 mpeg_box = gtk_vbox_new(FALSE, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
349 gtk_container_add(GTK_CONTAINER(mpeg_frame), mpeg_box); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
350 gtk_container_set_border_width(GTK_CONTAINER(mpeg_box), 10); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
351 gtk_box_set_spacing(GTK_BOX(mpeg_box), 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
352 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
353 mpeg_level = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
354 gtk_widget_set_usize(mpeg_level, 120, -2); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
355 gtk_misc_set_alignment(GTK_MISC(mpeg_level), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
356 gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_level, FALSE, FALSE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
357 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
358 mpeg_bitrate = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
359 gtk_misc_set_alignment(GTK_MISC(mpeg_bitrate), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
360 gtk_label_set_justify(GTK_LABEL(mpeg_bitrate), GTK_JUSTIFY_LEFT); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
361 gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_bitrate, FALSE, FALSE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
362 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
363 mpeg_samplerate = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
364 gtk_misc_set_alignment(GTK_MISC(mpeg_samplerate), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
365 gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_samplerate, FALSE, FALSE, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
366 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
367 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
368 mpeg_flags = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
369 gtk_misc_set_alignment(GTK_MISC(mpeg_flags), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
370 gtk_label_set_justify(GTK_LABEL(mpeg_flags), GTK_JUSTIFY_LEFT); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
371 gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_flags, FALSE, FALSE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
372 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
373 mpeg_frames = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
374 gtk_misc_set_alignment(GTK_MISC(mpeg_frames), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
375 gtk_label_set_justify(GTK_LABEL(mpeg_frames), GTK_JUSTIFY_LEFT); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
376 gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_frames, FALSE, FALSE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
377 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
378 mpeg_duration = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
379 gtk_misc_set_alignment(GTK_MISC(mpeg_duration), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
380 gtk_label_set_justify(GTK_LABEL(mpeg_duration), GTK_JUSTIFY_LEFT); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
381 gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_duration, FALSE, FALSE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
382 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
383 mpeg_replaygain = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
384 gtk_misc_set_alignment(GTK_MISC(mpeg_replaygain), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
385 gtk_label_set_justify(GTK_LABEL(mpeg_replaygain), GTK_JUSTIFY_LEFT); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
386 gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_replaygain, FALSE, FALSE, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
387 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
388 mpeg_replaygain2 = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
389 gtk_misc_set_alignment(GTK_MISC(mpeg_replaygain2), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
390 gtk_label_set_justify(GTK_LABEL(mpeg_replaygain2), GTK_JUSTIFY_LEFT); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
391 gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_replaygain2, FALSE, FALSE, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
392 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
393 mpeg_replaygain3 = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
394 gtk_misc_set_alignment(GTK_MISC(mpeg_replaygain3), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
395 gtk_label_set_justify(GTK_LABEL(mpeg_replaygain3), GTK_JUSTIFY_LEFT); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
396 gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_replaygain3, FALSE, FALSE, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
397 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
398 mpeg_replaygain4 = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
399 gtk_misc_set_alignment(GTK_MISC(mpeg_replaygain4), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
400 gtk_label_set_justify(GTK_LABEL(mpeg_replaygain4), GTK_JUSTIFY_LEFT); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
401 gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_replaygain4, FALSE, FALSE, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
402 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
403 mp3gain1 = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
404 gtk_misc_set_alignment(GTK_MISC(mp3gain1), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
405 gtk_label_set_justify(GTK_LABEL(mp3gain1), GTK_JUSTIFY_LEFT); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
406 gtk_box_pack_start(GTK_BOX(mpeg_box), mp3gain1, FALSE, FALSE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
407 mp3gain2 = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
408 gtk_misc_set_alignment(GTK_MISC(mp3gain2), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
409 gtk_label_set_justify(GTK_LABEL(mp3gain2), GTK_JUSTIFY_LEFT); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
410 gtk_box_pack_start(GTK_BOX(mpeg_box), mp3gain2, FALSE, FALSE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
411 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
412 mpeg_fileinfo = gtk_label_new(""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
413 gtk_misc_set_alignment(GTK_MISC(mpeg_fileinfo), 0, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
414 gtk_label_set_justify(GTK_LABEL(mpeg_fileinfo), GTK_JUSTIFY_LEFT); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
415 gtk_box_pack_start(GTK_BOX(mpeg_box), mpeg_fileinfo, FALSE, FALSE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
416 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
417 id3_frame = gtk_frame_new(_(" ID3 Tag ")); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
418 gtk_table_attach(GTK_TABLE(left_vbox), id3_frame, 2, 4, 0, 1, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
419 GTK_FILL, GTK_FILL, 0, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
420 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
421 table = gtk_table_new(5, 5, FALSE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
422 gtk_container_set_border_width(GTK_CONTAINER(table), 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
423 gtk_container_add(GTK_CONTAINER(id3_frame), table); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
424 |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
425 label = gtk_label_new(_("Title:")); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
426 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
427 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
428 GTK_FILL, 5, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
429 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
430 title_entry = gtk_entry_new(); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
431 gtk_table_attach(GTK_TABLE(table), title_entry, 1, 4, 0, 1, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
432 GTK_FILL | GTK_EXPAND | GTK_SHRINK, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
433 GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
434 |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
435 label = gtk_label_new(_("Artist:")); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
436 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
437 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
438 GTK_FILL, 5, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
439 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
440 artist_entry = gtk_entry_new(); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
441 gtk_table_attach(GTK_TABLE(table), artist_entry, 1, 4, 1, 2, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
442 GTK_FILL | GTK_EXPAND | GTK_SHRINK, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
443 GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
444 |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
445 label = gtk_label_new(_("Album:")); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
446 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
447 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, GTK_FILL, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
448 GTK_FILL, 5, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
449 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
450 album_entry = gtk_entry_new(); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
451 gtk_table_attach(GTK_TABLE(table), album_entry, 1, 4, 2, 3, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
452 GTK_FILL | GTK_EXPAND | GTK_SHRINK, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
453 GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
454 |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
455 label = gtk_label_new(_("Comment:")); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
456 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
457 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, GTK_FILL, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
458 GTK_FILL, 5, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
459 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
460 comment_entry = gtk_entry_new(); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
461 gtk_table_attach(GTK_TABLE(table), comment_entry, 1, 4, 3, 4, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
462 GTK_FILL | GTK_EXPAND | GTK_SHRINK, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
463 GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
464 |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
465 label = gtk_label_new(_("Year:")); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
466 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
467 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5, GTK_FILL, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
468 GTK_FILL, 5, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
469 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
470 year_entry = gtk_entry_new(); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
471 gtk_widget_set_usize(year_entry, 40, -1); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
472 gtk_table_attach(GTK_TABLE(table), year_entry, 1, 2, 4, 5, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
473 GTK_FILL | GTK_EXPAND | GTK_SHRINK, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
474 GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
475 |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
476 label = gtk_label_new(_("Track number:")); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
477 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
478 gtk_table_attach(GTK_TABLE(table), label, 2, 3, 4, 5, GTK_FILL, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
479 GTK_FILL, 5, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
480 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
481 tracknum_entry = gtk_entry_new(); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
482 gtk_widget_set_usize(tracknum_entry, 40, -1); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
483 gtk_table_attach(GTK_TABLE(table), tracknum_entry, 3, 4, 4, 5, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
484 GTK_FILL | GTK_EXPAND | GTK_SHRINK, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
485 GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
486 |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
487 label = gtk_label_new(_("Genre:")); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
488 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
489 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 5, 6, GTK_FILL, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
490 GTK_FILL, 5, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
491 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
492 genre_combo = gtk_combo_new(); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
493 gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(genre_combo)->entry), |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
494 FALSE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
495 if (!genre_list) { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
496 int i = 0; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
497 const id3_ucs4_t *ucs4 = id3_genre_index(i); |
730
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
498 |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
499 //add "Unknown" to the first. we must shift index. |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
500 genre_list = g_list_append(genre_list, _("Unknown")); |
730
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
501 |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
502 while (ucs4) { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
503 genre_list = |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
504 g_list_append(genre_list, id3_ucs4_utf8duplicate(ucs4)); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
505 i++; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
506 ucs4 = id3_genre_index(i); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
507 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
508 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
509 gtk_combo_set_popdown_strings(GTK_COMBO(genre_combo), genre_list); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
510 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
511 gtk_table_attach(GTK_TABLE(table), genre_combo, 1, 4, 5, 6, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
512 GTK_FILL | GTK_EXPAND | GTK_SHRINK, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
513 GTK_FILL | GTK_EXPAND | GTK_SHRINK, 0, 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
514 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
515 bbox = gtk_hbutton_box_new(); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
516 gtk_hbutton_box_set_layout_default(GTK_BUTTONBOX_SPREAD); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
517 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
518 save = gtk_button_new_from_stock(GTK_STOCK_SAVE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
519 g_signal_connect(G_OBJECT(save), "clicked", |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
520 G_CALLBACK(save_cb), NULL); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
521 gtk_box_pack_start(GTK_BOX(bbox), save, TRUE, TRUE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
522 gtk_widget_grab_default(save); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
523 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
524 remove_id3 = gtk_button_new_from_stock(GTK_STOCK_DELETE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
525 g_signal_connect(G_OBJECT(remove_id3), "clicked", |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
526 G_CALLBACK(remove_id3_cb), save); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
527 gtk_box_pack_start(GTK_BOX(bbox), remove_id3, TRUE, TRUE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
528 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
529 g_signal_connect_swapped(G_OBJECT(title_entry), "changed", |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
530 G_CALLBACK(change_buttons), save); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
531 g_signal_connect_swapped(G_OBJECT(artist_entry), "changed", |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
532 G_CALLBACK(change_buttons), save); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
533 g_signal_connect_swapped(G_OBJECT(album_entry), "changed", |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
534 G_CALLBACK(change_buttons), save); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
535 g_signal_connect_swapped(G_OBJECT(year_entry), "changed", |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
536 G_CALLBACK(change_buttons), save); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
537 g_signal_connect_swapped(G_OBJECT(comment_entry), "changed", |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
538 G_CALLBACK(change_buttons), save); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
539 g_signal_connect_swapped(G_OBJECT(tracknum_entry), "changed", |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
540 G_CALLBACK(change_buttons), save); |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
541 |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
542 g_signal_connect_swapped(G_OBJECT(GTK_COMBO(genre_combo)->entry), "changed", |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
543 G_CALLBACK(change_buttons), save); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
544 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
545 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
546 gtk_table_attach(GTK_TABLE(table), bbox, 0, 5, 6, 7, GTK_FILL, 0, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
547 0, 8); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
548 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
549 bbox = gtk_hbutton_box_new(); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
550 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
551 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
552 gtk_table_attach(GTK_TABLE(left_vbox), bbox, 0, 4, 1, 2, GTK_FILL, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
553 0, 0, 8); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
554 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
555 cancel = gtk_button_new_from_stock(GTK_STOCK_CLOSE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
556 g_signal_connect_swapped(G_OBJECT(cancel), "clicked", |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
557 G_CALLBACK(gtk_widget_destroy), |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
558 G_OBJECT(window)); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
559 GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
560 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0); |
1319
a0320227c751
From: Eduard Bloch <edi@gmx.de>
William Pitcock <nenolod@atheme-project.org>
parents:
1302
diff
changeset
|
561 gtk_window_set_focus(GTK_WINDOW(window), cancel); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
562 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
563 gtk_widget_show_all(window); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
564 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
565 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
566 static void id3_frame_to_entry(char *framename, GtkEntry * entry) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
567 { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
568 gtk_entry_set_text(entry, ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
569 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
570 if (info.tag) { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
571 gchar *text = input_id3_get_string(info.tag, framename); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
572 if (text) { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
573 gtk_entry_set_text(entry, text); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
574 g_free(text); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
575 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
576 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
577 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
578 #endif /* !NOGUI */ |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
579 |
1222
aeea3e7b0060
make fileinfo work again.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1162
diff
changeset
|
580 void audmad_get_file_info(char *fileurl) |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
581 { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
582 #ifndef NOGUI |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
583 gchar *title; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
584 gchar message[128]; |
611 | 585 static char const *const layer_str[3] = { "I", "II", "III" }; |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
586 static char const *const mode_str[4] = { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
587 ("single channel"), ("dual channel"), "joint stereo", "stereo" |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
588 }; |
1222
aeea3e7b0060
make fileinfo work again.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1162
diff
changeset
|
589 gchar *tmp, *utf_filename; |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
590 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
591 #ifdef DEBUG |
799 | 592 { |
1222
aeea3e7b0060
make fileinfo work again.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1162
diff
changeset
|
593 tmp = str_to_utf8(fileurl); |
799 | 594 g_message("f: audmad_get_file_info: %s", tmp); |
595 g_free(tmp); | |
1222
aeea3e7b0060
make fileinfo work again.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1162
diff
changeset
|
596 tmp = NULL; |
799 | 597 } |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
598 #endif |
1160
98a760301a4e
[svn] - add a check for file existence to fileinfo dialog. closes #941.
yaz
parents:
997
diff
changeset
|
599 |
1222
aeea3e7b0060
make fileinfo work again.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1162
diff
changeset
|
600 if(!vfs_file_test(fileurl, G_FILE_TEST_EXISTS)) { |
1160
98a760301a4e
[svn] - add a check for file existence to fileinfo dialog. closes #941.
yaz
parents:
997
diff
changeset
|
601 return; |
98a760301a4e
[svn] - add a check for file existence to fileinfo dialog. closes #941.
yaz
parents:
997
diff
changeset
|
602 } |
98a760301a4e
[svn] - add a check for file existence to fileinfo dialog. closes #941.
yaz
parents:
997
diff
changeset
|
603 |
1328
38fb3bb3e21e
- make probing for tuple completely reuse fd.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1319
diff
changeset
|
604 input_init(&info, fileurl, NULL); |
611 | 605 |
1222
aeea3e7b0060
make fileinfo work again.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1162
diff
changeset
|
606 if(audmad_is_remote(fileurl)) { |
611 | 607 info.remote = TRUE; |
768
1d3f70ac6b31
[svn] - remote metadata handling is moved into input_process_remote_metadata(). this function converts string into utf-8 if necessary (mainly for zina).
yaz
parents:
738
diff
changeset
|
608 return; //file info dialog for remote streaming doesn't make sense. |
611 | 609 } |
610 | |
1222
aeea3e7b0060
make fileinfo work again.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1162
diff
changeset
|
611 tmp = g_filename_from_uri(fileurl, NULL, NULL); |
1264
5fe8289b9aed
a bunch of paranoid checks for the return value of g_filename_from_uri
Giacomo Lozito <james@develia.org>
parents:
1222
diff
changeset
|
612 if (tmp == NULL) |
5fe8289b9aed
a bunch of paranoid checks for the return value of g_filename_from_uri
Giacomo Lozito <james@develia.org>
parents:
1222
diff
changeset
|
613 { |
5fe8289b9aed
a bunch of paranoid checks for the return value of g_filename_from_uri
Giacomo Lozito <james@develia.org>
parents:
1222
diff
changeset
|
614 #ifdef DEBUG |
5fe8289b9aed
a bunch of paranoid checks for the return value of g_filename_from_uri
Giacomo Lozito <james@develia.org>
parents:
1222
diff
changeset
|
615 tmp = str_to_utf8(fileurl); |
5fe8289b9aed
a bunch of paranoid checks for the return value of g_filename_from_uri
Giacomo Lozito <james@develia.org>
parents:
1222
diff
changeset
|
616 g_message("f: audmad_get_file_info: %s , g_filename_from_uri failed", tmp); |
5fe8289b9aed
a bunch of paranoid checks for the return value of g_filename_from_uri
Giacomo Lozito <james@develia.org>
parents:
1222
diff
changeset
|
617 g_free(tmp); |
5fe8289b9aed
a bunch of paranoid checks for the return value of g_filename_from_uri
Giacomo Lozito <james@develia.org>
parents:
1222
diff
changeset
|
618 tmp = NULL; |
5fe8289b9aed
a bunch of paranoid checks for the return value of g_filename_from_uri
Giacomo Lozito <james@develia.org>
parents:
1222
diff
changeset
|
619 #endif |
5fe8289b9aed
a bunch of paranoid checks for the return value of g_filename_from_uri
Giacomo Lozito <james@develia.org>
parents:
1222
diff
changeset
|
620 return; |
5fe8289b9aed
a bunch of paranoid checks for the return value of g_filename_from_uri
Giacomo Lozito <james@develia.org>
parents:
1222
diff
changeset
|
621 } |
1222
aeea3e7b0060
make fileinfo work again.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1162
diff
changeset
|
622 utf_filename = str_to_utf8(tmp); |
aeea3e7b0060
make fileinfo work again.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1162
diff
changeset
|
623 g_free(tmp); |
aeea3e7b0060
make fileinfo work again.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1162
diff
changeset
|
624 tmp = NULL; |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
625 create_window(); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
626 |
997
e46b98155d5d
[svn] - fix a bug which counts number of frames twice in handling xing header.
yaz
parents:
980
diff
changeset
|
627 info.fileinfo_request = TRUE; |
980
6ba4a4bfd127
[svn] - fix overflow when calculates bitrate with non-fast scan on a huge sized file.
yaz
parents:
898
diff
changeset
|
628 input_get_info(&info, info.remote ? TRUE : FALSE); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
629 |
1328
38fb3bb3e21e
- make probing for tuple completely reuse fd.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1319
diff
changeset
|
630 tmp = g_path_get_basename(utf_filename); |
38fb3bb3e21e
- make probing for tuple completely reuse fd.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1319
diff
changeset
|
631 title = g_strdup_printf(_("File Info - %s"), tmp); |
38fb3bb3e21e
- make probing for tuple completely reuse fd.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
1319
diff
changeset
|
632 g_free(tmp); tmp = NULL; |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
633 gtk_window_set_title(GTK_WINDOW(window), title); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
634 g_free(title); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
635 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
636 gtk_entry_set_text(GTK_ENTRY(filename_entry), utf_filename); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
637 gtk_editable_set_position(GTK_EDITABLE(filename_entry), -1); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
638 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
639 free(utf_filename); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
640 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
641 id3_frame_to_entry(ID3_FRAME_ARTIST, GTK_ENTRY(artist_entry)); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
642 id3_frame_to_entry(ID3_FRAME_TITLE, GTK_ENTRY(title_entry)); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
643 id3_frame_to_entry(ID3_FRAME_ALBUM, GTK_ENTRY(album_entry)); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
644 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
645 // year |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
646 // id3_frame_to_entry (ID3_FRAME_YEAR, GTK_ENTRY (year_entry)); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
647 // to set year entry, we have to do manually because TYER is still used equally to TDRC. |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
648 gtk_entry_set_text(GTK_ENTRY(year_entry), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
649 if (info.tag) { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
650 gchar *text = NULL; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
651 text = input_id3_get_string(info.tag, "TDRC"); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
652 if (!text) |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
653 text = input_id3_get_string(info.tag, "TYER"); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
654 if (text) { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
655 gtk_entry_set_text(GTK_ENTRY(year_entry), text); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
656 g_free(text); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
657 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
658 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
659 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
660 id3_frame_to_entry(ID3_FRAME_TRACK, GTK_ENTRY(tracknum_entry)); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
661 id3_frame_to_entry(ID3_FRAME_COMMENT, GTK_ENTRY(comment_entry)); |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
662 snprintf(message, 127, _("Layer %s"), layer_str[info.mpeg_layer - 1]); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
663 gtk_label_set_text(GTK_LABEL(mpeg_level), message); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
664 if (info.vbr) { |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
665 snprintf(message, 127, _("VBR (avg. %d kbps)"), info.bitrate / 1000); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
666 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
667 else { |
611 | 668 snprintf(message, 127, "%d kbps", info.bitrate / 1000); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
669 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
670 gtk_label_set_text(GTK_LABEL(mpeg_bitrate), message); |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
671 snprintf(message, 127, _("%d Hz"), info.freq); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
672 gtk_label_set_text(GTK_LABEL(mpeg_samplerate), message); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
673 if (info.frames != -1) { |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
674 snprintf(message, 127, _("%d frames"), info.frames); |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
675 gtk_label_set_text(GTK_LABEL(mpeg_frames), message); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
676 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
677 else { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
678 gtk_label_set_text(GTK_LABEL(mpeg_frames), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
679 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
680 gtk_label_set_text(GTK_LABEL(mpeg_flags), mode_str[info.mode]); |
1162
29519d604e8c
[svn] - revise bitrate calculation with xing header. if number of bytes and number of frames are available in xing header, fast play time calculation yields almost appropriate duration upon a vbr file.
yaz
parents:
1160
diff
changeset
|
681 { |
29519d604e8c
[svn] - revise bitrate calculation with xing header. if number of bytes and number of frames are available in xing header, fast play time calculation yields almost appropriate duration upon a vbr file.
yaz
parents:
1160
diff
changeset
|
682 guint sec = mad_timer_count(info.duration, MAD_UNITS_SECONDS); |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
683 snprintf(message, 127, _("%d:%02d (%d seconds)"), sec /60 ,sec % 60, sec); |
1162
29519d604e8c
[svn] - revise bitrate calculation with xing header. if number of bytes and number of frames are available in xing header, fast play time calculation yields almost appropriate duration upon a vbr file.
yaz
parents:
1160
diff
changeset
|
684 } |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
685 gtk_label_set_text(GTK_LABEL(mpeg_duration), message); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
686 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
687 if (info.replaygain_album_str != NULL) { |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
688 snprintf(message, 127, _("RG_album=%4s (x%4.2f)"), |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
689 info.replaygain_album_str, info.replaygain_album_scale); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
690 gtk_label_set_text(GTK_LABEL(mpeg_replaygain), message); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
691 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
692 else |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
693 gtk_label_set_text(GTK_LABEL(mpeg_replaygain), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
694 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
695 if (info.replaygain_track_str != NULL) { |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
696 snprintf(message, 127, _("RG_track=%4s (x%4.2f)"), |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
697 info.replaygain_track_str, info.replaygain_track_scale); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
698 gtk_label_set_text(GTK_LABEL(mpeg_replaygain2), message); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
699 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
700 else |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
701 gtk_label_set_text(GTK_LABEL(mpeg_replaygain2), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
702 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
703 if (info.replaygain_album_peak_str != NULL) { |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
704 snprintf(message, 127, _("Peak album=%4s (%+5.3fdBFS)"), |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
705 info.replaygain_album_peak_str, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
706 20 * log10(info.replaygain_album_peak)); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
707 gtk_label_set_text(GTK_LABEL(mpeg_replaygain3), message); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
708 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
709 else |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
710 gtk_label_set_text(GTK_LABEL(mpeg_replaygain3), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
711 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
712 if (info.replaygain_track_peak_str != NULL) { |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
713 snprintf(message, 127, _("Peak track=%4s (%+5.3fdBFS)"), |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
714 info.replaygain_track_peak_str, |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
715 20 * log10(info.replaygain_track_peak)); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
716 gtk_label_set_text(GTK_LABEL(mpeg_replaygain4), message); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
717 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
718 else |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
719 gtk_label_set_text(GTK_LABEL(mpeg_replaygain3), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
720 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
721 if (info.mp3gain_undo_str != NULL) { |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
722 snprintf(message, 127, _("mp3gain undo=%4s (%+5.3fdB)"), |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
723 info.mp3gain_undo_str, info.mp3gain_undo); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
724 gtk_label_set_text(GTK_LABEL(mp3gain1), message); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
725 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
726 else |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
727 gtk_label_set_text(GTK_LABEL(mp3gain1), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
728 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
729 if (info.mp3gain_minmax_str != NULL) { |
1302
1d3b02d1842b
Guess... Yes, "i18n" stuff.
Stany HENRY <StrassBoy@gmail.com>
parents:
1264
diff
changeset
|
730 snprintf(message, 127, _("mp3gain minmax=%4s (max-min=%+6.3fdB)"), |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
731 info.mp3gain_minmax_str, info.mp3gain_minmax); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
732 gtk_label_set_text(GTK_LABEL(mp3gain2), message); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
733 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
734 else |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
735 gtk_label_set_text(GTK_LABEL(mp3gain2), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
736 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
737 gtk_label_set_text(GTK_LABEL(mpeg_fileinfo), ""); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
738 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
739 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
740 /* work out the index of the genre in the list */ |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
741 { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
742 const id3_ucs4_t *string; |
645 | 743 id3_ucs4_t *genre; |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
744 struct id3_frame *frame; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
745 union id3_field *field; |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
746 frame = id3_tag_findframe(info.tag, ID3_FRAME_GENRE, 0); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
747 if (frame) { |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
748 field = id3_frame_field(frame, 1); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
749 string = id3_field_getstrings(field, 0); |
645 | 750 genre = mad_parse_genre(string); |
730
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
751 #ifdef DEBUG |
898
06ecbb1e3dbb
[svn] - non-utf string had been used for file name in window title of File Info window. patch by M.H.
yaz
parents:
799
diff
changeset
|
752 if (genre) { |
730
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
753 gchar *utf = (gchar *)id3_ucs4_utf8duplicate(genre); |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
754 g_print("genre = %s\n", utf); |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
755 g_print("genre num = %d\n", id3_genre_number(genre)); |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
756 g_free(utf); |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
757 } |
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
758 #endif |
645 | 759 if (genre) { |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
760 gtk_list_select_item(GTK_LIST |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
761 (GTK_COMBO(genre_combo)->list), |
730
74a46ac77c97
[svn] - now fileinfo dialog shows "Unknown" instead of "Blues" if genre name isn't specified.
yaz
parents:
645
diff
changeset
|
762 id3_genre_number(genre)+1); //shift one for "Unknown". |
645 | 763 g_free((void *)genre); |
764 } | |
610
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
765 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
766 } |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
767 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
768 gtk_widget_set_sensitive(id3_frame, TRUE); |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
769 |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
770 #endif /* !NOGUI */ |
862190d39e00
[svn] - add madplug. It is not yet hooked up, I'll do that later.
nenolod
parents:
diff
changeset
|
771 } |