diff options
author | Michael Mair-Keimberger (asterix) <m.mairkeimberger@gmail.com> | 2016-07-08 15:19:24 +0200 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2016-08-11 10:07:58 +0200 |
commit | e8d256efab42553bd7165b37e691776842f2c67d (patch) | |
tree | 0b0888da30de20e71f59f2d3108af7511539228f | |
parent | app-misc/symlinks: remove unused patch (diff) | |
download | gentoo-e8d256efab42553bd7165b37e691776842f2c67d.tar.gz gentoo-e8d256efab42553bd7165b37e691776842f2c67d.tar.bz2 gentoo-e8d256efab42553bd7165b37e691776842f2c67d.zip |
app-misc/xmind: remove unused files
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
-rw-r--r-- | app-misc/xmind/files/x-xmind.xml | 10 | ||||
-rw-r--r-- | app-misc/xmind/files/xmind-thumbnailer | 78 | ||||
-rw-r--r-- | app-misc/xmind/files/xmind.schemas | 30 |
3 files changed, 0 insertions, 118 deletions
diff --git a/app-misc/xmind/files/x-xmind.xml b/app-misc/xmind/files/x-xmind.xml deleted file mode 100644 index 57292e9c689b..000000000000 --- a/app-misc/xmind/files/x-xmind.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> - <mime-type type="application/x-xmind"> - <sub-class-of type="application/zip"/> - <comment>XMind Workbook</comment> - <alias type="application/vnd.xmind.workbook"/> - <generic-icon name="package-x-generic"/> - <glob pattern="*.xmind"/> - </mime-type> -</mime-info> diff --git a/app-misc/xmind/files/xmind-thumbnailer b/app-misc/xmind/files/xmind-thumbnailer deleted file mode 100644 index 48eb89b8cd9a..000000000000 --- a/app-misc/xmind/files/xmind-thumbnailer +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python - -import gnomevfs -import os -import sys -import zipfile -from PIL import Image, ImageEnhance - -# Alter these varibles to change thumbnail look -ICON_PATH = "/usr/share/icons/hicolor/32x32/apps/xmind.png" # Change this path to alter icons -ICON_OPACITY = 0.6 #Opacity of the icon (between 0.0 and 1.0) -THUMBNAIL_BACKGROUND_COLOR = "white" # Color of the background - -in_file_path = gnomevfs.get_local_path_from_uri(sys.argv[1]) -out_file_path = sys.argv[2] -path_without_thumbs = os.getenv("HOME")+"/Templates" - -def get_icon(thumbnail_size): - #Load icon - icon = Image.open(ICON_PATH).convert("RGBA") - #Set it's opacity - icon = set_icon_opacity(icon,ICON_OPACITY) - #And set it's position in thumbnail - icon_posx=thumbnail_size[0]-icon.size[0] - icon_posy=thumbnail_size[1]-icon.size[1] - icon_width=thumbnail_size[0] - icon_height=thumbnail_size[1] - return {"image":icon,"position":(icon_posx,icon_posy,icon_width,icon_height)} - -def get_basic_thumbnail(): - #Find out if the file is not in Templates directory - if in_file_path.find(path_without_thumbs)!=0: - try: - #Extract thumbnail from Xmind file and save it - zip=zipfile.ZipFile(in_file_path,mode="r") - picture=zip.read("Thumbnails/thumbnail.jpg") - zip.close() - thumbnail=open(out_file_path,"w") - thumbnail.write(picture) - thumbnail.write("/n") - thumbnail.close() - #Open saved thumbnail - image=Image.open(out_file_path).convert("RGBA") - if image.size[0]>200: - image = image.resize((200,image.size[1]*200/image.size[0])) - if image.size[1]>200: - image = image.resize((image.size[0]*200/image.size[1],200)) - return {"suceeded":True,"image":image,"size":(image.size[0],image.size[1])} - - except: - return {"suceeded":False} - else: - return {"suceeded":False} - -# Nicked from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362879 -def set_icon_opacity(icon,opacity): - #Returns an image with reduced opacity. - assert opacity >= 0 and opacity <= 1 - if icon.mode != 'RGBA': - icon = icon.convert('RGBA') - else: - icon = icon.copy() - alpha = icon.split()[3] - alpha = ImageEnhance.Brightness(alpha).enhance(opacity) - icon.putalpha(alpha) - return icon - -thumbnail=get_basic_thumbnail() -if thumbnail["suceeded"]: - background=Image.new("RGB", thumbnail["size"], THUMBNAIL_BACKGROUND_COLOR) - icon=get_icon(thumbnail["size"]) - thumbnail=thumbnail["image"] - # Add thumbnail - background.paste(thumbnail, None, thumbnail) - # Add icon - background.paste(icon["image"],icon["position"],icon["image"]) - # Save thumbnail - background.save(out_file_path,"PNG") diff --git a/app-misc/xmind/files/xmind.schemas b/app-misc/xmind/files/xmind.schemas deleted file mode 100644 index 336b09ecd837..000000000000 --- a/app-misc/xmind/files/xmind.schemas +++ /dev/null @@ -1,30 +0,0 @@ -<gconfschemafile> - <schemalist> - - <schema> - <key>/schemas/desktop/gnome/thumbnailers/application@x-xmind/enable</key> - <applyto>/desktop/gnome/thumbnailers/application@x-xmind/enable</applyto> - <owner>xmind-thumb</owner> - <type>bool</type> - <default>true</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - - <schema> - <key>/schemas/desktop/gnome/thumbnailers/application@x-xmind/command</key> - <applyto>/desktop/gnome/thumbnailers/application@x-xmind/command</applyto> - <owner>xmind-thumb</owner> - <type>string</type> - <default>/usr/bin/xmind-thumbnailer %u %o</default> - <locale name="C"> - <short></short> - <long></long> - </locale> - </schema> - - </schemalist> -</gconfschemafile> |