Mercurial > audlegacy-plugins
annotate src/sid/xs_fileinfo.c @ 2507:251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 02 Apr 2008 19:53:39 +0300 |
parents | e5401b6c4665 |
children | 1223e8510d8a |
rev | line source |
---|---|
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1 /* |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
2 XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
3 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
4 File information window |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
5 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
6 Programmed and designed by Matti 'ccr' Hamalainen <ccr@tnsp.org> |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
7 (C) Copyright 1999-2007 Tecnic Software productions (TNSP) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
8 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
9 This program is free software; you can redistribute it and/or modify |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
10 it under the terms of the GNU General Public License as published by |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
11 the Free Software Foundation; either version 2 of the License, or |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
12 (at your option) any later version. |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
13 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
14 This program is distributed in the hope that it will be useful, |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
15 but WITHOUT ANY WARRANTY; without even the implied warranty of |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
17 GNU General Public License for more details. |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
18 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
19 You should have received a copy of the GNU General Public License along |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
20 with this program; if not, write to the Free Software Foundation, Inc., |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
21 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
22 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
23 #include <gdk/gdkkeysyms.h> |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
24 #include <gtk/gtk.h> |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
25 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
26 #include "xs_fileinfo.h" |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
27 #include "xs_player.h" |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
28 #include "xs_support.h" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
29 #include "xs_config.h" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
30 #include "xs_interface.h" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
31 #include "xs_glade.h" |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
32 #include "xs_slsup.h" |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
33 |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
34 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
35 static GtkWidget *xs_fileinfowin = NULL; |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
36 static stil_node_t *xs_fileinfostil = NULL; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
37 XS_MUTEX(xs_fileinfowin); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
38 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
39 #define LUW(x) lookup_widget(xs_fileinfowin, x) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
40 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
41 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
42 #ifndef AUDACIOUS_PLUGIN |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
43 void xs_fileinfo_update(void) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
44 { |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
45 XS_MUTEX_LOCK(xs_status); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
46 XS_MUTEX_LOCK(xs_fileinfowin); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
47 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
48 /* Check if control window exists, we are currently playing and have a tune */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
49 if (xs_fileinfowin) { |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
50 gboolean isEnabled; |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
51 GtkAdjustment *tmpAdj; |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
52 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
53 if (xs_status.tuneInfo && xs_status.isPlaying && (xs_status.tuneInfo->nsubTunes > 1)) { |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
54 tmpAdj = gtk_range_get_adjustment(GTK_RANGE(LUW("fileinfo_subctrl_adj"))); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
55 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
56 tmpAdj->value = xs_status.currSong; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
57 tmpAdj->lower = 1; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
58 tmpAdj->upper = xs_status.tuneInfo->nsubTunes; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
59 XS_MUTEX_UNLOCK(xs_status); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
60 XS_MUTEX_UNLOCK(xs_fileinfowin); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
61 gtk_adjustment_value_changed(tmpAdj); |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
62 XS_MUTEX_LOCK(xs_status); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
63 XS_MUTEX_LOCK(xs_fileinfowin); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
64 isEnabled = TRUE; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
65 } else |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
66 isEnabled = FALSE; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
67 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
68 /* Enable or disable subtune-control in fileinfo window */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
69 gtk_widget_set_sensitive(LUW("fileinfo_subctrl_prev"), isEnabled); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
70 gtk_widget_set_sensitive(LUW("fileinfo_subctrl_adj"), isEnabled); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
71 gtk_widget_set_sensitive(LUW("fileinfo_subctrl_next"), isEnabled); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
72 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
73 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
74 XS_MUTEX_UNLOCK(xs_status); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
75 XS_MUTEX_UNLOCK(xs_fileinfowin); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
76 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
77 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
78 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
79 static void xs_fileinfo_setsong(void) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
80 { |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
81 gint n; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
82 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
83 XS_MUTEX_LOCK(xs_status); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
84 XS_MUTEX_LOCK(xs_fileinfowin); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
85 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
86 if (xs_status.tuneInfo && xs_status.isPlaying) { |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
87 n = (gint) gtk_range_get_adjustment(GTK_RANGE(LUW("fileinfo_subctrl_adj")))->value; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
88 if ((n >= 1) && (n <= xs_status.tuneInfo->nsubTunes)) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
89 xs_status.currSong = n; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
90 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
91 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
92 XS_MUTEX_UNLOCK(xs_fileinfowin); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
93 XS_MUTEX_UNLOCK(xs_status); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
94 } |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
95 #endif /* AUDACIOUS_PLUGIN */ |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
96 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
97 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
98 void xs_fileinfo_ok(void) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
99 { |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
100 XS_MUTEX_LOCK(xs_fileinfowin); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
101 if (xs_fileinfowin) { |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
102 gtk_widget_destroy(xs_fileinfowin); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
103 xs_fileinfowin = NULL; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
104 } |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
105 XS_MUTEX_UNLOCK(xs_fileinfowin); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
106 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
107 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
108 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
109 gboolean xs_fileinfo_delete(GtkWidget * widget, GdkEvent * event, gpointer user_data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
110 { |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
111 (void) widget; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
112 (void) event; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
113 (void) user_data; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
114 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
115 XSDEBUG("delete_event\n"); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
116 xs_fileinfo_ok(); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
117 return FALSE; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
118 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
119 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
120 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
121 static void xs_fileinfo_subtune(GtkWidget * widget, void *data) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
122 { |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
123 stil_subnode_t *tmpNode; |
1559
6b4e47c5ca67
Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents:
1558
diff
changeset
|
124 GtkWidget *tmpText; |
6b4e47c5ca67
Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents:
1558
diff
changeset
|
125 gchar *subName, *subAuthor, *subInfo; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
126 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
127 (void) widget; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
128 (void) data; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
129 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
130 /* Freeze text-widget and delete the old text */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
131 tmpText = LUW("fileinfo_sub_info"); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
132 #ifndef AUDACIOUS_PLUGIN |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
133 gtk_text_freeze(GTK_TEXT(tmpText)); |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
134 gtk_text_set_point(GTK_TEXT(tmpText), 0); |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
135 gtk_text_forward_delete(GTK_TEXT(tmpText), gtk_text_get_length(GTK_TEXT(tmpText))); |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
136 #endif |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
137 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
138 /* Get subtune information */ |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
139 tmpNode = (stil_subnode_t *) data; |
1592
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
140 if (!tmpNode && xs_fileinfostil) |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
141 tmpNode = xs_fileinfostil->subTunes[0]; |
1559
6b4e47c5ca67
Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents:
1558
diff
changeset
|
142 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
143 if (tmpNode) { |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
144 subName = tmpNode->name; |
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
145 subAuthor = tmpNode->author; |
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
146 subInfo = tmpNode->info; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
147 } else { |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
148 subName = NULL; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
149 subAuthor = NULL; |
1559
6b4e47c5ca67
Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents:
1558
diff
changeset
|
150 subInfo = NULL; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
151 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
152 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
153 /* Get and set subtune information */ |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
154 gtk_entry_set_text(GTK_ENTRY(LUW("fileinfo_sub_name")), subName ? subName : ""); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
155 gtk_entry_set_text(GTK_ENTRY(LUW("fileinfo_sub_author")), subAuthor ? subAuthor : ""); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
156 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
157 #ifdef AUDACIOUS_PLUGIN |
1559
6b4e47c5ca67
Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents:
1558
diff
changeset
|
158 gtk_text_buffer_set_text(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(tmpText))), |
6b4e47c5ca67
Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents:
1558
diff
changeset
|
159 subInfo ? subInfo : "", -1); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
160 #else |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
161 gtk_text_insert(GTK_TEXT(tmpText), NULL, NULL, NULL, |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
162 subInfo ? subInfo : "", -1); |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
163 |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
164 /* Un-freeze the widget */ |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
165 gtk_text_thaw(GTK_TEXT(tmpText)); |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
166 #endif |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
167 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
168 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
169 |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
170 void xs_fileinfo(gchar * filename) |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
171 { |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
172 GtkWidget *tmpMenuItem, *tmpMenu, *tmpOptionMenu; |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
173 xs_tuneinfo_t *tmpInfo; |
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
174 stil_subnode_t *tmpNode; |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
175 gchar tmpStr[256], *tmpFilename; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
176 gint n; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
177 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
178 /* Current implementation leaves old fileinfo window untouched if |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
179 * no information can be found for the new file. Hmm... |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
180 */ |
1581
8581eb9d574a
Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents:
1574
diff
changeset
|
181 #ifdef AUDACIOUS_PLUGIN |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
182 xs_get_trackinfo(filename, &tmpFilename, &n); |
1581
8581eb9d574a
Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents:
1574
diff
changeset
|
183 #else |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
184 tmpFilename = filename; |
1581
8581eb9d574a
Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents:
1574
diff
changeset
|
185 #endif |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
186 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
187 /* Get new tune information */ |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
188 XS_MUTEX_LOCK(xs_fileinfowin); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
189 XS_MUTEX_LOCK(xs_status); |
1581
8581eb9d574a
Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents:
1574
diff
changeset
|
190 if ((tmpInfo = xs_status.sidPlayer->plrGetSIDInfo(tmpFilename)) == NULL) { |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
191 XS_MUTEX_UNLOCK(xs_fileinfowin); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
192 XS_MUTEX_UNLOCK(xs_status); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
193 return; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
194 } |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
195 XS_MUTEX_UNLOCK(xs_status); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
196 |
1581
8581eb9d574a
Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents:
1574
diff
changeset
|
197 xs_fileinfostil = xs_stil_get(tmpFilename); |
8581eb9d574a
Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents:
1574
diff
changeset
|
198 |
8581eb9d574a
Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents:
1574
diff
changeset
|
199 #ifdef AUDACIOUS_PLUGIN |
8581eb9d574a
Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents:
1574
diff
changeset
|
200 g_free(tmpFilename); |
8581eb9d574a
Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents:
1574
diff
changeset
|
201 #endif |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
202 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
203 /* Check if there already is an open fileinfo window */ |
1558
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
204 if (xs_fileinfowin) |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
1756
diff
changeset
|
205 gtk_window_present(GTK_WINDOW(xs_fileinfowin)); |
1558
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
206 else { |
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
207 xs_fileinfowin = create_xs_fileinfowin(); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
208 #ifndef AUDACIOUS_PLUGIN |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
209 XS_SIGNAL_CONNECT(gtk_range_get_adjustment(GTK_RANGE(LUW("fileinfo_subctrl_adj"))), |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
210 "value_changed", xs_fileinfo_setsong, NULL); |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
211 #endif |
1558
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
212 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
213 |
1558
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
214 /* Delete current items */ |
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
215 tmpOptionMenu = LUW("fileinfo_sub_tune"); |
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
216 tmpMenu = gtk_option_menu_get_menu(GTK_OPTION_MENU(tmpOptionMenu)); |
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
217 gtk_widget_destroy(tmpMenu); |
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
218 gtk_option_menu_remove_menu(GTK_OPTION_MENU(tmpOptionMenu)); |
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
219 tmpMenu = gtk_menu_new(); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
220 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
221 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
222 /* Set the generic song information */ |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
223 tmpFilename = XS_CS_FILENAME(filename); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
224 gtk_entry_set_text(GTK_ENTRY(LUW("fileinfo_filename")), tmpFilename); |
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
225 g_free(tmpFilename); |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
226 gtk_entry_set_text(GTK_ENTRY(LUW("fileinfo_songname")), tmpInfo->sidName); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
227 gtk_entry_set_text(GTK_ENTRY(LUW("fileinfo_composer")), tmpInfo->sidComposer); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
228 gtk_entry_set_text(GTK_ENTRY(LUW("fileinfo_copyright")), tmpInfo->sidCopyright); |
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
229 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
230 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
231 /* Main tune - the pseudo tune */ |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
232 tmpMenuItem = gtk_menu_item_new_with_label(_("General info")); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
233 gtk_widget_show(tmpMenuItem); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
234 gtk_menu_append(GTK_MENU(tmpMenu), tmpMenuItem); |
1592
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
235 if (xs_fileinfostil) |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
236 tmpNode = xs_fileinfostil->subTunes[0]; |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
237 else |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
238 tmpNode = NULL; |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
239 XS_SIGNAL_CONNECT(tmpMenuItem, "activate", xs_fileinfo_subtune, tmpNode); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
240 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
241 /* Other menu items */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
242 for (n = 1; n <= tmpInfo->nsubTunes; n++) { |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
243 if (xs_fileinfostil && n <= xs_fileinfostil->nsubTunes && xs_fileinfostil->subTunes[n]) { |
1592
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
244 gboolean isSet = FALSE; |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
245 tmpNode = xs_fileinfostil->subTunes[n]; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
246 |
1559
6b4e47c5ca67
Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents:
1558
diff
changeset
|
247 g_snprintf(tmpStr, sizeof(tmpStr), _("Tune #%i: "), n); |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
248 |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
249 if (tmpNode->name) { |
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
250 xs_pnstrcat(tmpStr, sizeof(tmpStr), tmpNode->name); |
1592
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
251 isSet = TRUE; |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
252 } |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
253 |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
254 if (tmpNode->title) { |
1592
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
255 xs_pnstrcat(tmpStr, sizeof(tmpStr), |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
256 isSet ? " [*]" : tmpNode->title); |
1592
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
257 isSet = TRUE; |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
258 } |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
259 |
2507
251336bee085
Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
2192
diff
changeset
|
260 if (tmpNode->info) { |
1596
9ad9b3479b38
Actually only use [!] marker in the subtune menu, not the whole info field.
Matti Hamalainen <ccr@tnsp.org>
parents:
1592
diff
changeset
|
261 xs_pnstrcat(tmpStr, sizeof(tmpStr), " [!]"); |
1592
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
262 isSet = TRUE; |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
263 } |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
264 |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
265 if (!isSet) |
1559
6b4e47c5ca67
Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents:
1558
diff
changeset
|
266 xs_pnstrcat(tmpStr, sizeof(tmpStr), "---"); |
1592
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
267 |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
268 tmpMenuItem = gtk_menu_item_new_with_label(tmpStr); |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
269 gtk_widget_show(tmpMenuItem); |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
270 gtk_menu_append(GTK_MENU(tmpMenu), tmpMenuItem); |
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
271 XS_SIGNAL_CONNECT(tmpMenuItem, "activate", xs_fileinfo_subtune, tmpNode); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
272 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
273 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
274 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
275 |
1558
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
276 gtk_option_menu_set_menu(GTK_OPTION_MENU(tmpOptionMenu), tmpMenu); |
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
277 gtk_widget_show(tmpOptionMenu); |
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
278 |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
279 /* Set the subtune information */ |
1592
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
280 xs_fileinfo_subtune(tmpOptionMenu, NULL); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
281 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
282 /* Free temporary tuneinfo */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
283 xs_tuneinfo_free(tmpInfo); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
284 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
285 /* Show the window */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
286 gtk_widget_show(xs_fileinfowin); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
287 |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
288 XS_MUTEX_UNLOCK(xs_fileinfowin); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
289 |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
290 #ifndef AUDACIOUS_PLUGIN |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
291 xs_fileinfo_update(); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
292 #endif |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
293 } |