~gilir/menulibre/gi-repository-fix

« back to all changes in this revision

Viewing changes to menulibre_lib/Applications.py

  • Committer: Sean Davis
  • Date: 2013-01-25 03:28:12 UTC
  • Revision ID: smd.seandavis@gmail.com-20130125032812-piqe0dbjo0jfoni1
Cleanup and regression fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
[Desktop Entry]
25
25
Version=1.0
26
26
Type=Application
27
 
Name=New Application
28
 
Comment=My New Application
29
 
Icon=
 
27
Name=New Menu Item
 
28
Comment=A small descriptive blurb about this application.
 
29
Icon=application-default-icon
30
30
Exec=
31
31
Path=
32
32
Terminal=false
49
49
    def new(self, filename):
50
50
                """Create a new application instance for a non-existing file."""
51
51
        self.filename = filename
52
 
        self.icon = 'gtk-missing-image'
53
 
        self.name = 'New Application'
54
 
        self.comment = 'My New Application'
 
52
        self.icon = 'application-default-icon'
 
53
        self.name = 'New Menu Item'
 
54
        self.comment = 'A small descriptive blurb about this application.'
55
55
        self.genericname = ''
56
56
        self.command = ''
57
57
        self.executable = ''
58
58
        self.path = ''
59
59
        self.terminal = False
 
60
        self.hidden = False
 
61
        self.quicklist_format = ""
60
62
        self.startupnotify = False
61
63
        self.categories = []
62
64
        self.actions = None
306
308
            pass
307
309
    # Check for uncategorized WINE applications...
308
310
    if len(settings['categories']) == 0:
309
 
        if 'wine' in os.path.split(settings['filename'])[0]:
 
311
        if 'wine' in settings['filename'].lower():
310
312
            settings['categories'].append('Wine')
311
313
    return settings