MCPcopy Index your code
hub / github.com/InstaPy/InstaPy / get_icons

Function get_icons

instapy/quota_supervisor.py:312–350  ·  view source on GitHub ↗

Return the locations of icons according to the operating system

()

Source from the content-addressed store, hash-verified

310
311
312def get_icons():
313 """Return the locations of icons according to the operating system"""
314 # get full location of icons folder inside package
315 icons_path = get_pkg_resource_path("instapy", "icons/")
316
317 windows_ico = [
318 "Windows/qs_sleep_windows.ico",
319 "Windows/qs_wakeup_windows.ico",
320 "Windows/qs_exit_windows.ico",
321 ]
322 linux_png = [
323 "Linux/qs_sleep_linux.png",
324 "Linux/qs_wakeup_linux.png",
325 "Linux/qs_exit_linux.png",
326 ]
327 mac_icns = [
328 "Mac/qs_sleep_mac.icns",
329 "Mac/qs_wakeup_mac.icns",
330 "Mac/qs_exit_mac.icns",
331 ]
332
333 # make it full path now
334 windows_ico = [icons_path + icon for icon in windows_ico]
335 linux_png = [icons_path + icon for icon in linux_png]
336 mac_icns = [icons_path + icon for icon in mac_icns]
337
338 (sleep_icon, wakeup_icon, exit_icon) = (
339 windows_ico
340 if platform.startswith("win32")
341 else linux_png
342 if platform.startswith("linux")
343 else mac_icns
344 if platform.startswith("darwin")
345 else [None, None, None]
346 )
347
348 icons = {"sleep": sleep_icon, "wakeup": wakeup_icon, "exit": exit_icon}
349
350 return icons
351
352
353def load_records():

Callers 1

toast_notificationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected