------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee. http://bugs.kde.org/show_bug.cgi?id=103255 ------- Additional Comments From caulier.gilles free fr 2006-10-13 16:12 ------- SVN commit 595205 by cgilles: kipiplugins from trunk : MetadataEdit plugin: Missing IPTC Contact and Subject tags. CCMAIL: kde-imaging kde org CCBUGS: 91812, 133276, 103255 M +25 -9 iptccaption.cpp M +16 -1 iptccredits.cpp --- trunk/extragear/libs/kipi-plugins/metadataedit/iptccaption.cpp #595204:595205 @ -50,11 +50,13 @ IPTCCaptionPriv() { captionEdit = 0; + subjectEdit = 0; writerEdit = 0; headlineEdit = 0; specialInstructionEdit = 0; } + KLineEdit *subjectEdit; KLineEdit *writerEdit; KLineEdit *headlineEdit; @ -86,36 +88,48 @ // -------------------------------------------------------- - QLabel *label2 = new QLabel(i18n("Caption Writer:"), parent); + QLabel *label2 = new QLabel(i18n("Subject:"), parent); + d->subjectEdit = new KLineEdit(parent); + d->subjectEdit->setValidator(asciiValidator); + d->subjectEdit->setMaxLength(236); + label2->setBuddy(d->subjectEdit); + vlay->addWidget(label2); + vlay->addWidget(d->subjectEdit); + QWhatsThis::add(d->subjectEdit, i18n("<p>Set here the structured definition of the subject. " + "This field is limited to 236 ASCII characters.")); + + // -------------------------------------------------------- + + QLabel *label3 = new QLabel(i18n("Caption Writer:"), parent); d->writerEdit = new KLineEdit(parent); d->writerEdit->setValidator(asciiValidator); d->writerEdit->setMaxLength(32); - label2->setBuddy(d->writerEdit); - vlay->addWidget(label2); + label3->setBuddy(d->writerEdit); + vlay->addWidget(label3); vlay->addWidget(d->writerEdit); QWhatsThis::add(d->writerEdit, i18n("<p>Set here the person responsible for caption. This field is limited " "to 32 ASCII characters.")); // -------------------------------------------------------- - QLabel *label3 = new QLabel(i18n("Headline:"), parent); + QLabel *label4 = new QLabel(i18n("Headline:"), parent); d->headlineEdit = new KLineEdit(parent); d->headlineEdit->setValidator(asciiValidator); d->headlineEdit->setMaxLength(256); - label3->setBuddy(d->headlineEdit); - vlay->addWidget(label3); + label4->setBuddy(d->headlineEdit); + vlay->addWidget(label4); vlay->addWidget(d->headlineEdit); QWhatsThis::add(d->headlineEdit, i18n("<p>Set here the content synopsis. This field is limited " "to 256 ASCII characters.")); // -------------------------------------------------------- - QLabel *label4 = new QLabel(i18n("Special Instructions:"), parent); + QLabel *label5 = new QLabel(i18n("Special Instructions:"), parent); d->specialInstructionEdit = new KTextEdit(parent); /* d->specialInstructionEdit->setValidator(asciiValidator); d->specialInstructionEdit->setMaxLength(256);*/ - label4->setBuddy(d->specialInstructionEdit); - vlay->addWidget(label4); + label5->setBuddy(d->specialInstructionEdit); + vlay->addWidget(label5); vlay->addWidget(d->specialInstructionEdit); QWhatsThis::add(d->specialInstructionEdit, i18n("<p>Set here the editorial usage instructions. " "This field is limited to 256 ASCII characters.")); @ -142,6 +156,7 @ KIPIPlugins::Exiv2Iface exiv2Iface; exiv2Iface.setIptc(iptcData); d->captionEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Caption", false)); + d->subjectEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Subject", false)); d->writerEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Writer", false)); d->headlineEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Headline", false)); d->specialInstructionEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.SpecialInstructions", false)); @ -152,6 +167,7 @ KIPIPlugins::Exiv2Iface exiv2Iface; exiv2Iface.setIptc(iptcData); exiv2Iface.setIptcTagString("Iptc.Application2.Caption", d->captionEdit->text()); + exiv2Iface.setIptcTagString("Iptc.Application2.Subject", d->subjectEdit->text()); exiv2Iface.setIptcTagString("Iptc.Application2.Writer", d->writerEdit->text()); exiv2Iface.setIptcTagString("Iptc.Application2.Headline", d->headlineEdit->text()); exiv2Iface.setIptcTagString("Iptc.Application2.SpecialInstructions", d->specialInstructionEdit->text()); --- trunk/extragear/libs/kipi-plugins/metadataedit/iptccredits.cpp #595204:595205 @ -53,6 +53,7 @ bylineTitleEdit = 0; creditEdit = 0; sourceEdit = 0; + contactEdit = 0; } KLineEdit *copyrightEdit; @ -60,6 +61,7 @ KLineEdit *bylineTitleEdit; KLineEdit *creditEdit; KLineEdit *sourceEdit; + KLineEdit *contactEdit; }; IPTCCredits::IPTCCredits(QWidget* parent, QByteArray& iptcData) @ -134,6 +136,18 @ // -------------------------------------------------------- + QLabel *label6 = new QLabel(i18n("Contact:"), parent); + d->contactEdit = new KLineEdit(parent); + d->contactEdit->setValidator(asciiValidator); + d->contactEdit->setMaxLength(128); + label6->setBuddy(d->sourceEdit); + vlay->addWidget(label6); + vlay->addWidget(d->contactEdit); + QWhatsThis::add(d->contactEdit, i18n("<p>Set here the person or organisation to contact. " + "This field is limited to 128 ASCII characters.")); + + // -------------------------------------------------------- + QLabel *iptcNote = new QLabel(i18n("<b>Note: IPTC text tags only support printable " "ASCII characters set.</b>"), parent); vlay->addWidget(iptcNote); @ -158,6 +172,7 @ d->bylineTitleEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.BylineTitle", false)); d->creditEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Credit", false)); d->sourceEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Source", false)); + d->contactEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Contact", false)); } void IPTCCredits::applyMetadata(QByteArray& iptcData) @ -168,7 +183,7 @ exiv2Iface.setIptcTagString("Iptc.Application2.Byline", d->bylineEdit->text()); exiv2Iface.setIptcTagString("Iptc.Application2.BylineTitle", d->bylineTitleEdit->text()); exiv2Iface.setIptcTagString("Iptc.Application2.Credit", d->creditEdit->text()); - exiv2Iface.setIptcTagString("Iptc.Application2.Source", d->sourceEdit->text()); + exiv2Iface.setIptcTagString("Iptc.Application2.Source", d->sourceEdit->text()); exiv2Iface.setIptcTagString("Iptc.Application2.Contact", d->contactEdit->text()); iptcData = exiv2Iface.getIptc(); } _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |