View file File name : DesktopEntry.cpython-36.pyc Content :3 �N�P�A � @ sT d Z ddlmZmZ ddlZddlmZ ddlZ ddl Z ddlZG dd� de�ZdS )a= Complete implementation of the XDG Desktop Entry Specification Version 0.9.4 http://standards.freedesktop.org/desktop-entry-spec/ Not supported: - Encoding: Legacy Mixed - Does not check exec parameters - Does not check URL's - Does not completly validate deprecated/kde items - Does not completly check categories � )�IniFile�is_asciiN)�ParsingErrorc @ s� e Zd ZdZdZdpdd�Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Zd.d/� Zd0d1� Zd2d3� Zd4d5� Zd6d7� Zd8d9� Zd:d;� Z d<d=� Z!d>d?� Z"d@dA� Z#dBdC� Z$dDdE� Z%dFdG� Z&dHdI� Z'dJdK� Z(dLdM� Z)dNdO� Z*dPdQ� Z+dRdS� Z,dTdU� Z-dVdW� Z.dXdY� Z/dZd[� Z0d\d]� Z1d^d_� Z2d`da� Z3dbdc� Z4ddde� Z5dfdg� Z6dhdi� Z7djdk� Z8dldm� Z9dndo� Z:dS )q�DesktopEntryz+Class to parse and validate Desktop Entriesz Desktop EntryNc C s6 t � | _|r$tjj|�r$| j|� n|r2| j|� dS )z�Create a new DesktopEntry If filename exists, it will be parsed as a desktop entry file. If not, or if filename is None, a blank DesktopEntry is created. N)�dict�content�os�path�exists�parse�new)�self�filename� r �"/usr/lib/python3.6/DesktopEntry.py�__init__ s zDesktopEntry.__init__c C s | j � S )N)�getName)r r r r �__str__% s zDesktopEntry.__str__c C s t j| |ddg� dS )zParse a desktop entry file.z Desktop EntryzKDE Desktop EntryN)r r )r �filer r r r ( s zDesktopEntry.parsec C s | j d�S )N�Type)�get)r r r r �getType- s zDesktopEntry.getTypec C s | j ddd�S )z)deprecated, use getVersionString instead �Version�numeric)�type)r )r r r r � getVersion/ s zDesktopEntry.getVersionc C s | j d�S )Nr )r )r r r r �getVersionString2 s zDesktopEntry.getVersionStringc C s | j ddd�S )N�NameT)�locale)r )r r r r r 4 s zDesktopEntry.getNamec C s | j ddd�S )NZGenericNameT)r )r )r r r r �getGenericName6 s zDesktopEntry.getGenericNamec C s | j ddd�S )N� NoDisplay�boolean)r )r )r r r r �getNoDisplay8 s zDesktopEntry.getNoDisplayc C s | j ddd�S )N�CommentT)r )r )r r r r � getComment: s zDesktopEntry.getCommentc C s | j ddd�S )NZIconT)r )r )r r r r �getIcon<