|
Lines 255-262
Link Here
|
| 255 |
|
255 |
|
| 256 |
bool singleSelect; |
256 |
bool singleSelect; |
| 257 |
|
257 |
|
| 258 |
TQString fileformats; |
|
|
| 259 |
|
| 260 |
KURL url; |
258 |
KURL url; |
| 261 |
KURL::List urls; |
259 |
KURL::List urls; |
| 262 |
}; |
260 |
}; |
|
Lines 266-303
Link Here
|
| 266 |
d = new ImageDialogPrivate; |
264 |
d = new ImageDialogPrivate; |
| 267 |
d->singleSelect = singleSelect; |
265 |
d->singleSelect = singleSelect; |
| 268 |
|
266 |
|
| 269 |
TQStringList patternList = TQStringList::split('\n', KImageIO::pattern(KImageIO::Reading)); |
267 |
TQStringList mimeTypes = KImageIO::mimeTypes(KImageIO::Reading); |
| 270 |
|
268 |
mimeTypes.append("image/x-raw"); |
| 271 |
// All Images from list must been always the first entry given by KDE API |
|
|
| 272 |
TQString allPictures = patternList[0]; |
| 273 |
|
| 274 |
#if KDCRAW_VERSION < 0x000106 |
| 275 |
// Add other files format witch are missing to All Images" type mime provided by KDE and remplace current. |
| 276 |
if (KDcrawIface::DcrawBinary::instance()->versionIsRight()) |
| 277 |
{ |
| 278 |
allPictures.insert(allPictures.find("|"), TQString(KDcrawIface::DcrawBinary::instance()->rawFiles()) + TQString(" *.JPE *.TIF")); |
| 279 |
patternList.remove(patternList[0]); |
| 280 |
patternList.prepend(allPictures); |
| 281 |
// Added RAW file formats supported by dcraw program like a type mime. |
| 282 |
// Nota: we cannot use here "image/x-raw" type mime from KDE because it uncomplete |
| 283 |
// or unavailable (see file #121242 in B.K.O). |
| 284 |
patternList.append(i18n("\n%1|Camera RAW files").arg(TQString(KDcrawIface::DcrawBinary::instance()->rawFiles()))); |
| 285 |
} |
| 286 |
#else |
| 287 |
allPictures.insert(allPictures.find("|"), TQString(KDcrawIface::KDcraw::rawFiles()) + TQString(" *.JPE *.TIF")); |
| 288 |
patternList.remove(patternList[0]); |
| 289 |
patternList.prepend(allPictures); |
| 290 |
// Added RAW file formats supported by dcraw program like a type mime. |
| 291 |
// Nota: we cannot use here "image/x-raw" type mime from KDE because it uncomplete |
| 292 |
// or unavailable (see file #121242 in B.K.O). |
| 293 |
patternList.append(i18n("\n%1|Camera RAW files").arg(TQString(KDcrawIface::KDcraw::rawFiles()))); |
| 294 |
#endif |
| 295 |
|
269 |
|
| 296 |
d->fileformats = patternList.join("\n"); |
270 |
DDebug() << "mimeTypes=" << mimeTypes.join(" ") << endl; |
| 297 |
|
271 |
|
| 298 |
DDebug() << "fileformats=" << d->fileformats << endl; |
272 |
KFileDialog dlg(url.path(), mimeTypes.join(" "), parent, "imageFileOpenDialog", false); |
| 299 |
|
|
|
| 300 |
KFileDialog dlg(url.path(), d->fileformats, parent, "imageFileOpenDialog", false); |
| 301 |
ImageDialogPreview *preview = new ImageDialogPreview(&dlg); |
273 |
ImageDialogPreview *preview = new ImageDialogPreview(&dlg); |
| 302 |
dlg.setPreviewWidget(preview); |
274 |
dlg.setPreviewWidget(preview); |
| 303 |
dlg.setOperationMode(KFileDialog::Opening); |
275 |
dlg.setOperationMode(KFileDialog::Opening); |
|
Lines 330-340
Link Here
|
| 330 |
return d->singleSelect; |
302 |
return d->singleSelect; |
| 331 |
} |
303 |
} |
| 332 |
|
304 |
|
| 333 |
TQString ImageDialog::fileformats() const |
|
|
| 334 |
{ |
| 335 |
return d->fileformats; |
| 336 |
} |
| 337 |
|
| 338 |
KURL ImageDialog::url() const |
305 |
KURL ImageDialog::url() const |
| 339 |
{ |
306 |
{ |
| 340 |
return d->url; |
307 |
return d->url; |