2
# @file geisview/filter_list.py
3
# @brief A geisview filter list dialog
5
# Copyright (C) 2011 Canonical Ltd
7
# This program is free software; you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
from __future__ import print_function, absolute_import, unicode_literals
23
import geisview.defaults
24
import geisview.filter_definition
30
class FilterList(object):
33
self._builder = gtk.Builder()
34
self._builder.add_from_file(os.path.join(geisview.defaults.ui_dir,
36
self._builder.connect_signals(self)
38
self._dialog = self._builder.get_object("filter_list");
39
self._name_entry = self._builder.get_object("name_entry");
40
self._facility_combo = self._builder.get_object("facility_combo");
41
self._filter_list_store = self._builder.get_object("filter_list_store")
43
self._dialog.show_all()
46
print "FilterList.run() begins"
47
response = self._dialog.run()
48
self._dialog.destroy()
49
print "FilterList.run() ends, response=%s" % response
51
def on_add_filter(self, widget, data=None):
52
print "FilterList.on_add_filter()"
53
dlg = geisview.filter_definition.FilterDefinition()
56
def on_edit_filter(self, widget, data=None):
57
print "FilterList.on_edit_filter()"
59
def on_remove_filter(self, widget, data=None):
60
print "FilterList.on_remove_filter()"