Code cleanup
This commit is contained in:
parent
c93bbf3de5
commit
c140e9313e
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import sys, os, signal, time, argparse
|
import sys, os, signal, time, argparse
|
||||||
|
|
||||||
from Qt import QtCore, QtGui, QtWidgets, __binding__
|
from Qt import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from qspectrumanalyzer import backends
|
from qspectrumanalyzer import backends
|
||||||
from qspectrumanalyzer.version import __version__
|
from qspectrumanalyzer.version import __version__
|
||||||
@ -621,7 +621,7 @@ def main():
|
|||||||
global debug
|
global debug
|
||||||
|
|
||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
parser= argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog="qspectrumanalyzer",
|
prog="qspectrumanalyzer",
|
||||||
description="Spectrum analyzer for multiple SDR platforms",
|
description="Spectrum analyzer for multiple SDR platforms",
|
||||||
)
|
)
|
||||||
|
@ -24,6 +24,7 @@ IsWindowVisible = windll.user32.IsWindowVisible
|
|||||||
# interpreter procss, 0 if there is no window
|
# interpreter procss, 0 if there is no window
|
||||||
console_window_handle = GetConsoleWindow()
|
console_window_handle = GetConsoleWindow()
|
||||||
|
|
||||||
|
|
||||||
def set_attached_console_visible(state):
|
def set_attached_console_visible(state):
|
||||||
"""Show/hide system console window attached to current process.
|
"""Show/hide system console window attached to current process.
|
||||||
Return it's previous state.
|
Return it's previous state.
|
||||||
@ -32,10 +33,12 @@ def set_attached_console_visible(state):
|
|||||||
flag = {True: SW_SHOW, False: SW_HIDE}
|
flag = {True: SW_SHOW, False: SW_HIDE}
|
||||||
return bool(ShowWindow(console_window_handle, flag[state]))
|
return bool(ShowWindow(console_window_handle, flag[state]))
|
||||||
|
|
||||||
|
|
||||||
def is_attached_console_visible():
|
def is_attached_console_visible():
|
||||||
"""Return True if attached console window is visible"""
|
"""Return True if attached console window is visible"""
|
||||||
return IsWindowVisible(console_window_handle)
|
return IsWindowVisible(console_window_handle)
|
||||||
|
|
||||||
|
|
||||||
def set_windows_appusermodelid():
|
def set_windows_appusermodelid():
|
||||||
"""Make sure correct icon is used on Windows 7 taskbar"""
|
"""Make sure correct icon is used on Windows 7 taskbar"""
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user