typographical fixes

This commit is contained in:
Martin Wagner 2021-08-05 17:18:55 +02:00
parent 5619142e58
commit 47b16118c2

View File

@ -452,7 +452,7 @@ class Duration():
def __str__(self):
if self._fallback:
return ""
return ""
else:
delta=datetime.timedelta(seconds=int(self._value))
if delta.days > 0:
@ -3313,7 +3313,7 @@ class SeekBar(Gtk.Box):
if self._update:
self._scale.set_value(elapsed)
self._elapsed.set_text(str(Duration(elapsed)))
self._rest.set_text(f"-{Duration(duration-elapsed)}")
self._rest.set_text(f"{Duration(duration-elapsed)}")
self._scale.set_fill_level(elapsed)
else:
self._disable()
@ -3323,8 +3323,8 @@ class SeekBar(Gtk.Box):
self.set_sensitive(False)
self._scale.set_fill_level(0)
self._scale.set_range(0, 0)
self._elapsed.set_text("")
self._rest.set_text("")
self._elapsed.set_text("")
self._rest.set_text("")
def _on_scale_button_press_event(self, widget, event):
if event.button == 1 and event.type == Gdk.EventType.BUTTON_PRESS:
@ -3415,7 +3415,7 @@ class AudioFormat(Gtk.Box):
def _on_bitrate(self, emitter, brate):
# handle unknown bitrates: https://github.com/MusicPlayerDaemon/MPD/issues/428#issuecomment-442430365
if brate is None:
self._brate_label.set_text("")
self._brate_label.set_text("")
else:
self._brate_label.set_text(brate)
@ -3423,11 +3423,11 @@ class AudioFormat(Gtk.Box):
current_song=self._client.currentsong()
if current_song:
file_type=current_song["file"].split(".")[-1].split("/")[0].upper()
self._separator_label.set_text(" kb/s • ")
self._separator_label.set_text(" kbs • ")
self._file_type_label.set_text(file_type)
else:
self._file_type_label.set_text("")
self._separator_label.set_text(" kb/s")
self._separator_label.set_text(" kbs")
self._format_label.set_markup("<small> </small>")
def _on_mini_player(self, obj, typestring):
@ -3443,7 +3443,7 @@ class AudioFormat(Gtk.Box):
def _on_disconnected(self, *args):
self.set_sensitive(False)
self._brate_label.set_text("")
self._brate_label.set_text("")
self._separator_label.set_text(" kb/s")
self._file_type_label.set_text("")
self._format_label.set_markup("<small> </small>")