From c558736424165fd7d5c50a8e8d877db98716eea8 Mon Sep 17 00:00:00 2001 From: cyd01 Date: Fri, 6 Nov 2020 18:37:06 +0100 Subject: [PATCH] Tagging the 0.74.3.1 release of the kitty project. --- 0.74_My_PuTTY/config.c | 4 ++++ 0.74_My_PuTTY/putty.h | 1 + 0.74_My_PuTTY/settings.c | 2 ++ 0.74_My_PuTTY/version.h | 2 +- 0.74_My_PuTTY/windows/version_major.txt | 2 +- 0.74_My_PuTTY/windows/version_minor.txt | 2 +- 0.74_My_PuTTY/windows/windlg.c | 8 +++++++- docs/version.txt | 2 +- kitty.c | 21 +++++++++++++++++++++ kitty.h | 8 ++++++++ kitty_ini.txt | 6 ++++++ kitty_savedump.c | 3 +++ kitty_settings.c | 2 ++ 13 files changed, 58 insertions(+), 5 deletions(-) diff --git a/0.74_My_PuTTY/config.c b/0.74_My_PuTTY/config.c index df1ced0..9df2ceb 100644 --- a/0.74_My_PuTTY/config.c +++ b/0.74_My_PuTTY/config.c @@ -4094,6 +4094,10 @@ if( !GetPuttyFlag() ) { HELPCTX(no_help), conf_editbox_handler, I(CONF_winscprawsettings), I(1)); + ctrl_editbox(s, "Shell (scp mode only)", NO_SHORTCUT, 100, + HELPCTX(no_help), + conf_editbox_handler, I(CONF_pscpshell), + I(1)); } #endif diff --git a/0.74_My_PuTTY/putty.h b/0.74_My_PuTTY/putty.h index 0762e8f..e2937c9 100644 --- a/0.74_My_PuTTY/putty.h +++ b/0.74_My_PuTTY/putty.h @@ -1548,6 +1548,7 @@ NORETURN void cleanup_exit(int); X(INT, NONE, winscpprot) \ X(STR, NONE, sftpconnect) \ X(STR, NONE, pscpoptions) \ + X(STR, NONE, pscpshell) \ X(STR, NONE, pscpremotedir) \ X(STR, NONE, winscpoptions) \ X(STR, NONE, winscprawsettings) \ diff --git a/0.74_My_PuTTY/settings.c b/0.74_My_PuTTY/settings.c index afec735..83ae11a 100644 --- a/0.74_My_PuTTY/settings.c +++ b/0.74_My_PuTTY/settings.c @@ -891,6 +891,7 @@ void save_open_settings(settings_w *sesskey, Conf *conf) write_setting_i(sesskey, "WinSCPProtocol", conf_get_int(conf, CONF_winscpprot) ); write_setting_s(sesskey, "SFTPConnect", conf_get_str(conf, CONF_sftpconnect) ); write_setting_s(sesskey, "PSCPOptions", conf_get_str(conf, CONF_pscpoptions) ); + write_setting_s(sesskey, "PSCPShell", conf_get_str(conf, CONF_pscpshell) ); write_setting_s(sesskey, "PSCPRemoteDir", conf_get_str(conf, CONF_pscpremotedir) ); write_setting_s(sesskey, "WinSCPOptions", conf_get_str(conf, CONF_winscpoptions) ); write_setting_s(sesskey, "WinSCPRawSettings", conf_get_str(conf, CONF_winscprawsettings) ); @@ -1553,6 +1554,7 @@ void load_open_settings(settings_r *sesskey, Conf *conf) gppi(sesskey, "WinSCPProtocol", 1, conf, CONF_winscpprot ); gpps(sesskey, "SFTPConnect", "", conf, CONF_sftpconnect ); gpps(sesskey, "PSCPOptions", "-r", conf, CONF_pscpoptions ); + gpps(sesskey, "PSCPShell", "", conf, CONF_pscpshell ); gpps(sesskey, "PSCPRemoteDir", "", conf, CONF_pscpremotedir ); gpps(sesskey, "WinSCPOptions", "", conf, CONF_winscpoptions ); gpps(sesskey, "WinSCPRawSettings", "", conf, CONF_winscprawsettings ); diff --git a/0.74_My_PuTTY/version.h b/0.74_My_PuTTY/version.h index 3b0ca55..c9f4b5b 100644 --- a/0.74_My_PuTTY/version.h +++ b/0.74_My_PuTTY/version.h @@ -1,5 +1,5 @@ #define RELEASE 0.74 #define TEXTVER "Release 0.74" #define SSHVER "-Release-0.74" -#define BINARY_VERSION 0,74,2,8 +#define BINARY_VERSION 0,74,3,1 #define SOURCE_COMMIT "unavailable" diff --git a/0.74_My_PuTTY/windows/version_major.txt b/0.74_My_PuTTY/windows/version_major.txt index e7a4a73..b666a58 100644 --- a/0.74_My_PuTTY/windows/version_major.txt +++ b/0.74_My_PuTTY/windows/version_major.txt @@ -1 +1 @@ -"0.74.2" +"0.74.3" diff --git a/0.74_My_PuTTY/windows/version_minor.txt b/0.74_My_PuTTY/windows/version_minor.txt index 45a4fb7..d00491f 100644 --- a/0.74_My_PuTTY/windows/version_minor.txt +++ b/0.74_My_PuTTY/windows/version_minor.txt @@ -1 +1 @@ -8 +1 diff --git a/0.74_My_PuTTY/windows/windlg.c b/0.74_My_PuTTY/windows/windlg.c index c1eb725..7fed351 100644 --- a/0.74_My_PuTTY/windows/windlg.c +++ b/0.74_My_PuTTY/windows/windlg.c @@ -62,6 +62,7 @@ extern char BuildVersionTime[256] ; void CenterDlgInParent(HWND hDlg) ; int get_param( const char * val ) ; void CheckVersionFromWebSite( HWND hwnd ) ; +bool SessPathIsInitial( void ); #ifndef TIMER_SLIDEBG //#define TIMER_SLIDEBG 12343 @@ -723,8 +724,13 @@ static INT_PTR CALLBACK GenericMainDlgProc(HWND hwnd, UINT msg, hw = GetDesktopWindow(); if (GetWindowRect(hw, &rs) && GetWindowRect(hwnd, &rd)) MoveWindow(hwnd, +#ifdef MOD_PERSO + GetConfigBoxLeft()>0 ? GetConfigBoxLeft() : (rs.right + rs.left + rd.left - rd.right) / 2, + GetConfigBoxTop()>0 ? GetConfigBoxTop() : (rs.bottom + rs.top + rd.top - rd.bottom) / 2, +#else (rs.right + rs.left + rd.left - rd.right) / 2, (rs.bottom + rs.top + rd.top - rd.bottom) / 2, +#endif rd.right - rd.left, rd.bottom - rd.top, true); } @@ -863,7 +869,7 @@ static INT_PTR CALLBACK GenericMainDlgProc(HWND hwnd, UINT msg, */ SetWindowLongPtr(hwnd, GWLP_USERDATA, 1); #ifdef MOD_PERSO - ShowWindow(hwnd,SW_HIDE); + //ShowWindow(hwnd,SW_HIDE); ShowWindow(hwnd,SW_SHOW); #endif return 0; diff --git a/docs/version.txt b/docs/version.txt index 1534e78..7584334 100644 --- a/docs/version.txt +++ b/docs/version.txt @@ -1 +1 @@ -0.74.2.8 \ No newline at end of file +0.74.3.1 \ No newline at end of file diff --git a/kitty.c b/kitty.c index 1b775cb..d661f33 100644 --- a/kitty.c +++ b/kitty.c @@ -276,6 +276,16 @@ static int ConfigBoxNoExitFlag = 0 ; int GetConfigBoxNoExitFlag(void) { return ConfigBoxNoExitFlag ; } void SetConfigBoxNoExitFlag( const int flag ) { ConfigBoxNoExitFlag = flag ; } +// ConfigBox X-position +static int ConfigBoxLeft = -1 ; +int GetConfigBoxLeft() { return ConfigBoxLeft ; } +void SetConfigBoxLeft( const int val ) { ConfigBoxLeft = val ; } + +// ConfigBox Y-position +static int ConfigBoxTop = -1 ; +int GetConfigBoxTop() { return ConfigBoxTop ; } +void SetConfigBoxTop( const int val ) { ConfigBoxTop= val ; } + // Flag pour inhiber la gestion du CTRL+TAB static int CtrlTabFlag = 1 ; int GetCtrlTabFlag(void) { return CtrlTabFlag ; } @@ -4011,6 +4021,11 @@ void StartWinSCP( HWND hwnd, char * directory, char * host, char * user ) { strcat( cmd, " " ) ; strcat( cmd, conf_get_str(conf, CONF_winscprawsettings) ) ; } + if( !strcmp(proto,"scp") && (strlen(conf_get_str(conf, CONF_pscpshell))>0) ) { + if( raw == 0 ) { strcat( cmd, " /rawsettings" ) ; raw++ ; } + strcat( cmd, " " ) ; strcat( cmd, "Shell=\"" ) ; strcat( cmd, conf_get_str(conf, CONF_pscpshell) ) ; strcat( cmd, "\"" ) ; + } + if( debug_flag ) { debug_logevent( "Run: %s", cmd ) ; } RunCommand( hwnd, cmd ) ; memset(cmd,0,strlen(cmd)); @@ -5301,6 +5316,12 @@ void LoadParameters( void ) { if( readINI( KittyIniFile, "ConfigBox", "defaultsettings", buffer ) ) { if( !stricmp( buffer, "NO" ) ) DefaultSettingsFlag = 0 ; } + if( readINI( KittyIniFile, "ConfigBox", "left", buffer ) ) { + SetConfigBoxLeft( atoi(buffer) ) ; + } + if( readINI( KittyIniFile, "ConfigBox", "top", buffer ) ) { + SetConfigBoxTop( atoi(buffer) ) ; + } // Param RandomActiveFlag défini dans kitty_commun.c // Pour gérer le bug sur certaines machines: https://github.com/cyd01/KiTTY/issues/113 diff --git a/kitty.h b/kitty.h index 5661299..7b49de5 100644 --- a/kitty.h +++ b/kitty.h @@ -23,6 +23,14 @@ void SetPuttyFlag( const int flag ) ; // extern int ConfigBoxNoExitFlag ; int GetConfigBoxNoExitFlag(void) ; +// ConfigBox X-position +int GetConfigBoxLeft() ; +void SetConfigBoxLeft( const int val ) ; + +// ConfigBox Y-position +int GetConfigBoxTop(); +void SetConfigBoxTop( const int val ) ; + // Flag pour inhiber la gestion du CTRL+TAB int GetCtrlTabFlag(void) ; void SetCtrlTabFlag( const int flag ) ; diff --git a/kitty_ini.txt b/kitty_ini.txt index 2ecdee1..3262388 100644 --- a/kitty_ini.txt +++ b/kitty_ini.txt @@ -32,9 +32,15 @@ filter=yes ; height: the number of visible lines into the saved sessions selection box (in main window) height=21 +; left: X position of the confuguration box (-1 means center) +;left=-1 + ; noexit: if set to yes, return to the configuration box at main program exit ;noexit=no +; top: Y position of the confuguration box (-1 means center) +;top=-1 + ; windowheight: the size of the configuration box ;windowheight=800 diff --git a/kitty_savedump.c b/kitty_savedump.c index f5b0acb..ac3af9b 100644 --- a/kitty_savedump.c +++ b/kitty_savedump.c @@ -548,6 +548,7 @@ void SaveDumpConfig( FILE *fp, Conf * conf ) { fprintf( fp, "winscpprot=%d\n", conf_get_int(conf,CONF_winscpprot) ) ; fprintf( fp, "sftpconnect=%s\n", conf_get_str(conf,CONF_sftpconnect) ) ; fprintf( fp, "pscpoptions=%s\n", conf_get_str(conf,CONF_pscpoptions) ) ; + fprintf( fp, "pscpshell=%s\n", conf_get_str(conf,CONF_pscpshell) ) ; fprintf( fp, "pscpremotedir=%s\n", conf_get_str(conf,CONF_pscpremotedir) ) ; fprintf( fp, "winscpoptions=%s\n", conf_get_str(conf,CONF_winscpoptions) ) ; fprintf( fp, "winscprawsettings=%s\n", conf_get_str(conf,CONF_winscprawsettings) ) ; @@ -690,6 +691,8 @@ void SaveDumpConfig( FILE *fp, Conf * conf ) { fprintf( fp,"BackgroundImageFlag=%d\n",GetBackgroundImageFlag() ); fprintf( fp,"RandomActiveFlag=%d\n",GetRandomActiveFlag() ); fprintf( fp,"CryptSaltFlag=%d\n",GetCryptSaltFlag() ); + fprintf( fp, "ConfigBoxLeft=%d\n",GetConfigBoxLeft()); + fprintf( fp, "ConfigBoxTop=%d\n",GetConfigBoxTop()); #ifdef MOD_RECONNECT fprintf( fp,"AutoreconnectFlag=%d\nReconnectDelay=%d\n",AutoreconnectFlag,ReconnectDelay ); #endif diff --git a/kitty_settings.c b/kitty_settings.c index 2a33fc6..4359464 100644 --- a/kitty_settings.c +++ b/kitty_settings.c @@ -397,6 +397,7 @@ void save_open_settings_forced(char *filename, Conf *conf) { write_setting_i_forced(sesskey, "WinSCPProtocol", conf_get_int(conf, CONF_winscpprot) ); write_setting_s_forced(sesskey, "SFTPConnect", conf_get_str(conf, CONF_sftpconnect) ); write_setting_s_forced(sesskey, "PSCPOptions", conf_get_str(conf, CONF_pscpoptions) ); + write_setting_s_forced(sesskey, "PSCPShell", conf_get_str(conf, CONF_pscpshell) ); write_setting_s_forced(sesskey, "PSCPRemoteDir", conf_get_str(conf, CONF_pscpremotedir) ); write_setting_s_forced(sesskey, "WinSCPOptions", conf_get_str(conf, CONF_winscpoptions) ); write_setting_s_forced(sesskey, "WinSCPRawSettings", conf_get_str(conf, CONF_winscprawsettings) ); @@ -1024,6 +1025,7 @@ void load_open_settings_forced(char *filename, Conf *conf) { gppi_forced(sesskey, "WinSCPProtocol", 1, conf, CONF_winscpprot ); gpps_forced(sesskey, "SFTPConnect", "", conf, CONF_sftpconnect ); gpps_forced(sesskey, "PSCPOptions", "-r", conf, CONF_pscpoptions ); + gpps_forced(sesskey, "PSCPShell", "", conf, CONF_pscpshell ); gpps_forced(sesskey, "PSCPRemoteDir", "", conf, CONF_pscpremotedir ); gpps_forced(sesskey, "WinSCPOptions", "", conf, CONF_winscpoptions ); gpps_forced(sesskey, "WinSCPRawSettings", "", conf, CONF_winscprawsettings );