/usr/share/griffith/lib/view.py is in griffith 0.13+20140313-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 | # -*- coding: UTF-8 -*-
__revision__ = '$Id$'
# Copyright (c) 2005-2009 Vasco Nunes, Piotr Ożarowski
#
# 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 of the License, 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 Library 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
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# You may use and distribute this software under the terms of the
# GNU General Public License, version 2 or later
# TODO: rewrite it using advfilter (see get_def_conditions)
def filter_not_seen(self):
self.populate_treeview()
self.update_statusbar(_("Filter activated. Showing only not seen movies."))
if self.mac:
self.macapp.sync_menubar()
def filter_loaned(self):
self.populate_treeview()
self.update_statusbar(_("Filter activated. Showing only loaned movies."))
if self.mac:
self.macapp.sync_menubar()
def filter_all(self):
self.populate_treeview()
def filter_by_volume(self, volume_id):
from quick_filter import clear_filter
clear_filter(self, populate=False)
self.populate_treeview(where={'volume_id':volume_id})
volume_name = self.db.Volume.query.filter_by(volume_id=volume_id).one().name
self.update_statusbar(_("Filter activated. Showing only movies from volume: %s")%volume_name)
def filter_by_collection(self, collection_id):
from quick_filter import clear_filter
clear_filter(self, populate=False)
self.populate_treeview(where={'collection_id':collection_id})
collection_name = self.db.Collection.query.filter_by(collection_id=collection_id).one().name
self.update_statusbar(_("Filter activated. Showing only movies from collection: %s")%collection_name)
|