~ubuntu-branches/debian/jessie/phatch/jessie

« back to all changes in this revision

Viewing changes to phatch/lib/linux/desktop.py

  • Committer: Bazaar Package Importer
  • Author(s): Stani M
  • Date: 2009-10-11 19:07:45 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20091011190745-jofr6ykc17mentlf
Tags: 0.2.3-1
Upstream bugfix release (Closes LP: #448845, #446725, #445943)

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
11
# GNU General Public License for more details.
12
 
 
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program.  If not, see http://www.gnu.org/licenses/
15
15
 
16
16
import os
17
17
 
18
18
DROPLET = \
19
 
"""[Desktop Entry]
 
19
"""#!/usr/bin/env xdg-open
 
20
[Desktop Entry]
20
21
Version=1.0
 
22
Type=Application
21
23
Name=%(name)s
22
 
Type=Application
23
24
Terminal=false
24
25
Exec=%(command)s
25
26
Icon=%(icon)s"""
31
32
    droplet     = open(filename,'w')
32
33
    droplet.write(DROPLET%data)
33
34
    droplet.close()
 
35
    os.chmod(filename, 0755)