annotate src/sid/xs_fileinfo.c @ 1596:9ad9b3479b38

Actually only use [!] marker in the subtune menu, not the whole info field.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 05 Sep 2007 02:29:16 +0300
parents ff902c317ecf
children 15c07b4cc459
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
36 static t_xs_stil_node *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 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
123 t_xs_stil_subnode *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 */
1592
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
139 tmpNode = (t_xs_stil_subnode *) data;
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) {
1581
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
144 if (tmpNode->pName)
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
145 subName = tmpNode->pName;
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
146 else
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
147 subName = tmpNode->pTitle;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
148 subAuthor = tmpNode->pAuthor;
1559
6b4e47c5ca67 Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents: 1558
diff changeset
149 subInfo = tmpNode->pInfo;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
150 } else {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
151 subName = NULL;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
152 subAuthor = NULL;
1559
6b4e47c5ca67 Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents: 1558
diff changeset
153 subInfo = NULL;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
154 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
155
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
156 /* Get and set subtune information */
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 12
diff changeset
157 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
158 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
159
e566e18e9e3d Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents: 1561
diff changeset
160 #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
161 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
162 subInfo ? subInfo : "", -1);
1574
e566e18e9e3d Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents: 1561
diff changeset
163 #else
e566e18e9e3d Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents: 1561
diff changeset
164 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
165 subInfo ? subInfo : "", -1);
e566e18e9e3d Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents: 1561
diff changeset
166
e566e18e9e3d Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents: 1561
diff changeset
167 /* Un-freeze the widget */
e566e18e9e3d Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents: 1561
diff changeset
168 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
169 #endif
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
170 }
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
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
173 void xs_fileinfo(gchar * pcFilename)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
174 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
175 GtkWidget *tmpMenuItem, *tmpMenu, *tmpOptionMenu;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
176 t_xs_tuneinfo *tmpInfo;
1592
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
177 t_xs_stil_subnode *tmpNode;
1574
e566e18e9e3d Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents: 1561
diff changeset
178 gchar tmpStr[256], *tmpFilename;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
179 gint n;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
180
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
181 /* Current implementation leaves old fileinfo window untouched if
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
182 * 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
183 */
1581
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
184 #ifdef AUDACIOUS_PLUGIN
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
185 xs_get_trackinfo(pcFilename, &tmpFilename, &n);
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
186 #else
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
187 tmpFilename = pcFilename;
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
188 #endif
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
189
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
190 /* Get new tune information */
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 12
diff changeset
191 XS_MUTEX_LOCK(xs_fileinfowin);
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 12
diff changeset
192 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
193 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
194 XS_MUTEX_UNLOCK(xs_fileinfowin);
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 return;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
197 }
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 12
diff changeset
198 XS_MUTEX_UNLOCK(xs_status);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
199
1581
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
200 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
201
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
202 #ifdef AUDACIOUS_PLUGIN
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
203 g_free(tmpFilename);
8581eb9d574a Fix fileinfo dialog to work with new subtune system.
Matti Hamalainen <ccr@tnsp.org>
parents: 1574
diff changeset
204 #endif
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
205
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
206 /* 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
207 if (xs_fileinfowin)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
208 gdk_window_raise(xs_fileinfowin->window);
1558
289fa4cb75db Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 735
diff changeset
209 else {
289fa4cb75db Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 735
diff changeset
210 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
211 #ifndef AUDACIOUS_PLUGIN
e566e18e9e3d Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents: 1561
diff changeset
212 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
213 "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
214 #endif
1558
289fa4cb75db Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 735
diff changeset
215 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
216
1558
289fa4cb75db Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 735
diff changeset
217 /* Delete current items */
289fa4cb75db Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 735
diff changeset
218 tmpOptionMenu = LUW("fileinfo_sub_tune");
289fa4cb75db Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 735
diff changeset
219 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
220 gtk_widget_destroy(tmpMenu);
289fa4cb75db Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 735
diff changeset
221 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
222 tmpMenu = gtk_menu_new();
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
223
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
224
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
225 /* Set the generic song information */
1574
e566e18e9e3d Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents: 1561
diff changeset
226 tmpFilename = XS_CS_FILENAME(pcFilename);
e566e18e9e3d Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents: 1561
diff changeset
227 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
228 g_free(tmpFilename);
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 12
diff changeset
229 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
230 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
231 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
232
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
233
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
234 /* Main tune - the pseudo tune */
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 12
diff changeset
235 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
236 gtk_widget_show(tmpMenuItem);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
237 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
238 if (xs_fileinfostil)
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
239 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
240 else
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
241 tmpNode = NULL;
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
242 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
243
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
244 /* Other menu items */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
245 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
246 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
247 gboolean isSet = FALSE;
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
248 tmpNode = xs_fileinfostil->subTunes[n];
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 12
diff changeset
249
1559
6b4e47c5ca67 Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents: 1558
diff changeset
250 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
251
1592
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
252 if (tmpNode->pName) {
1559
6b4e47c5ca67 Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents: 1558
diff changeset
253 xs_pnstrcat(tmpStr, sizeof(tmpStr), tmpNode->pName);
1592
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
254 isSet = TRUE;
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
255 }
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
256
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
257 if (tmpNode->pTitle) {
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
258 xs_pnstrcat(tmpStr, sizeof(tmpStr),
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
259 isSet ? " [*]" : tmpNode->pTitle);
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
260 isSet = TRUE;
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
261 }
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
262
1596
9ad9b3479b38 Actually only use [!] marker in the subtune menu, not the whole info field.
Matti Hamalainen <ccr@tnsp.org>
parents: 1592
diff changeset
263 if (tmpNode->pInfo && isSet) {
9ad9b3479b38 Actually only use [!] marker in the subtune menu, not the whole info field.
Matti Hamalainen <ccr@tnsp.org>
parents: 1592
diff changeset
264 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
265 isSet = TRUE;
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
266 }
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 if (!isSet)
1559
6b4e47c5ca67 Fixes to make the fileinfo sub-tune info selector actually work.
Matti Hamalainen <ccr@tnsp.org>
parents: 1558
diff changeset
269 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
270
ff902c317ecf Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents: 1581
diff changeset
271 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
272 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
273 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
274 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
275 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
276
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
277 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
278
1558
289fa4cb75db Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 735
diff changeset
279 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
280 gtk_widget_show(tmpOptionMenu);
289fa4cb75db Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 735
diff changeset
281
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
282 /* 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
283 xs_fileinfo_subtune(tmpOptionMenu, NULL);
0
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 /* Free temporary tuneinfo */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
286 xs_tuneinfo_free(tmpInfo);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
287
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
288 /* Show the window */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
289 gtk_widget_show(xs_fileinfowin);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
290
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 12
diff changeset
291 XS_MUTEX_UNLOCK(xs_fileinfowin);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
292
1574
e566e18e9e3d Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents: 1561
diff changeset
293 #ifndef AUDACIOUS_PLUGIN
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
294 xs_fileinfo_update();
1574
e566e18e9e3d Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents: 1561
diff changeset
295 #endif
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
296 }