diff --git a/rtgui/history.cc b/rtgui/history.cc index f16111d62..d62fcdb30 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -24,18 +24,11 @@ using namespace rtengine; using namespace rtengine::procparams; -Glib::ustring eventDescrArray[NUMOFEVENTS]; History::History (bool bookmarkSupport) : historyVPaned(nullptr), blistener(nullptr), tpc (nullptr), bmnum (1) { blistenerLock = false; // sets default that the Before preview will not be locked - - // fill history event message array - for (int i = 0; i < NUMOFEVENTS; i++) { - eventDescrArray[i] = M(Glib::ustring::compose("HISTORY_MSG_%1", i + 1)); - } - // History List // ~~~~~~~~~~~~ Gtk::ScrolledWindow* hscrollw = Gtk::manage (new Gtk::ScrolledWindow ()); @@ -238,7 +231,7 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring } // construct formatted list content - Glib::ustring text = Glib::ustring::compose ("%1", eventDescrArray[ev]); + Glib::ustring text = M("HISTORY_MSG_" + std::to_string(ev + 1)); Glib::RefPtr selection = hTreeView->get_selection(); Gtk::TreeModel::iterator iter = selection->get_selected(); @@ -263,7 +256,6 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring // if there is no last item or its chev!=ev, create a new one if (size == 0 || !row || row[historyColumns.chev] != ev || ev == EvProfileChanged) { Gtk::TreeModel::Row newrow = *(historyModel->append()); - newrow[historyColumns.realText] = eventDescrArray[ev]; newrow[historyColumns.text] = text; newrow[historyColumns.value] = g_markup_escape_text(descr.c_str(), -1); newrow[historyColumns.chev] = ev; @@ -282,7 +274,6 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring } // else just update it else { - row[historyColumns.realText] = eventDescrArray[ev]; row[historyColumns.text] = text; row[historyColumns.value] = g_markup_escape_text(descr.c_str(), -1); row[historyColumns.chev] = ev; @@ -428,9 +419,9 @@ bool History::on_query_tooltip(int x, int y, bool keyboard_tooltip, const Glib:: if (path && !path.empty()) { Gtk::TreeModel::iterator iter = historyModel->get_iter(path); if (iter) { - Glib::ustring param, val; - iter->get_value(1, param); - iter->get_value(2, val); + Glib::ustring text, val; + iter->get_value(0, text); + iter->get_value(1, val); /* * @@ -449,7 +440,7 @@ bool History::on_query_tooltip(int x, int y, bool keyboard_tooltip, const Glib:: tooltip->set_custom(*hbox); */ - tooltip->set_text(param+" : "+val); + tooltip->set_text(text + " : " + val); displayTooltip = true; } } diff --git a/rtgui/history.h b/rtgui/history.h index e905cb396..8fbe256e4 100644 --- a/rtgui/history.h +++ b/rtgui/history.h @@ -40,7 +40,6 @@ public: class HistoryColumns : public Gtk::TreeModel::ColumnRecord { public: - Gtk::TreeModelColumn realText; Gtk::TreeModelColumn text; Gtk::TreeModelColumn value; Gtk::TreeModelColumn params; @@ -49,7 +48,6 @@ public: HistoryColumns() { add(text); - add(realText); add(value); add(chev); add(params);