Browse Source

Claudia is now fired !

pull/362/head
Houston4444 3 years ago
parent
commit
8b39876777
11 changed files with 49 additions and 455 deletions
  1. +0
    -5
      INSTALL.md
  2. +1
    -1
      Makefile
  3. +4
    -15
      README.md
  4. +11
    -11
      resources/ui/cadence.ui
  5. +0
    -169
      resources/ui/cadence_tb_jack.ui
  6. +22
    -163
      resources/ui/settings_app.ui
  7. +0
    -1
      src/cadence.py
  8. +4
    -25
      src/logs.py
  9. +2
    -5
      src/shared_cadence.py
  10. +4
    -21
      src/shared_canvasjack.py
  11. +1
    -39
      src/shared_settings.py

+ 0
- 5
INSTALL.md View File

@@ -38,7 +38,6 @@ Optional but recommended:
- pulseaudio[-module-jack] - pulseaudio[-module-jack]


The 'Cadence' app relies on jackdbus to work properly (either JACK2 or JACK1+DBus patch). <br/> The 'Cadence' app relies on jackdbus to work properly (either JACK2 or JACK1+DBus patch). <br/>
Claudia is a LADISH frontend, so it will obviously require LADISH to run.


The python version used and tested is python3.2. Older versions won't work! <br/> The python version used and tested is python3.2. Older versions won't work! <br/>
After install, the app/tools will still work on distributions with python2 as default, without any additional work. After install, the app/tools will still work on distributions with python2 as default, without any additional work.
@@ -76,7 +75,3 @@ No special requirements <br/>
### Catia ### Catia
Requires jack <br/> Requires jack <br/>
Recommends a2jmidid (>= 7) and jackdbus <br/> Recommends a2jmidid (>= 7) and jackdbus <br/>

### Claudia [Linux only] <br/>
Requires jackdbus and ladish <br/>
Recommends a2jmidid <br/>

+ 1
- 1
Makefile View File

@@ -61,7 +61,7 @@ locale/%.qm: locale/%.ts
UI: cadence catarina catia tools UI: cadence catarina catia tools


cadence: src/ui_cadence.py \ cadence: src/ui_cadence.py \
src/ui_cadence_tb_jack.py src/ui_cadence_tb_alsa.py src/ui_cadence_tb_a2j.py src/ui_cadence_tb_pa.py \
src/ui_cadence_tb_alsa.py src/ui_cadence_tb_a2j.py src/ui_cadence_tb_pa.py \
src/ui_cadence_rwait.py src/ui_cadence_rwait.py


catarina: src/ui_catarina.py \ catarina: src/ui_catarina.py \


+ 4
- 15
README.md View File

@@ -21,10 +21,10 @@ It automatically connects itself to all application JACK output ports that are a


### [Cadence-JackSettings](http://kxstudio.sourceforge.net/KXStudio:Applications:Cadence-JackSettings) ### [Cadence-JackSettings](http://kxstudio.sourceforge.net/KXStudio:Applications:Cadence-JackSettings)
Simple and easy-to-use configure dialog for jackdbus. <br/> Simple and easy-to-use configure dialog for jackdbus. <br/>
It can configure JACK's driver and engine parameters, and it also supports LADISH studios.
It can configure JACK's driver and engine parameters.


### [Cadence-Logs](http://kxstudio.sourceforge.net/KXStudio:Applications:Cadence-Logs) ### [Cadence-Logs](http://kxstudio.sourceforge.net/KXStudio:Applications:Cadence-Logs)
Small tool that shows JACK, A2J, LASH and LADISH logs in a multi-tab window. <br/>
Small tool that shows JACK and A2J logs in a multi-tab window. <br/>
The logs are viewed in a text box, making it easy to browse and extract status messages using copy and paste commands. The logs are viewed in a text box, making it easy to browse and extract status messages using copy and paste commands.


### [Cadence-Render](http://kxstudio.sourceforge.net/KXStudio:Applications:Cadence-Render) ### [Cadence-Render](http://kxstudio.sourceforge.net/KXStudio:Applications:Cadence-Render)
@@ -37,21 +37,10 @@ It can send data through specific channels and has a MIDI Keyboard too.


### [Catarina](http://kxstudio.sourceforge.net/KXStudio:Applications:Catarina) ### [Catarina](http://kxstudio.sourceforge.net/KXStudio:Applications:Catarina)
A Patchbay test app, created while the patchcanvas module was being developed. <br/> A Patchbay test app, created while the patchcanvas module was being developed. <br/>
It allows the user to experiment with the patchbay, without using ALSA, JACK or LADISH. <br/>
It allows the user to experiment with the patchbay, without using ALSA or JACK. <br/>
You can save & load patchbay configurations too. You can save & load patchbay configurations too.


### [Catia](http://kxstudio.sourceforge.net/KXStudio:Applications:Catia) ### [Catia](http://kxstudio.sourceforge.net/KXStudio:Applications:Catia)
JACK Patchbay, with some neat features like A2J bridge support and JACK Transport. <br/> JACK Patchbay, with some neat features like A2J bridge support and JACK Transport. <br/>
It's supposed to be as simple as possible (there's Claudia for advanced things), so it can work nicely on Windows and Mac too. <br/>
It's supposed to be as simple as possible, so it can work nicely on Windows and Mac too. <br/>
Currently has ALSA-MIDI support in experimental stage (it doesn't automatically refresh the canvas when changes happen externally). Currently has ALSA-MIDI support in experimental stage (it doesn't automatically refresh the canvas when changes happen externally).

### [Claudia](http://kxstudio.sourceforge.net/KXStudio:Applications:Claudia)
LADISH frontend; just like Catia, but focused at session management through LADISH. <br/>
It has a bit more features than the official LADISH GUI, with a nice preview of the main canvas in the bottom-left. <br/>
It also implements the 'Claudia-Launcher' add-application style for LADISH.

### [Claudia-Launcher](http://kxstudio.sourceforge.net/KXStudio:Applications:Claudia-Launcher)
A multimedia application launcher with LADISH support. <br/>
It searches for installed packages (not binaries), and displays the respective content as a launcher. <br/>
The content is got through an hardcoded database, created and/or modified to suit the target distribution. <br/>
Currently supports Debian and ArchLinux based distros.

+ 11
- 11
resources/ui/cadence.ui View File

@@ -18,7 +18,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number>
<number>1</number>
</property> </property>
<widget class="QWidget" name="tab_system"> <widget class="QWidget" name="tab_system">
<attribute name="title"> <attribute name="title">
@@ -689,8 +689,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>392</width>
<height>118</height>
<width>299</width>
<height>98</height>
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
@@ -823,8 +823,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>392</width>
<height>118</height>
<width>302</width>
<height>98</height>
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
@@ -1192,7 +1192,7 @@
<item> <item>
<widget class="QLabel" name="label_tools_logs"> <widget class="QLabel" name="label_tools_logs">
<property name="text"> <property name="text">
<string>View JACK, A2J and LADISH logs</string>
<string>View JACK and A2J logs</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
@@ -1612,8 +1612,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>396</width>
<height>401</height>
<width>96</width>
<height>89</height>
</rect> </rect>
</property> </property>
<attribute name="label"> <attribute name="label">
@@ -1642,7 +1642,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>91</width>
<width>96</width>
<height>89</height> <height>89</height>
</rect> </rect>
</property> </property>
@@ -1672,7 +1672,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>91</width>
<width>96</width>
<height>89</height> <height>89</height>
</rect> </rect>
</property> </property>
@@ -1702,7 +1702,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>91</width>
<width>96</width>
<height>89</height> <height>89</height>
</rect> </rect>
</property> </property>


+ 0
- 169
resources/ui/cadence_tb_jack.ui View File

@@ -1,169 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>390</width>
<height>118</height>
</rect>
</property>
<property name="windowTitle">
<string>JACK Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="rb_jack">
<property name="text">
<string>Load JACK Default Settings</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rb_ladish">
<property name="text">
<string>Load LADISH Studio</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Studio Name:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cb_studio_name">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>Dialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>224</x>
<y>113</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>129</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Dialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>292</x>
<y>119</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>129</y>
</hint>
</hints>
</connection>
<connection>
<sender>rb_ladish</sender>
<signal>toggled(bool)</signal>
<receiver>label</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>83</x>
<y>38</y>
</hint>
<hint type="destinationlabel">
<x>78</x>
<y>63</y>
</hint>
</hints>
</connection>
<connection>
<sender>rb_ladish</sender>
<signal>toggled(bool)</signal>
<receiver>cb_studio_name</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>115</x>
<y>34</y>
</hint>
<hint type="destinationlabel">
<x>163</x>
<y>67</y>
</hint>
</hints>
</connection>
</connections>
</ui>

+ 22
- 163
resources/ui/settings_app.ui View File

@@ -82,11 +82,6 @@
<string>canvas</string> <string>canvas</string>
</property> </property>
</row> </row>
<row>
<property name="text">
<string>ladish</string>
</property>
</row>
<column> <column>
<property name="text"> <property name="text">
<string>Widget</string> <string>Widget</string>
@@ -103,7 +98,7 @@
</font> </font>
</property> </property>
<property name="textAlignment"> <property name="textAlignment">
<set>AlignLeft|AlignVCenter</set>
<set>AlignLeading|AlignVCenter</set>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../resources.qrc"> <iconset resource="../resources.qrc">
@@ -131,24 +126,6 @@
<set>ItemIsSelectable|ItemIsEnabled</set> <set>ItemIsSelectable|ItemIsEnabled</set>
</property> </property>
</item> </item>
<item row="2" column="0">
<property name="text">
<string>LADISH</string>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/48x48/ladish.png</normaloff>:/48x48/ladish.png</iconset>
</property>
<property name="flags">
<set>ItemIsSelectable|ItemIsEnabled</set>
</property>
</item>
</widget> </widget>
</item> </item>
<item> <item>
@@ -157,11 +134,20 @@
<number>0</number> <number>0</number>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number>
<number>2</number>
</property> </property>
<widget class="QWidget" name="page_main"> <widget class="QWidget" name="page_main">
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
<property name="margin">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number> <number>2</number>
</property> </property>
<item> <item>
@@ -367,7 +353,16 @@
</widget> </widget>
<widget class="QWidget" name="page_canvas"> <widget class="QWidget" name="page_canvas">
<layout class="QVBoxLayout" name="verticalLayout_8"> <layout class="QVBoxLayout" name="verticalLayout_8">
<property name="margin">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number> <number>2</number>
</property> </property>
<item> <item>
@@ -555,142 +550,6 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="page_ladish">
<layout class="QVBoxLayout" name="verticalLayout_10">
<property name="margin">
<number>2</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>&lt;b&gt;LADISH&lt;/b&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_14">
<property name="text">
<string notr="true"/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/48x48/ladish.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QCheckBox" name="cb_ladish_studio_autostart">
<property name="text">
<string>Start studio on load</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cb_ladish_notify">
<property name="text">
<string>Send notifications</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Shell to use:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="le_ladish_shell"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Terminal to use:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="le_ladish_terminal"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>JS delay:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="sb_ladish_jsdelay">
<property name="suffix">
<string> seconds</string>
</property>
<property name="prefix">
<string/>
</property>
<property name="maximum">
<number>1000</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="page"/> <widget class="QWidget" name="page"/>
</widget> </widget>
</item> </item>


+ 0
- 1
src/cadence.py View File

@@ -33,7 +33,6 @@ else:


import systray import systray
import ui_cadence import ui_cadence
import ui_cadence_tb_jack
import ui_cadence_tb_alsa import ui_cadence_tb_alsa
import ui_cadence_tb_a2j import ui_cadence_tb_a2j
import ui_cadence_tb_pa import ui_cadence_tb_pa


+ 4
- 25
src/logs.py View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-


# JACK, A2J, LASH and LADISH Logs Viewer
# JACK and A2J Logs Viewer
# Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> # Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@@ -19,14 +19,9 @@
# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


if True:
from PyQt5.QtCore import pyqtSlot, Qt, QFile, QIODevice, QMutex, QMutexLocker, QTextStream, QThread, QSettings
from PyQt5.QtGui import QPalette, QSyntaxHighlighter
from PyQt5.QtWidgets import QDialog
else:
from PyQt4.QtCore import pyqtSlot, Qt, QFile, QIODevice, QMutex, QMutexLocker, QTextStream, QThread, QSettings
from PyQt4.QtGui import QPalette, QSyntaxHighlighter
from PyQt4.QtGui import QDialog
from PyQt5.QtCore import pyqtSlot, Qt, QFile, QIODevice, QMutex, QMutexLocker, QTextStream, QThread, QSettings
from PyQt5.QtGui import QPalette, QSyntaxHighlighter
from PyQt5.QtWidgets import QDialog


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff) # Imports (Custom Stuff)
@@ -102,22 +97,6 @@ class SyntaxHighlighter_LASH(QSyntaxHighlighter):
elif ": ------------------" in text: elif ": ------------------" in text:
self.setFormat(text.find(" ------------------"), len(text), self.fPalette.color(QPalette.Active, QPalette.Mid)) self.setFormat(text.find(" ------------------"), len(text), self.fPalette.color(QPalette.Active, QPalette.Mid))


# ------------------------------------------------------------------------------------------------------------
# Syntax Highlighter for LADISH

class SyntaxHighlighter_LADISH(QSyntaxHighlighter):
def __init__(self, parent):
QSyntaxHighlighter.__init__(self, parent)

self.fPalette = parent.palette()

def highlightBlock(self, text):
if ": ERROR: " in text:
self.setFormat(text.find(" ERROR: "), len(text), Qt.red)
elif ": WARNING: " in text:
self.setFormat(text.find(" WARNING: "), len(text), Qt.darkRed)
elif ": -------" in text:
self.setFormat(text.find(" -------"), len(text), self.fPalette.color(QPalette.Active, QPalette.Mid))


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Lock-less file read thread # Lock-less file read thread


+ 2
- 5
src/shared_cadence.py View File

@@ -21,10 +21,7 @@


from time import sleep from time import sleep


if True:
from PyQt5.QtCore import QProcess, QSettings
else:
from PyQt4.QtCore import QProcess, QSettings
from PyQt5.QtCore import QProcess, QSettings


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff) # Imports (Custom Stuff)
@@ -153,7 +150,7 @@ def stopAllAudioProcesses(tryCloseJack = True):
process.start("cadence-pulse2jack", ["--dummy"]) process.start("cadence-pulse2jack", ["--dummy"])
process.waitForFinished() process.waitForFinished()


procsTerm = ["a2j", "a2jmidid", "artsd", "jackd", "jackdmp", "knotify4", "lash", "ladishd", "ladiappd", "ladiconfd", "jmcore"]
procsTerm = ["a2j", "a2jmidid", "artsd", "jackd", "jackdmp", "knotify4", "jmcore"]
procsKill = ["jackdbus", "pulseaudio"] procsKill = ["jackdbus", "pulseaudio"]
tries = 20 tries = 20




+ 4
- 21
src/shared_canvasjack.py View File

@@ -19,14 +19,10 @@
# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


if True:
from PyQt5.QtCore import pyqtSlot, QTimer
from PyQt5.QtGui import QCursor, QFontMetrics, QImage, QPainter
from PyQt5.QtWidgets import QMainWindow, QMenu
else:
from PyQt4.QtCore import pyqtSlot, QTimer
from PyQt4.QtGui import QCursor, QFontMetrics, QImage, QPainter
from PyQt4.QtGui import QMainWindow, QMenu

from PyQt5.QtCore import pyqtSlot, QTimer
from PyQt5.QtGui import QCursor, QFontMetrics, QImage, QPainter
from PyQt5.QtWidgets import QMainWindow, QMenu


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff) # Imports (Custom Stuff)
@@ -63,13 +59,6 @@ class DBusObject(object):
'bus', 'bus',
'a2j', 'a2j',
'jack', 'jack',
'ladish_control',
'ladish_studio',
'ladish_room',
'ladish_graph',
'ladish_manager',
'ladish_app_iface',
'ladish_app_daemon',
'patchbay' 'patchbay'
] ]


@@ -78,12 +67,6 @@ gDBus.loop = None
gDBus.bus = None gDBus.bus = None
gDBus.a2j = None gDBus.a2j = None
gDBus.jack = 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 gDBus.patchbay = None


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------


+ 1
- 39
src/shared_settings.py View File

@@ -35,27 +35,12 @@ from patchcanvas_theme import *
# Tab indexes # Tab indexes
TAB_INDEX_MAIN = 0 TAB_INDEX_MAIN = 0
TAB_INDEX_CANVAS = 1 TAB_INDEX_CANVAS = 1
TAB_INDEX_LADISH = 2
TAB_INDEX_NONE = 3
TAB_INDEX_NONE = 2


# PatchCanvas defines # PatchCanvas defines
CANVAS_ANTIALIASING_SMALL = 1 CANVAS_ANTIALIASING_SMALL = 1
CANVAS_EYECANDY_SMALL = 1 CANVAS_EYECANDY_SMALL = 1


# LADISH defines
LADISH_CONF_KEY_DAEMON_NOTIFY = "/org/ladish/daemon/notify"
LADISH_CONF_KEY_DAEMON_SHELL = "/org/ladish/daemon/shell"
LADISH_CONF_KEY_DAEMON_TERMINAL = "/org/ladish/daemon/terminal"
LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART = "/org/ladish/daemon/studio_autostart"
LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY = "/org/ladish/daemon/js_save_delay"

# LADISH defaults
LADISH_CONF_KEY_DAEMON_NOTIFY_DEFAULT = True
LADISH_CONF_KEY_DAEMON_SHELL_DEFAULT = "sh"
LADISH_CONF_KEY_DAEMON_TERMINAL_DEFAULT = "x-terminal-emulator"
LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART_DEFAULT = True
LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY_DEFAULT = 0

# Internal defaults # Internal defaults
global SETTINGS_DEFAULT_PROJECT_FOLDER global SETTINGS_DEFAULT_PROJECT_FOLDER
SETTINGS_DEFAULT_PROJECT_FOLDER = HOME SETTINGS_DEFAULT_PROJECT_FOLDER = HOME
@@ -90,7 +75,6 @@ class SettingsW(QDialog):
if appName == "catarina": if appName == "catarina":
self.fAutoHideGroups = False self.fAutoHideGroups = False
self.ui.lw_page.hideRow(TAB_INDEX_MAIN) self.ui.lw_page.hideRow(TAB_INDEX_MAIN)
self.ui.lw_page.hideRow(TAB_INDEX_LADISH)
self.ui.lw_page.setCurrentCell(TAB_INDEX_CANVAS, 0) self.ui.lw_page.setCurrentCell(TAB_INDEX_CANVAS, 0)


elif appName == "catia": elif appName == "catia":
@@ -99,13 +83,11 @@ class SettingsW(QDialog):
self.ui.group_main_paths.setVisible(False) self.ui.group_main_paths.setVisible(False)
self.ui.group_tray.setEnabled(False) self.ui.group_tray.setEnabled(False)
self.ui.group_tray.setVisible(False) self.ui.group_tray.setVisible(False)
self.ui.lw_page.hideRow(TAB_INDEX_LADISH)
self.ui.lw_page.setCurrentCell(TAB_INDEX_MAIN, 0) self.ui.lw_page.setCurrentCell(TAB_INDEX_MAIN, 0)


else: else:
self.ui.lw_page.hideRow(TAB_INDEX_MAIN) self.ui.lw_page.hideRow(TAB_INDEX_MAIN)
self.ui.lw_page.hideRow(TAB_INDEX_CANVAS) self.ui.lw_page.hideRow(TAB_INDEX_CANVAS)
self.ui.lw_page.hideRow(TAB_INDEX_LADISH)
self.ui.stackedWidget.setCurrentIndex(TAB_INDEX_NONE) self.ui.stackedWidget.setCurrentIndex(TAB_INDEX_NONE)
return return


@@ -161,13 +143,6 @@ class SettingsW(QDialog):


# --------------------------------------- # ---------------------------------------


if not self.ui.lw_page.isRowHidden(TAB_INDEX_LADISH):
self.ui.cb_ladish_notify.setChecked(settings.value(LADISH_CONF_KEY_DAEMON_NOTIFY, LADISH_CONF_KEY_DAEMON_NOTIFY_DEFAULT, type=bool))
self.ui.le_ladish_shell.setText(settings.value(LADISH_CONF_KEY_DAEMON_SHELL, LADISH_CONF_KEY_DAEMON_SHELL_DEFAULT, type=str))
self.ui.le_ladish_terminal.setText(settings.value(LADISH_CONF_KEY_DAEMON_TERMINAL, LADISH_CONF_KEY_DAEMON_TERMINAL_DEFAULT, type=str))
self.ui.cb_ladish_studio_autostart.setChecked(settings.value(LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART, LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART_DEFAULT, type=bool))
self.ui.sb_ladish_jsdelay.setValue(settings.value(LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY, LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY_DEFAULT, type=int))

@pyqtSlot() @pyqtSlot()
def slot_saveSettings(self): def slot_saveSettings(self):
settings = QSettings() settings = QSettings()
@@ -200,13 +175,6 @@ class SettingsW(QDialog):


# --------------------------------------- # ---------------------------------------


if not self.ui.lw_page.isRowHidden(TAB_INDEX_LADISH):
settings.setValue(LADISH_CONF_KEY_DAEMON_NOTIFY, self.ui.cb_ladish_notify.isChecked())
settings.setValue(LADISH_CONF_KEY_DAEMON_SHELL, self.ui.le_ladish_shell.text())
settings.setValue(LADISH_CONF_KEY_DAEMON_TERMINAL, self.ui.le_ladish_terminal.text())
settings.setValue(LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART, self.ui.cb_ladish_studio_autostart.isChecked())
settings.setValue(LADISH_CONF_KEY_DAEMON_JS_SAVE_DELAY, self.ui.sb_ladish_jsdelay.value())

@pyqtSlot() @pyqtSlot()
def slot_resetSettings(self): def slot_resetSettings(self):
if self.ui.lw_page.currentRow() == TAB_INDEX_MAIN: if self.ui.lw_page.currentRow() == TAB_INDEX_MAIN:
@@ -225,12 +193,6 @@ class SettingsW(QDialog):
self.ui.cb_canvas_render_aa.setCheckState(Qt.PartiallyChecked) self.ui.cb_canvas_render_aa.setCheckState(Qt.PartiallyChecked)
self.ui.cb_canvas_render_hq_aa.setChecked(False) self.ui.cb_canvas_render_hq_aa.setChecked(False)


elif self.ui.lw_page.currentRow() == TAB_INDEX_LADISH:
self.ui.cb_ladish_notify.setChecked(LADISH_CONF_KEY_DAEMON_NOTIFY_DEFAULT)
self.ui.cb_ladish_studio_autostart.setChecked(LADISH_CONF_KEY_DAEMON_STUDIO_AUTOSTART_DEFAULT)
self.ui.le_ladish_shell.setText(LADISH_CONF_KEY_DAEMON_SHELL_DEFAULT)
self.ui.le_ladish_terminal.setText(LADISH_CONF_KEY_DAEMON_TERMINAL_DEFAULT)

@pyqtSlot() @pyqtSlot()
def slot_getAndSetProjectPath(self): def slot_getAndSetProjectPath(self):
getAndSetPath(self, self.ui.le_main_def_folder.text(), self.ui.le_main_def_folder) getAndSetPath(self, self.ui.le_main_def_folder.text(), self.ui.le_main_def_folder)


Loading…
Cancel
Save