summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/gtkui/callbacks.c5
-rw-r--r--plugins/gtkui/gtkui.c14
2 files changed, 8 insertions, 11 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c
index 902476a5..369e9749 100644
--- a/plugins/gtkui/callbacks.c
+++ b/plugins/gtkui/callbacks.c
@@ -494,8 +494,7 @@ seekbar_draw (GtkWidget *widget) {
GdkColor *clr_back = gtkui_get_back_color ();
DB_playItem_t *trk = deadbeef->streamer_get_playing_track ();
- DB_fileinfo_t *dec = deadbeef->streamer_get_current_fileinfo ();
- if (!dec || !trk || deadbeef->pl_get_item_duration (trk) < 0) {
+ if (!trk || deadbeef->pl_get_item_duration (trk) < 0) {
clearlooks_rounded_rectangle (cr, 2, widget->allocation.height/2-4, widget->allocation.width-4, 8, 4, 0xff);
// empty seekbar, just a frame
cairo_set_source_rgb (cr, clr_selection->red/65535.f, clr_selection->green/65535.f, clr_selection->blue/65535.f );
@@ -515,7 +514,7 @@ seekbar_draw (GtkWidget *widget) {
pos = x;
}
else {
- if (dec && deadbeef->pl_get_item_duration (trk) > 0) {
+ if (deadbeef->pl_get_item_duration (trk) > 0) {
pos = deadbeef->streamer_get_playpos () / deadbeef->pl_get_item_duration (trk);
pos *= widget->allocation.width;
}
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c
index 07d7d693..2848aa28 100644
--- a/plugins/gtkui/gtkui.c
+++ b/plugins/gtkui/gtkui.c
@@ -88,7 +88,6 @@ gtkpl_free (DdbListview *pl) {
colhdr_anim.timeline = 0;
}
#endif
-// g_object_unref (theme_treeview);
}
@@ -125,16 +124,15 @@ update_songinfo (gpointer ctx) {
int sectotal = ((int)pl_totaltime) % 60;
char totaltime_str[512] = "";
- if (daystotal == 0)
+ if (daystotal == 0) {
snprintf (totaltime_str, sizeof (totaltime_str), "%d:%02d:%02d", hourtotal, mintotal, sectotal);
-
- else if (daystotal == 1)
+ }
+ else if (daystotal == 1) {
snprintf (totaltime_str, sizeof (totaltime_str), "1 day %d:%02d:%02d", hourtotal, mintotal, sectotal);
-
- else
+ }
+ else {
snprintf (totaltime_str, sizeof (totaltime_str), "%d days %d:%02d:%02d", daystotal, hourtotal, mintotal, sectotal);
-
-
+ }
DB_playItem_t *track = deadbeef->streamer_get_playing_track ();
DB_fileinfo_t *c = deadbeef->streamer_get_current_fileinfo ();