Skip to content

Commit 140466c

Browse files
authored
classes.app: Set icon, desktop file (#3354)
1 parent b16508e commit 140466c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/classes/app.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
from PyQt5.QtCore import PYQT_VERSION_STR
3737
from PyQt5.QtCore import QT_VERSION_STR
3838
from PyQt5.QtCore import Qt
39-
from PyQt5.QtGui import QPalette, QColor, QFontDatabase, QFont
39+
from PyQt5.QtGui import QPalette, QColor, QFontDatabase, QFont, QIcon
4040
from PyQt5.QtWidgets import QApplication, QStyleFactory, QMessageBox
4141

4242
try:
@@ -70,6 +70,7 @@ def __init__(self, *args, mode=None):
7070
log.info('Starting new session'.center(48))
7171

7272
from classes import settings, project_data, updates, language, ui_util, logger_libopenshot
73+
from images import openshot_rc
7374
import openshot
7475

7576
# Re-route stdout and stderr to logger
@@ -106,6 +107,12 @@ def __init__(self, *args, mode=None):
106107
# Setup application
107108
self.setApplicationName('openshot')
108109
self.setApplicationVersion(info.SETUP['version'])
110+
self.setWindowIcon(QIcon(":/openshot.svg"))
111+
try:
112+
# Qt 5.7+ only
113+
self.setDesktopFile("org.openshot.OpenShot")
114+
except AttributeError:
115+
pass
109116

110117
# Init settings
111118
self.settings = settings.SettingStore()

0 commit comments

Comments
 (0)