Add application icon.
This commit is contained in:
@@ -1,25 +1,15 @@
|
||||
import sys
|
||||
try:
|
||||
import gi
|
||||
gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk, GObject, Pango, GdkPixbuf
|
||||
except ImportError as ex:
|
||||
print("Couldn't import GTK dependencies. Make sure you "
|
||||
"installed the PyGTK package and %s module." % ex.name)
|
||||
sys.exit(-1)
|
||||
|
||||
import gi
|
||||
import os
|
||||
import copy
|
||||
import re
|
||||
import mtgsdk
|
||||
import time
|
||||
from gi.repository import Gtk, GObject, Pango
|
||||
from typing import Type, Dict, List
|
||||
|
||||
from cardvault import handlers
|
||||
from cardvault import util
|
||||
from cardvault import database
|
||||
|
||||
|
||||
gi.require_version('Gtk', '3.0')
|
||||
|
||||
|
||||
class Application:
|
||||
@@ -131,8 +121,8 @@ class Application:
|
||||
text_label.set_line_wrap(True)
|
||||
text_label.set_halign(Gtk.Align.END)
|
||||
color = self.config['legality_colors'][legality["legality"]]
|
||||
date_label.set_markup("<span fgcolor=\""+color+"\">" + legality["format"] + ":" + "</span>")
|
||||
text_label.set_markup("<span fgcolor=\""+color+"\">" + legality["legality"] + "</span>")
|
||||
date_label.set_markup("<span fgcolor=\"" + color + "\">" + legality["format"] + ":" + "</span>")
|
||||
text_label.set_markup("<span fgcolor=\"" + color + "\">" + legality["legality"] + "</span>")
|
||||
grid.attach(date_label, 0, rows + 2, 1, 1)
|
||||
grid.attach(text_label, 1, rows + 2, 1, 1)
|
||||
|
||||
@@ -225,7 +215,7 @@ class Application:
|
||||
self.tags = self.db.tag_get_all()
|
||||
self.wants = self.db.wants_get_all()
|
||||
end = time.time()
|
||||
util.log("Finished in {}s".format(str(round(end-start, 3))), util.LogLevel.Info)
|
||||
util.log("Finished in {}s".format(str(round(end - start, 3))), util.LogLevel.Info)
|
||||
self.push_status("All data loaded.")
|
||||
|
||||
def set_online(self, status: bool):
|
||||
@@ -398,7 +388,7 @@ class Application:
|
||||
util.log("Done", util.LogLevel.Info)
|
||||
|
||||
def get_all_sets(self) -> dict:
|
||||
if not self.is_online ():
|
||||
if not self.is_online():
|
||||
l = self.db.set_get_all()
|
||||
out = {}
|
||||
for s in l:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<property name="title" translatable="yes">Card Vault</property>
|
||||
<property name="default_width">900</property>
|
||||
<property name="default_height">700</property>
|
||||
<property name="icon_name">application-x-executable</property>
|
||||
<property name="icon">../resources/cardvault.png</property>
|
||||
<signal name="delete-event" handler="do_delete_event" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
|
||||
@@ -12,9 +12,9 @@ from gi.repository import Gtk, GObject
|
||||
from cardvault import util, application
|
||||
from mtgsdk import Card, MtgException
|
||||
|
||||
from search import SearchHandlers
|
||||
from library import LibraryHandlers
|
||||
from wants import WantsHandlers
|
||||
from cardvault.search import SearchHandlers
|
||||
from cardvault.library import LibraryHandlers
|
||||
from cardvault.wants import WantsHandlers
|
||||
|
||||
|
||||
class Handlers(SearchHandlers, LibraryHandlers, WantsHandlers):
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Version=0.5
|
||||
Type=Application
|
||||
Name=Card Vault
|
||||
Comment=Oraganize and plan your MTG card collection
|
||||
Comment=Organize and plan your MTG card collection
|
||||
TryExec=cardvault
|
||||
Exec=cardvault %F
|
||||
Icon=application-x-executable
|
||||
Exec=cardvault
|
||||
Icon=cardvault
|
||||
|
||||
BIN
cardvault/resources/cardvault.png
Normal file
BIN
cardvault/resources/cardvault.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -1,15 +1,10 @@
|
||||
import gi
|
||||
import time
|
||||
gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk
|
||||
from urllib.error import URLError, HTTPError
|
||||
|
||||
import time
|
||||
|
||||
from mtgsdk import Card
|
||||
|
||||
from cardvault import application
|
||||
from cardvault import cardlist
|
||||
from cardvault import util
|
||||
from cardvault import application, cardlist, util
|
||||
|
||||
|
||||
class SearchHandlers:
|
||||
|
||||
2
setup.py
2
setup.py
@@ -15,7 +15,7 @@ setup(
|
||||
package_data={'cardvault': ['resources/images/*', 'resources/mana/*', 'gui/*']},
|
||||
|
||||
data_files=[
|
||||
#('share/icons/hicolor/scalable/apps', ['data/mypackage.svg']),
|
||||
('share/icons/hicolor/scalable/apps', ['cardvault/resources/cardvault.png']),
|
||||
('share/applications', ['cardvault/resources/cardvault.desktop'])],
|
||||
|
||||
author='luxick',
|
||||
|
||||
Reference in New Issue
Block a user