This file is indexed.

/usr/share/pyshared/tryton/gui/window/limit.py is in tryton-client 2.2.1-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
#This file is part of Tryton.  The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
import sys
import gtk
import gettext
from tryton.config import TRYTON_ICON, CONFIG
from tryton.common import get_toplevel_window

_ = gettext.gettext


class Limit(object):
    'Set Search Limit'

    def __init__(self):
        self.parent = get_toplevel_window()
        self.win = gtk.Dialog(_('Limit'), self.parent,
                gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT,
                (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
                    gtk.STOCK_OK, gtk.RESPONSE_OK))
        self.win.set_default_response(gtk.RESPONSE_OK)
        self.win.set_icon(TRYTON_ICON)
        self.win.set_has_separator(True)
        self.win.vbox.set_spacing(3)
        self.win.vbox.pack_start(gtk.Label(
            _('Search Limit Settings')), expand=False, fill=True)
        self.win.vbox.pack_start(gtk.HSeparator())
        hbox = gtk.HBox(spacing=3)
        hbox.pack_start(gtk.Label(_('Limit:')), expand=True, fill=True)
        self.spin_limit = gtk.SpinButton(climb_rate=1, digits=0)
        self.spin_limit.set_numeric(False)
        self.spin_limit.set_adjustment(gtk.Adjustment(value=CONFIG['client.limit'],
            lower=1, upper=sys.maxint, step_incr=10, page_incr=100))
        hbox.pack_start(self.spin_limit, expand=True, fill=True)
        self.win.vbox.pack_start(hbox, expand=True, fill=True)

        self.win.show_all()

    def run(self):
        'Run the window'
        res = self.win.run()
        if res == gtk.RESPONSE_OK:
            CONFIG['client.limit'] = self.spin_limit.get_value()
            CONFIG.save()
        self.parent.present()
        self.win.destroy()
        return res