Patch level : 10.0
Files correlati : agalib.lib Ricompilazione Demo : [ ] Commento : Corretta gestione temi in base ad OEM git-svn-id: svn://10.65.10.50/trunk@18046 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c03bdf4380
commit
d6f0c029e0
@ -222,7 +222,7 @@ long TApplication::handler(WINDOW win, EVENT* ep)
|
||||
case M_EDIT_COPY:
|
||||
case M_EDIT_PASTE:
|
||||
{
|
||||
// I comandi della clipborad vanno ridiretti alla finestra col focus
|
||||
// I comandi della clipboard vanno ridiretti alla finestra col focus
|
||||
WINDOW w = xvt_scr_get_focus_vobj();
|
||||
if (w != NULL_WIN && w != win) // Evito ciclo infinito
|
||||
{
|
||||
|
@ -787,3 +787,19 @@ TConfig::~TConfig()
|
||||
if (_dirty)
|
||||
_write_file();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Utilities
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
const TString& get_oem_info(const char* varname)
|
||||
{
|
||||
TConfig ini(CONFIG_OEM, "MAIN");
|
||||
const int oem = ini.get_int("OEM", NULL, -1);
|
||||
if (oem >= 0)
|
||||
{
|
||||
TString8 str; str.format("OEM_%d", oem);
|
||||
return get_tmp_string() = ini.get(varname, str);
|
||||
}
|
||||
return EMPTY_STRING;
|
||||
}
|
||||
|
@ -177,4 +177,6 @@ public:
|
||||
virtual ~TConfig();
|
||||
};
|
||||
|
||||
const TString& get_oem_info(const char* varname);
|
||||
|
||||
#endif
|
||||
|
@ -207,18 +207,17 @@ XVT_FNTID xvtil_default_font(bool bold, bool big)
|
||||
|
||||
DEF_FONT = xvt_dwin_get_font(TASK_WIN);
|
||||
|
||||
TConfig font(CONFIG_GUI, "Font");
|
||||
TString font_ser_desc = font.get("FontDesc");
|
||||
TConfig font(CONFIG_GUI, "Colors");
|
||||
TString font_ser_desc = font.get("FontDesc"); // Modernamente e' nel paragrafo Colors
|
||||
|
||||
if (font_ser_desc.empty())
|
||||
font_ser_desc = font.get("FontDesc", "Font"); // Anticamente era nel paragrafo Font
|
||||
|
||||
if (font_ser_desc.empty())
|
||||
{
|
||||
const char* name = "Courier New";
|
||||
// Tenta di usare il Verdana se possibile
|
||||
if (pc.right > 800 && is_xvt_font("Verdana"))
|
||||
name = "Verdana";
|
||||
|
||||
const char* name = "Verdana";
|
||||
font_ser_desc.format("01\\%s\\0\\10\\WIN01/-13/0/0/0/400/0/0/0/0/1/2/1/49/%s", name, name);
|
||||
|
||||
font.set("FontDesc", font_ser_desc); // Salva definitivamente il font
|
||||
font.set("FontDesc", font_ser_desc, "Colors", true); // Salva definitivamente il font
|
||||
}
|
||||
|
||||
xvt_font_deserialize(DEF_FONT, font_ser_desc);
|
||||
|
@ -827,17 +827,6 @@ void TMask::handler(WINDOW w, EVENT* ep)
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (tag >= M_EDIT && tag <= M_EDIT_CLIPBOARD && notebook() != NULL_WIN)
|
||||
{
|
||||
static long _last_tag = 0;
|
||||
const long curr_tag = w ^ tag;
|
||||
if (curr_tag != _last_tag)
|
||||
{
|
||||
_last_tag = curr_tag;
|
||||
xvt_win_post_event(curr_win(), ep);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (tag == M_HELP_ONCONTEXT)
|
||||
{
|
||||
on_key(K_F1);
|
||||
|
@ -929,7 +929,8 @@ void TWindow::line(short x0, short y0, short x1, short y1)
|
||||
void TWindow::icon(short x0, short y0, int iconid)
|
||||
{
|
||||
PNT f = log2dev(x0,y0);
|
||||
if (iconid < 0) iconid = ICON_RSRC;
|
||||
if (iconid <= 0)
|
||||
iconid = ICON_RSRC;
|
||||
xvt_dwin_draw_icon(win(), f.h, f.v, iconid);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user