Skip to content

Commit 267fa9f

Browse files
committed
gui: set application name
Also, remove deprecated and «pointless» (by GTK docs) set_wmclass.
1 parent a041abb commit 267fa9f

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

gui/shredder/application.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import logging
99
import os
1010

11-
from gi.repository import GdkPixbuf, Gio, Gtk, Rsvg
11+
from gi.repository import GdkPixbuf, GLib, Gio, Gtk, Rsvg
1212

1313
from shredder import APP_TITLE
1414
from shredder.about import AboutDialog
@@ -62,11 +62,13 @@ def _load_app_icon():
6262
class Application(Gtk.Application):
6363
"""GtkApplication implementation of Shredder."""
6464
def __init__(self, options):
65-
Gtk.Application.__init__(
66-
self,
65+
GLib.set_application_name(APP_TITLE)
66+
67+
super().__init__(
6768
application_id='org.gnome.Shredder',
6869
flags=Gio.ApplicationFlags.FLAGS_NONE
6970
)
71+
7072
self.cmd_opts = options
7173
self.settings = self.win = None
7274

@@ -122,10 +124,6 @@ def do_startup(self, **kw):
122124
self.set_accels_for_action('app.search', ['<Ctrl>F'])
123125
self.set_accels_for_action('app.activate', ['<Ctrl>Return'])
124126

125-
# Set the fallback window title.
126-
# This is only used if no .desktop file is provided.
127-
self.win.set_wmclass(APP_TITLE, APP_TITLE)
128-
129127
# Load the application icon
130128
self.win.set_default_icon(_load_app_icon())
131129

0 commit comments

Comments
 (0)