only need to set the default window icon once
This commit is contained in:
parent
c328d6f6c6
commit
26dd3a2ca8
|
@ -44,5 +44,13 @@ def error_dialog(title, text):
|
|||
m.destroy()
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
from . import status_icon
|
||||
from . import notify, main_window
|
||||
|
||||
|
||||
from . import icons
|
||||
Gtk.Window.set_default_icon_from_file(icons.icon_file(main_window.NAME.lower()))
|
||||
|
|
|
@ -6,7 +6,6 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
|||
from gi.repository import Gtk
|
||||
|
||||
from solaar import __version__, NAME
|
||||
from . import icons as _icons
|
||||
|
||||
|
||||
_dialog = None
|
||||
|
@ -15,12 +14,6 @@ _dialog = None
|
|||
def _create():
|
||||
about = Gtk.AboutDialog()
|
||||
|
||||
icon_file = _icons.icon_file(NAME.lower())
|
||||
if icon_file:
|
||||
about.set_icon_from_file(icon_file)
|
||||
else:
|
||||
about.set_icon_name(NAME.lower())
|
||||
|
||||
about.set_program_name(NAME)
|
||||
about.set_version(__version__)
|
||||
about.set_comments('Shows status of devices connected\nto a Logitech Unifying Receiver.')
|
||||
|
|
|
@ -304,16 +304,11 @@ def _show(w, trigger=None):
|
|||
# all created windows will be placed here, keyed by the receiver path
|
||||
_windows = {}
|
||||
|
||||
|
||||
def _create(receiver):
|
||||
window = Gtk.Window()
|
||||
|
||||
window.set_title(NAME + ': ' + receiver.name)
|
||||
icon_file = _icons.icon_file(NAME.lower())
|
||||
if icon_file:
|
||||
window.set_icon_from_file(icon_file)
|
||||
else:
|
||||
window.set_icon_name(NAME.lower())
|
||||
|
||||
window.set_role('status-window')
|
||||
window.set_type_hint(Gdk.WindowTypeHint.UTILITY)
|
||||
|
||||
|
|
Loading…
Reference in New Issue