Merge branch 'master' into gtk3

This commit is contained in:
Morgan Hardwood
2017-01-06 20:12:12 +01:00
38 changed files with 1117 additions and 968 deletions

View File

@@ -34,7 +34,7 @@ IPTCPanel::IPTCPanel ()
int row = 0;
Gtk::Label* capl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CAPTION") + ":") );
Gtk::Label* capl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_DESCRIPTION") + ":") );
setExpandAlignProperties(capl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
captionText = Gtk::TextBuffer::create ();
captionView = Gtk::manage( new Gtk::TextView (captionText) );
@@ -44,20 +44,20 @@ IPTCPanel::IPTCPanel ()
scrolledWindowc->set_min_content_height (100);
scrolledWindowc->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS);
scrolledWindowc->add(*captionView);
capl->set_tooltip_text (M("IPTCPANEL_CAPTIONHINT"));
captionView->set_tooltip_text (M("IPTCPANEL_CAPTIONHINT"));
capl->set_tooltip_text (M("IPTCPANEL_DESCRIPTIONHINT"));
captionView->set_tooltip_text (M("IPTCPANEL_DESCRIPTIONHINT"));
captionView->set_size_request(35, 95);
iptc->attach (*capl, 0, row++, 1, 1);
iptc->attach (*scrolledWindowc, 0, row++, 1, 1);
// --------------------------
Gtk::Label* capwl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CAPTIONWRITER") + ":") );
Gtk::Label* capwl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_DESCRIPTIONWRITER") + ":") );
setExpandAlignProperties(capwl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
captionWriter = Gtk::manage( new Gtk::Entry () );
setExpandAlignProperties(captionWriter, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
capwl->set_tooltip_text (M("IPTCPANEL_CAPTIONWRITERHINT"));
captionWriter->set_tooltip_text (M("IPTCPANEL_CAPTIONWRITERHINT"));
capwl->set_tooltip_text (M("IPTCPANEL_DESCRIPTIONWRITERHINT"));
captionWriter->set_tooltip_text (M("IPTCPANEL_DESCRIPTIONWRITERHINT"));
iptc->attach (*capwl, 0, row++, 1, 1);
iptc->attach (*captionWriter, 0, row++, 1, 1);
@@ -187,25 +187,25 @@ IPTCPanel::IPTCPanel ()
iptc->attach (*hsep3, 0, row++, 2, 1);
// --------------------------
Gtk::Label* authl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_AUTHOR") + ":") );
setExpandAlignProperties(authl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
author = Gtk::manage( new Gtk::Entry () );
setExpandAlignProperties(author, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
authl->set_tooltip_text (M("IPTCPANEL_CREDITHINT"));
author->set_tooltip_text (M("IPTCPANEL_CREDITHINT"));
iptc->attach (*authl, 0, row++, 1, 1);
iptc->attach (*author, 0, row++, 1, 1);
Gtk::Label* creatorLbl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CREATOR") + ":") );
setExpandAlignProperties(creatorLbl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
creator = Gtk::manage( new Gtk::Entry () );
setExpandAlignProperties(creator, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
creatorLbl->set_tooltip_text (M("IPTCPANEL_CREATORHINT"));
creator->set_tooltip_text (M("IPTCPANEL_CREATORHINT"));
iptc->attach (*creatorLbl, 0, row++, 1, 1);
iptc->attach (*creator, 0, row++, 1, 1);
// --------------------------
Gtk::Label* aupl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_AUTHORSPOSITION") + ":") );
setExpandAlignProperties(aupl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
authorPos = Gtk::manage( new Gtk::Entry () );
setExpandAlignProperties(authorPos, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
aupl->set_tooltip_text (M("IPTCPANEL_AUTHORSPOSITIONHINT"));
authorPos->set_tooltip_text (M("IPTCPANEL_AUTHORSPOSITIONHINT"));
iptc->attach (*aupl, 0, row++, 1, 1);
iptc->attach (*authorPos, 0, row++, 1, 1);
Gtk::Label* creatorJobTitleLbl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CREATORJOBTITLE") + ":") );
setExpandAlignProperties(creatorJobTitleLbl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
creatorJobTitle = Gtk::manage( new Gtk::Entry () );
setExpandAlignProperties(creatorJobTitle, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
creatorJobTitleLbl->set_tooltip_text (M("IPTCPANEL_CREATORJOBTITLEHINT"));
creatorJobTitle->set_tooltip_text (M("IPTCPANEL_CREATORJOBTITLEHINT"));
iptc->attach (*creatorJobTitleLbl, 0, row++, 1, 1);
iptc->attach (*creatorJobTitle, 0, row++, 1, 1);
// --------------------------
@@ -375,8 +375,8 @@ IPTCPanel::IPTCPanel ()
conns[2] = headline->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) );
conns[3] = instructions->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) );
conns[4] = category->get_entry()->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) );
conns[5] = author->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) );
conns[6] = authorPos->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) );
conns[5] = creator->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) );
conns[6] = creatorJobTitle->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) );
conns[7] = credit->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) );
conns[8] = source->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) );
conns[9] = copyright->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) );
@@ -391,8 +391,8 @@ IPTCPanel::IPTCPanel ()
keyword->get_entry()->set_max_length (64);
captionWriter->set_max_length (32);
instructions->set_max_length (256);
author->set_max_length (32);
authorPos->set_max_length (32);
creator->set_max_length (32);
creatorJobTitle->set_max_length (32);
credit->set_max_length (32);
source->set_max_length (32);
copyright->set_max_length (128);
@@ -580,8 +580,8 @@ void IPTCPanel::updateChangeList ()
changeList["SupplementalCategories"].push_back (suppCategories->get_text (i));
}
changeList["Author" ].push_back (author->get_text ());
changeList["AuthorsPosition"].push_back (authorPos->get_text ());
changeList["Creator" ].push_back (creator->get_text ());
changeList["CreatorJobTitle"].push_back (creatorJobTitle->get_text ());
changeList["Credit" ].push_back (credit->get_text ());
changeList["Source" ].push_back (source->get_text ());
changeList["Copyright" ].push_back (copyright->get_text ());
@@ -609,8 +609,8 @@ void IPTCPanel::applyChangeList ()
keywords->clear_items ();
category->get_entry()->set_text ("");
suppCategories->clear_items ();
author->set_text ("");
authorPos->set_text ("");
creator->set_text ("");
creatorJobTitle->set_text ("");
credit->set_text ("");
source->set_text ("");
copyright->set_text ("");
@@ -642,10 +642,10 @@ void IPTCPanel::applyChangeList ()
for (unsigned int j = 0; j < i->second.size(); j++) {
suppCategories->append (i->second.at(j));
}
else if (i->first == "Author" && !i->second.empty()) {
author->set_text (i->second.at(0));
} else if (i->first == "AuthorsPosition" && !i->second.empty()) {
authorPos->set_text (i->second.at(0));
else if (i->first == "Creator" && !i->second.empty()) {
creator->set_text (i->second.at(0));
} else if (i->first == "CreatorJobTitle" && !i->second.empty()) {
creatorJobTitle->set_text (i->second.at(0));
} else if (i->first == "Credit" && !i->second.empty()) {
credit->set_text (i->second.at(0));
} else if (i->first == "Source" && !i->second.empty()) {