This file is indexed.

/usr/lib/exaile/xlgui/preferences/collection.py is in exaile 3.4.0.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Copyright (C) 2010 Adam Olsen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

import gtk

from xl import xdg
from xl.nls import gettext as _
from xlgui.preferences import widgets

name = _('Collection')
icon = 'folder-music'
ui = xdg.get_data_path('ui', 'preferences', 'collection.ui')

def _get_default_strip_list():
    return [] # currently, this is broken by the backend not also having access to the default set here, so we will just NOT set one. FIXME
    #TRANSLATORS: Grammatical articles that are ignored while sorting the
    #collection panel. For example, in French locales this could be
    #the space-separated list "l' la le les".
    #If this practice is not common in your locale, simply
    #translate this to an empty string.
    default_strip_list = _("the")
    return [v.lower() for v in default_strip_list.split(' ') if v is not '']

class CollectionStripArtistPreference(widgets.ListPreference):
    default = _get_default_strip_list()
    name = 'collection/strip_list'

    def __init__(self, preferences, widget):
        widgets.ListPreference.__init__(self, preferences, widget)
        self.widget.connect('populate-popup', self._populate_popup_cb)

    def _get_value(self):
        """
            Get the value, overrides the base class function
            because we don't need shlex parsing. We actually
            want values like "l'" here.
        """
        values = [v.lower() for v in self.widget.get_text().split(' ') if v is not '']
        return values

    def _populate_popup_cb(self, entry, menu):
        import gtk
        entry = gtk.MenuItem(_('Reset to Defaults'))
        entry.connect('activate', self._reset_to_defaults_cb)
        entry.show()

        sep = gtk.SeparatorMenuItem()
        sep.show()

        menu.attach(entry, 0, 1, 0, 1)
        menu.attach(sep, 0, 1, 1, 2)

    def _reset_to_defaults_cb(self, item):
        self.widget.set_text(' '.join(_get_default_strip_list()))

class FileBasedCompilationsPreference(widgets.CheckPreference):
    default = True
    name = 'collection/file_based_compilations'

# vim:ts=4 et sw=4