Minimal necessary to get things running on macos

This commit is contained in:
Sumner Evans
2020-03-18 15:24:09 -06:00
committed by Sumner Evans
parent 4a55181b63
commit 0c8c080aab
3 changed files with 7 additions and 8 deletions

View File

@@ -7,8 +7,7 @@ from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Notify', '0.7')
from gi.repository import Gdk, GdkPixbuf, Gio, GLib, Gtk, Notify
from gi.repository import Gdk, GdkPixbuf, Gio, GLib, Gtk
from .cache_manager import CacheManager
from .config import ReplayGainType
@@ -24,7 +23,7 @@ from .ui.settings import SettingsDialog
class SublimeMusicApp(Gtk.Application):
def __init__(self, config_file: str):
super().__init__(application_id="com.sumnerevans.sublimemusic")
Notify.init('Sublime Music')
# Notify.init('Sublime Music')
self.window: Optional[Gtk.Window] = None
self.state = ApplicationState()
@@ -760,7 +759,7 @@ class SublimeMusicApp(Gtk.Application):
return False
def on_app_shutdown(self, app: 'SublimeMusicApp'):
Notify.uninit()
# Notify.uninit()
if self.state.config.server is None:
return
@@ -874,7 +873,7 @@ class SublimeMusicApp(Gtk.Application):
self.should_scrobble_song = True
# Show a song play notification.
if self.state.config.song_play_notification:
if self.state.config.song_play_notification and False:
try:
notification_lines = []
if song.album:

View File

@@ -3,7 +3,7 @@ import os
from enum import Enum
from typing import Any, Dict, List, Optional
import keyring
# import keyring
class ReplayGainType(Enum):
@@ -52,6 +52,7 @@ class ServerConfiguration:
self.local_network_ssid = local_network_ssid
self.username = username
self.sync_enabled = sync_enabled
self._password = password
self.disable_cert_verify = disable_cert_verify
# Try to save the password in the keyring, but if we can't, then save

View File

@@ -3,10 +3,8 @@ import os
from enum import Enum
from typing import Any, Dict, List, Optional, Set
import gi
gi.require_version('NM', '1.0')
from gi.repository import NM
from .cache_manager import CacheManager
from .config import AppConfiguration
from .from_json import from_json
@@ -188,6 +186,7 @@ class ApplicationState:
@property
def current_ssids(self) -> Set[str]:
return set()
if not self.nmclient_initialized:
# Only look at the active WiFi connections.
for ac in self.networkmanager_client.get_active_connections():