Mercurial > audlegacy
annotate src/audacious/ui_fileinfo.c @ 4291:ca077e01ed3a
Add caching to Jump to Track feature to speed up searches. (Bugzilla #180)
author | Jussi Judin <jjudin+audacious@iki.fi> |
---|---|
date | Mon, 18 Feb 2008 20:44:40 -0600 |
parents | 2b7a74fce100 |
children | 35d5b1b8aa1e |
rev | line source |
---|---|
2313 | 1 /* |
2 * Audacious: A cross-platform multimedia player | |
3 * Copyright (c) 2006 William Pitcock, Tony Vroon, George Averill, | |
4 * Giacomo Lozito, Derek Pomery and Yoshiki Yazawa. | |
4162
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
5 * Copyright (c) 2008 Eugene Zagidullin |
2313 | 6 * |
7 * This program is free software; you can redistribute it and/or modify | |
8 * it under the terms of the GNU General Public License as published by | |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3113
diff
changeset
|
9 * the Free Software Foundation; under version 3 of the License. |
2313 | 10 * |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3113
diff
changeset
|
17 * along with this program. If not, see <http://www.gnu.org/licenses>. |
3123
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
18 * |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
19 * The Audacious team does not consider modular code linking to |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
20 * Audacious or using our public API to be a derived work. |
2313 | 21 */ |
22 | |
23 #ifdef HAVE_CONFIG_H | |
24 # include "config.h" | |
25 #endif | |
26 | |
27 #include <glib.h> | |
28 #include <glib/gi18n.h> | |
29 #include <gtk/gtk.h> | |
30 #include <string.h> | |
31 #include <stddef.h> | |
32 #include <stdio.h> | |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
33 #include <stdarg.h> |
2313 | 34 #include <sys/types.h> |
35 #include <dirent.h> | |
36 #include <unistd.h> | |
37 #include <errno.h> | |
38 #include <sys/types.h> | |
39 #include <sys/stat.h> | |
40 | |
41 #include "plugin.h" | |
42 #include "pluginenum.h" | |
43 #include "input.h" | |
44 #include "effect.h" | |
2385
ab2b1b6f6179
[svn] - add missing inclusion of strings.h where necessary, do not export main.h and export strings.h
giacomo
parents:
2348
diff
changeset
|
45 #include "strings.h" |
2313 | 46 #include "general.h" |
47 #include "output.h" | |
48 #include "visualization.h" | |
49 | |
50 #include "main.h" | |
51 #include "util.h" | |
52 #include "dnd.h" | |
3298
f985357757e0
audacious-core: convert to tuple-ng, remove titlestring API.
William Pitcock <nenolod@atheme-project.org>
parents:
3123
diff
changeset
|
53 #include "tuple.h" |
4019
29650db2d5f2
added update button (currently disabled) to file info dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4013
diff
changeset
|
54 #include "vfs.h" |
2313 | 55 |
56 #include "playlist.h" | |
57 | |
58 #include "ui_main.h" | |
59 #include "ui_playlist.h" | |
60 #include "build_stamp.h" | |
61 #include "ui_fileinfo.h" | |
62 #include "ui_playlist.h" | |
63 | |
4162
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
64 #define G_FREE_CLEAR(a) if(a != NULL) { g_free(a); a = NULL; } |
4021
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
65 #define STATUS_TIMEOUT 3*1000 |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
66 |
2313 | 67 GtkWidget *fileinfo_win; |
68 | |
3986 | 69 GtkWidget *entry_location; |
70 GtkWidget *entry_title; | |
71 GtkWidget *entry_artist; | |
72 GtkWidget *entry_album; | |
73 GtkWidget *entry_comment; | |
74 GtkWidget *entry_year; | |
75 GtkWidget *entry_track; | |
76 GtkWidget *entry_genre; | |
77 | |
78 GtkWidget *image_artwork; | |
79 | |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
80 GtkWidget *image_fileicon; |
4013
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
81 GtkWidget *label_format_name; |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
82 GtkWidget *label_quality; |
4061
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
83 GtkWidget *label_bitrate; |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
84 GtkWidget *btn_apply; |
4021
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
85 GtkWidget *label_mini_status; |
4165
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
86 GtkWidget *arrow_rawdata; |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
87 GtkWidget *treeview_rawdata; |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
88 |
4167
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
89 enum { |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
90 RAWDATA_KEY, |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
91 RAWDATA_VALUE, |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
92 RAWDATA_N_COLS |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
93 }; |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
94 |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
95 static gchar *current_file = NULL; |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
96 static InputPlugin *current_ip = NULL; |
4023
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
97 static gboolean something_changed = FALSE; |
4019
29650db2d5f2
added update button (currently disabled) to file info dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4013
diff
changeset
|
98 |
4163
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
99 /* stolen from Audacious 1.4 vorbis plugin. --nenolod */ |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
100 static const gchar *genre_table[] = { |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
101 N_("Blues"), N_("Classic Rock"), N_("Country"), N_("Dance"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
102 N_("Disco"), N_("Funk"), N_("Grunge"), N_("Hip-Hop"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
103 N_("Jazz"), N_("Metal"), N_("New Age"), N_("Oldies"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
104 N_("Other"), N_("Pop"), N_("R&B"), N_("Rap"), N_("Reggae"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
105 N_("Rock"), N_("Techno"), N_("Industrial"), N_("Alternative"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
106 N_("Ska"), N_("Death Metal"), N_("Pranks"), N_("Soundtrack"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
107 N_("Euro-Techno"), N_("Ambient"), N_("Trip-Hop"), N_("Vocal"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
108 N_("Jazz+Funk"), N_("Fusion"), N_("Trance"), N_("Classical"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
109 N_("Instrumental"), N_("Acid"), N_("House"), N_("Game"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
110 N_("Sound Clip"), N_("Gospel"), N_("Noise"), N_("AlternRock"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
111 N_("Bass"), N_("Soul"), N_("Punk"), N_("Space"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
112 N_("Meditative"), N_("Instrumental Pop"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
113 N_("Instrumental Rock"), N_("Ethnic"), N_("Gothic"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
114 N_("Darkwave"), N_("Techno-Industrial"), N_("Electronic"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
115 N_("Pop-Folk"), N_("Eurodance"), N_("Dream"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
116 N_("Southern Rock"), N_("Comedy"), N_("Cult"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
117 N_("Gangsta Rap"), N_("Top 40"), N_("Christian Rap"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
118 N_("Pop/Funk"), N_("Jungle"), N_("Native American"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
119 N_("Cabaret"), N_("New Wave"), N_("Psychedelic"), N_("Rave"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
120 N_("Showtunes"), N_("Trailer"), N_("Lo-Fi"), N_("Tribal"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
121 N_("Acid Punk"), N_("Acid Jazz"), N_("Polka"), N_("Retro"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
122 N_("Musical"), N_("Rock & Roll"), N_("Hard Rock"), N_("Folk"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
123 N_("Folk/Rock"), N_("National Folk"), N_("Swing"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
124 N_("Fast-Fusion"), N_("Bebob"), N_("Latin"), N_("Revival"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
125 N_("Celtic"), N_("Bluegrass"), N_("Avantgarde"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
126 N_("Gothic Rock"), N_("Progressive Rock"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
127 N_("Psychedelic Rock"), N_("Symphonic Rock"), N_("Slow Rock"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
128 N_("Big Band"), N_("Chorus"), N_("Easy Listening"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
129 N_("Acoustic"), N_("Humour"), N_("Speech"), N_("Chanson"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
130 N_("Opera"), N_("Chamber Music"), N_("Sonata"), N_("Symphony"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
131 N_("Booty Bass"), N_("Primus"), N_("Porn Groove"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
132 N_("Satire"), N_("Slow Jam"), N_("Club"), N_("Tango"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
133 N_("Samba"), N_("Folklore"), N_("Ballad"), N_("Power Ballad"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
134 N_("Rhythmic Soul"), N_("Freestyle"), N_("Duet"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
135 N_("Punk Rock"), N_("Drum Solo"), N_("A Cappella"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
136 N_("Euro-House"), N_("Dance Hall"), N_("Goa"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
137 N_("Drum & Bass"), N_("Club-House"), N_("Hardcore"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
138 N_("Terror"), N_("Indie"), N_("BritPop"), N_("Negerpunk"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
139 N_("Polsk Punk"), N_("Beat"), N_("Christian Gangsta Rap"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
140 N_("Heavy Metal"), N_("Black Metal"), N_("Crossover"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
141 N_("Contemporary Christian"), N_("Christian Rock"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
142 N_("Merengue"), N_("Salsa"), N_("Thrash Metal"), |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
143 N_("Anime"), N_("JPop"), N_("Synthpop") |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
144 }; |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
145 |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
146 static GList *genre_list = NULL; |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
147 |
2313 | 148 static void |
3986 | 149 fileinfo_entry_set_text(GtkWidget *widget, const char *text) |
2313 | 150 { |
3986 | 151 if (widget == NULL) |
152 return; | |
2313 | 153 |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
154 gtk_entry_set_text(GTK_ENTRY(widget), text != NULL ? text : ""); |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
155 } |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
156 |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
157 static void |
4022
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
158 set_entry_str_from_field(GtkWidget *widget, Tuple *tuple, gint fieldn, gboolean editable) |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
159 { |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
160 gchar *text; |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
161 |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
162 if(widget != NULL) { |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
163 text = (gchar*)tuple_get_string(tuple, fieldn, NULL); |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
164 gtk_entry_set_text(GTK_ENTRY(widget), text != NULL ? text : ""); |
4022
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
165 gtk_editable_set_editable(GTK_EDITABLE(widget), editable); |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
166 } |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
167 } |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
168 |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
169 static void |
4022
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
170 set_entry_int_from_field(GtkWidget *widget, Tuple *tuple, gint fieldn, gboolean editable) |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
171 { |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
172 gchar *text; |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
173 |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
174 if(widget == NULL) return; |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
175 |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
176 if(tuple_get_value_type(tuple, fieldn, NULL) == TUPLE_INT) { |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
177 text = g_strdup_printf("%d", tuple_get_int(tuple, fieldn, NULL)); |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
178 gtk_entry_set_text(GTK_ENTRY(widget), text); |
4022
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
179 gtk_editable_set_editable(GTK_EDITABLE(widget), editable); |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
180 g_free(text); |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
181 } else { |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
182 gtk_entry_set_text(GTK_ENTRY(widget), ""); |
4022
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
183 gtk_editable_set_editable(GTK_EDITABLE(widget), editable); |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
184 } |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
185 } |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
186 |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
187 static void |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
188 set_field_str_from_entry(Tuple *tuple, gint fieldn, GtkWidget *widget) |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
189 { |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
190 if(widget == NULL) return; |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
191 tuple_associate_string(tuple, fieldn, NULL, gtk_entry_get_text(GTK_ENTRY(widget))); |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
192 } |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
193 |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
194 static void |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
195 set_field_int_from_entry(Tuple *tuple, gint fieldn, GtkWidget *widget) |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
196 { |
4022
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
197 gchar *tmp; |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
198 if(widget == NULL) return; |
4022
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
199 |
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
200 tmp = (gchar*)gtk_entry_get_text(GTK_ENTRY(widget)); |
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
201 if(*tmp != '\0') |
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
202 tuple_associate_int(tuple, fieldn, NULL, atoi(tmp)); |
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
203 else |
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
204 tuple_associate_int(tuple, fieldn, NULL, -1); |
2313 | 205 } |
206 | |
207 static void | |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
208 fileinfo_label_set_text(GtkWidget *widget, const char *text) |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
209 { |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
210 gchar *tmp; |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
211 |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
212 if (widget == NULL) |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
213 return; |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
214 |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
215 if (text) { |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
216 tmp = g_strdup_printf("<span size=\"small\">%s</span>", text); |
4012
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
217 gtk_label_set_text(GTK_LABEL(widget), tmp); |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
218 gtk_label_set_use_markup(GTK_LABEL(widget), TRUE); |
4012
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
219 g_free(tmp); |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
220 } else { |
4012
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
221 gtk_label_set_text(GTK_LABEL(widget), _("<span size=\"small\">n/a</span>")); |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
222 gtk_label_set_use_markup(GTK_LABEL(widget), TRUE); |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
223 } |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
224 } |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
225 |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
226 static void |
3986 | 227 fileinfo_entry_set_image(GtkWidget *widget, const char *text) |
2313 | 228 { |
4164 | 229 GdkPixbuf *pixbuf; |
230 int width, height; | |
231 double aspect; | |
232 GdkPixbuf *pixbuf2; | |
2313 | 233 |
4164 | 234 if (widget == NULL) |
235 return; | |
2313 | 236 |
4164 | 237 pixbuf = gdk_pixbuf_new_from_file(text, NULL); |
2313 | 238 |
4164 | 239 if (pixbuf == NULL) |
240 return; | |
2313 | 241 |
4164 | 242 width = gdk_pixbuf_get_width(GDK_PIXBUF(pixbuf)); |
243 height = gdk_pixbuf_get_height(GDK_PIXBUF(pixbuf)); | |
244 | |
245 if (strcmp(DATA_DIR "/images/audio.png", text)) { | |
246 if (width == 0) | |
247 width = 1; | |
248 aspect = (double)height / (double)width; | |
249 | |
250 if (aspect > 1.0) { | |
251 height = (int)(cfg.filepopup_pixelsize * aspect); | |
252 width = cfg.filepopup_pixelsize; | |
253 } else { | |
254 height = cfg.filepopup_pixelsize; | |
255 width = (int)(cfg.filepopup_pixelsize / aspect); | |
4012
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
256 } |
2313 | 257 |
4164 | 258 pixbuf2 = gdk_pixbuf_scale_simple(GDK_PIXBUF(pixbuf), width, height, GDK_INTERP_BILINEAR); |
4012
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
259 g_object_unref(G_OBJECT(pixbuf)); |
4164 | 260 pixbuf = pixbuf2; |
261 } | |
262 | |
263 gtk_image_set_from_pixbuf(GTK_IMAGE(widget), GDK_PIXBUF(pixbuf)); | |
264 g_object_unref(G_OBJECT(pixbuf)); | |
2313 | 265 } |
266 | |
267 void fileinfo_hide(gpointer unused) | |
268 { | |
4019
29650db2d5f2
added update button (currently disabled) to file info dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4013
diff
changeset
|
269 if(GTK_WIDGET_VISIBLE(fileinfo_win)) gtk_widget_hide(fileinfo_win); |
2313 | 270 |
3986 | 271 /* Clear it out. */ |
272 fileinfo_entry_set_text(entry_title, ""); | |
273 fileinfo_entry_set_text(entry_artist, ""); | |
274 fileinfo_entry_set_text(entry_album, ""); | |
275 fileinfo_entry_set_text(entry_comment, ""); | |
4163
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
276 fileinfo_entry_set_text(gtk_bin_get_child(GTK_BIN(entry_genre)), ""); |
3986 | 277 fileinfo_entry_set_text(entry_year, ""); |
278 fileinfo_entry_set_text(entry_track, ""); | |
279 fileinfo_entry_set_text(entry_location, ""); | |
2313 | 280 |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
281 fileinfo_label_set_text(label_format_name, NULL); |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
282 fileinfo_label_set_text(label_quality, NULL); |
4061
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
283 fileinfo_label_set_text(label_bitrate, NULL); |
4021
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
284 |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
285 if (label_mini_status != NULL) { |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
286 gtk_label_set_text(GTK_LABEL(label_mini_status), "<span size=\"small\"></span>"); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
287 gtk_label_set_use_markup(GTK_LABEL(label_mini_status), TRUE); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
288 } |
4023
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
289 |
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
290 something_changed = FALSE; |
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
291 gtk_widget_set_sensitive(btn_apply, FALSE); |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
292 |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
293 current_ip = NULL; |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
294 G_FREE_CLEAR(current_file); |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
295 |
3986 | 296 fileinfo_entry_set_image(image_artwork, DATA_DIR "/images/audio.png"); |
2313 | 297 } |
298 | |
4023
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
299 static void entry_changed (GtkEditable *editable, gpointer user_data) |
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
300 { |
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
301 if(current_file != NULL && current_ip != NULL && current_ip->update_song_tuple != NULL) { |
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
302 something_changed = TRUE; |
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
303 gtk_widget_set_sensitive(btn_apply, TRUE); |
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
304 } |
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
305 } |
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
306 |
4021
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
307 static gboolean |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
308 ministatus_timeout_proc (gpointer data) |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
309 { |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
310 GtkLabel *status = GTK_LABEL(data); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
311 gtk_label_set_text(status, "<span size=\"small\"></span>"); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
312 gtk_label_set_use_markup(status, TRUE); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
313 |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
314 return FALSE; |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
315 } |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
316 |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
317 static void |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
318 ministatus_display_message(gchar *text) |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
319 { |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
320 if(label_mini_status != NULL) { |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
321 gchar *tmp = g_strdup_printf("<span size=\"small\">%s</span>", text); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
322 gtk_label_set_text(GTK_LABEL(label_mini_status), tmp); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
323 g_free(tmp); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
324 gtk_label_set_use_markup(GTK_LABEL(label_mini_status), TRUE); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
325 g_timeout_add (STATUS_TIMEOUT, (GSourceFunc) ministatus_timeout_proc, (gpointer) label_mini_status); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
326 } |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
327 } |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
328 |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
329 static void |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
330 message_update_successfull() |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
331 { |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
332 ministatus_display_message(_("Metadata updated successfully")); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
333 } |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
334 |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
335 static void |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
336 message_update_failed() |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
337 { |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
338 ministatus_display_message(_("Metadata updating failed")); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
339 } |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
340 |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
341 static void |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
342 fileinfo_update_tuple(gpointer data) |
4019
29650db2d5f2
added update button (currently disabled) to file info dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4013
diff
changeset
|
343 { |
4164 | 344 Tuple *tuple; |
345 VFSFile *fd; | |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
346 |
4164 | 347 if (current_file != NULL && current_ip != NULL && current_ip->update_song_tuple != NULL && something_changed) { |
348 tuple = tuple_new(); | |
349 fd = vfs_fopen(current_file, "r+b"); | |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
350 |
4164 | 351 if (fd != NULL) { |
352 set_field_str_from_entry(tuple, FIELD_TITLE, entry_title); | |
353 set_field_str_from_entry(tuple, FIELD_ARTIST, entry_artist); | |
354 set_field_str_from_entry(tuple, FIELD_ALBUM, entry_album); | |
355 set_field_str_from_entry(tuple, FIELD_COMMENT, entry_comment); | |
356 set_field_str_from_entry(tuple, FIELD_GENRE, gtk_bin_get_child(GTK_BIN(entry_genre))); | |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
357 |
4164 | 358 set_field_int_from_entry(tuple, FIELD_YEAR, entry_year); |
359 set_field_int_from_entry(tuple, FIELD_TRACK_NUMBER, entry_track); | |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4226
diff
changeset
|
360 |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4226
diff
changeset
|
361 plugin_set_current((Plugin *)current_ip); |
4164 | 362 if (current_ip->update_song_tuple(tuple, fd)) { |
363 message_update_successfull(); | |
364 something_changed = FALSE; | |
365 gtk_widget_set_sensitive(btn_apply, FALSE); | |
366 } else | |
367 message_update_failed(); | |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
368 |
4164 | 369 vfs_fclose(fd); |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
370 |
4164 | 371 } else |
372 message_update_failed(); | |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
373 |
4164 | 374 mowgli_object_unref(tuple); |
375 } | |
4019
29650db2d5f2
added update button (currently disabled) to file info dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4013
diff
changeset
|
376 } |
29650db2d5f2
added update button (currently disabled) to file info dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4013
diff
changeset
|
377 |
4162
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
378 /** |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
379 * Looks up an icon from a NULL-terminated list of icon names. |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
380 * |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
381 * size: the requested size |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
382 * name: the default name |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
383 * ... : a NULL-terminated list of alternates |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
384 */ |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
385 GdkPixbuf * |
4162
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
386 themed_icon_lookup(gint size, const gchar *name, ...) |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
387 { |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
388 GtkIconTheme *icon_theme; |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
389 GdkPixbuf *pixbuf; |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
390 GError *error = NULL; |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
391 gchar *n; |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
392 va_list par; |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
393 |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
394 icon_theme = gtk_icon_theme_get_default (); |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
395 pixbuf = gtk_icon_theme_load_icon (icon_theme, name, size, 0, &error); |
4164 | 396 |
397 if (pixbuf != NULL) | |
398 return pixbuf; | |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
399 |
4164 | 400 if (error != NULL) |
401 g_error_free(error); | |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
402 |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
403 /* fallback */ |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
404 va_start(par, name); |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
405 while((n = (gchar*)va_arg(par, gchar *)) != NULL) { |
4012
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
406 error = NULL; |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
407 pixbuf = gtk_icon_theme_load_icon (icon_theme, n, size, 0, &error); |
4162
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
408 |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
409 if (pixbuf) { |
4012
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
410 va_end(par); |
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
411 return pixbuf; |
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
412 } |
4162
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
413 |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
414 if (error != NULL) |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
415 g_error_free(error); |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
416 } |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
417 |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
418 return NULL; |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
419 } |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
420 |
4162
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
421 /** |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
422 * Intelligently looks up an icon for a mimetype. Supports |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
423 * HIDEOUSLY BROKEN gnome icon naming scheme too. |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
424 * |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
425 * size : the requested size |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
426 * mime_type: the mime type. |
0b00f1d21270
Prettify theme-icon util functions.
William Pitcock <nenolod@atheme.org>
parents:
4061
diff
changeset
|
427 */ |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
428 GdkPixbuf * |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
429 mime_icon_lookup(gint size, const gchar *mime_type) /* smart icon resolving routine :) */ |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
430 { |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
431 gchar *mime_as_is; /* audio-x-mp3 */ |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
432 gchar *mime_gnome; /* gnome-mime-audio-x-mp3 */ |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
433 gchar *mime_generic; /* audio-x-generic */ |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
434 gchar *mime_gnome_generic; /* gnome-mime-audio */ |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
435 |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
436 GdkPixbuf *icon = NULL; |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
437 |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
438 gchar **s = g_strsplit(mime_type, "/", 2); |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
439 if(s[1] != NULL) { |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
440 mime_as_is = g_strdup_printf("%s-%s", s[0], s[1]); |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
441 mime_gnome = g_strdup_printf("gnome-mime-%s-%s", s[0], s[1]); |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
442 mime_generic = g_strdup_printf("%s-x-generic", s[0]); |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
443 mime_gnome_generic = g_strdup_printf("gnome-mime-%s", s[0]); |
4012
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
444 icon = themed_icon_lookup(size, mime_as_is, mime_gnome, mime_generic, mime_gnome_generic, s[0], NULL); /* s[0] is category */ |
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
445 g_free(mime_gnome_generic); |
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
446 g_free(mime_generic); |
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
447 g_free(mime_gnome); |
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
448 g_free(mime_as_is); |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
449 } |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
450 g_strfreev(s); |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
451 |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
452 return icon; |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
453 } |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
454 |
2313 | 455 void |
456 create_fileinfo_window(void) | |
457 { | |
3986 | 458 GtkWidget *hbox; |
4021
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
459 GtkWidget *hbox_status_and_bbox; |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
460 GtkWidget *vbox0; |
3986 | 461 GtkWidget *vbox1; |
462 GtkWidget *vbox2; | |
4165
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
463 GtkWidget *vbox3; |
3986 | 464 GtkWidget *label_title; |
465 GtkWidget *label_artist; | |
466 GtkWidget *label_album; | |
467 GtkWidget *label_comment; | |
468 GtkWidget *label_genre; | |
469 GtkWidget *label_year; | |
470 GtkWidget *label_track; | |
471 GtkWidget *label_location; | |
4013
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
472 GtkWidget *label_general; |
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
473 GtkWidget *label_format; |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
474 GtkWidget *label_quality_label; |
4061
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
475 GtkWidget *label_bitrate_label; |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
476 GtkWidget *codec_hbox; |
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
477 GtkWidget *codec_table; |
3986 | 478 GtkWidget *table1; |
479 GtkWidget *bbox_close; | |
480 GtkWidget *btn_close; | |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
481 GtkWidget *alignment; |
4011
c19c8d47e221
vseparator in fileinfo came back
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4010
diff
changeset
|
482 GtkWidget *separator; |
4169
b99639969b32
Backed out changeset 6c07ce72ab94
William Pitcock <nenolod@atheme.org>
parents:
4168
diff
changeset
|
483 GtkWidget *scrolledwindow; |
4167
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
484 GtkTreeViewColumn *column; |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
485 GtkCellRenderer *renderer; |
4163
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
486 gint i; |
3986 | 487 |
488 fileinfo_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
489 gtk_container_set_border_width(GTK_CONTAINER(fileinfo_win), 6); | |
490 gtk_window_set_title(GTK_WINDOW(fileinfo_win), _("Track Information")); | |
491 gtk_window_set_position(GTK_WINDOW(fileinfo_win), GTK_WIN_POS_CENTER); | |
492 gtk_window_set_resizable(GTK_WINDOW(fileinfo_win), FALSE); | |
493 gtk_window_set_type_hint(GTK_WINDOW(fileinfo_win), GDK_WINDOW_TYPE_HINT_DIALOG); | |
494 gtk_window_set_transient_for(GTK_WINDOW(fileinfo_win), GTK_WINDOW(mainwin)); | |
495 | |
4021
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
496 vbox0 = gtk_vbox_new(FALSE, 0); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
497 gtk_container_add(GTK_CONTAINER(fileinfo_win), vbox0); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
498 |
4011
c19c8d47e221
vseparator in fileinfo came back
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4010
diff
changeset
|
499 hbox = gtk_hbox_new(FALSE, 6); |
4021
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
500 gtk_box_pack_start(GTK_BOX(vbox0), hbox, TRUE, TRUE, 0); |
2313 | 501 |
3986 | 502 image_artwork = gtk_image_new(); |
503 gtk_box_pack_start(GTK_BOX(hbox), image_artwork, FALSE, FALSE, 0); | |
504 gtk_misc_set_alignment(GTK_MISC(image_artwork), 0.5, 0); | |
505 gtk_image_set_from_file(GTK_IMAGE(image_artwork), DATA_DIR "/images/audio.png"); | |
4011
c19c8d47e221
vseparator in fileinfo came back
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4010
diff
changeset
|
506 separator = gtk_vseparator_new(); |
c19c8d47e221
vseparator in fileinfo came back
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4010
diff
changeset
|
507 gtk_box_pack_start(GTK_BOX(hbox), separator, FALSE, FALSE, 0); |
3986 | 508 |
509 vbox1 = gtk_vbox_new(FALSE, 0); | |
510 gtk_box_pack_start(GTK_BOX(hbox), vbox1, TRUE, TRUE, 0); | |
511 | |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
512 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
513 gtk_box_pack_start(GTK_BOX(vbox1), alignment, TRUE, TRUE, 0); |
4165
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
514 |
3986 | 515 vbox2 = gtk_vbox_new(FALSE, 0); |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
516 gtk_container_add(GTK_CONTAINER(alignment), vbox2); |
4165
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
517 |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
518 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
519 gtk_box_pack_start(GTK_BOX(vbox1), alignment, TRUE, TRUE, 0); |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
520 |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
521 vbox3 = gtk_vbox_new(FALSE, 0); |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
522 gtk_container_add(GTK_CONTAINER(alignment), vbox3); |
4010
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
523 |
4013
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
524 label_general = gtk_label_new(_("<span size=\"small\">General</span>")); |
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
525 gtk_box_pack_start (GTK_BOX (vbox2), label_general, FALSE, FALSE, 0); |
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
526 gtk_label_set_use_markup(GTK_LABEL(label_general), TRUE); |
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
527 gtk_misc_set_alignment(GTK_MISC(label_general), 0, 0.5); |
4010
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
528 |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
529 alignment = gtk_alignment_new (0.5, 0.5, 1, 1); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
530 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 6, 0, 0); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
531 gtk_box_pack_start (GTK_BOX (vbox2), alignment, FALSE, FALSE, 0); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
532 |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
533 codec_hbox = gtk_hbox_new(FALSE, 6); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
534 gtk_container_add (GTK_CONTAINER(alignment), codec_hbox); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
535 |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
536 image_fileicon = gtk_image_new_from_stock (GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_DIALOG); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
537 gtk_box_pack_start (GTK_BOX (codec_hbox), image_fileicon, FALSE, FALSE, 0); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
538 |
4061
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
539 codec_table = gtk_table_new(3, 2, FALSE); |
4010
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
540 gtk_table_set_row_spacings (GTK_TABLE(codec_table), 6); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
541 gtk_table_set_col_spacings (GTK_TABLE(codec_table), 12); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
542 gtk_box_pack_start (GTK_BOX (codec_hbox), codec_table, FALSE, FALSE, 0); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
543 |
4013
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
544 label_format = gtk_label_new(_("<span size=\"small\">Format:</span>")); |
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
545 gtk_label_set_use_markup(GTK_LABEL(label_format), TRUE); |
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
546 gtk_misc_set_alignment(GTK_MISC(label_format), 0, 0.5); |
4010
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
547 label_quality_label = gtk_label_new(_("<span size=\"small\">Quality:</span>")); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
548 gtk_label_set_use_markup(GTK_LABEL(label_quality_label), TRUE); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
549 gtk_misc_set_alignment(GTK_MISC(label_quality_label), 0, 0.5); |
4061
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
550 label_bitrate_label = gtk_label_new(_("<span size=\"small\">Bitrate:</span>")); |
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
551 gtk_label_set_use_markup(GTK_LABEL(label_bitrate_label), TRUE); |
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
552 gtk_misc_set_alignment(GTK_MISC(label_bitrate_label), 0, 0.5); |
4010
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
553 |
4013
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
554 label_format_name = gtk_label_new(_("<span size=\"small\">n/a</span>")); |
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
555 gtk_label_set_use_markup(GTK_LABEL(label_format_name), TRUE); |
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
556 gtk_misc_set_alignment(GTK_MISC(label_format_name), 0, 0.5); |
4010
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
557 label_quality = gtk_label_new(_("<span size=\"small\">n/a</span>")); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
558 gtk_label_set_use_markup(GTK_LABEL(label_quality), TRUE); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
559 gtk_misc_set_alignment(GTK_MISC(label_quality), 0, 0.5); |
4061
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
560 label_bitrate = gtk_label_new(_("<span size=\"small\">n/a</span>")); |
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
561 gtk_label_set_use_markup(GTK_LABEL(label_bitrate), TRUE); |
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
562 gtk_misc_set_alignment(GTK_MISC(label_bitrate), 0, 0.5); |
4010
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
563 |
4013
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
564 gtk_table_attach(GTK_TABLE(codec_table), label_format, 0, 1, 0, 1, |
4010
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
565 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
566 (GtkAttachOptions) (0), 0, 0); |
4013
2e80ee28c7cc
Changed lables in file info box
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4012
diff
changeset
|
567 gtk_table_attach(GTK_TABLE(codec_table), label_format_name, 1, 2, 0, 1, |
4010
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
568 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
569 (GtkAttachOptions) (0), 0, 0); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
570 gtk_table_attach(GTK_TABLE(codec_table), label_quality_label, 0, 1, 1, 2, |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
571 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
572 (GtkAttachOptions) (0), 0, 0); |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
573 gtk_table_attach(GTK_TABLE(codec_table), label_quality, 1, 2, 1, 2, |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
574 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
ce791ae274aa
Codec info in fileinfo box moved to top
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4009
diff
changeset
|
575 (GtkAttachOptions) (0), 0, 0); |
4061
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
576 gtk_table_attach(GTK_TABLE(codec_table), label_bitrate_label, 0, 1, 2, 3, |
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
577 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
578 (GtkAttachOptions) (0), 0, 0); |
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
579 gtk_table_attach(GTK_TABLE(codec_table), label_bitrate, 1, 2, 2, 3, |
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
580 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), |
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
581 (GtkAttachOptions) (0), 0, 0); |
3986 | 582 |
583 label_title = gtk_label_new(_("<span size=\"small\">Title</span>")); | |
584 gtk_box_pack_start(GTK_BOX(vbox2), label_title, FALSE, FALSE, 0); | |
585 gtk_label_set_use_markup(GTK_LABEL(label_title), TRUE); | |
586 gtk_misc_set_alignment(GTK_MISC(label_title), 0, 0); | |
2313 | 587 |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
588 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
589 gtk_box_pack_start(GTK_BOX(vbox2), alignment, FALSE, FALSE, 0); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
590 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 6, 0, 0); |
3986 | 591 entry_title = gtk_entry_new(); |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
592 gtk_container_add(GTK_CONTAINER(alignment), entry_title); |
4023
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
593 g_signal_connect(G_OBJECT(entry_title), "changed", (GCallback) entry_changed, NULL); |
3986 | 594 |
595 label_artist = gtk_label_new(_("<span size=\"small\">Artist</span>")); | |
596 gtk_box_pack_start(GTK_BOX(vbox2), label_artist, FALSE, FALSE, 0); | |
597 gtk_label_set_use_markup(GTK_LABEL(label_artist), TRUE); | |
598 gtk_misc_set_alignment(GTK_MISC(label_artist), 0, 0.5); | |
599 | |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
600 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
601 gtk_box_pack_start(GTK_BOX(vbox2), alignment, FALSE, FALSE, 0); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
602 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 6, 0, 0); |
3986 | 603 entry_artist = gtk_entry_new(); |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
604 gtk_container_add(GTK_CONTAINER(alignment), entry_artist); |
4023
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
605 g_signal_connect(G_OBJECT(entry_artist), "changed", (GCallback) entry_changed, NULL); |
3986 | 606 |
607 label_album = gtk_label_new(_("<span size=\"small\">Album</span>")); | |
608 gtk_box_pack_start(GTK_BOX(vbox2), label_album, FALSE, FALSE, 0); | |
609 gtk_label_set_use_markup(GTK_LABEL(label_album), TRUE); | |
610 gtk_misc_set_alignment(GTK_MISC(label_album), 0, 0.5); | |
611 | |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
612 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
613 gtk_box_pack_start(GTK_BOX(vbox2), alignment, FALSE, FALSE, 0); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
614 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 6, 0, 0); |
3986 | 615 entry_album = gtk_entry_new(); |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
616 gtk_container_add(GTK_CONTAINER(alignment), entry_album); |
4023
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
617 g_signal_connect(G_OBJECT(entry_album), "changed", (GCallback) entry_changed, NULL); |
2313 | 618 |
3986 | 619 label_comment = gtk_label_new(_("<span size=\"small\">Comment</span>")); |
620 gtk_box_pack_start(GTK_BOX(vbox2), label_comment, FALSE, FALSE, 0); | |
621 gtk_label_set_use_markup(GTK_LABEL(label_comment), TRUE); | |
622 gtk_misc_set_alignment(GTK_MISC(label_comment), 0, 0.5); | |
623 | |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
624 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
625 gtk_box_pack_start(GTK_BOX(vbox2), alignment, FALSE, FALSE, 0); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
626 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 6, 0, 0); |
3986 | 627 entry_comment = gtk_entry_new(); |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
628 gtk_container_add (GTK_CONTAINER(alignment), entry_comment); |
4023
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
629 g_signal_connect(G_OBJECT(entry_comment), "changed", (GCallback) entry_changed, NULL); |
3986 | 630 |
631 label_genre = gtk_label_new(_("<span size=\"small\">Genre</span>")); | |
632 gtk_box_pack_start(GTK_BOX(vbox2), label_genre, FALSE, FALSE, 0); | |
633 gtk_label_set_use_markup(GTK_LABEL(label_genre), TRUE); | |
634 gtk_misc_set_alignment(GTK_MISC(label_genre), 0, 0.5); | |
635 | |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
636 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
637 gtk_box_pack_start(GTK_BOX(vbox2), alignment, FALSE, FALSE, 0); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
638 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 6, 0, 0); |
4163
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
639 entry_genre = gtk_combo_box_entry_new_text(); |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
640 |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
641 if (!genre_list) { |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
642 GList *iter; |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
643 |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
644 for (i = 0; i < G_N_ELEMENTS(genre_table); i++) |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
645 genre_list = g_list_prepend(genre_list, _(genre_table[i])); |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
646 genre_list = g_list_sort(genre_list, (GCompareFunc) g_ascii_strcasecmp); |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
647 |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
648 MOWGLI_ITER_FOREACH(iter, genre_list) |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
649 gtk_combo_box_append_text(GTK_COMBO_BOX(entry_genre), iter->data); |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
650 } |
a12876b41f01
Turn the genre box into an editable dropdown list.
William Pitcock <nenolod@atheme.org>
parents:
4162
diff
changeset
|
651 |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
652 gtk_container_add(GTK_CONTAINER(alignment), entry_genre); |
4023
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
653 g_signal_connect(G_OBJECT(entry_genre), "changed", (GCallback) entry_changed, NULL); |
3986 | 654 |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
655 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
656 gtk_box_pack_start(GTK_BOX(vbox2), alignment, FALSE, FALSE, 0); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
657 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 6, 0, 0); |
3986 | 658 table1 = gtk_table_new(2, 2, FALSE); |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
659 gtk_container_add(GTK_CONTAINER(alignment), table1); |
3986 | 660 gtk_table_set_col_spacings(GTK_TABLE(table1), 6); |
661 | |
662 label_year = gtk_label_new(_("<span size=\"small\">Year</span>")); | |
663 gtk_table_attach(GTK_TABLE(table1), label_year, 0, 1, 0, 1, | |
664 (GtkAttachOptions) (GTK_FILL), | |
665 (GtkAttachOptions) (0), 0, 0); | |
666 gtk_label_set_use_markup(GTK_LABEL(label_year), TRUE); | |
667 gtk_misc_set_alignment(GTK_MISC(label_year), 0, 0.5); | |
2313 | 668 |
3986 | 669 entry_year = gtk_entry_new(); |
670 gtk_table_attach(GTK_TABLE(table1), entry_year, 0, 1, 1, 2, | |
671 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
672 (GtkAttachOptions) (0), 0, 0); | |
4023
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
673 g_signal_connect(G_OBJECT(entry_year), "changed", (GCallback) entry_changed, NULL); |
3986 | 674 |
675 label_track = gtk_label_new(_("<span size=\"small\">Track Number</span>")); | |
676 gtk_table_attach(GTK_TABLE(table1), label_track, 1, 2, 0, 1, | |
677 (GtkAttachOptions) (GTK_FILL), | |
678 (GtkAttachOptions) (0), 0, 0); | |
679 gtk_label_set_use_markup(GTK_LABEL(label_track), TRUE); | |
680 gtk_misc_set_alignment(GTK_MISC(label_track), 0, 0.5); | |
681 | |
682 entry_track = gtk_entry_new(); | |
683 gtk_table_attach(GTK_TABLE(table1), entry_track, 1, 2, 1, 2, | |
684 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), | |
685 (GtkAttachOptions) (0), 0, 0); | |
4023
0f3cd542f23a
be more robust: tag updating enabled only if some field changed
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4022
diff
changeset
|
686 g_signal_connect(G_OBJECT(entry_track), "changed", (GCallback) entry_changed, NULL); |
2313 | 687 |
3986 | 688 label_location = gtk_label_new(_("<span size=\"small\">Location</span>")); |
689 gtk_box_pack_start(GTK_BOX(vbox2), label_location, FALSE, FALSE, 0); | |
690 gtk_label_set_use_markup(GTK_LABEL(label_location), TRUE); | |
691 gtk_misc_set_alignment(GTK_MISC(label_location), 0, 0.5); | |
692 | |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
693 alignment = gtk_alignment_new (0.5, 0.5, 1, 1); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
694 gtk_box_pack_start (GTK_BOX (vbox2), alignment, FALSE, FALSE, 0); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
695 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 0, 0); |
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
696 |
3986 | 697 entry_location = gtk_entry_new(); |
3988
ce1ce0a6cc74
bring back alignments - it looks nicer with those
Tomasz Mon <desowin@gmail.com>
parents:
3986
diff
changeset
|
698 gtk_container_add(GTK_CONTAINER(alignment), entry_location); |
4022
85315c67252d
fields in fileinfo dialog now non-editable when tag updating is impossible
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4021
diff
changeset
|
699 gtk_editable_set_editable(GTK_EDITABLE(entry_location), FALSE); |
4165
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
700 |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
701 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
702 hbox = gtk_hbox_new(FALSE, 0); |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
703 gtk_container_add(GTK_CONTAINER(alignment), hbox); |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
704 gtk_box_pack_start(GTK_BOX(vbox3), alignment, TRUE, TRUE, 0); |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
705 |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
706 alignment = gtk_alignment_new(0.5, 0.5, 1, 1); |
4226 | 707 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 0, 0); |
4165
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
708 arrow_rawdata = gtk_expander_new(_("<span size=\"small\">Raw Metadata</span>")); |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
709 gtk_expander_set_use_markup(GTK_EXPANDER(arrow_rawdata), TRUE); |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
710 gtk_container_add(GTK_CONTAINER(alignment), arrow_rawdata); |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
711 gtk_box_pack_start(GTK_BOX(hbox), alignment, TRUE, TRUE, 0); |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
712 |
4169
b99639969b32
Backed out changeset 6c07ce72ab94
William Pitcock <nenolod@atheme.org>
parents:
4168
diff
changeset
|
713 scrolledwindow = gtk_scrolled_window_new (NULL, NULL); |
4170
5b5c1472b0cf
A better approach to the fileinfo issue.
William Pitcock <nenolod@atheme.org>
parents:
4169
diff
changeset
|
714 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); |
4169
b99639969b32
Backed out changeset 6c07ce72ab94
William Pitcock <nenolod@atheme.org>
parents:
4168
diff
changeset
|
715 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); |
b99639969b32
Backed out changeset 6c07ce72ab94
William Pitcock <nenolod@atheme.org>
parents:
4168
diff
changeset
|
716 gtk_container_add(GTK_CONTAINER(arrow_rawdata), scrolledwindow); |
b99639969b32
Backed out changeset 6c07ce72ab94
William Pitcock <nenolod@atheme.org>
parents:
4168
diff
changeset
|
717 |
4165
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
718 treeview_rawdata = gtk_tree_view_new(); |
4169
b99639969b32
Backed out changeset 6c07ce72ab94
William Pitcock <nenolod@atheme.org>
parents:
4168
diff
changeset
|
719 gtk_container_add(GTK_CONTAINER(scrolledwindow), treeview_rawdata); |
4165
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
720 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview_rawdata), TRUE); |
d4b13079f476
Add treeview to the fileinfo editor. This doesn't populate with data yet.
William Pitcock <nenolod@atheme.org>
parents:
4164
diff
changeset
|
721 gtk_tree_view_set_reorderable(GTK_TREE_VIEW(treeview_rawdata), TRUE); |
4171
589558b4d19c
haha. it'd help if i committed my changes.
William Pitcock <nenolod@atheme.org>
parents:
4170
diff
changeset
|
722 gtk_widget_set_size_request(treeview_rawdata, -1, 130); |
4167
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
723 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
724 column = gtk_tree_view_column_new(); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
725 gtk_tree_view_column_set_title(column, _("Key")); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
726 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
727 gtk_tree_view_column_set_spacing(column, 4); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
728 gtk_tree_view_column_set_resizable(column, FALSE); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
729 gtk_tree_view_column_set_fixed_width(column, 50); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
730 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
731 renderer = gtk_cell_renderer_text_new(); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
732 gtk_tree_view_column_pack_start(column, renderer, FALSE); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
733 gtk_tree_view_column_set_attributes(column, renderer, |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
734 "text", RAWDATA_KEY, NULL); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
735 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview_rawdata), column); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
736 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
737 column = gtk_tree_view_column_new(); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
738 gtk_tree_view_column_set_title(column, _("Value")); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
739 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
740 gtk_tree_view_column_set_spacing(column, 4); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
741 gtk_tree_view_column_set_resizable(column, FALSE); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
742 gtk_tree_view_column_set_fixed_width(column, 50); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
743 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
744 renderer = gtk_cell_renderer_text_new(); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
745 gtk_tree_view_column_pack_start(column, renderer, FALSE); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
746 gtk_tree_view_column_set_attributes(column, renderer, |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
747 "text", RAWDATA_VALUE, NULL); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
748 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview_rawdata), column); |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
749 |
4021
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
750 hbox_status_and_bbox = gtk_hbox_new(FALSE, 0); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
751 gtk_box_pack_start (GTK_BOX (vbox0), hbox_status_and_bbox, FALSE, FALSE, 0); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
752 |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
753 label_mini_status = gtk_label_new("<span size=\"small\"></span>"); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
754 gtk_label_set_use_markup(GTK_LABEL(label_mini_status), TRUE); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
755 gtk_misc_set_alignment(GTK_MISC(label_mini_status), 0, 0.5); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
756 gtk_box_pack_start (GTK_BOX (hbox_status_and_bbox), label_mini_status, TRUE, TRUE, 0); |
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
757 |
3986 | 758 bbox_close = gtk_hbutton_box_new(); |
4019
29650db2d5f2
added update button (currently disabled) to file info dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4013
diff
changeset
|
759 gtk_box_set_spacing(GTK_BOX(bbox_close), 6); |
4021
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
760 gtk_box_pack_start(GTK_BOX(hbox_status_and_bbox), bbox_close, FALSE, FALSE, 0); |
3986 | 761 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox_close), GTK_BUTTONBOX_END); |
762 | |
4035
db2e900fdb62
"Apply" button in fileinfo changed to "Save"
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4023
diff
changeset
|
763 btn_apply = gtk_button_new_from_stock("gtk-save"); |
4019
29650db2d5f2
added update button (currently disabled) to file info dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4013
diff
changeset
|
764 gtk_container_add(GTK_CONTAINER(bbox_close), btn_apply); |
29650db2d5f2
added update button (currently disabled) to file info dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4013
diff
changeset
|
765 g_signal_connect(G_OBJECT(btn_apply), "clicked", (GCallback) fileinfo_update_tuple, NULL); |
29650db2d5f2
added update button (currently disabled) to file info dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4013
diff
changeset
|
766 gtk_widget_set_sensitive(btn_apply, FALSE); |
29650db2d5f2
added update button (currently disabled) to file info dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4013
diff
changeset
|
767 |
3986 | 768 btn_close = gtk_button_new_from_stock("gtk-close"); |
769 gtk_container_add(GTK_CONTAINER(bbox_close), btn_close); | |
770 GTK_WIDGET_SET_FLAGS(btn_close, GTK_CAN_DEFAULT); | |
771 g_signal_connect(G_OBJECT(btn_close), "clicked", (GCallback) fileinfo_hide, NULL); | |
772 | |
4021
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
773 gtk_widget_show_all (vbox0); |
2313 | 774 } |
775 | |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
776 void |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
777 fileinfo_show_for_tuple(Tuple *tuple, gboolean updating_enabled) |
2313 | 778 { |
4166 | 779 gchar *tmp, *tmp_utf = NULL; |
780 GdkPixbuf *icon = NULL; | |
4167
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
781 GtkTreeIter iter; |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
782 GtkListStore *store; |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
783 mowgli_dictionary_iteration_state_t state; |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
784 TupleValue *tvalue; |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
785 gint i; |
2313 | 786 |
4166 | 787 if (tuple == NULL) |
788 return; | |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
789 |
4166 | 790 if(!updating_enabled) { |
791 current_ip = NULL; | |
792 G_FREE_CLEAR(current_file); | |
793 } | |
2313 | 794 |
4166 | 795 something_changed = FALSE; |
2313 | 796 |
4166 | 797 if (!GTK_WIDGET_REALIZED(fileinfo_win)) |
798 gtk_widget_realize(fileinfo_win); | |
2313 | 799 |
4166 | 800 set_entry_str_from_field(entry_title, tuple, FIELD_TITLE, updating_enabled); |
801 set_entry_str_from_field(entry_artist, tuple, FIELD_ARTIST, updating_enabled); | |
802 set_entry_str_from_field(entry_album, tuple, FIELD_ALBUM, updating_enabled); | |
803 set_entry_str_from_field(entry_comment, tuple, FIELD_COMMENT, updating_enabled); | |
804 set_entry_str_from_field(gtk_bin_get_child(GTK_BIN(entry_genre)), tuple, FIELD_GENRE, updating_enabled); | |
805 | |
806 tmp = g_strdup_printf("%s/%s", | |
807 tuple_get_string(tuple, FIELD_FILE_PATH, NULL), | |
808 tuple_get_string(tuple, FIELD_FILE_NAME, NULL)); | |
2313 | 809 |
4166 | 810 if (tmp) { |
811 tmp_utf = str_to_utf8(tmp); | |
812 fileinfo_entry_set_text(entry_location, tmp_utf); | |
813 g_free(tmp_utf); | |
814 g_free(tmp); | |
815 tmp = NULL; | |
816 } | |
817 | |
818 /* set empty string if field not availaible. --eugene */ | |
819 set_entry_int_from_field(entry_year, tuple, FIELD_YEAR, updating_enabled); | |
820 set_entry_int_from_field(entry_track, tuple, FIELD_TRACK_NUMBER, updating_enabled); | |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
821 |
4166 | 822 fileinfo_label_set_text(label_format_name, tuple_get_string(tuple, FIELD_CODEC, NULL)); |
823 fileinfo_label_set_text(label_quality, tuple_get_string(tuple, FIELD_QUALITY, NULL)); | |
4061
450581e58761
added new tuple field FIELD_BITRATE
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4057
diff
changeset
|
824 |
4166 | 825 if (tuple_get_value_type(tuple, FIELD_BITRATE, NULL) == TUPLE_INT) { |
826 tmp = g_strdup_printf(_("%d kb/s"), tuple_get_int(tuple, FIELD_BITRATE, NULL)); | |
827 fileinfo_label_set_text(label_bitrate, tmp); | |
828 g_free(tmp); | |
829 } else | |
830 fileinfo_label_set_text(label_bitrate, NULL); | |
4009
ba6258a39662
icon, codec and quality info added to file info box. Added new tuple field FIELD_MIMETYPE used for icon resolving
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
3988
diff
changeset
|
831 |
4166 | 832 tmp = (gchar *)tuple_get_string(tuple, FIELD_MIMETYPE, NULL); |
833 icon = mime_icon_lookup(48, tmp ? tmp : "audio/x-generic"); | |
834 if (icon) { | |
835 if (image_fileicon) gtk_image_set_from_pixbuf (GTK_IMAGE(image_fileicon), icon); | |
836 g_object_unref(icon); | |
837 } | |
838 | |
839 tmp = fileinfo_recursive_get_image( | |
840 tuple_get_string(tuple, FIELD_FILE_PATH, NULL), | |
841 tuple_get_string(tuple, FIELD_FILE_NAME, NULL), 0); | |
4012
197352fd6b3e
Replaced tabs with spaces
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4011
diff
changeset
|
842 |
4166 | 843 if (tmp) { |
844 fileinfo_entry_set_image(image_artwork, tmp); | |
845 g_free(tmp); | |
846 } | |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
847 |
4166 | 848 gtk_widget_set_sensitive(btn_apply, FALSE); |
4021
d79fd54de4fa
added mini statusbar to fileinfo dialog. looks like version string in prefs dialog
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4020
diff
changeset
|
849 |
4166 | 850 if (label_mini_status != NULL) { |
851 gtk_label_set_text(GTK_LABEL(label_mini_status), "<span size=\"small\"></span>"); | |
852 gtk_label_set_use_markup(GTK_LABEL(label_mini_status), TRUE); | |
853 } | |
4167
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
854 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
855 store = gtk_list_store_new(RAWDATA_N_COLS, G_TYPE_STRING, G_TYPE_STRING); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
856 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
857 for (i = 0; i < FIELD_LAST; i++) { |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
858 gchar *key, *value; |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
859 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
860 if (!tuple->values[i]) |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
861 continue; |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
862 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
863 if (tuple->values[i]->type != TUPLE_INT && tuple->values[i]->value.string) |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
864 value = g_strdup(tuple->values[i]->value.string); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
865 else if (tuple->values[i]->type == TUPLE_INT) |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
866 value = g_strdup_printf("%d", tuple->values[i]->value.integer); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
867 else |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
868 continue; |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
869 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
870 key = g_strdup(tuple_fields[i].name); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
871 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
872 gtk_list_store_append(store, &iter); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
873 gtk_list_store_set(store, &iter, |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
874 RAWDATA_KEY, key, |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
875 RAWDATA_VALUE, value, -1); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
876 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
877 g_free(key); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
878 g_free(value); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
879 } |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
880 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
881 /* non-standard values are stored in a dictionary. */ |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
882 MOWGLI_DICTIONARY_FOREACH(tvalue, &state, tuple->dict) { |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
883 gchar *key, *value; |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
884 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
885 if (tvalue->type != TUPLE_INT && tvalue->value.string) |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
886 value = g_strdup(tvalue->value.string); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
887 else if (tvalue->type == TUPLE_INT) |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
888 value = g_strdup_printf("%d", tvalue->value.integer); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
889 else |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
890 continue; |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
891 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
892 key = g_strdup(state.cur->key); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
893 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
894 gtk_list_store_append(store, &iter); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
895 gtk_list_store_set(store, &iter, |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
896 RAWDATA_KEY, key, |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
897 RAWDATA_VALUE, value, -1); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
898 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
899 g_free(key); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
900 g_free(value); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
901 } |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
902 |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
903 gtk_tree_view_set_model(GTK_TREE_VIEW(treeview_rawdata), GTK_TREE_MODEL(store)); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
904 g_object_unref(store); |
7c6b3b6def1a
Populate the raw metadata treeview.
William Pitcock <nenolod@atheme.org>
parents:
4166
diff
changeset
|
905 |
4166 | 906 if (!GTK_WIDGET_VISIBLE(fileinfo_win)) |
907 gtk_widget_show(fileinfo_win); | |
2313 | 908 } |
909 | |
910 void | |
911 fileinfo_show_for_path(gchar *path) | |
912 { | |
4166 | 913 Tuple *tuple = input_get_song_tuple(path); |
2313 | 914 |
4166 | 915 if (tuple == NULL) { |
916 input_file_info_box(path); | |
917 return; | |
918 } | |
2313 | 919 |
4166 | 920 fileinfo_show_for_tuple(tuple, FALSE); |
2313 | 921 |
4166 | 922 mowgli_object_unref(tuple); |
2313 | 923 } |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
924 |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
925 void |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
926 fileinfo_show_editor_for_path(gchar *path, InputPlugin *ip) |
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
927 { |
4166 | 928 G_FREE_CLEAR(current_file); |
929 current_file = g_strdup(path); | |
930 current_ip = ip; | |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
931 |
4166 | 932 Tuple *tuple = input_get_song_tuple(path); |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
933 |
4166 | 934 if (tuple == NULL) { |
935 input_file_info_box(path); | |
936 return; | |
937 } | |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
938 |
4166 | 939 fileinfo_show_for_tuple(tuple, TRUE); |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
940 |
4166 | 941 mowgli_object_unref(tuple); |
4020
66529edae49d
added tag editing capabilities, maybe raw yet
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
4019
diff
changeset
|
942 } |