Suppressing 2 Gtk warning: #1 when the lens profile's filename is empty; #2 when opening the Preferences window

This commit is contained in:
Hombre
2013-09-22 19:45:31 +02:00
parent 05a96423e4
commit 12807d3525
2 changed files with 4 additions and 3 deletions

View File

@@ -80,11 +80,13 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
{ {
disableListener (); disableListener ();
if (pp->lensProf.lcpFile.length()>0 && lcpStore->isValidLCPFileName(pp->lensProf.lcpFile)) { if (!pp->lensProf.lcpFile.empty() && lcpStore->isValidLCPFileName(pp->lensProf.lcpFile)) {
fcbLCPFile->set_filename (pp->lensProf.lcpFile); fcbLCPFile->set_filename (pp->lensProf.lcpFile);
updateDisabled(true); updateDisabled(true);
} else { } else {
fcbLCPFile->unselect_filename(fcbLCPFile->get_filename()); Glib::ustring fname = fcbLCPFile->get_filename();
if (!pp->lensProf.lcpFile.empty())
fcbLCPFile->unselect_filename(fname);
updateDisabled(false); updateDisabled(false);
} }

View File

@@ -710,7 +710,6 @@ Gtk::Widget* Preferences::getGeneralPanel () {
hb6->set_border_width (4); hb6->set_border_width (4);
hb6->set_spacing (4); hb6->set_spacing (4);
Gtk::Label* dflab = Gtk::manage( new Gtk::Label (M("PREFERENCES_DATEFORMAT")+":", Gtk::ALIGN_LEFT)); Gtk::Label* dflab = Gtk::manage( new Gtk::Label (M("PREFERENCES_DATEFORMAT")+":", Gtk::ALIGN_LEFT));
hb6->pack_start (*dflab, Gtk::PACK_SHRINK,4);
dateformat = Gtk::manage( new Gtk::Entry () ); dateformat = Gtk::manage( new Gtk::Entry () );
dateformat->set_tooltip_markup (M("PREFERENCES_DATEFORMATHINT")); dateformat->set_tooltip_markup (M("PREFERENCES_DATEFORMATHINT"));
dflab->set_tooltip_markup (M("PREFERENCES_DATEFORMATHINT")); dflab->set_tooltip_markup (M("PREFERENCES_DATEFORMATHINT"));