~ken-vandine/unity-lens-video/packaging_tweaks

« back to all changes in this revision

Viewing changes to src/unity-lens-video

  • Committer: David Callé
  • Date: 2012-02-13 09:15:48 UTC
  • Revision ID: davidc@framli.eu-20120213091548-u49bxyt1ddknl0j7
* Doc fixes
* Copyright fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /usr/bin/python
 
2
# -*- coding: utf-8 -*-
2
3
 
3
4
#    Copyright (c) 2011 David Calle <davidc@framli.eu>
4
5
 
15
16
#    You should have received a copy of the GNU General Public License
16
17
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18
 
18
 
"""The unity video lens."""
 
19
"""The unity video lens. Indexing videos in ~/Videos and generating thumbnails if needed."""
19
20
 
20
21
import gettext
21
22
import locale
89
90
# pylint: disable=R0903
90
91
class Daemon:
91
92
    
92
 
    """David: Insert proper docstring here."""
 
93
    """Creation of a lens with a local scope."""
93
94
 
94
95
    def __init__(self):
95
96
        
126
127
        self._scope.connect("filters-changed",self.on_filtering_changed)
127
128
        self._scope.props.sources.connect("notify::filtering",
128
129
            self.on_filtering_changed)
129
 
#        self._scope.export()
130
 
        
131
130
        self._lens.add_local_scope(self._scope)
132
131
        self._lens.export()
133
132
        
145
144
            return False
146
145
 
147
146
    def on_search_changed(self, scope, search, search_type, _):
148
 
        """FIXME: Add docstring."""
 
147
        """On a new search, differentiate between lens view 
 
148
        and global search before updating the model"""
149
149
        search_string = search.props.search_string.strip()
150
150
        print "Search changed to \"%s\"" % search_string
151
151
        model = search.props.results_model
180
180
                title, comment, dnd_uri)
181
181
 
182
182
    def videolocal(self, search):
183
 
        """FIXME: Add docstring."""
 
183
        """Using locate to search the video db, then applying some methods
 
184
        to get the informations we need."""
184
185
        result_list = []
185
186
        try:
186
187
            results = subprocess.check_output(