diff --git a/include/applicat.cpp b/include/applicat.cpp index 3a2a59878..c55f20a3e 100755 --- a/include/applicat.cpp +++ b/include/applicat.cpp @@ -407,10 +407,7 @@ long TApplication::handler(WINDOW win, EVENT* ep) { WINDOW w = cur_win(); if (w != NULL_WIN && w != win) - { - // ::dispatch_e_menu(w, ep->v.cmd.tag); dispatch_event(w, *ep, TRUE); - } } else { @@ -429,19 +426,6 @@ long TApplication::handler(WINDOW win, EVENT* ep) else return 1; // Divieto! break; - case E_FONT: - { - XVT_FNTID new_font = ep->v.font.font_id; - char font_ser_desc[512]; - TConfig font(CONFIG_USER, "Font"); - - xvt_font_serialize(new_font, font_ser_desc, sizeof(font_ser_desc)); - font.set("FontDesc", font_ser_desc); - font.set_paragraph("Colors"); // Forza la scrittura del paragrafo - - xvt_load_default_font(); - } - break; case E_QUIT: if (ep->v.query) { diff --git a/include/xml.cpp b/include/xml.cpp index a2a3d4468..ea0ef4004 100755 --- a/include/xml.cpp +++ b/include/xml.cpp @@ -8,6 +8,8 @@ #include #endif +#include + /////////////////////////////////////////////////////////// // Utilities /////////////////////////////////////////////////////////// @@ -140,6 +142,18 @@ const TString& TXmlItem::GetAttr(const char* strAttr) const return EMPTY_STRING; } +TXmlItem& TXmlItem::SetAttr(const char* strAttr, int n) +{ + TString16 str; + if (n != 0) str << n; + return SetAttr(strAttr, str); +} + +int TXmlItem::GetIntAttr(const char* strAttr) const +{ + return atoi(GetAttr(strAttr)); +} + TXmlItem& TXmlItem::SetAttr(const char* strAttr, bool b) { return SetAttr(strAttr, b ? "1" : ""); diff --git a/include/xml.h b/include/xml.h index f11b90224..24d3b5111 100755 --- a/include/xml.h +++ b/include/xml.h @@ -46,7 +46,8 @@ public: TXmlItem& SetAttr(const char* strAttr, const char* strVal); const TString& GetAttr(const char* strAttr) const; - + TXmlItem& SetAttr(const char* strAttr, int n); + int GetIntAttr(const char* strAttr) const; TXmlItem& SetAttr(const char* strAttr, bool yes); bool GetBoolAttr(const char* strAttr) const;