public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-misc/xmind/files/
@ 2016-08-11  8:09 Patrice Clement
  0 siblings, 0 replies; only message in thread
From: Patrice Clement @ 2016-08-11  8:09 UTC (permalink / raw
  To: gentoo-commits

commit:     e8d256efab42553bd7165b37e691776842f2c67d
Author:     Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Fri Jul  8 13:19:24 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Thu Aug 11 08:07:58 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8d256ef

app-misc/xmind: remove unused files

Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 app-misc/xmind/files/x-xmind.xml       | 10 -----
 app-misc/xmind/files/xmind-thumbnailer | 78 ----------------------------------
 app-misc/xmind/files/xmind.schemas     | 30 -------------
 3 files changed, 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 57292e9..0000000
--- 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 48eb89b..0000000
--- 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 336b09e..0000000
--- 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>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-11  8:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-11  8:09 [gentoo-commits] repo/gentoo:master commit in: app-misc/xmind/files/ Patrice Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox