~ubuntu-branches/ubuntu/saucy/geis/saucy-proposed

« back to all changes in this revision

Viewing changes to .pc/python-fix-print-syntax.patch/tools/geisview/filter_list.py

  • Committer: Package Import Robot
  • Author(s): Luke Yelavich
  • Date: 2012-11-14 14:52:22 UTC
  • Revision ID: package-import@ubuntu.com-20121114145222-c3z09cyxbip191kf
Tags: 2.2.14-0ubuntu2
Fix python print syntax. (LP: #1077419)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# @file geisview/filter_list.py
 
3
# @brief A geisview filter list dialog
 
4
#
 
5
# Copyright (C) 2011 Canonical Ltd
 
6
#
 
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.
 
11
#
 
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.
 
16
#
 
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/>.
 
19
#
 
20
 
 
21
from __future__ import print_function, absolute_import, unicode_literals
 
22
 
 
23
import geisview.defaults
 
24
import geisview.filter_definition
 
25
import os
 
26
import pygtk
 
27
pygtk.require("2.0")
 
28
import gtk
 
29
 
 
30
class FilterList(object):
 
31
 
 
32
    def __init__(self):
 
33
        self._builder = gtk.Builder()
 
34
        self._builder.add_from_file(os.path.join(geisview.defaults.ui_dir,
 
35
                                           "filter_list.ui"))
 
36
        self._builder.connect_signals(self)
 
37
 
 
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")
 
42
 
 
43
        self._dialog.show_all()
 
44
     
 
45
    def run(self):
 
46
        print "FilterList.run() begins"
 
47
        response = self._dialog.run()
 
48
        self._dialog.destroy()
 
49
        print "FilterList.run() ends, response=%s" % response
 
50
 
 
51
    def on_add_filter(self, widget, data=None):
 
52
        print "FilterList.on_add_filter()"
 
53
        dlg = geisview.filter_definition.FilterDefinition()
 
54
        dlg.run()
 
55
 
 
56
    def on_edit_filter(self, widget, data=None):
 
57
        print "FilterList.on_edit_filter()"
 
58
 
 
59
    def on_remove_filter(self, widget, data=None):
 
60
        print "FilterList.on_remove_filter()"
 
61