Commit 38dd53fb authored by Marinus Schraal's avatar Marinus Schraal

disclistboxwidget: Make song label length non-optional

Music had a gsettings option for the label length of individual songs,
which was a bit random.
With the rewrite of the album widgets we are more flexible and can set a
saner default, making the gsetting no longer needed.
parent e85b2cb5
......@@ -38,11 +38,6 @@
<summary>Notifications mode</summary>
<description>Enables or disables playback notifications</description>
</key>
<key type="i" name="max-width-chars">
<default>20</default>
<summary>Max chars to display in track name on Artist view</summary>
<description>This setting modifies the amount of chars for track title on Artist view before its been ellipsized. Set this to -1 to disable</description>
</key>
<key type="b" name="replaygain">
<default>false</default>
<summary>Enable ReplayGain</summary>
......
......@@ -22,27 +22,17 @@
# code, but you are not obligated to do so. If you do not wish to do so,
# delete this exception statement from your version.
import logging
from gettext import gettext as _
from gi.repository import Gdk, Gio, GObject, Gtk
from gi.repository import Gdk, GObject, Gtk
from gnomemusic import log
from gnomemusic.grilo import grilo
import gnomemusic.utils as utils
logger = logging.getLogger(__name__)
NOW_PLAYING_ICON_NAME = 'media-playback-start-symbolic'
ERROR_ICON_NAME = 'dialog-error-symbolic'
try:
settings = Gio.Settings.new('org.gnome.Music')
MAX_TITLE_WIDTH = settings.get_int('max-width-chars')
except Exception as e:
MAX_TITLE_WIDTH = 20
logger.error("Error on setting widget max-width-chars: %s", str(e))
class StarStack(Gtk.Stack):
"""Stackwidget for starring songs"""
......@@ -309,7 +299,7 @@ class DiscBox(Gtk.Box):
song_widget.title = builder.get_object('title')
song_widget.title.set_text(title)
song_widget.title.set_max_width_chars(MAX_TITLE_WIDTH)
song_widget.title.set_max_width_chars(50)
song_widget.duration = builder.get_object('duration')
time = utils.seconds_to_string(track.get_duration())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment