Changeset 1427

Show
Ignore:
Timestamp:
11/14/08 13:47:30 (12 years ago)
Author:
arnonym
Message:
  • Load the users configuration-file too and use it to overwrite the systems config
  • add a menu-item to trigger bus-resets (not yet implemented)
  • add an "About FFADO" box stating the authors and the license and such things. Should be improved...
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/support/mixer-qt4/ffadomixer_config.py.in

    r1415 r1427  
    1414SHAREDIR = "$SHAREDIR" 
    1515 
     16USER_CONFIG_FILE = "$USER_CONFIG_FILE" 
     17SYSTEM_CONFIG_FILE = "$SYSTEM_CONFIG_FILE" 
     18 
    1619DEBUG = $DEBUG 
  • branches/libffado-2.0/support/mixer-qt4/ffado_configuration.py

    r1426 r1427  
    2222# 
    2323 
    24 import re 
     24import re, os 
    2525 
    2626class DeviceList: 
     
    3131 
    3232        def updateFromFile( self, filename ): 
     33                if not os.path.exists( filename ): 
     34                        return 
    3335                f = open( filename, "r" ) 
    3436                stream = f.read() 
  • branches/libffado-2.0/support/mixer-qt4/ffado_panelmanager.py

    r1426 r1427  
    9393        self.connect( quitaction, SIGNAL( "triggered()" ), self, SLOT( "close()" ) ) 
    9494        filemenu.addAction( quitaction ) 
     95 
     96        editmenu = self.menuBar().addMenu( "Edit" ) 
     97        updateaction = QAction( "Update Mixer Panels", self ) 
     98        self.connect( updateaction, SIGNAL( "triggered()" ), self.updatePanels ) 
     99        editmenu.addAction( updateaction ) 
     100        resetaction = QAction( "Trigger Bus Reset", self ) 
     101        self.connect( resetaction, SIGNAL( "triggered()" ), self.busreset ) 
     102        editmenu.addAction( resetaction ) 
     103 
    95104        helpmenu = self.menuBar().addMenu( "Help" ) 
     105        aboutaction = QAction( "About FFADO", self ) 
     106        self.connect( aboutaction, SIGNAL( "triggered()" ), self.aboutFFADO ) 
     107        helpmenu.addAction( aboutaction ) 
    96108        aboutqtaction = QAction( "About Qt", self ) 
    97109        self.connect( aboutqtaction, SIGNAL( "triggered()" ), qApp, SLOT( "aboutQt()" ) ) 
     
    124136        self.alivetimer.start( 2000 ) 
    125137 
    126         self.devices = DeviceList( "%s/configuration" % SHAREDIR ) 
     138        self.devices = DeviceList( SYSTEM_CONFIG_FILE ) 
     139        self.devices.updateFromFile( USER_CONFIG_FILE ) 
    127140 
    128141    def count(self): 
     
    352365                self.tabs.addTab( w, "Generic Mixer" ) 
    353366                self.panels[GUID_GENERIC_MIXER] = w 
     367 
     368    def busreset( self ): 
     369        QMessageBox.information( self, "Not supported", "Triggering bus resets from the mixer (via dbus) isn't yet supported." ) 
     370 
     371    def aboutFFADO(self): 
     372        QMessageBox.about( self, "About FFADO", """ 
     373<h1>ffado.org</h1> 
     374 
     375<p>FFADO is the new approach to have firewire audio on linux.</p> 
     376 
     377<p>&copy; 2006-2008 by the FFADO developers<br />ffado is licensed under the GPLv3, for the full license text see <a href="http://www.gnu.org/licenses/">www.gnu.org/licenses</a> or the LICENSE.* files shipped with ffado.</p> 
     378 
     379<p>FFADO developers are:<ul> 
     380<li>Pieter Palmers 
     381<li>Daniel Wagner 
     382<li>Jonathan Woithe 
     383<li>Arnold Krille 
     384</ul> 
     385""" )