Skip to content

Commit

Permalink
Merge branch 'topic/import-050716'
Browse files Browse the repository at this point in the history
  • Loading branch information
k-takata committed Aug 28, 2016
2 parents 6e4410d + 3c918a0 commit 575862f
Show file tree
Hide file tree
Showing 30 changed files with 1,054 additions and 121 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ work64/
tags

/source_all/*
!/source_all/Makefile
!/source_all/config.h
/source_custom/*
!/source_custom/Makefile
!/source_custom/config.h
20 changes: 17 additions & 3 deletions lang/tclang-ja.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Main]
DialogFont=�l�r �o�S�V�b�N,9
Version=TClock Light kt160827
Version=TClock Light kt160828
HelpURL=http://homepage1.nifty.com/kazubon/tclocklight/help/ja/

[Property]
Expand All @@ -14,9 +14,11 @@ Line01=" [
Line02=" [ �w�i�F2][ ][...]"
Line03=" [ �O���f�[�V����] [ ��] [ �c]"
Line04=" [ �g���C�̔w�i��h��‚Ԃ�]"
Line05=" [�����F ][ ][...]"
Line06=" [�t�H���g][ ]"
Line05=" [ �����F ][ ][...]"
Line06=" [ �t�H���g][ ]"
Line07="[�t�H���g�T�C�Y][ ] [ ����] [ �Α�]"
Line08=" [ ����][ �Ȃ�] [ �e] [ �����]"
Line09=" [ �F][ ][...][����][ ][]"

[Size]
HelpURL=size.html
Expand Down Expand Up @@ -48,6 +50,17 @@ Line02=" [
Line03=" [ 12����0���ƕ\��]"
Line04=" [ OK ] [�L�����Z�� ]"

[AnalogClock]
HelpURL=analog.html
Line01="[ �A�i���O���v��\������]"
Line02=" [���j] [ ][...] [ ���� ]"
Line03=" [���j] [ ][...] [ ���� ]"
Line04=" [�ʒu] [ �e�L�X�g�ɏd�˂� ] [ �� ] [ �E ]"
Line05=" [�ʒu���� ]"
Line06=" [���E][ ][][�㉺][ ][]"
Line07=" [�T�C�Y] [ ][]"
Line08="[�r�b�g�}�b�v][ ][...]"

[Alarm]
HelpURL=alarm.html
Line01=" [ ���O][ ] [ �lj� ] [ �폜 ]"
Expand Down Expand Up @@ -190,6 +203,7 @@ Clock=
Color=�F�ƃt�H���g
SizePos=�ʒu�ƃT�C�Y
Format=����
AnalogClock=�A�i���O���v
Alarm=�A���[��
Cuckoo=�͂Ǝ��v
Mouse=�}�E�X����
Expand Down
24 changes: 19 additions & 5 deletions lang/tclang.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Main]
DialogFont=MS Sans Serif, 9
Version=TClock Light kt160827
Version=TClock Light kt160828
HelpURL=http://homepage1.nifty.com/kazubon/tclocklight/help/en/

[Property]
Expand All @@ -10,13 +10,15 @@ Line02=" [OK ] [Cancel ] [&Apply

[Color]
HelpURL=color.html
Line01=" [ Background1][ ][...]"
Line02=" [ Background2][ ][...]"
Line01=" [ Background1][ ][...]"
Line02=" [ Background2][ ][...]"
Line03=" [Gradation ] [ Horizontal][ Vertical]"
Line04=" [ Paint Tray background]"
Line05=" [Text ][ ][...]"
Line06=" [Font ][ ]"
Line05=" [Text ][ ][...]"
Line06=" [Font ][ ]"
Line07=" [Size ][ ] [ Bold] [ Italic]"
Line08=" [ Decoration ][ None][ Shadow][ Border]"
Line09=" [ Color ][ ][...][ Range][ ][] "

[Size]
HelpURL=size.html
Expand Down Expand Up @@ -48,6 +50,17 @@ Line02=" [PM symbol ][ ]"
Line03=" [ Show 0:xx at 12:xx]"
Line04=" [ OK ] [ Cancel ]"

[AnalogClock]
HelpURL=analog.html
Line01="[ Display analog clock]"
Line02=" [Hour hand] [ ][...] [ Bold ]"
Line03=" [Minute hand] [ ][...] [ Bold ]"
Line04=" [Position] [ Over the text ] [ Left ] [ Right ]"
Line05=" [Arrangement of position ]"
Line06=" [Horizontal][ ][][Vertical][ ][]"
Line07=" [Size] [ ][]"
Line08=" [ Background][ ][...]"

[Alarm]
HelpURL=alarm.html
Line01=" [ Name][ ] [ Add ] [Delete ]"
Expand Down Expand Up @@ -190,6 +203,7 @@ Clock=Clock
Color=Color and Font
SizePos=Size and Position
Format=Format
AnalogClock=Analog clock
Alarm=Alarm
Cuckoo=Cuckoo clock
Mouse=Mouse
Expand Down
2 changes: 1 addition & 1 deletion pack.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ setlocal DISABLEDELAYEDEXPANSION
:: Normal version
set execfiles=tcdll.tclock tclock.exe tcplayer.exe tcprop.exe tcsntp.exe tctimer.exe
set pkgfiles=readme-kt.txt config-kt.txt format-kt.txt readme.html
set srcfiles=source source_all\config.h source_custom\config.h pack.bat make_all.bat prepare_custom.bat
set srcfiles=source source_all\Makefile source_all\config.h source_custom\Makefile source_custom\config.h pack.bat make_all.bat prepare_custom.bat

if not exist pkg mkdir pkg

Expand Down
2 changes: 0 additions & 2 deletions prepare_custom.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ goto :eof


:createlink
if exist Makefile del Makefile
if exist common rmdir common
if exist dll rmdir dll
if exist exe rmdir exe
Expand All @@ -23,7 +22,6 @@ if exist property rmdir property
if exist sntp rmdir sntp
if exist timer rmdir timer

mklink Makefile ..\source\Makefile
mklink /d common ..\source\common
mklink /d dll ..\source\dll
mklink /d exe ..\source\exe
Expand Down
4 changes: 2 additions & 2 deletions readme-kt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ Privilege Isolation)
�ETClock Light Unofficial 060502
�Etclocklight- 080409

�@�c�[���`�b�v�̊g����A�A�i���O���v�A�e�A�����͎�荞��ł��܂���B

2.13. x64 �ւ̑Ή�
�@x64 �ɐ����Ή����܂����B
�@x64 �f�B���N�g���ɓ����Ă���t�@�C���� x64 �p�̎��s�t�@�C���ł��B�g����
Expand Down Expand Up @@ -399,6 +397,8 @@ UAC (User Account Control)
- �A���[���A�}�E�X�@�\�A�^�C�}�[�̏����������N���X�g�ɕύX�B
- (memreduce �͕s�̗p)
�EExplorer�̃N���b�V����ɉ����������ݒ���f�t�H���g�ŗL�����B
�Etclocklight-050716 �̑����ƃA�i���O���v�@�\����荞�ށB(all ��)
����ɔ����Aall �ł̓f�t�H���g���C�u�����Ƃ̃����N���K�{�ƂȂ����B


�T�D���C�Z���X
Expand Down
11 changes: 5 additions & 6 deletions source/common/combobox.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ void InitColorCombo(HWND hDlg, int idCombo,
const COLORREF* pColAdd, int nAdd, COLORREF colDef);
void OnMeasureItemColorCombo(LPMEASUREITEMSTRUCT pmis);
void OnDrawItemColorCombo(LPDRAWITEMSTRUCT pdis, char (*pTexts)[80]);
void ChooseColorWithCombo(HINSTANCE hInst, HWND hDlg,
int idCombo);
BOOL ChooseColorWithCombo(HWND hDlg, int idCombo);

/*------------------------------------------------
initialize
Expand Down Expand Up @@ -131,8 +130,7 @@ void OnDrawItemColorCombo(LPDRAWITEMSTRUCT pdis, char (*pTexts)[80])
/*--------------------------------------------------------
open a choose color dialog and set color to combobox
----------------------------------------------------------*/
void ChooseColorWithCombo(HINSTANCE hInst, HWND hDlg,
int idCombo)
BOOL ChooseColorWithCombo(HWND hDlg, int idCombo)
{
CHOOSECOLOR cc;
COLORREF col, colarray[16];
Expand All @@ -146,12 +144,11 @@ void ChooseColorWithCombo(HINSTANCE hInst, HWND hDlg,
memset(&cc, 0, sizeof(CHOOSECOLOR));
cc.lStructSize = sizeof(CHOOSECOLOR);
cc.hwndOwner = hDlg;
cc.hInstance = (HWND)hInst;
cc.rgbResult = col;
cc.lpCustColors = colarray;
cc.Flags = CC_FULLOPEN | CC_RGBINIT;

if(!ChooseColor(&cc)) return;
if(!ChooseColor(&cc)) return FALSE;

for(i = 0; i < CBGetCount(hDlg, idCombo); i++)
{
Expand All @@ -162,6 +159,8 @@ void ChooseColorWithCombo(HINSTANCE hInst, HWND hDlg,
CBAddString(hDlg, idCombo, cc.rgbResult);

CBSetCurSel(hDlg, idCombo, i);

return TRUE;
}

/* ---------------------- Font combobox -------------------------------*/
Expand Down
10 changes: 4 additions & 6 deletions source/common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <shlobj.h>
#include "../config.h"

#define TCLOCKVERSION "TClock Light kt160827"
#define TCLOCKVERSION "TClock Light kt160828"

#define CLASS_TCLOCKMAIN "TClockMainClass"
#define CLASS_TCLOCKPROP "TClockPropertyClass"
Expand Down Expand Up @@ -177,8 +177,7 @@ void InitColorCombo(HWND hDlg, int idCombo,
const COLORREF *pColAdd, int nAdd, COLORREF colDef);
void OnMeasureItemColorCombo(LPMEASUREITEMSTRUCT pmis);
void OnDrawItemColorCombo(LPDRAWITEMSTRUCT pdis, char (*pTexts)[80]);
void ChooseColorWithCombo(HINSTANCE hInst, HWND hDlg,
int idCombo);
BOOL ChooseColorWithCombo(HWND hDlg, int idCombo);
void InitFontNameCombo(HWND hDlg, int idCombo, const char* deffont);
void InitFontSizeCombo(HWND hDlg, int idCombo,
const char *fontname, int charset);
Expand Down Expand Up @@ -249,9 +248,9 @@ int r_strnicmp(const char* d, const char* s, size_t n);
int r_atoi(const char *p);
int r_atox(const char *p);
int r__wtoi(const WCHAR *p);
int r_wcslen(const wchar_t *p);
size_t r_wcslen(const wchar_t *p);
wchar_t *r_wcscpy(wchar_t *dp, const wchar_t *sp);
int r_wcsncmp(const wchar_t *p1, const wchar_t *p2, int count);
int r_wcsncmp(const wchar_t *p1, const wchar_t *p2, size_t count);
wchar_t *r_wcscat(wchar_t *dp, const wchar_t *sp);
wchar_t *r_wcsstr(const wchar_t *string, const wchar_t *strCharSet);

Expand Down Expand Up @@ -331,7 +330,6 @@ DWORDLONG r_M32x32to64(DWORD a, DWORD b);

BOOL PlayFile(HWND hwnd, const char *fname, int loops);
BOOL PlayFileCmdLine(HWND hwnd, const char *str);
BOOL Player(HWND hwnd, const char *fname);
void StopFile(void);
void OnMCINotify(HWND hwnd, WPARAM wFlags, LONG lDevID);
BOOL IsSoundFile(const char* fname);
Expand Down
8 changes: 4 additions & 4 deletions source/common/nodeflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ int r__wtoi(const WCHAR *p)
/*-------------------------------------------
wcslen
---------------------------------------------*/
int r_wcslen(const wchar_t *p)
size_t r_wcslen(const wchar_t *p)
{
int n = 0; while(*p) { n++; p++; } return n;
size_t n = 0; while(*p) { n++; p++; } return n;
}

/*-------------------------------------------
Expand All @@ -141,9 +141,9 @@ wchar_t *r_wcscpy(wchar_t *dp, const wchar_t *sp)
/*-------------------------------------------
wcsncmp
---------------------------------------------*/
int r_wcsncmp(const wchar_t *p1, const wchar_t *p2, int count)
int r_wcsncmp(const wchar_t *p1, const wchar_t *p2, size_t count)
{
int i;
size_t i;
for(i = 0; i < count; i++)
{
if(*p1 == 0 && *p2 == 0) break;
Expand Down
1 change: 0 additions & 1 deletion source/common/playfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

BOOL PlayFile(HWND hwnd, const char *fname, int loops);
BOOL PlayFileCmdLine(HWND hwnd, const char *str);
BOOL Player(HWND hwnd, const char *fname);
void StopFile(void);
void OnMCINotify(HWND hwnd, WPARAM wFlags, LONG lDevID);
BOOL IsSoundFile(const char* fname);
Expand Down
6 changes: 3 additions & 3 deletions source/common/utl.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ void SendStringToOtherW(HWND hwnd, HWND hwndFrom,
COPYDATASTRUCT cds;

cds.dwData = type;
cds.cbData = (wcslen(s) + 1) * sizeof(wchar_t);
cds.cbData = ((int)wcslen(s) + 1) * sizeof(wchar_t);
cds.lpData = (LPVOID)s;

if(hwnd && IsWindow(hwnd))
Expand Down Expand Up @@ -538,8 +538,8 @@ void WriteDebugW(const wchar_t* s)
hf = _lcreat(fname, 0);
if(hf == HFILE_ERROR) return;
_llseek(hf, 0, 2);
_lwrite(hf, (LPCSTR)s, wcslen(s)*sizeof(wchar_t));
_lwrite(hf, (LPCSTR)L"\x0d\x0a", wcslen(L"\x0d\x0a")*sizeof(wchar_t));
_lwrite(hf, (LPCSTR)s, (int)wcslen(s)*sizeof(wchar_t));
_lwrite(hf, (LPCSTR)L"\x0d\x0a", 2*sizeof(wchar_t));
_lclose(hf);
}

20 changes: 11 additions & 9 deletions source/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@
//--------------------------------------------------------
// optional functions

#define TC_ENABLE_BATTERY 0
#define TC_ENABLE_CPU 0
#define TC_ENABLE_ETIME 0
#define TC_ENABLE_HDD 0
#define TC_ENABLE_MEMORY 0
#define TC_ENABLE_NETWORK 0
#define TC_ENABLE_VOLUME 0
#define TC_ENABLE_WHEEL 0
#define TC_ENABLE_DESKTOPICON 0
#define TC_ENABLE_BATTERY 0
#define TC_ENABLE_CPU 0
#define TC_ENABLE_ETIME 0
#define TC_ENABLE_HDD 0
#define TC_ENABLE_MEMORY 0
#define TC_ENABLE_NETWORK 0
#define TC_ENABLE_VOLUME 0
#define TC_ENABLE_WHEEL 0
#define TC_ENABLE_DESKTOPICON 0
#define TC_ENABLE_CLOCKDECORATION 0
#define TC_ENABLE_ANALOGCLOCK 0

// Default interval for getting system information: default 4 [sec]
#define TC_DEFAULT_INTERVALSYSINFO 4
Expand Down
Loading

0 comments on commit 575862f

Please sign in to comment.