root/trunk/libffado/support/mixer/ffado_regdialog.py

Revision 1077, 2.2 kB (checked in by ppalmers, 16 years ago)

create config save directory if not present. change registration window looks.

Line 
1 #
2 # Copyright (C) 2005-2008 by Pieter Palmers
3 #
4 # This file is part of FFADO
5 # FFADO = Free Firewire (pro-)audio drivers for linux
6 #
7 # FFADO is based upon FreeBoB.
8 #
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 2 of the License, or
12 # (at your option) version 3 of the License.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 #
22
23 from qt import *
24 from ffado_regdialogui import *
25
26 class ffadoRegDialog(ffadoRegDialogUI):
27     def __init__(self, vendor_name, vendor_id, model_name, model_id,
28                  guid, version, email="(optional)",
29                  parent = None,name = None,modal = 1,fl = 0):
30         ffadoRegDialogUI.__init__(self,parent,name,modal,fl)
31
32         self.txtVendorName.setText(vendor_name)
33         self.txtVendorId.setText(vendor_id)
34         self.txtModelName.setText(model_name)
35         self.txtModelId.setText(model_id)
36         self.txtGUID.setText(guid)
37         self.txtVersion.setText(version)
38         self.txtEmail.setText(email)
39         self.choice = "nosend"
40
41     def buttonPressed(self):
42         sender = self.sender()
43         if sender == self.btnSend:
44             print "user chose to send"
45             self.choice = "send"
46         elif sender ==  self.btnNoSend:
47             print "user chose not to send"
48             self.choice = "nosend"
49         elif sender ==  self.btnNeverSend:
50             print "user chose to never send"
51             self.choice = "neversend"
52         self.close()
53
54     def getEmail(self):
55         return self.txtEmail.text()
56
57     def init(self):
58         print "Init ffado reg window"
59         self.choice = "nosend"
60         QObject.connect(self.btnSend,SIGNAL('clicked()'),self.buttonPressed)
61         QObject.connect(self.btnNoSend,SIGNAL('clicked()'),self.buttonPressed)
62         QObject.connect(self.btnNeverSend,SIGNAL('clicked()'),self.buttonPressed)
Note: See TracBrowser for help on using the browser.