summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--callbacks.c1
-rw-r--r--gtkplaylist.c5
2 files changed, 3 insertions, 3 deletions
diff --git a/callbacks.c b/callbacks.c
index b7a21be2..1d689564 100644
--- a/callbacks.c
+++ b/callbacks.c
@@ -268,6 +268,7 @@ void
on_pausebtn_clicked (GtkButton *button,
gpointer user_data)
{
+ messagepump_push (M_PAUSESONG, 0, 0, 0);
}
diff --git a/gtkplaylist.c b/gtkplaylist.c
index 0010ad21..e7190d82 100644
--- a/gtkplaylist.c
+++ b/gtkplaylist.c
@@ -411,6 +411,7 @@ gtkps_update_songinfo (void) {
if (!mainwin) {
return;
}
+ GDK_THREADS_ENTER();
songupd_timelapse -= 1;
// FIXME: don't update if window is not visible
if (songupd_timelapse < 0) {
@@ -430,23 +431,21 @@ gtkps_update_songinfo (void) {
int mindur = c->info.duration / 60;
int secdur = c->info.duration - mindur * 60;
- GDK_THREADS_ENTER();
char str[1024];
snprintf (str, 1024, "Samplerate: %d | Bits per sample: %d | %s | Position %d:%02d | Duration %d:%02d", c->info.samplesPerSecond, c->info.bitsPerSample, c->info.channels == 1 ? "Mono" : "Stereo", minpos, secpos, mindur, secdur);
gtk_statusbar_pop (sb, sb_context_id);
gtk_statusbar_push (sb, sb_context_id, str);
-// printf ("songinfo: %d %d %s %d:%02d (%d:%02d)\n", c->info.samplesPerSecond, c->info.bitsPerSample, c->info.channels == 1 ? "Mono" : "Stereo", minpos, secpos, mindur, secdur);
extern int g_disable_seekbar_handler;
g_disable_seekbar_handler = 1;
GtkRange *seekbar = GTK_RANGE (lookup_widget (mainwin, "playpos"));
gtk_range_set_value (seekbar, c->info.position * 1000 / c->info.duration);
g_disable_seekbar_handler = 0;
- GDK_THREADS_LEAVE();
}
else {
gtk_statusbar_pop (sb, sb_context_id);
gtk_statusbar_push (sb, sb_context_id, "Stopped");
}
}
+ GDK_THREADS_LEAVE();
}