~ubuntu-branches/debian/squeeze/pyrenamer/squeeze

« back to all changes in this revision

Viewing changes to src/pyrenamer_tooltips.py

  • Committer: Bazaar Package Importer
  • Author(s): Adolfo González Blázquez
  • Date: 2008-09-17 14:22:21 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080917142221-pa4xq3sowwkv0moo
Tags: 0.6.0-1
* New upstream release:
  - Fix crash when a id3 tag is not available or wrong, returning an
    empty filename (LP: #235161)
  - Fix crash while processing some bad exif tags, catching possible
    exceptions (LP: #261832)
  - Fix crash while starting, fixing src/treefilebrowser.py (LP: #237482)
* debian/control:
  - Build-Depends-Indep: removed 'python-eyed3'
  - Depends: changed 'python-eyed3' to 'python-hachoir-metadata|python-eyed3'
  - Bump up Standards-Version to 3.8.0
  - Descrition: changed 'Mass' to 'mass'
* debian/copyright: updated copyright year
* debian/watch: updated
* debian/pyrenamer.xpm: new icon file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
 
 
3
"""
 
4
Copyright (C) 2006-2008 Adolfo González Blázquez <code@infinicode.org>
 
5
 
 
6
This program is free software; you can redistribute it and/or
 
7
modify it under the terms of the GNU General Public License as
 
8
published by the Free Software Foundation; either version 2
 
9
of the License, or (at your option) any later version. 
 
10
 
 
11
This program is distributed in the hope that it will be useful,
 
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
14
GNU General Public License for more details. 
 
15
 
 
16
You should have received a copy of the GNU General Public License
 
17
along with this program; if not, write to the Free Software
 
18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
19
 
 
20
If you find any bugs or have any suggestions email: code@infinicode.org
 
21
"""
 
22
 
 
23
import TreeViewTooltips as tvt
 
24
from gettext import gettext as _
 
25
 
 
26
class ToolTips(tvt.TreeViewTooltips):
 
27
 
 
28
    def __init__(self,column):
 
29
        self.column = column
 
30
        tvt.TreeViewTooltips.__init__(self)
 
31
 
 
32
 
 
33
    def get_tooltip(self, view, column, path):
 
34
 
 
35
        model = view.get_model()
 
36
        oldpath = model[path][1]
 
37
        newpath = model[path][3]
 
38
        if newpath != None:
 
39
                return _("<b>Original: </b> %s\n<b>Renamed: </b> %s") % (oldpath, newpath)
 
40
        else:
 
41
                return _("<b>Original: </b> %s") % oldpath
 
42
                
 
43
        """if column is self.column:
 
44
            filepath = model[path][3]
 
45
            return '<b>New filename: </b> %s' % filepath
 
46
        else:
 
47
            filepath = model[path][1]
 
48
            return '<b>Original filename: </b> %s' % filepath"""