79
78
SLOT( deselectAllTracks() ), actionCollection(), "deselect_all" );
80
79
selectAll->setEnabled( false );
81
80
deselectAll->setEnabled( false );
84
82
KActionMenu *actActionMenu = new KActionMenu( i18n("Rip &Selection"), "rip", actionCollection(), "rip" );
85
83
actActionMenu->setDelayed(true); //needed for checking "all accounts"
97
95
connect( jobQue, SIGNAL( removeJob(int) ), this, SLOT( updateStatus() ) );
98
96
connect( jobQue, SIGNAL( removeJob(int) ), ripper, SLOT( removeJob(int) ) );
99
97
connect( jobQue, SIGNAL( removeJob(int) ), encoder, SLOT( removeJob(int)) );
101
99
connect( ripper, SIGNAL( updateProgress(int, int) ) , jobQue, SLOT( updateProgress(int,int) ) );
102
100
connect( ripper, SIGNAL( addJob(Job*, const QString &) ), jobQue, SLOT( addJob(Job*, const QString &)) );
103
101
connect( ripper, SIGNAL( eject(const QString &) ) , tracks, SLOT( ejectDevice(const QString &)) );
104
102
connect( ripper, SIGNAL( encodeWav(Job *) ) , encoder, SLOT( encodeWav(Job *)) );
105
103
connect( ripper, SIGNAL( jobsChanged() ) , this, SLOT( updateStatus() ) );
108
105
connect( encoder, SIGNAL( updateProgress(int, int) ) , jobQue, SLOT( updateProgress(int,int)) );
109
106
connect( encoder, SIGNAL( addJob(Job*, const QString&)), jobQue, SLOT( addJob(Job*, const QString &)) );
110
107
connect( encoder, SIGNAL( jobsChanged() ) , this, SLOT( updateStatus() ) );
112
109
connect( tracks, SIGNAL( hasCD(bool) ) , this, SLOT( hasCD(bool) ) );
113
connect( tracks, SIGNAL( ripTrack(Job *) ), ripper, SLOT( ripTrack(Job *)) );
110
connect( tracks, SIGNAL( ripTrack(Job *) ), ripper, SLOT( ripTrack(Job *)) );
114
111
connect( tracks, SIGNAL( hasTracks(bool) ), rip, SLOT( setEnabled(bool)) );
115
112
connect( tracks, SIGNAL( hasTracks(bool) ), actActionMenu, SLOT( setEnabled(bool)) );
116
113
connect( tracks, SIGNAL( hasTracks(bool) ), deselectAll, SLOT( setEnabled(bool)) );
117
connect( tracks, SIGNAL( hasTracks(bool) ), selectAll, SLOT( setEnabled(bool)) );
114
connect( tracks, SIGNAL( hasTracks(bool) ), selectAll, SLOT( setEnabled(bool)) );
119
116
(void)new KAction(i18n("Remove &Completed Jobs"), 0, jobQue,
120
117
SLOT(clearDoneJobs()), actionCollection(), "clear_done_jobs" );
122
119
KAction *edit = new KAction(i18n("&Edit Album..."), 0, tracks,
123
120
SLOT(editInformation()), actionCollection(), "edit_cd");
124
121
connect(tracks, SIGNAL(hasCD(bool)), edit, SLOT(setEnabled(bool)));
125
edit->setEnabled( false );
122
edit->setEnabled( false );
127
124
(void)new KAction(i18n("Encode &File..."), 0, this,
128
125
SLOT(encodeFile()), actionCollection(), "encode_file");
130
127
KAction *cddb = new KAction(i18n("&CDDB Lookup"), 0, tracks,
131
128
SLOT(performCDDB()), actionCollection(), "cddb_now");
132
129
connect(tracks, SIGNAL(hasCD(bool)), cddb, SLOT(setEnabled(bool)));
133
cddb->setEnabled( false );
130
cddb->setEnabled( false );
135
132
KStdAction::configureNotifications(this, SLOT(configureNotifications()),
136
133
actionCollection());
137
134
KStdAction::quit( this, SLOT(close()), actionCollection(), "quit" );
139
136
// Init statusbar
140
137
statusBar()->insertItem(i18n("No Audio CD detected"), 0 );
141
138
hasCD(tracks->hasCD());