Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove unused code
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Aug 5, 2020
1 parent beea81a commit 12195e8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 66 deletions.
49 changes: 0 additions & 49 deletions src/shared.py
Expand Up @@ -152,61 +152,12 @@ def cString(value):
return value
return value.decode("utf-8", errors="ignore")

# ------------------------------------------------------------------------------------------------------------
# Check if a value is a number (float support)

def isNumber(value):
try:
float(value)
return True
except:
return False

# ------------------------------------------------------------------------------------------------------------
# Convert a value to a list

def toList(value):
if value is None:
return []
elif not isinstance(value, list):
return [value]
else:
return value

# ------------------------------------------------------------------------------------------------------------
# Unicode open

def uopen(filename, mode="r"):
return codecopen(filename, encoding="utf-8", mode=mode)

# ------------------------------------------------------------------------------------------------------------
# QLineEdit and QPushButton combo

def getAndSetPath(self_, currentPath, lineEdit):
newPath = QFileDialog.getExistingDirectory(self_, self_.tr("Set Path"), currentPath, QFileDialog.ShowDirsOnly)
if newPath:
lineEdit.setText(newPath)
return newPath

# ------------------------------------------------------------------------------------------------------------
# Get Icon from user theme, using our own as backup (Oxygen)

def getIcon(icon, size=16):
return QIcon.fromTheme(icon, QIcon(":/%ix%i/%s.svgz" % (size, size, icon)))

# ------------------------------------------------------------------------------------------------------------
# Custom MessageBox

def CustomMessageBox(self_, icon, title, text, extraText="", buttons=QMessageBox.Yes|QMessageBox.No, defButton=QMessageBox.No):
msgBox = QMessageBox(self_)
msgBox.setIcon(icon)
msgBox.setWindowTitle(title)
msgBox.setText(text)
msgBox.setInformativeText(extraText)
msgBox.setStandardButtons(buttons)
msgBox.setDefaultButton(defButton)
return msgBox.exec_()

# ------------------------------------------------------------------------------------------------------------
# Signal handler

Expand Down
17 changes: 0 additions & 17 deletions src/shared_canvasjack.py
Expand Up @@ -54,29 +54,12 @@ class DBusObject(object):
'loop',
'bus',
'a2j',
'jack',
'ladish_control',
'ladish_studio',
'ladish_room',
'ladish_graph',
'ladish_manager',
'ladish_app_iface',
'ladish_app_daemon',
'patchbay'
]

gDBus = DBusObject()
gDBus.loop = None
gDBus.bus = None
gDBus.a2j = None
gDBus.jack = None
gDBus.ladish_control = None
gDBus.ladish_studio = None
gDBus.ladish_room = None
gDBus.ladish_graph = None
gDBus.ladish_app_iface = None
gDBus.ladish_app_daemon = None
gDBus.patchbay = None

# ------------------------------------------------------------------------------------------------------------
# Global JACK object
Expand Down

0 comments on commit 12195e8

Please sign in to comment.