Update of /cvsroot/quickrip/quickrip In directory sc8-pr-cvs1:/tmp/cvs-serv24612 Modified Files: gui.py Added Files: guiprogressdialogue.py Removed Files: guiprogressdialogue_1pass.py guiprogressdialogue_2pass.py guiprogressdialogue_3pass.py Log Message: Consolidated progress dialogues into one UI file, with an empty space for progress bars. These are then put in as appropriate in GUI.py (in GUI.openRipDialogue) Index: gui.py =================================================================== RCS file: /cvsroot/quickrip/quickrip/gui.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** gui.py 14 Jul 2003 18:28:43 -0000 1.11 --- gui.py 16 Jul 2003 18:44:31 -0000 1.12 *************** *** 1,3 **** ! #!/usr/bin/env python """ --- 1,3 ---- ! #!/usr/bin/env python """ *************** *** 120,123 **** --- 120,124 ---- def int_startRipping(self): print "* Starting ripping" + self.openRipDialogue() def int_newTrack(self, name, number, total, vbr): *************** *** 277,299 **** def openRipDialogue(self): ! #qr_dir = "/usr/share/quickrip" ! try: ! os.chdir(config.qr_dir) ! except OSError, msg: ! print "\n***Unable to change to directory %s\n(%s)\n" % (qr_dir, msg) - if self.config['passes'] is 1: - from guiprogressdialogue_1pass import dialogProgress - elif self.config['passes'] is 2: - from guiprogressdialogue_2pass import dialogProgress - elif not self.config['passes'] or self.config['passes'] is 3: - from guiprogressdialogue_3pass import dialogProgress self.state = "stopped" ! self.Dialogue = dialogProgress(self) self.Dialogue.connect(self.Dialogue.b_changeState,SIGNAL("clicked()"),self.changeState) self.Dialogue.b_changeState.setText("Start") self.Dialogue.b_closeProgressDialogue.setEnabled(1) self.Dialogue.rippingXofY.setText("Waiting to start...") ! os.chdir(self.outdir) self.Dialogue.exec_loop() --- 278,339 ---- def openRipDialogue(self): ! #try: ! # os.chdir(config.qr_dir) ! #except OSError, msg: ! # print "\n***Unable to change to directory", qr_dir, "\n(", msg, ")\n" ! import output ! print output.bold("DEVELOPER: UNCOMMENT THE CHDIR CODE! (LINE 284, GUI.PY)") ! ! from guiprogressdialogue import dialogueProgress self.state = "stopped" ! self.Dialogue = dialogueProgress(self) self.Dialogue.connect(self.Dialogue.b_changeState,SIGNAL("clicked()"),self.changeState) self.Dialogue.b_changeState.setText("Start") self.Dialogue.b_closeProgressDialogue.setEnabled(1) self.Dialogue.rippingXofY.setText("Waiting to start...") ! ! # Add in progress bars appropriate to number of passes ! l_audiopass = QHBoxLayout(None,0,6,"l_audiopass") ! self.Dialogue.textLabel3 = QLabel(self.Dialogue.groupBox3,"textlabel3") ! l_audiopass.addWidget(self.Dialogue.textLabel3) ! self.Dialogue.pm_audioPass = QProgressBar(self.Dialogue.groupBox3,"pm_audioPass") ! self.Dialogue.pm_audioPass.setMinimumSize(QSize(400,0)) ! l_audiopass.addWidget(self.Dialogue.pm_audioPass) ! self.Dialogue.groupBox3Layout.addLayout(l_audiopass,2,0) ! self.Dialogue.textLabel3.setText(self.tr("Progress:")) ! ! if self.config['passes'] is 2 or self.config['passes'] is 3: ! l_videopass1 = QHBoxLayout(None,0,6,"l_videopass1") ! self.Dialogue.textLabel4 = QLabel(self.Dialogue.groupBox3,"textlabel4") ! l_videopass1.addWidget(self.Dialogue.textLabel4) ! self.Dialogue.pm_videoPass1 = QProgressBar(self.Dialogue.groupBox3,"pm_videoPass1") ! self.Dialogue.pm_videoPass1.setMinimumSize(QSize(400,0)) ! l_videopass1.addWidget(self.Dialogue.pm_videoPass1) ! self.Dialogue.groupBox3Layout.addLayout(l_videopass1,3,0) ! self.Dialogue.textLabel3.setText(self.tr("Audio pass:")) ! self.Dialogue.textLabel4.setText(self.tr("Video pass:")) ! ! if self.config['passes'] is 3: ! l_videopass2 = QHBoxLayout(None,0,6,"l_videopass1") ! self.Dialogue.textLabel5 = QLabel(self.Dialogue.groupBox3,"textlabel5") ! l_videopass2.addWidget(self.Dialogue.textLabel5) ! self.Dialogue.pm_videoPass2 = QProgressBar(self.Dialogue.groupBox3,"pm_videoPass2") ! self.Dialogue.pm_videoPass2.setMinimumSize(QSize(400,0)) ! l_videopass2.addWidget(self.Dialogue.pm_videoPass2) ! self.Dialogue.groupBox3Layout.addLayout(l_videopass2,4,0) ! self.Dialogue.textLabel3.setText(self.tr("Audio pass:")) ! self.Dialogue.textLabel4.setText(self.tr("Video pass 1:")) ! self.Dialogue.textLabel5.setText(self.tr("Video pass 2:")) ! ! ! ! # if self.config['passes'] is 1: ! # from guiprogressdialogue_1pass import dialogProgress ! # elif self.config['passes'] is 2: ! # from guiprogressdialogue_2pass import dialogProgress ! # elif not self.config['passes'] or self.config['passes'] is 3: ! # from guiprogressdialogue_3pass import dialogProgress ! self.Dialogue.exec_loop() --- guiprogressdialogue_1pass.py DELETED --- --- guiprogressdialogue_2pass.py DELETED --- --- guiprogressdialogue_3pass.py DELETED --- |