|
8 | 8 | import logging |
9 | 9 | import os |
10 | 10 |
|
11 | | -from gi.repository import GdkPixbuf, Gio, Gtk, Rsvg |
| 11 | +from gi.repository import GdkPixbuf, GLib, Gio, Gtk, Rsvg |
12 | 12 |
|
13 | 13 | from shredder import APP_TITLE |
14 | 14 | from shredder.about import AboutDialog |
@@ -62,11 +62,13 @@ def _load_app_icon(): |
62 | 62 | class Application(Gtk.Application): |
63 | 63 | """GtkApplication implementation of Shredder.""" |
64 | 64 | def __init__(self, options): |
65 | | - Gtk.Application.__init__( |
66 | | - self, |
| 65 | + GLib.set_application_name(APP_TITLE) |
| 66 | + |
| 67 | + super().__init__( |
67 | 68 | application_id='org.gnome.Shredder', |
68 | 69 | flags=Gio.ApplicationFlags.FLAGS_NONE |
69 | 70 | ) |
| 71 | + |
70 | 72 | self.cmd_opts = options |
71 | 73 | self.settings = self.win = None |
72 | 74 |
|
@@ -122,10 +124,6 @@ def do_startup(self, **kw): |
122 | 124 | self.set_accels_for_action('app.search', ['<Ctrl>F']) |
123 | 125 | self.set_accels_for_action('app.activate', ['<Ctrl>Return']) |
124 | 126 |
|
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 | | - |
129 | 127 | # Load the application icon |
130 | 128 | self.win.set_default_icon(_load_app_icon()) |
131 | 129 |
|
|
0 commit comments