Aggiunto menu font
git-svn-id: svn://10.65.10.50/trunk@2800 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c56df40925
commit
565b421b0f
@ -3,3 +3,4 @@
|
||||
MENU TASK_MENUBAR
|
||||
SUBMENU MENU_FILE "~File"
|
||||
|
||||
DEFAULT_FONT_MENU
|
||||
|
@ -1,16 +1,15 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#define STRICT
|
||||
#define XVT_INCL_NATIVE
|
||||
#include <xvt.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
#define STRICT
|
||||
#include <windows.h>
|
||||
#include <toolhelp.h>
|
||||
# include <toolhelp.h>
|
||||
#endif
|
||||
|
||||
#include <extcdecl.h>
|
||||
#include <modaut.h>
|
||||
|
||||
#include <applicat.h>
|
||||
#include <colors.h>
|
||||
#include <config.h>
|
||||
@ -18,10 +17,13 @@
|
||||
#include <prefix.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <extcdecl.h>
|
||||
#include <modaut.h>
|
||||
#include <relation.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
#include <xvtility.h>
|
||||
#include <controls.h>
|
||||
|
||||
#include <bagn002.h>
|
||||
|
||||
@ -69,7 +71,7 @@ HIDDEN long backdrop_eh( WINDOW win, EVENT* ep)
|
||||
|
||||
HIDDEN void create_backdrop( void )
|
||||
{
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_NT
|
||||
xvt_create_statbar();
|
||||
xvt_statbar_set("");
|
||||
#else
|
||||
@ -171,11 +173,21 @@ long XVT_CALLCONV1 TApplication::task_eh(WINDOW win, EVENT *ep)
|
||||
do_events();
|
||||
|
||||
break;
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_NT
|
||||
case E_UPDATE:
|
||||
backdrop_eh(win, ep);
|
||||
break;
|
||||
#endif
|
||||
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);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -308,7 +320,9 @@ void TApplication::terminate()
|
||||
const word WM_WAKEUP = RegisterWindowMessage("WAKEUP");
|
||||
const HTASK ht = GetCurrentTask();
|
||||
SendMessage(HWND_BROADCAST, WM_WAKEUP, (unsigned int)ht, 0L);
|
||||
#endif
|
||||
|
||||
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_NT
|
||||
if (fexist("prassi.hlp"))
|
||||
{
|
||||
HWND hwnd = (HWND)xvt_vobj_get_attr(TASK_WIN, ATTR_NATIVE_WINDOW);
|
||||
@ -381,16 +395,19 @@ void TApplication::set_perms()
|
||||
_user_aut.set(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
TLocalisamfile users(LF_USER);
|
||||
|
||||
users.zero();
|
||||
users.put("USERNAME", utente);
|
||||
if (users.read() == NOERR)
|
||||
{
|
||||
if (use_files())
|
||||
{
|
||||
const TString& aut = users.get("AUTSTR");
|
||||
for (int i = aut.len()-1; i > 0; i--)
|
||||
_user_aut.set(i, aut[i] == 'X');
|
||||
TLocalisamfile users(LF_USER);
|
||||
|
||||
users.zero();
|
||||
users.put("USERNAME", utente);
|
||||
if (users.read() == NOERR)
|
||||
{
|
||||
const TString& aut = users.get("AUTSTR");
|
||||
for (int i = aut.len()-1; i > 0; i--)
|
||||
_user_aut.set(i, aut[i] == 'X');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -420,7 +437,7 @@ void TApplication::check_parameters(
|
||||
#endif
|
||||
}
|
||||
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_NT
|
||||
const long twin_style = WSF_ICONIZABLE | WSF_SIZE | WSF_CLOSE | WSF_MAXIMIZED;
|
||||
xvt_vobj_set_attr(NULL_WIN,ATTR_WIN_PM_TWIN_STARTUP_STYLE, twin_style);
|
||||
#endif
|
||||
@ -538,7 +555,7 @@ void TApplication::enable_menu_item(
|
||||
|
||||
void TApplication::dispatch_e_menu(MENU_TAG item)
|
||||
{
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_NT
|
||||
HWND w = (HWND)xvt_vobj_get_attr(TASK_WIN, ATTR_NATIVE_WINDOW);
|
||||
PostMessage(w, WM_COMMAND, item, 0L);
|
||||
#else
|
||||
@ -710,10 +727,11 @@ bool TApplication::firm_change_enabled() const
|
||||
|
||||
// @comm Praticamente controlla se e' stato lanciato da ba0 o dal program manager
|
||||
{
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_NT
|
||||
static bool can = 2;
|
||||
if (can == 2)
|
||||
{
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
TASKENTRY te; te.dwSize = sizeof(TASKENTRY);
|
||||
HTASK ct = GetCurrentTask();
|
||||
TaskFindHandle(&te, ct);
|
||||
@ -724,6 +742,9 @@ bool TApplication::firm_change_enabled() const
|
||||
stricmp(te.szModule, "MSVC") == 0 ||
|
||||
#endif
|
||||
stricmp(te.szModule, "PROGMAN") == 0;
|
||||
#else
|
||||
can = TRUE;
|
||||
#endif
|
||||
}
|
||||
return can;
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user