Add .desktop file to install

This commit is contained in:
luxick
2017-04-21 22:01:06 +02:00
parent ecac7b7757
commit d708a3c4f4
6 changed files with 22 additions and 6 deletions

1
.gitignore vendored
View File

@@ -90,3 +90,4 @@ ENV/
.ropeproject
.idea
install.txt

View File

@@ -49,9 +49,9 @@ class Handlers:
"Importing a library will override your current library. "
"Proceed?")
if override_question == Gtk.ResponseType.YES:
(library, tags) = util.import_library(dialog.get_filename())
self.app.library = library
self.app.tags = tags
imports = util.import_library(dialog.get_filename())
self.app.library = imports[0]
self.app.tags = imports[1]
# Cause current page to reload with imported data
self.app.current_page.emit('show')
self.app.unsaved_changes = True

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
Version=0.5
Type=Application
Name=Card Vault
Comment=Oraganize and plan your MTG card collection
TryExec=cardvault
Exec=cardvault %F
Icon=application-x-executable

View File

@@ -209,7 +209,8 @@ def import_library(path):
tags = imported["tags"]
except KeyError as err:
log("Invalid library format " + str(err), LogLevel.Error)
return
library = {}
tags = {}
log("Library imported", LogLevel.Info)
return (library, tags)

3
setup.cfg Normal file
View File

@@ -0,0 +1,3 @@
[install]
single-version-externally-managed=1
record=install.txt

View File

@@ -12,9 +12,12 @@ setup(
version=util.VERSION,
packages=find_packages(),
# install_requires=['pygobject'],
package_data={'cardvault': ['resources/images/*', 'resources/mana/*', 'gui/*']},
data_files=[
#('share/icons/hicolor/scalable/apps', ['data/mypackage.svg']),
('share/applications', ['cardvault/resources/cardvault.desktop'])],
author='luxick',
author_email='cardvoult@luxick.de',
description='Managing MTG card libraries and decks',