comparison src/xs_fileinfo.c @ 657:acaba070cf49

Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 02 Apr 2008 19:46:59 +0300
parents 7de614ecb7b6
children b0743dc9165d
comparison
equal deleted inserted replaced
656:e9257f006f41 657:acaba070cf49
31 #include "xs_glade.h" 31 #include "xs_glade.h"
32 #include "xs_slsup.h" 32 #include "xs_slsup.h"
33 33
34 34
35 static GtkWidget *xs_fileinfowin = NULL; 35 static GtkWidget *xs_fileinfowin = NULL;
36 static t_xs_stil_node *xs_fileinfostil = NULL; 36 static stil_node_t *xs_fileinfostil = NULL;
37 XS_MUTEX(xs_fileinfowin); 37 XS_MUTEX(xs_fileinfowin);
38 38
39 #define LUW(x) lookup_widget(xs_fileinfowin, x) 39 #define LUW(x) lookup_widget(xs_fileinfowin, x)
40 40
41 41
118 } 118 }
119 119
120 120
121 static void xs_fileinfo_subtune(GtkWidget * widget, void *data) 121 static void xs_fileinfo_subtune(GtkWidget * widget, void *data)
122 { 122 {
123 t_xs_stil_subnode *tmpNode; 123 stil_subnode_t *tmpNode;
124 GtkWidget *tmpText; 124 GtkWidget *tmpText;
125 gchar *subName, *subAuthor, *subInfo; 125 gchar *subName, *subAuthor, *subInfo;
126 126
127 (void) widget; 127 (void) widget;
128 (void) data; 128 (void) data;
134 gtk_text_set_point(GTK_TEXT(tmpText), 0); 134 gtk_text_set_point(GTK_TEXT(tmpText), 0);
135 gtk_text_forward_delete(GTK_TEXT(tmpText), gtk_text_get_length(GTK_TEXT(tmpText))); 135 gtk_text_forward_delete(GTK_TEXT(tmpText), gtk_text_get_length(GTK_TEXT(tmpText)));
136 #endif 136 #endif
137 137
138 /* Get subtune information */ 138 /* Get subtune information */
139 tmpNode = (t_xs_stil_subnode *) data; 139 tmpNode = (stil_subnode_t *) data;
140 if (!tmpNode && xs_fileinfostil) 140 if (!tmpNode && xs_fileinfostil)
141 tmpNode = xs_fileinfostil->subTunes[0]; 141 tmpNode = xs_fileinfostil->subTunes[0];
142 142
143 if (tmpNode) { 143 if (tmpNode) {
144 subName = tmpNode->pName; 144 subName = tmpNode->name;
145 subAuthor = tmpNode->pAuthor; 145 subAuthor = tmpNode->author;
146 subInfo = tmpNode->pInfo; 146 subInfo = tmpNode->info;
147 } else { 147 } else {
148 subName = NULL; 148 subName = NULL;
149 subAuthor = NULL; 149 subAuthor = NULL;
150 subInfo = NULL; 150 subInfo = NULL;
151 } 151 }
168 168
169 169
170 void xs_fileinfo(gchar * pcFilename) 170 void xs_fileinfo(gchar * pcFilename)
171 { 171 {
172 GtkWidget *tmpMenuItem, *tmpMenu, *tmpOptionMenu; 172 GtkWidget *tmpMenuItem, *tmpMenu, *tmpOptionMenu;
173 t_xs_tuneinfo *tmpInfo; 173 xs_tuneinfo_t *tmpInfo;
174 t_xs_stil_subnode *tmpNode; 174 stil_subnode_t *tmpNode;
175 gchar tmpStr[256], *tmpFilename; 175 gchar tmpStr[256], *tmpFilename;
176 gint n; 176 gint n;
177 177
178 /* Current implementation leaves old fileinfo window untouched if 178 /* Current implementation leaves old fileinfo window untouched if
179 * no information can be found for the new file. Hmm... 179 * no information can be found for the new file. Hmm...
244 gboolean isSet = FALSE; 244 gboolean isSet = FALSE;
245 tmpNode = xs_fileinfostil->subTunes[n]; 245 tmpNode = xs_fileinfostil->subTunes[n];
246 246
247 g_snprintf(tmpStr, sizeof(tmpStr), _("Tune #%i: "), n); 247 g_snprintf(tmpStr, sizeof(tmpStr), _("Tune #%i: "), n);
248 248
249 if (tmpNode->pName) { 249 if (tmpNode->name) {
250 xs_pnstrcat(tmpStr, sizeof(tmpStr), tmpNode->pName); 250 xs_pnstrcat(tmpStr, sizeof(tmpStr), tmpNode->name);
251 isSet = TRUE; 251 isSet = TRUE;
252 } 252 }
253 253
254 if (tmpNode->pTitle) { 254 if (tmpNode->title) {
255 xs_pnstrcat(tmpStr, sizeof(tmpStr), 255 xs_pnstrcat(tmpStr, sizeof(tmpStr),
256 isSet ? " [*]" : tmpNode->pTitle); 256 isSet ? " [*]" : tmpNode->title);
257 isSet = TRUE; 257 isSet = TRUE;
258 } 258 }
259 259
260 if (tmpNode->pInfo) { 260 if (tmpNode->info) {
261 xs_pnstrcat(tmpStr, sizeof(tmpStr), " [!]"); 261 xs_pnstrcat(tmpStr, sizeof(tmpStr), " [!]");
262 isSet = TRUE; 262 isSet = TRUE;
263 } 263 }
264 264
265 if (!isSet) 265 if (!isSet)