Add program_name to fix missing icons
By default, GTK sets the prgname to argv[0], which is then used to choose the correct .desktop file. If the program is run through a symlink, such as through `/etc/alternatives/x-terminal-emulator`, argv[0] is not `terminator` so under Wayland the desktop file is not detected, leading to a missing icon.
This commit is contained in:
parent
7b39058b0e
commit
3245d671bb
|
@ -33,7 +33,7 @@ try:
|
||||||
import gi
|
import gi
|
||||||
gi.require_version('Gtk','3.0')
|
gi.require_version('Gtk','3.0')
|
||||||
# pylint: disable-msg=W0611
|
# pylint: disable-msg=W0611
|
||||||
from gi.repository import Gtk, Gdk
|
from gi.repository import Gtk, Gdk, GLib
|
||||||
|
|
||||||
if Gdk.Display.get_default() == None:
|
if Gdk.Display.get_default() == None:
|
||||||
print('You need to run terminator in an X environment. ' \
|
print('You need to run terminator in an X environment. ' \
|
||||||
|
@ -80,6 +80,8 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
dbg ("%s starting up, version %s" % (APP_NAME, APP_VERSION))
|
dbg ("%s starting up, version %s" % (APP_NAME, APP_VERSION))
|
||||||
|
|
||||||
|
GLib.set_prgname(APP_NAME)
|
||||||
|
|
||||||
OPTIONS,dbus_options = terminatorlib.optionparse.parse_options()
|
OPTIONS,dbus_options = terminatorlib.optionparse.parse_options()
|
||||||
if OPTIONS.configjson:
|
if OPTIONS.configjson:
|
||||||
configjson = ConfigJson()
|
configjson = ConfigJson()
|
||||||
|
|
Loading…
Reference in New Issue