1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 19:31:02 +01:00

Some ui changes to the ripcd dialog.

- Move the Rip audio CD menu item to the Tools menu.

- Hide the progress bar if the CD ripper isn't working when the CD ripping
dialog is shown.
This commit is contained in:
Mattias Andersson 2015-02-18 20:07:05 +01:00
parent eed0c0d45f
commit 7d0d7be568
4 changed files with 15 additions and 6 deletions

View File

@ -49,7 +49,10 @@ const char* RipCDDialog::kSettingsGroup = "Transcoder";
const int RipCDDialog::kMaxDestinationItems = 10;
RipCDDialog::RipCDDialog(QWidget* parent)
: QDialog(parent), ui_(new Ui_RipCDDialog), ripper_(new Ripper(this)) {
: QDialog(parent),
ui_(new Ui_RipCDDialog),
ripper_(new Ripper(this)),
working_(false) {
// Init
ui_->setupUi(this);
@ -119,7 +122,12 @@ RipCDDialog::~RipCDDialog() {}
bool RipCDDialog::CheckCDIOIsValid() { return ripper_->CheckCDIOIsValid(); }
void RipCDDialog::showEvent(QShowEvent* event) { BuildTrackListTable(); }
void RipCDDialog::showEvent(QShowEvent* event) {
BuildTrackListTable();
if (!working_) {
ui_->progress_group->hide();
}
}
void RipCDDialog::ClickedRipButton() {
if (ripper_->MediaChanged()) {
@ -236,6 +244,7 @@ void RipCDDialog::UpdateProgressBar(int progress) {
}
void RipCDDialog::SetWorking(bool working) {
working_ = working;
rip_button_->setVisible(!working);
cancel_button_->setVisible(working);
close_button_->setVisible(!working);

View File

@ -18,8 +18,6 @@
#ifndef SRC_RIPPER_RIPCDDIALOG_H_
#define SRC_RIPPER_RIPCDDIALOG_H_
#include <cdio/cdio.h>
#include <memory>
#include <QDialog>
#include <QFile>
@ -77,5 +75,6 @@ class RipCDDialog : public QDialog {
QPushButton* rip_button_;
std::unique_ptr<Ui_RipCDDialog> ui_;
Ripper* ripper_;
bool working_;
};
#endif // SRC_RIPPER_RIPCDDIALOG_H_

View File

@ -312,6 +312,7 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
ui_->action_quit->setIcon(IconLoader::Load("application-exit"));
ui_->action_remove_from_playlist->setIcon(IconLoader::Load("list-remove"));
ui_->action_repeat_mode->setIcon(IconLoader::Load("media-playlist-repeat"));
ui_->action_rip_audio_cd->setIcon(IconLoader::Load("media-optical"));
ui_->action_shuffle->setIcon(IconLoader::Load("x-clementine-shuffle"));
ui_->action_shuffle_mode->setIcon(IconLoader::Load("media-playlist-shuffle"));
ui_->action_stop->setIcon(IconLoader::Load("media-playback-stop"));

View File

@ -411,7 +411,6 @@
</property>
<addaction name="action_open_media"/>
<addaction name="action_open_cd"/>
<addaction name="action_rip_audio_cd"/>
<addaction name="action_add_podcast"/>
<addaction name="separator"/>
<addaction name="action_previous_track"/>
@ -473,6 +472,7 @@
<addaction name="action_equalizer"/>
<addaction name="action_visualisations"/>
<addaction name="action_transcode"/>
<addaction name="action_rip_audio_cd"/>
<addaction name="separator"/>
<addaction name="action_update_library"/>
<addaction name="action_full_library_scan"/>
@ -847,7 +847,7 @@
</action>
<action name="action_rip_audio_cd">
<property name="text">
<string>Rip audio CD...</string>
<string>Rip audio CD</string>
</property>
</action>
<action name="action_remove_unavailable">