gtk-theme-variant-switcher
gtk-theme-variant-switcher copied to clipboard
Problem with spotify - theme not set after restart
Steps to reproduce:
- Turn on Spotify
- Turn on Switcher (dark theme is set)
- Restart Spotify (them is not set)
Output from terminal:
./switcher.py
sys:1: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
sys:1: PyGIWarning: Wnck was imported without specifying a version first. Use gi.require_version('Wnck', '3.0') before import to ensure that the right version gets loaded.
[2015-11-01 13:07:35,131] [switcher.on_activate.INFO] Listening for newly opened windows.
[2015-11-01 13:07:35,153] [switcher.update_window.DEBUG] Got window: spotify ("Spotify"/"spotify")
[2015-11-01 13:07:35,157] [switcher.update_window.INFO] Setting window "spotify" to "dark".
[2015-11-01 13:07:35,157] [switcher.update_window.DEBUG] Got window: gnome-terminal-server ("Gnome-terminal"/"skoruppa@skoruppa-netbook:~/pobrane/gtk-theme-variant-switcher-master")
[2015-11-01 13:07:35,157] [switcher.update_window.DEBUG] Got window: dconf-editor ("Dconf-editor"/"edytor dconf")
[2015-11-01 13:07:35,158] [switcher.update_window.DEBUG] Got window: gnome-terminal-server ("Gnome-terminal"/"skoruppa@skoruppa-netbook:~/.local/share/gtk-theme-variant-switcher")
[2015-11-01 13:07:35,158] [switcher.update_window.DEBUG] Got window: navigator ("Firefox"/"(1) facebook - mozilla firefox")
[2015-11-01 13:07:35,158] [switcher.update_window.DEBUG] Got window: avant-window-navigator ("Avant-window-navigator"/"avant-window-navigator")
[2015-11-01 13:07:35,158] [switcher.update_window.DEBUG] Got window: desktop_window ("Nautilus"/"pulpit")
Traceback (most recent call last):
File "./switcher.py", line 43, in update_window
instance_name = window.get_class_instance_name().lower()
AttributeError: 'NoneType' object has no attribute 'lower'
@skoruppa It looks like the window doesn't have any class instance name - which sounds strange. Do you know how to code? Perhaps you could add a try-except clause around line 43 and output the window_group and window_name?
I think it is not nautilus fault. For me this looks like Spotify, just after run for like a one second, doesn't have any class name. Anyway, I have done as you said. Output without spotify
a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
sys:1: PyGIWarning: Wnck was imported without specifying a version first. Use gi.require_version('Wnck', '3.0') before import to ensure that the right version gets loaded.
[2015-11-02 20:02:36,220] [switcher.on_activate.INFO] Listening for newly opened windows.
[2015-11-02 20:02:36,230] [switcher.update_window.DEBUG] Got window: gnome-terminal-server ("Gnome-terminal"/"skoruppa@skoruppa-netbook:~/.local/share/gtk-theme-variant-switcher")
[2015-11-02 20:02:36,231] [switcher.update_window.DEBUG] Got window: Navigator ("Firefox"/"problem with spotify - theme not set after restart · issue #11 · theblacklion/gtk-theme-variant-switcher - mozilla firefox")
[2015-11-02 20:02:36,231] [switcher.update_window.DEBUG] Got window: avant-window-navigator ("Avant-window-navigator"/"avant-window-navigator")
[2015-11-02 20:02:36,231] [switcher.update_window.DEBUG] Got window: desktop_window ("Nautilus"/"pulpit")
new line after I turned on Spotify
[2015-11-02 20:02:41,291] [switcher.update_window.DEBUG] Got window: None ("None"/"okno bez tytułu")
Might get fixed by https://github.com/oktayacikalin/gtk-theme-variant-switcher/pull/9
I merged #9 - did it help?