~ubuntu-branches/debian/sid/djvusmooth/sid

« back to all changes in this revision

Viewing changes to lib/gui/outline_browser.py

  • Committer: Package Import Robot
  • Author(s): Daniel Stender
  • Date: 2015-09-15 15:34:11 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20150915153411-zlz201vxr4wk5d3p
Tags: 0.2.16-1
* New upstream release (Closes: #799017).
* deb/control:
  + added dh-python to build deps.
  + put python-djvu and python-wxgtk3.0 also into build-deps (needed by the
    tests).
  + dropped Depends: against python-xdg (Closes: #793364).
* deb/copyright: updated.
* deb/watch: watch pypi.debian.net.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# Copyright © 2008-2014 Jakub Wilk <jwilk@jwilk.net>
4
4
# Copyright © 2009 Mateusz Turcza <mturcza@mimuw.edu.pl>
5
5
#
6
 
# This package is free software; you can redistribute it and/or modify
7
 
# it under the terms of the GNU General Public License as published by
8
 
# the Free Software Foundation; version 2 dated June, 1991.
9
 
#
10
 
# This package is distributed in the hope that it will be useful, but
11
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
 
# General Public License for more details.
 
6
# This file is part of djvusmooth.
 
7
#
 
8
# djvusmooth is free software; you can redistribute it and/or modify it
 
9
# under the terms of the GNU General Public License version 2 as published
 
10
# by the Free Software Foundation.
 
11
#
 
12
# djvusmooth is distributed in the hope that it will be useful, but WITHOUT
 
13
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
14
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 
15
# more details.
14
16
 
15
17
import wx
16
18
 
42
44
 
43
45
class OutlineBrowser(wx.TreeCtrl):
44
46
 
45
 
    def __init__(self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.TR_HAS_BUTTONS | wx.TR_EDIT_LABELS):
 
47
    def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=(wx.TR_HAS_BUTTONS | wx.TR_EDIT_LABELS)):
46
48
        wx.TreeCtrl.__init__(self, parent, id, pos, size, style)
47
49
        self._items = {}
48
50
        self._root_item = None
101
103
            try:
102
104
                n = int(buffer(uri, 1))
103
105
            except ValueError:
104
 
                return # TODO: try to handle non-local URIs
 
106
                return  # TODO: try to handle non-local URIs
105
107
            parent = wx.GetTopLevelParent(self)
106
108
            parent.page_no = n - 1
107
109
        else:
108
 
            return # TODO: try to handle non-local URIs
 
110
            return  # TODO: try to handle non-local URIs
109
111
 
110
112
    def do_delete_node(self, node):
111
113
        try:
268
270
 
269
271
__all__ = ['OutlineBrowser']
270
272
 
271
 
# vim:ts=4 sw=4 et
 
273
# vim:ts=4 sts=4 sw=4 et