Mercurial > audlegacy-plugins
annotate src/sid/xs_fileinfo.c @ 3193:93cf4d0a0dde
alsa-ng: Prefer "PCM" volume control over "Wave" on systems that have both, for consistency with OSS plugin and maybe other apps (closes AUD-34 and AUD-36).
author | John Lindgren <john.lindgren@tds.net> |
---|---|
date | Mon, 29 Jun 2009 23:05:56 -0400 |
parents | da7e2ec2ea27 |
children |
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
39 #define LUW(x) lookup_widget(xs_fileinfowin, x) |
0
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 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
45 XS_MUTEX_LOCK(xs_status); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
48 /* Check if control window exists, we are currently playing and have a tune */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
49 if (xs_fileinfowin) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
50 gboolean isEnabled; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
51 GtkAdjustment *tmpAdj; |
735
6c3c7b841382
[svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
12
diff
changeset
|
52 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
53 if (xs_status.tuneInfo && xs_status.isPlaying && (xs_status.tuneInfo->nsubTunes > 1)) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
54 tmpAdj = gtk_range_get_adjustment(GTK_RANGE(LUW("fileinfo_subctrl_adj"))); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
55 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
56 tmpAdj->value = xs_status.currSong; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
57 tmpAdj->lower = 1; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
58 tmpAdj->upper = xs_status.tuneInfo->nsubTunes; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
59 XS_MUTEX_UNLOCK(xs_status); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
60 XS_MUTEX_UNLOCK(xs_fileinfowin); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
61 gtk_adjustment_value_changed(tmpAdj); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
62 XS_MUTEX_LOCK(xs_status); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
63 XS_MUTEX_LOCK(xs_fileinfowin); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
64 isEnabled = TRUE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
65 } else |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
66 isEnabled = FALSE; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
67 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
68 /* Enable or disable subtune-control in fileinfo window */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
69 gtk_widget_set_sensitive(LUW("fileinfo_subctrl_prev"), isEnabled); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
70 gtk_widget_set_sensitive(LUW("fileinfo_subctrl_adj"), isEnabled); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
71 gtk_widget_set_sensitive(LUW("fileinfo_subctrl_next"), isEnabled); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
72 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
73 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
74 XS_MUTEX_UNLOCK(xs_status); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
81 gint n; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
82 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
83 XS_MUTEX_LOCK(xs_status); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
86 if (xs_status.tuneInfo && xs_status.isPlaying) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
87 n = (gint) gtk_range_get_adjustment(GTK_RANGE(LUW("fileinfo_subctrl_adj")))->value; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
88 if ((n >= 1) && (n <= xs_status.tuneInfo->nsubTunes)) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
89 xs_status.currSong = n; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
90 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
91 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
92 XS_MUTEX_UNLOCK(xs_fileinfowin); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
100 XS_MUTEX_LOCK(xs_fileinfowin); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
101 if (xs_fileinfowin) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
102 gtk_widget_destroy(xs_fileinfowin); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
103 xs_fileinfowin = NULL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
104 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
111 (void) widget; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
112 (void) event; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
113 (void) user_data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
114 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
115 XSDEBUG("delete_event\n"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
116 xs_fileinfo_ok(); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
117 return FALSE; |
0
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 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
123 stil_subnode_t *tmpNode; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
124 GtkWidget *tmpText; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
125 gchar *subName, *subAuthor, *subInfo; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
126 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
127 (void) widget; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
128 (void) data; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
129 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
130 /* Freeze text-widget and delete the old text */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
133 gtk_text_freeze(GTK_TEXT(tmpText)); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
134 gtk_text_set_point(GTK_TEXT(tmpText), 0); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
135 gtk_text_forward_delete(GTK_TEXT(tmpText), gtk_text_get_length(GTK_TEXT(tmpText))); |
1574
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
138 /* Get subtune information */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
139 tmpNode = (stil_subnode_t *) data; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
140 if (!tmpNode && xs_fileinfostil) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
141 tmpNode = xs_fileinfostil->subTunes[0]; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
142 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
143 if (tmpNode) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
144 subName = tmpNode->name; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
145 subAuthor = tmpNode->author; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
146 subInfo = tmpNode->info; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
147 } else { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
148 subName = NULL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
149 subAuthor = NULL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
150 subInfo = NULL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
151 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
152 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
153 /* Get and set subtune information */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
154 gtk_entry_set_text(GTK_ENTRY(LUW("fileinfo_sub_name")), subName ? subName : ""); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
158 gtk_text_buffer_set_text(GTK_TEXT_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(tmpText))), |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
161 gtk_text_insert(GTK_TEXT(tmpText), NULL, NULL, NULL, |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
164 /* Un-freeze the widget */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
165 gtk_text_thaw(GTK_TEXT(tmpText)); |
1574
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 { |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
172 GtkWidget *tmpMenuItem, *tmpMenu, *tmpOptionMenu; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
173 xs_tuneinfo_t *tmpInfo; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
174 stil_subnode_t *tmpNode; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
175 gchar tmpStr[256], *tmpFilename; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
176 gint n; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
177 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
178 /* Current implementation leaves old fileinfo window untouched if |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
179 * no information can be found for the new file. Hmm... |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
184 tmpFilename = filename; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
185 #endif |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
186 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
187 /* Get new tune information */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
188 XS_MUTEX_LOCK(xs_fileinfowin); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
189 XS_MUTEX_LOCK(xs_status); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
190 if ((tmpInfo = xs_status.sidPlayer->plrGetSIDInfo(tmpFilename)) == NULL) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
191 XS_MUTEX_UNLOCK(xs_fileinfowin); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
192 XS_MUTEX_UNLOCK(xs_status); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
193 return; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
194 } |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
197 xs_fileinfostil = xs_stil_get(tmpFilename); |
1581
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
200 g_free(tmpFilename); |
1581
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
203 /* Check if there already is an open fileinfo window */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
204 if (xs_fileinfowin) |
2511
da7e2ec2ea27
Use macro wrapping for Gtk+ v1 vs v2 differences, yet again.
Matti Hamalainen <ccr@tnsp.org>
parents:
2509
diff
changeset
|
205 XS_WINDOW_PRESENT(xs_fileinfowin); |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
206 else { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
209 XS_SIGNAL_CONNECT(gtk_range_get_adjustment(GTK_RANGE(LUW("fileinfo_subctrl_adj"))), |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
210 "value_changed", xs_fileinfo_setsong, NULL); |
1574
e566e18e9e3d
Huge cleanup and some bugfixes. Temporarily breaks / removes sub-tune
Matti Hamalainen <ccr@tnsp.org>
parents:
1561
diff
changeset
|
211 #endif |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
212 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
213 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
214 /* Delete current items */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
215 tmpOptionMenu = LUW("fileinfo_sub_tune"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
216 tmpMenu = gtk_option_menu_get_menu(GTK_OPTION_MENU(tmpOptionMenu)); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
217 gtk_widget_destroy(tmpMenu); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
218 gtk_option_menu_remove_menu(GTK_OPTION_MENU(tmpOptionMenu)); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
222 /* Set the generic song information */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
223 tmpFilename = XS_CS_FILENAME(filename); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
224 gtk_entry_set_text(GTK_ENTRY(LUW("fileinfo_filename")), tmpFilename); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
225 g_free(tmpFilename); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
226 gtk_entry_set_text(GTK_ENTRY(LUW("fileinfo_songname")), tmpInfo->sidName); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
227 gtk_entry_set_text(GTK_ENTRY(LUW("fileinfo_composer")), tmpInfo->sidComposer); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
228 gtk_entry_set_text(GTK_ENTRY(LUW("fileinfo_copyright")), tmpInfo->sidCopyright); |
735
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
231 /* Main tune - the pseudo tune */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
232 tmpMenuItem = gtk_menu_item_new_with_label(_("General info")); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
233 gtk_widget_show(tmpMenuItem); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
234 gtk_menu_append(GTK_MENU(tmpMenu), tmpMenuItem); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
235 if (xs_fileinfostil) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
236 tmpNode = xs_fileinfostil->subTunes[0]; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
237 else |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
238 tmpNode = NULL; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
241 /* Other menu items */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
242 for (n = 1; n <= tmpInfo->nsubTunes; n++) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
243 if (xs_fileinfostil && n <= xs_fileinfostil->nsubTunes && xs_fileinfostil->subTunes[n]) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
244 gboolean isSet = FALSE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
245 tmpNode = xs_fileinfostil->subTunes[n]; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
246 |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
249 if (tmpNode->name) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
250 xs_pnstrcat(tmpStr, sizeof(tmpStr), tmpNode->name); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
251 isSet = TRUE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
252 } |
1592
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
253 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
254 if (tmpNode->title) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
255 xs_pnstrcat(tmpStr, sizeof(tmpStr), |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
256 isSet ? " [*]" : tmpNode->title); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
257 isSet = TRUE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
258 } |
1592
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
259 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
260 if (tmpNode->info) { |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
261 xs_pnstrcat(tmpStr, sizeof(tmpStr), " [!]"); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
262 isSet = TRUE; |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
263 } |
1592
ff902c317ecf
Merged fileinfo improvements from XMMS-SID: sub-tunes info selector menu
Matti Hamalainen <ccr@tnsp.org>
parents:
1581
diff
changeset
|
264 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
265 if (!isSet) |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
268 tmpMenuItem = gtk_menu_item_new_with_label(tmpStr); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
269 gtk_widget_show(tmpMenuItem); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
270 gtk_menu_append(GTK_MENU(tmpMenu), tmpMenuItem); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
271 XS_SIGNAL_CONNECT(tmpMenuItem, "activate", xs_fileinfo_subtune, tmpNode); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
272 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
273 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
274 } |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
275 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
276 gtk_option_menu_set_menu(GTK_OPTION_MENU(tmpOptionMenu), tmpMenu); |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
277 gtk_widget_show(tmpOptionMenu); |
1558
289fa4cb75db
Merge fileinfo window fixes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
735
diff
changeset
|
278 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
279 /* Set the subtune information */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
282 /* Free temporary tuneinfo */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
283 xs_tuneinfo_free(tmpInfo); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
284 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
285 /* Show the window */ |
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
diff
changeset
|
286 gtk_widget_show(xs_fileinfowin); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
287 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 |
2509
1223e8510d8a
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
2507
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 } |