Mercurial > audlegacy
annotate audacious/newui/newui_window.c @ 1988:c97eb02a1aab trunk
[svn] - update russian translation
author | nenolod |
---|---|
date | Tue, 21 Nov 2006 11:56:37 -0800 |
parents | 55b05e25d4ef |
children |
rev | line source |
---|---|
1957 | 1 /* Audacious |
2 * Copyright (C) 2005-2006 Audacious team | |
3 * | |
4 * This program is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; either version 2 of the License, or | |
7 * (at your option) any later version. | |
8 * | |
9 * This program is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License | |
15 * along with this program; if not, write to the Free Software | |
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | |
17 * 02110-1301, USA. | |
18 */ | |
19 | |
20 #include "audacious/glade.h" | |
1962 | 21 |
22 #ifdef HAVE_CONFIG_H | |
23 # include "config.h" | |
24 #endif | |
25 | |
26 #include <glib.h> | |
27 #include <glib/gi18n.h> | |
28 #include <gtk/gtk.h> | |
29 #include <glade/glade.h> | |
30 #include <string.h> | |
31 #include <stddef.h> | |
32 #include <stdio.h> | |
33 #include <sys/types.h> | |
34 #include <dirent.h> | |
35 #include <unistd.h> | |
36 #include <errno.h> | |
37 #include <sys/types.h> | |
38 #include <sys/stat.h> | |
39 | |
40 #include "audacious/plugin.h" | |
41 #include "audacious/pluginenum.h" | |
42 #include "audacious/input.h" | |
43 #include "audacious/effect.h" | |
44 #include "audacious/general.h" | |
45 #include "audacious/output.h" | |
46 #include "audacious/visualization.h" | |
47 | |
48 #include "audacious/main.h" | |
49 #include "audacious/urldecode.h" | |
50 #include "audacious/util.h" | |
51 #include "audacious/dnd.h" | |
52 #include "audacious/titlestring.h" | |
53 | |
54 #include "libaudacious/configdb.h" | |
55 | |
56 #include "audacious/playlist.h" | |
57 | |
58 #include "audacious/mainwin.h" | |
1964
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
59 #include "audacious/ui_fileinfo.h" |
1962 | 60 |
61 GtkWidget *newui_win; | |
62 | |
63 void | |
64 create_newui_window(void) | |
65 { | |
66 const char *glade_file = DATA_DIR "/glade/newui.glade"; | |
67 GladeXML *xml; | |
68 GtkWidget *widget; | |
69 | |
70 xml = glade_xml_new_or_die(_("Stock GTK2 UI"), glade_file, NULL, NULL); | |
71 | |
72 glade_xml_signal_autoconnect(xml); | |
73 | |
74 newui_win = glade_xml_get_widget(xml, "newui_window"); | |
75 g_object_set_data(G_OBJECT(newui_win), "glade-xml", xml); | |
76 | |
77 widget = glade_xml_get_widget(xml, "newui_albumart_img"); | |
78 gtk_image_set_from_file(GTK_IMAGE(widget), DATA_DIR "/images/audio.png"); | |
79 | |
80 /* build menu and toolbars */ | |
81 } | |
82 | |
83 void | |
1963 | 84 show_newui_window(void) |
85 { | |
86 gtk_widget_show(newui_win); | |
87 } | |
88 | |
1964
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
89 static void |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
90 newui_entry_set_image(const char *text) |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
91 { |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
92 GladeXML *xml = g_object_get_data(G_OBJECT(newui_win), "glade-xml"); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
93 GtkWidget *widget = glade_xml_get_widget(xml, "newui_albumart_img"); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
94 GdkPixbuf *pixbuf; |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
95 int width, height; |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
96 double aspect; |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
97 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
98 if (xml == NULL || widget == NULL) |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
99 return; |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
100 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
101 pixbuf = gdk_pixbuf_new_from_file(text, NULL); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
102 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
103 if (pixbuf == NULL) |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
104 return; |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
105 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
106 width = gdk_pixbuf_get_width(GDK_PIXBUF(pixbuf)); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
107 height = gdk_pixbuf_get_height(GDK_PIXBUF(pixbuf)); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
108 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
109 if(strcmp(DATA_DIR "/images/audio.png", text)) |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
110 { |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
111 if(width == 0) |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
112 width = 1; |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
113 aspect = (double)height / (double)width; |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
114 if(aspect > 1.0) { |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
115 height = (int)(cfg.filepopup_pixelsize * aspect); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
116 width = cfg.filepopup_pixelsize; |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
117 } else { |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
118 height = cfg.filepopup_pixelsize; |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
119 width = (int)(cfg.filepopup_pixelsize / aspect); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
120 } |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
121 GdkPixbuf *pixbuf2 = gdk_pixbuf_scale_simple(GDK_PIXBUF(pixbuf), width, height, GDK_INTERP_BILINEAR); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
122 g_object_unref(G_OBJECT(pixbuf)); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
123 pixbuf = pixbuf2; |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
124 } |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
125 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
126 gtk_image_set_from_pixbuf(GTK_IMAGE(widget), GDK_PIXBUF(pixbuf)); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
127 g_object_unref(G_OBJECT(pixbuf)); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
128 } |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
129 |
1963 | 130 void |
1962 | 131 newui_update_nowplaying_from_entry(PlaylistEntry *entry) |
132 { | |
133 GladeXML *xml = g_object_get_data(G_OBJECT(newui_win), "glade-xml"); | |
134 GtkWidget *widget; | |
135 gchar *tmp; | |
1964
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
136 static gchar *last_artwork = NULL; |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
137 gchar *fullpath; |
1962 | 138 |
1969
55b05e25d4ef
[svn] - some newui stuff (and also turn it off again, giacomo will need to look at a few things)
nenolod
parents:
1968
diff
changeset
|
139 if (entry->tuple == NULL) |
55b05e25d4ef
[svn] - some newui stuff (and also turn it off again, giacomo will need to look at a few things)
nenolod
parents:
1968
diff
changeset
|
140 return; |
55b05e25d4ef
[svn] - some newui stuff (and also turn it off again, giacomo will need to look at a few things)
nenolod
parents:
1968
diff
changeset
|
141 |
55b05e25d4ef
[svn] - some newui stuff (and also turn it off again, giacomo will need to look at a few things)
nenolod
parents:
1968
diff
changeset
|
142 widget = glade_xml_get_widget(xml, "newui_playstatus"); |
55b05e25d4ef
[svn] - some newui stuff (and also turn it off again, giacomo will need to look at a few things)
nenolod
parents:
1968
diff
changeset
|
143 tmp = g_strdup_printf("<b>%s</b> from <b>%s</b> by <b>%s</b>", entry->tuple->track_name, |
55b05e25d4ef
[svn] - some newui stuff (and also turn it off again, giacomo will need to look at a few things)
nenolod
parents:
1968
diff
changeset
|
144 entry->tuple->album_name, entry->tuple->performer); |
1962 | 145 gtk_label_set_markup(GTK_LABEL(widget), tmp); |
146 g_free(tmp); | |
1964
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
147 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
148 widget = glade_xml_get_widget(xml, "newui_label_title"); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
149 gtk_label_set_text(GTK_LABEL(widget), entry->tuple->track_name); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
150 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
151 widget = glade_xml_get_widget(xml, "newui_label_artist"); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
152 gtk_label_set_text(GTK_LABEL(widget), entry->tuple->performer); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
153 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
154 widget = glade_xml_get_widget(xml, "newui_label_album"); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
155 gtk_label_set_text(GTK_LABEL(widget), entry->tuple->album_name); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
156 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
157 widget = glade_xml_get_widget(xml, "newui_label_genre"); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
158 gtk_label_set_text(GTK_LABEL(widget), entry->tuple->genre); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
159 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
160 widget = glade_xml_get_widget(xml, "newui_label_year"); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
161 tmp = g_strdup_printf("%d", entry->tuple->year); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
162 gtk_label_set_text(GTK_LABEL(widget), tmp); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
163 g_free(tmp); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
164 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
165 widget = glade_xml_get_widget(xml, "newui_label_tracknum"); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
166 tmp = g_strdup_printf("%d", entry->tuple->track_number); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
167 gtk_label_set_text(GTK_LABEL(widget), tmp); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
168 g_free(tmp); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
169 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
170 widget = glade_xml_get_widget(xml, "newui_label_tracklen"); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
171 tmp = g_strdup_printf("%d:%02d", entry->tuple->length / 60000, (entry->tuple->length / 1000) % 60); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
172 gtk_label_set_text(GTK_LABEL(widget), tmp); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
173 g_free(tmp); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
174 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
175 if (cfg.use_file_cover) { |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
176 /* Use the file name */ |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
177 fullpath = g_strconcat(entry->tuple->file_path, "/", entry->tuple->file_name, NULL); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
178 } else { |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
179 fullpath = g_strconcat(entry->tuple->file_path, "/", NULL); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
180 } |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
181 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
182 if (!last_artwork || strcmp(last_artwork, fullpath)) |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
183 { |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
184 if (last_artwork != NULL) |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
185 g_free(last_artwork); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
186 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
187 last_artwork = g_strdup(fullpath); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
188 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
189 tmp = fileinfo_recursive_get_image(entry->tuple->file_path, entry->tuple->file_name, 0); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
190 if (tmp) |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
191 { |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
192 newui_entry_set_image(tmp); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
193 g_free(tmp); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
194 } else { |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
195 newui_entry_set_image(DATA_DIR "/images/audio.png"); |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
196 } |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
197 } |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
198 |
f027afc2ca2e
[svn] - avoid freeing a NULL pointer in ui_fileinfo.c
nenolod
parents:
1963
diff
changeset
|
199 g_free(fullpath); |
1962 | 200 } |
1967 | 201 |
1968 | 202 /* ********** callbacks ********** */ |
203 | |
204 void | |
205 newui_set_time(gint time, gint length) | |
206 { | |
207 GladeXML *xml = g_object_get_data(G_OBJECT(newui_win), "glade-xml"); | |
208 GtkWidget *widget = glade_xml_get_widget(xml, "newui_seekbar"); | |
209 | |
210 gtk_range_set_range(GTK_RANGE(widget), 0, length); | |
211 gtk_range_set_value(GTK_RANGE(widget), time); | |
212 } | |
213 | |
1967 | 214 /* ********** signals ********** */ |
215 | |
216 void | |
217 on_newui_shuffle_cb_realize(GtkToggleButton *button, gpointer data) | |
218 { | |
219 gtk_toggle_button_set_active(button, cfg.shuffle); | |
220 } | |
221 | |
222 void | |
223 on_newui_shuffle_cb_toggled(GtkToggleButton *button, gpointer data) | |
224 { | |
225 cfg.shuffle = gtk_toggle_button_get_active(button); | |
226 mainwin_shuffle_pushed(cfg.shuffle); | |
227 } |