~idbrii/filesearch-lens/oneiric

« back to all changes in this revision

Viewing changes to unity-filesearch-daemon

  • Committer: David Briscoe
  • Date: 2012-01-15 01:23:27 UTC
  • Revision ID: pydave@gmail.com-20120115012327-r7dt6ah18frrp0qw
CATEGORY -> GROUP

Don't know why these were renamed. The API still seems to use group.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
BUS_PATH = "/net/launchpad/lenses/filesearch"
17
17
 
18
18
# These category ids must match the order in which we add them to the lens
19
 
CATEGORY_FILES = 0
20
 
CATEGORY_FOLDERS = 1
 
19
GROUP_FILES = 0
 
20
GROUP_FOLDERS = 1
21
21
 
22
22
class Daemon:
23
23
 
132
132
                model.clear ()
133
133
                for letter in search:
134
134
                        if letter.isupper ():
135
 
                                cat = CATEGORY_FOLDERS
 
135
                                group = GROUP_FOLDERS
136
136
                                icon_hint = Gio.ThemedIcon.new ("keyboard").to_string()
137
137
                        elif letter.islower ():
138
 
                                cat = CATEGORY_FILES
 
138
                                group = GROUP_FILES
139
139
                                icon_hint = Gio.ThemedIcon.new ("keyboard").to_string()
140
140
                        else:
141
141
                                # We ignore unknown characters
144
144
                        uri = "http://en.wikipedia.org/wiki/%s" % letter
145
145
                        model.append (uri,                                         # uri
146
146
                                      icon_hint,                                   # string formatted GIcon
147
 
                                      cat,                                         # numeric category id
 
147
                                      group,                                         # numeric category id
148
148
                                      "text/html",                                 # mimetype
149
149
                                      letter,                                      # display name
150
150
                                      "See Wikipedia article about '%s'" % letter, # comment