Changeset 1640

Show
Ignore:
Timestamp:
08/30/09 12:05:51 (12 years ago)
Author:
arnonym
Message:

Make it more pythonic.

All ffado stuff is now in packages getting installed to the official python dirs. Ideally this would allow other apps to use the stuff from us.

Maybe the generic widgets (that are used by multiple mixers) should go into ffado/widgets...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/support/mixer-qt4/ffado-mixer.in

    r1601 r1640  
    2727# 
    2828 
    29 import sys 
     29import sys, os 
    3030 
    31 # Add the path of the installed ffado-mixer-modules 
    32 sys.path.append( "$PYTHONDIR" ) 
     31# Add the path of the installed ffado-modules 
     32# for path in sys.path: 
     33sys.path.append( "$PYPKGDIR" ) 
    3334 
    34 from ffadomixer_config import * #POLL_SLEEP_TIME_MSEC, FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH 
     35from ffado.config import * #POLL_SLEEP_TIME_MSEC, FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH 
    3536 
    3637import os 
     
    4041from PyQt4.QtGui import * #QApplication, QMessageBox, QIcon 
    4142 
    42 from ffado_dbus_util import * 
     43from ffado.dbus_util import * 
    4344 
    44 from ffado_panelmanager import PanelManager 
     45from ffado.panelmanager import PanelManager 
    4546 
    46 from ffado_logginghandler import * 
     47from ffado.logginghandler import * 
    4748 
    4849"""Just a small helper to ask the retry-question without a blocking messagebox""" 
     
    153154    logging.getLogger('registration').setLevel(debug_level) 
    154155    logging.getLogger('panelmanager').setLevel(debug_level) 
    155     logging.getLogger('configparser').setLevel(debug_level
     156    logging.getLogger('configparser').setLevel(logging.INFO
    156157 
    157158    logging.getLogger('global').setLevel(debug_level) 
     
    181182    # rock & roll 
    182183    mainwindow.show() 
    183     QObject.connect(app,SIGNAL("lastWindowClosed()"),app,SLOT("quit()")) 
     184    #QObject.connect(app,SIGNAL("lastWindowClosed()"),app,SLOT("quit()")) 
    184185    app.exec_() 
    185186 
  • trunk/libffado/support/mixer-qt4/ffado/config.py.in

    • Property svn:mergeinfo set
    r1625 r1640  
    1111POLL_SLEEP_TIME_MSEC = 100 # 100ms 
    1212 
    13 PYTHONDIR = "$PYTHONDIR" 
     13PYTHONDIR = "$PYPKGDIR" 
    1414SHAREDIR = "$SHAREDIR" 
    1515 
     
    2121UIDIR = PYTHONDIR 
    2222import os.path 
    23 if os.path.exists('support/mixer-qt4/mixer_global.ui'): 
     23if os.path.exists('support/mixer-qt4/ffado/mixer/globalmixer.ui'): 
    2424    UIDIR = "support/mixer-qt4" 
    25 if os.path.exists('mixer_global.ui'): 
     25if os.path.exists('ffado/mixer/globalmixer.ui'): 
    2626    UIDIR = "." 
    2727 
  • trunk/libffado/support/mixer-qt4/ffado/configuration.py

    • Property svn:mergeinfo set
    r1625 r1640  
    11#!/usr/bin/python 
    22# 
    3 # Copyright (C) 2008 by Arnold Krille 
     3# Copyright (C) 2008-2009 by Arnold Krille 
    44# 
    55# This file is part of FFADO 
  • trunk/libffado/support/mixer-qt4/ffado/dbus_util.py

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/matrixmixer.py

    • Property svn:mergeinfo set
    r1639 r1640  
    3434        self.layout = QtGui.QGridLayout(self) 
    3535        self.setLayout(self.layout) 
    36  
    37         #self.lbl = QtGui.QLabel("(%i,%i)" % (row,col), self) 
    38         #self.layout.addWidget(self.lbl, 0, 0) 
    3936 
    4037        self.dial = QtGui.QDial(self) 
     
    7673        self.interface = dbus.Interface(self.dev, dbus_interface="org.ffado.Control.Element.MatrixMixer") 
    7774 
    78         palette = self.palette() 
    79         print palette.color( QtGui.QPalette.Window ).name() 
    80         palette.setColor( QtGui.QPalette.Window, palette.color( QtGui.QPalette.Window ).darker() ); 
    81         print self.palette().color( QtGui.QPalette.Window ).name() 
     75        #print self.palette().color( QtGui.QPalette.Window ).name() 
     76        self.palette().setColor( QtGui.QPalette.Window, self.palette().color( QtGui.QPalette.Window ).darker() ); 
     77        #print self.palette().color( QtGui.QPalette.Window ).name() 
    8278 
    8379        rows = self.interface.getRowCount() 
     
    116112        p.fillRect(event.rect(), self.palette().window()) 
    117113 
    118 class Saffire_Dice(QtGui.QWidget): 
    119     def __init__(self, parent=None): 
    120         QtGui.QWidget.__init__(self, parent) 
    121         self.layout = QtGui.QGridLayout(self) 
    122         self.setLayout(self.layout) 
    123         self.mixerwidget = QtGui.QScrollArea(self) 
    124         self.mixerwidget.setWidgetResizable(True) 
    125         self.layout.addWidget(self.mixerwidget) 
    126  
    127     def buildMixer(self): 
    128         #print self.hw 
    129         #print self.hw.getText("/Generic/Nickname") 
    130         self.matrix = MatrixMixer(self.hw.servername, self.hw.basepath+"/EAP/MatrixMixer", self) 
    131         self.mixerwidget.setWidget(self.matrix) 
    132  
    133     #def getDisplayTitle(self): 
    134     #    return "Experimental EAP Mixer" 
    135  
    136  
    137114# 
    138115# vim: et ts=4 sw=4 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/audiofire.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2525                        QGroupBox, QTabWidget, QLabel, \ 
    2626                        QPushButton, QSpacerItem, QSizePolicy 
    27 from ffadomixer_config import * 
     27from ffado.config import * 
    2828import logging 
    2929log = logging.getLogger('audiofire') 
     
    3232    def __init__(self,parent = None): 
    3333        QWidget.__init__(self,parent) 
    34         uicLoad("mixer_audiofire_strip", self) 
     34        uicLoad("ffado/mixer/audiofire_strip", self) 
    3535 
    3636class AfSettingsWidget(QWidget): 
    3737    def __init__(self,parent = None): 
    3838        QWidget.__init__(self,parent) 
    39         uicLoad("mixer_audiofire_settings", self) 
     39        uicLoad("ffado/mixer/audiofire_settings", self) 
    4040 
    4141class AudioFireMixer(QWidget): 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/audiofire_settings.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/audiofire_strip.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/bcoaudio5.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from ffadomixer_config import * 
     25from ffado.config import * 
    2626import logging 
    2727log = logging.getLogger('bridgeco') 
     
    3030    def __init__(self,parent = None): 
    3131        QWidget.__init__(self,parent) 
    32         uicLoad("mixer_bcoaudio5", self) 
     32        uicLoad("ffado/mixer/bcoaudio5", self) 
    3333 
    3434        self.VolumeControls={ 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/bcoaudio5.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/dummy.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from ffadomixer_config import * 
     25from ffado.config import * 
    2626 
    2727class DummyMixer(QWidget): 
    2828    def __init__(self,parent = None): 
    2929        QWidget.__init__(self,parent) 
    30         uicLoad("mixer_dummy", self) 
     30        uicLoad("ffado/mixer/dummy", self) 
    3131 
    3232    def initValues(self): 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/dummy.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/edirolfa101.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from ffadomixer_config import * 
     25from ffado.config import * 
    2626 
    2727import logging 
     
    3131    def __init__(self, parent = None): 
    3232        QWidget.__init__(self, parent) 
    33         uicLoad("mixer_edirolfa101", self) 
     33        uicLoad("ffado/mixer/edirolfa101", self) 
    3434 
    3535    def setVolumeIn1(self, vol): 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/edirolfa101.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/edirolfa66.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from ffadomixer_config import * 
     25from ffado.config import * 
    2626 
    2727import logging 
     
    3131    def __init__(self, parent = None): 
    3232        QWidget.__init__(self, parent) 
    33         uicLoad("mixer_edirolfa66", self) 
     33        uicLoad("ffado/mixer/edirolfa66", self) 
    3434 
    3535        self.VolumeControls = { 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/edirolfa66.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/globalmixer.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2323from PyQt4.QtCore import QObject, pyqtSignature 
    2424from PyQt4.QtGui import QWidget, QMessageBox 
    25 from ffadomixer_config import * 
     25from ffado.config import * 
    2626 
    2727import logging 
     
    3131    def __init__(self, parent, name=None): 
    3232        QWidget.__init__(self, parent) 
    33         uicLoad("mixer_global", self) 
     33        uicLoad("ffado/mixer/globalmixer", self) 
    3434        self.setName(name) 
    3535 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/globalmixer.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/mackie_onyxmixer.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from ffadomixer_config import * 
     25from ffado.config import * 
    2626 
    2727class MackieOnyxMixer(QWidget): 
    2828    def __init__(self,parent = None): 
    2929        QWidget.__init__(self,parent) 
    30         uicLoad("mixer_mackie_onyxmixer", self) 
     30        uicLoad("ffado/mixer/mackie_onyxmixer", self) 
    3131 
    3232    def initValues(self): 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/mackie_onyxmixer.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/motu.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2424from PyQt4.QtCore import SIGNAL, SLOT, QObject, Qt 
    2525from PyQt4.QtGui import QWidget, QApplication 
    26 from ffadomixer_config import * 
     26from ffado.config import * 
    2727 
    2828import logging 
     
    4141    def __init__(self,parent = None): 
    4242        QWidget.__init__(self,parent) 
    43         uicLoad("mixer_motu", self) 
     43        uicLoad("ffado/mixer/motu", self) 
    4444 
    4545        self.init() 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/motu.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/nodevice.py

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/nodevice.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/phase24.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from ffadomixer_config import * 
     25from ffado.config import * 
    2626 
    2727import logging 
     
    3131    def __init__(self,parent = None): 
    3232        QWidget.__init__(self,parent) 
    33         uicLoad("mixer_phase24", self) 
     33        uicLoad("ffado/mixer/phase24", self) 
    3434 
    3535        self.VolumeControls={ 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/phase24.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/phase88.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from ffadomixer_config import * 
     25from ffado.config import * 
    2626 
    2727import logging 
     
    3131    def __init__(self,parent = None): 
    3232        QWidget.__init__(self,parent) 
    33         uicLoad("mixer_phase88", self) 
     33        uicLoad("ffado/mixer/phase88", self) 
    3434 
    3535        self.VolumeControls={ 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/phase88.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/quatafire.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget 
    25 from ffadomixer_config import * 
     25from ffado.config import * 
    2626 
    2727import logging 
     
    3131    def __init__(self,parent = None): 
    3232        QWidget.__init__(self,parent) 
    33         uicLoad("mixer_quatafire", self) 
     33        uicLoad("ffado/mixer/quatafire", self) 
    3434 
    3535        self.VolumeControls={ 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/quatafire.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/rme.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject, Qt 
    2424from PyQt4.QtGui import QWidget, QApplication 
    25 from ffadomixer_config import * 
     25from ffado.config import * 
    2626 
    2727import logging 
     
    3636    def __init__(self,parent = None): 
    3737        QWidget.__init__(self,parent) 
    38         uicLoad("mixer_rme", self) 
     38        uicLoad("ffado/mixer/rme", self) 
    3939 
    4040        self.init() 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/rme.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffire.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QWidget, QHBoxLayout 
    25 from ffadomixer_config import * 
    26 from mixer_saffire_base import SaffireMixerBase 
     25from ffado.config import * 
     26from ffado.mixer.saffire_base import SaffireMixerBase 
    2727 
    2828import logging 
     
    162162        self.my_parent = parent 
    163163        QWidget.__init__(self,parent) 
    164         uicLoad("mixer_saffire_stereo", self) 
     164        uicLoad("ffado/mixer/saffire_stereo", self) 
    165165        SaffireMixerBase.__init__(self) 
    166166        QObject.connect(self.btnRefresh, SIGNAL('clicked()'), self.updateValues) 
     
    290290        self.my_parent = parent 
    291291        QWidget.__init__(self,parent) 
    292         uicLoad("mixer_saffire_stereo", self) 
     292        uicLoad("ffado/mixer/saffire_stereo", self) 
    293293        SaffireMixerBase.__init__(self) 
    294294        QObject.connect(self.btnRefresh, SIGNAL('clicked()'), self.updateValues) 
     
    435435        self.my_parent = parent 
    436436        QWidget.__init__(self,parent) 
    437         uicLoad("mixer_saffirele_large", self) 
     437        uicLoad("ffado/mixer/saffirele_large", self) 
    438438        SaffireMixerBase.__init__(self) 
    439439 
     
    558558        self.my_parent = parent 
    559559        QWidget.__init__(self,parent) 
    560         uicLoad("mixer_saffirele_small", self) 
     560        uicLoad("ffado/mixer/saffirele_small", self) 
    561561        SaffireMixerBase.__init__(self) 
    562562 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffirele_large.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffirele_small.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffirepro.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2222 
    2323from PyQt4.QtGui import QWidget, QHBoxLayout, QMessageBox 
    24 from ffadomixer_config import * 
    25 from mixer_saffire_base import SaffireMixerBase 
     24from ffado.config import * 
     25from ffado.mixer.saffire_base import SaffireMixerBase 
    2626 
    2727import logging 
     
    112112        QWidget.__init__(self,parent) 
    113113        SaffireMixerBase.__init__(self) 
    114         uicLoad("mixer_saffirepro_large", self) 
     114        uicLoad("ffado/mixer/saffirepro_large", self) 
    115115        self.have_adat = False 
    116116        log.debug("Init large Saffire Pro mixer window") 
     
    371371        QWidget.__init__(self,parent) 
    372372        SaffireMixerBase.__init__(self) 
    373         uicLoad("mixer_saffirepro_small", self) 
     373        uicLoad("ffado/mixer/saffirepro_small", self) 
    374374        log.debug("Init small Saffire Pro mixer window") 
    375375 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffirepro_large.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffirepro_small.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_base.py

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py

    • Property svn:mergeinfo set
    r1639 r1640  
    2222import dbus 
    2323 
    24 class MatrixNode(QtGui.QFrame): 
    25     def __init__(self, row, col, parent): 
    26         QtGui.QFrame.__init__(self,parent) 
    27         self.row = row 
    28         self.connect(self.row, QtCore.SIGNAL("hide"), self.setHidden) 
    29         self.column = col 
    30         self.connect(self.column, QtCore.SIGNAL("hide"), self.setHidden) 
    31  
    32         self.setLineWidth(1) 
    33         self.setFrameStyle(QtGui.QFrame.Panel|QtGui.QFrame.Raised) 
    34         self.layout = QtGui.QGridLayout(self) 
    35         self.setLayout(self.layout) 
    36  
    37         #self.lbl = QtGui.QLabel("(%i,%i)" % (row,col), self) 
    38         #self.layout.addWidget(self.lbl, 0, 0) 
    39  
    40         self.dial = QtGui.QDial(self) 
    41         self.dial.setRange(0,pow(2,16-1)) 
    42         self.connect(self.dial, QtCore.SIGNAL("valueChanged(int)"), self.valueChanged) 
    43         self.layout.addWidget(self.dial, 0, 0) 
    44  
    45     def valueChanged(self, n): 
    46         self.emit(QtCore.SIGNAL("valueChanged"), self.row.number, self.column.number, n) 
    47  
    48     def setHidden(self, hide): 
    49         if not hide: 
    50             if self.row.hidden or self.column.hidden: 
    51                 return 
    52         QtGui.QFrame.setHidden(self, hide) 
    53  
    54 class MatrixChannel(QtGui.QWidget): 
    55     def __init__(self, number, parent=None): 
    56         QtGui.QWidget.__init__(self, parent) 
    57         layout = QtGui.QGridLayout(self) 
    58         self.number = number 
    59         self.btn = QtGui.QPushButton("%i" % self.number, self) 
    60         self.btn.setCheckable(True) 
    61         self.connect(self.btn, QtCore.SIGNAL("clicked(bool)"), self.hideChannel) 
    62         layout.addWidget(self.btn, 0, 0) 
    63  
    64         self.hidden = False 
    65  
    66     def hideChannel(self, hide): 
    67         #print "MatrixChannel.hideChannel( %s )" % str(hide) 
    68         self.hidden = hide 
    69         self.emit(QtCore.SIGNAL("hide"), hide) 
    70  
    71 class MatrixMixer(QtGui.QWidget): 
    72     def __init__(self, servername, basepath, parent=None): 
    73         QtGui.QWidget.__init__(self, parent) 
    74         self.bus = dbus.SessionBus() 
    75         self.dev = self.bus.get_object(servername, basepath) 
    76         self.interface = dbus.Interface(self.dev, dbus_interface="org.ffado.Control.Element.MatrixMixer") 
    77  
    78         palette = self.palette() 
    79         print palette.color( QtGui.QPalette.Window ).name() 
    80         palette.setColor( QtGui.QPalette.Window, palette.color( QtGui.QPalette.Window ).darker() ); 
    81         print self.palette().color( QtGui.QPalette.Window ).name() 
    82  
    83         rows = self.interface.getRowCount() 
    84         cols = self.interface.getColCount() 
    85  
    86         layout = QtGui.QGridLayout(self) 
    87         self.setLayout(layout) 
    88  
    89         self.columns = [] 
    90         self.rows = [] 
    91  
    92         # Add row/column headers 
    93         for i in range(cols): 
    94             ch = MatrixChannel(i, self) 
    95             layout.addWidget(ch, 0, i+1) 
    96             self.columns.append( ch ) 
    97         for i in range(rows): 
    98             ch = MatrixChannel(i, self) 
    99             layout.addWidget(ch, i+1, 0) 
    100             self.rows.append( ch ) 
    101  
    102         # Add node-widgets 
    103         for i in range(rows): 
    104             for j in range(cols): 
    105                 node = MatrixNode(self.rows[i], self.columns[j], self) 
    106                 node.dial.setValue(self.interface.getValue(i, j)) 
    107                 self.connect(node, QtCore.SIGNAL("valueChanged"), self.valueChanged) 
    108                 layout.addWidget(node, i+1, j+1) 
    109  
    110     def valueChanged(self, row, column, n): 
    111         #print "MatrixNode.valueChanged( %i, %i, %i )" % (row,column,n) 
    112         self.interface.setValue(row, column, n) 
    113  
    114     def paintEvent(self, event): 
    115         p = QtGui.QPainter(self) 
    116         p.fillRect(event.rect(), self.palette().window()) 
     24from ffado.matrixmixer import * 
    11725 
    11826class Saffire_Dice(QtGui.QWidget): 
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_mono.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_stereo.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/panelmanager.py

    • Property svn:mergeinfo set
    r1636 r1640  
    2323# 
    2424 
    25 from ffadomixer_config import * #FFADO_VERSION, FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH 
     25from ffado.config import * #FFADO_VERSION, FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH 
    2626 
    2727from PyQt4.QtGui import QFrame, QWidget, QTabWidget, QVBoxLayout, QMainWindow, QIcon, QAction, qApp, QStyleOptionTabWidgetFrame 
    2828from PyQt4.QtCore import QTimer 
    2929 
    30 from ffado_dbus_util import * 
    31 from ffado_registration import * 
    32  
    33 from ffado_configuration import * 
    34  
    35 from mixer_phase88 import * 
    36 from mixer_phase24 import * 
    37 from mixer_saffire import SaffireMixer 
    38 from mixer_saffirepro import SaffireProMixer 
    39 from mixer_saffire_dice import Saffire_Dice 
    40 from mixer_audiofire import AudioFireMixer 
    41 from mixer_bcoaudio5 import * 
    42 from mixer_edirolfa66 import * 
    43 from mixer_edirolfa101 import * 
    44 from mixer_mackie_onyxmixer import * 
    45 from mixer_quatafire import * 
    46 from mixer_motu import * 
    47 from mixer_rme import * 
    48 from mixer_dummy import * 
    49 from mixer_global import GlobalMixer 
     30from ffado.dbus_util import * 
     31from ffado.registration import * 
     32 
     33from ffado.configuration import * 
     34 
     35from ffado.mixer.phase88 import * 
     36from ffado.mixer.phase24 import * 
     37from ffado.mixer.saffire import SaffireMixer 
     38from ffado.mixer.saffirepro import SaffireProMixer 
     39from ffado.mixer.saffire_dice import Saffire_Dice 
     40from ffado.mixer.audiofire import AudioFireMixer 
     41from ffado.mixer.bcoaudio5 import * 
     42from ffado.mixer.edirolfa66 import * 
     43from ffado.mixer.edirolfa101 import * 
     44from ffado.mixer.mackie_onyxmixer import * 
     45from ffado.mixer.quatafire import * 
     46from ffado.mixer.motu import * 
     47from ffado.mixer.rme import * 
     48from ffado.mixer.dummy import * 
     49from ffado.mixer.globalmixer import GlobalMixer 
    5050 
    5151import time 
     
    7777    def __init__(self, parent): 
    7878        QWidget.__init__(self,parent) 
    79         uicLoad("ffado_panelmanagerstatus", self) 
     79        uicLoad("ffado/panelmanagerstatus", self) 
    8080 
    8181class OwnTabWidget(QTabWidget): 
  • trunk/libffado/support/mixer-qt4/ffado/panelmanagerstatus.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/regdialog.py

    • Property svn:mergeinfo set
    r1625 r1640  
    2323from PyQt4.QtCore import SIGNAL, SLOT, QObject 
    2424from PyQt4.QtGui import QDialog 
    25 from ffadomixer_config import * 
     25from ffado.config import * 
    2626 
    2727import logging 
  • trunk/libffado/support/mixer-qt4/ffado/regdialog.ui

    • Property svn:mergeinfo set
  • trunk/libffado/support/mixer-qt4/ffado/registration.py

    • Property svn:mergeinfo set
    r1625 r1640  
     1#!/usr/bin/python 
     2# 
     3# Copyright (C) 2008-2009 by Pieter Palmers 
     4#               2009      by Arnold Krille 
     5# 
     6# This file is part of FFADO 
     7# FFADO = Free Firewire (pro-)audio drivers for linux 
     8# 
     9# FFADO is based upon FreeBoB. 
     10# 
     11# This program is free software: you can redistribute it and/or modify 
     12# it under the terms of the GNU General Public License as published by 
     13# the Free Software Foundation, either version 3 of the License, or 
     14# (at your option) any later version. 
     15# 
     16# This program is distributed in the hope that it will be useful, 
     17# but WITHOUT ANY WARRANTY; without even the implied warranty of 
     18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     19# GNU General Public License for more details. 
     20# 
     21# You should have received a copy of the GNU General Public License 
     22# along with this program.  If not, see <http://www.gnu.org/licenses/>. 
     23# 
     24 
    125import urllib 
    226import ConfigParser, os 
    327 
    4 from ffadomixer_config import REGISTER_URL, INI_FILE_PATH, FFADO_CONFIG_DIR 
     28from ffado.config import REGISTER_URL, INI_FILE_PATH, FFADO_CONFIG_DIR 
    529from PyQt4.QtGui import QMessageBox 
    630from PyQt4.QtCore import QByteArray 
    731 
    8 from ffado_regdialog import * 
     32from ffado.regdialog import * 
    933 
    1034import logging 
  • trunk/libffado/support/mixer-qt4/SConscript

    r1625 r1640  
    11#!/usr/bin/python 
    22# 
    3 # Copyright (C) 2007-2008 Arnold Krille 
     3# Copyright (C) 2007-2009 Arnold Krille 
    44# Copyright (C) 2007-2008 Pieter Palmers 
    55# 
     
    2929if env.has_key('PYUIC4'): 
    3030    e = env.Clone() 
    31     e['MIXERGUIS'] = [ 
    32                         'phase24',  
    33                         'phase88', 
    34                         'saffire_mono', 'saffire_stereo', 
    35                         'saffirepro_large', 'saffirepro_small', 
    36                         'saffirele_large', 'saffirele_small', 
    37                         'audiofire_strip', 'audiofire_settings', 
    38                         'bcoaudio5', 
    39                         'edirolfa101', 'edirolfa66', 
    40                         'quatafire', 
    41                         'mackie_onyxmixer', 
    42                         'motu', 
    43                         'rme', 
    44                         'global', 'dummy' 
    45                      ] 
    46     e['MIXERAPPS'] = [ 
    47                         'phase24', 
    48                         'phase88', 
    49                         'saffire', 
    50                         'saffirepro', 
    51                         'audiofire', 
    52                         'bcoaudio5', 
    53                         'edirolfa101', 'edirolfa66', 
    54                         'quatafire', 
    55                         'mackie_onyxmixer', 
    56                         'motu', 
    57                         'rme', 
    58                         'global', 'dummy' 
    59                      ] 
    6031 
    61     e['OTHERGUIS'] = ['ffado_regdialog', 'ffado_panelmanagerstatus'] 
    62     e['OTHERAPPS'] = ['ffado_dbus_util', 
    63                       'ffado_regdialog', 
    64                       'ffado_panelmanager', 
    65                       'ffado_configuration', 
    66                       'ffado_logginghandler', 
    67                       'mixer_saffire_base' 
    68                      ] 
     32    def findfiles( arg, dirname, names ): 
     33        for name in names: 
     34            if name.startswith("."): 
     35                names.remove(name) 
     36        for name in names: 
     37            if '.pyc' not in name and '.in' not in name: 
     38                arg.append( os.path.join( dirname, name ) ) 
    6939 
    70     # 
    71     # For the ffadomixer.in 
    72     e['PYTHONDIR'] = Template( os.path.join( e['SHAREDIR'], 'python' ) ).safe_substitute( e ) 
    73     # For the installation of the stuff 
    74     e['pythondir'] = Template( os.path.join( e['sharedir'], 'python' ) ).safe_substitute( e ) 
     40    pythonfiles = [ 'ffado/config.py' ] 
     41    os.path.walk( "ffado", findfiles, pythonfiles ) 
    7542 
    76     for m in e['MIXERGUIS']: 
    77         app = "mixer_" + m 
    78         if os.path.exists( app+".ui" ): 
    79             e.Install( "$pythondir", app+".ui" ) 
    80     for m in e['MIXERAPPS']: 
    81         app = "mixer_" + m 
    82         e.Install( "$pythondir", app+".py" ) 
    83  
    84     for app in e['OTHERGUIS']: 
    85         if os.path.exists( app+".ui" ): 
    86             e.Install( "$pythondir", app+".ui" ) 
    87  
    88     for app in e['OTHERAPPS']: 
    89         e.Install( "$pythondir", app+".py" ) 
    90  
    91     e.Install( "$pythondir", "ffado_registration.py" ) 
    92  
    93     e.ScanReplace( "ffadomixer_config.py.in" ) 
    94     e.Depends( "ffadomixer_config.py", "#/config.h" ) 
    95     e.Install( "$pythondir", "ffadomixer_config.py" ) 
     43    e.ScanReplace( "ffado/config.py.in" ) 
     44    e.Depends( "ffado/config.py", "#/SConstruct" ) 
     45    for file in pythonfiles: 
     46        e.InstallAs( os.path.join(e['pypkgdir'], file), file ) 
    9647 
    9748    e.ScanReplace( "ffado-mixer.in" ) 
    98     e.Depends( "ffado-mixer", "#/config.h" ) 
    9949    e.Depends( "ffado-mixer", "SConscript" ) 
     50    e.Depends( "ffado-mixer", "#/SConstruct" ) 
    10051    e.Install( "$bindir", "ffado-mixer" ) 
    10152