1# Copyright (C) 2011 Dustin Spicuzza
2#
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 2, or (at your option)
6# any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
16#
17#
18# The developers of the Exaile media player hereby grant permission
19# for non-GPL compatible GStreamer and Exaile plugins to be used and
20# distributed together with GStreamer and Exaile. This permission is
21# above and beyond the permissions granted by the GPL license by which
22# Exaile is covered. If you modify this code, you may extend this
23# exception to your version of the code, but you are not obligated to
24# do so. If you do not wish to do so, delete this exception statement
25# from your version.
26
27
28from xlgui.preferences import widgets
29
30
31from xl.nls import gettext as _
32import os
33
34name = _('History')
35basedir = os.path.dirname(os.path.realpath(__file__))
36ui = os.path.join(basedir, 'history_preferences.ui')
37icon = 'document-open-recent'
38
39
40# defaults
41save_on_exit_default = False
42history_length_default = 1000
43
44
45class SaveOnExitPreference(widgets.CheckPreference):
46    default = save_on_exit_default
47    name = 'plugin/history/save_on_exit'
48
49
50class HistoryLengthPreference(widgets.SpinPreference):
51    default = history_length_default
52    name = 'plugin/history/history_length'
53