From 62c2de1dd2da57683cf269bb0602fc214d61bef0 Mon Sep 17 00:00:00 2001 From: cyd01 Date: Wed, 12 Aug 2020 09:02:00 +0200 Subject: [PATCH] Tagging the 0.74.0.4 release of the kitty project. --- 0.74_My_PuTTY/ssh2userauth.c | 2 +- 0.74_My_PuTTY/version.h | 2 +- 0.74_My_PuTTY/windows/version_minor.txt | 2 +- 0.74_My_PuTTY/windows/window.c | 16 ++++------------ kitty.c | 21 +++++++++++++++++++-- kitty_ini.txt | 2 ++ 6 files changed, 28 insertions(+), 17 deletions(-) diff --git a/0.74_My_PuTTY/ssh2userauth.c b/0.74_My_PuTTY/ssh2userauth.c index 0bfa17f..b66e730 100644 --- a/0.74_My_PuTTY/ssh2userauth.c +++ b/0.74_My_PuTTY/ssh2userauth.c @@ -260,7 +260,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) PktIn *pktin; #ifdef MOD_RECONNECT - SetSSHConnected(0); + SetSSHConnected(1); #endif ssh2_userauth_filter_queue(s); /* no matter why we were called */ diff --git a/0.74_My_PuTTY/version.h b/0.74_My_PuTTY/version.h index 566fe60..ae6bdc8 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,0,3 +#define BINARY_VERSION 0,74,0,4 #define SOURCE_COMMIT "unavailable" diff --git a/0.74_My_PuTTY/windows/version_minor.txt b/0.74_My_PuTTY/windows/version_minor.txt index 00750ed..b8626c4 100644 --- a/0.74_My_PuTTY/windows/version_minor.txt +++ b/0.74_My_PuTTY/windows/version_minor.txt @@ -1 +1 @@ -3 +4 diff --git a/0.74_My_PuTTY/windows/window.c b/0.74_My_PuTTY/windows/window.c index c69bf54..d677e79 100644 --- a/0.74_My_PuTTY/windows/window.c +++ b/0.74_My_PuTTY/windows/window.c @@ -671,6 +671,7 @@ static void close_session(void *ignored_context) #ifdef MOD_RECONNECT void RestartSession( void ) { + queue_toplevel_callback(close_session, NULL); if( GetAutoreconnectFlag() ) { lp_eventlog(default_logpolicy, "User request session restart..." ) ; } else { @@ -3645,7 +3646,7 @@ else if((UINT_PTR)wParam == TIMER_LOGROTATION) { // log rotation serbuf = strbuf_new(); #ifdef MOD_PERSO - /*On gère le répertoire distant*/ +/*On gère le répertoire distant*/ char *cmd, *cmd2=NULL ; cmd = (char*)malloc( strlen(conf_get_str(conf,CONF_autocommand))+1 ) ; strcpy( cmd, conf_get_str(conf,CONF_autocommand) ) ; @@ -4390,16 +4391,7 @@ free(cmd); #endif break ; } - if( (message == WM_LBUTTONUP) && (wParam & MK_SHIFT) ) { // shift + bouton gauche => duplicate session dans la fenêtre d'édition - char * host= (char*)malloc(strlen(conf_get_str(conf,CONF_host))+1) ; - strcpy( host, conf_get_str(conf,CONF_host) ) ; - conf_set_str(conf,CONF_host,"") ; - save_settings("__STARTUP",conf) ; - RunSession( hwnd, "", "__STARTUP" ); - conf_set_str(conf,CONF_host,host) ; - free(host) ; - del_settings("__STARTUP"); - } + else if (message == WM_LBUTTONUP && ((wParam & MK_CONTROL) ) ) {// ctrl+bouton gauche => nouvelle icone if( !GetHyperlinkFlag() || !conf_get_int(conf,CONF_url_ctrl_click) ) { // si les hyperliens ou le ctrl sont désactivés if( GetIconeFlag() != -1 ) SetNewIcon( hwnd, conf_get_filename(conf,CONF_iconefile)->path, conf_get_int(conf,CONF_icone), SI_NEXT ) ; @@ -4410,7 +4402,7 @@ free(cmd); } RefreshBackground( hwnd ) ; break ; - } + } else if (message == WM_MBUTTONUP && ((wParam & MK_CONTROL) ) ) { // ctrl+bouton milieu => send to tray SendMessage( hwnd, WM_COMMAND, IDM_TOTRAY, 0 ) ; diff --git a/kitty.c b/kitty.c index cc29c2f..44466d6 100644 --- a/kitty.c +++ b/kitty.c @@ -444,6 +444,7 @@ static struct TShortcuts { int resetterminal ; int duplicate ; int opennew ; + int opennewcurrent ; int changesettings ; int clearscrollback ; int closerestart ; @@ -1887,7 +1888,19 @@ void ManageShortcutsFlag( HWND hwnd ) { // Gere la demande de relance de l'application void ManageRestart( HWND hwnd ) { SendMessage( hwnd, WM_COMMAND, IDM_RESTART, 0 ) ; - } +} + +// Lance une configbox avec les paramètres courants (mais sans hostname) +void ConfigBoxWithCurrentSettings( HWND hwnd ) { + char * host= (char*)malloc(strlen(conf_get_str(conf,CONF_host))+1) ; + strcpy( host, conf_get_str(conf,CONF_host) ) ; + conf_set_str(conf,CONF_host,"") ; + save_settings("__STARTUP",conf) ; + RunSession( hwnd, "", "__STARTUP" ); + conf_set_str(conf,CONF_host,host) ; + free(host) ; + del_settings("__STARTUP"); +} // Modification de l'icone de l'application //SendMessage( hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon( hInstIcons, MAKEINTRESOURCE(IDI_MAINICON_0 + IconeNum ) ) ); @@ -1929,7 +1942,7 @@ void SetNewIcon( HWND hwnd, char * iconefile, int icone, const int mode ) { } } Shell_NotifyIcon(NIM_MODIFY, &TrayIcone); - } +} // Modification de l'icone pour mettre l'icone de perte de connexion void SetConnBreakIcon( void ) { @@ -4849,6 +4862,8 @@ void InitShortcuts( void ) { shortcuts_tab.duplicate = CONTROLKEY+ALTKEY+84 ; if( !readINI(KittyIniFile,"Shortcuts","opennew",buffer) || ( (shortcuts_tab.opennew=DefineShortcuts(buffer))<0 ) ) shortcuts_tab.opennew = 0 ; + if( !readINI(KittyIniFile,"Shortcuts","opennewcurrent",buffer) || ( (shortcuts_tab.opennewcurrent=DefineShortcuts(buffer))<0 ) ) + shortcuts_tab.opennewcurrent = 0 ; if( !readINI(KittyIniFile,"Shortcuts","changesettings",buffer) || ( (shortcuts_tab.changesettings=DefineShortcuts(buffer))<0 ) ) shortcuts_tab.changesettings = 0 ; if( !readINI(KittyIniFile,"Shortcuts","clearscrollback",buffer) || ( (shortcuts_tab.clearscrollback=DefineShortcuts(buffer))<0 ) ) @@ -5005,6 +5020,8 @@ int ManageShortcuts( HWND hwnd, const int* clips_system, int key_num, int shift_ { SendMessage( hwnd, WM_COMMAND, IDM_DUPSESS, 0 ) ; return 1 ; } else if( key == shortcuts_tab.opennew ) // Open new session { SendMessage( hwnd, WM_COMMAND, IDM_NEWSESS, 0 ) ; return 1 ; } + else if( key == shortcuts_tab.opennewcurrent ) // Open new config box with current settings + { ConfigBoxWithCurrentSettings( hwnd ) ; return 1 ; } else if( key == shortcuts_tab.changesettings ) // Change settings { SendMessage( hwnd, WM_COMMAND, IDM_RECONF, 0 ) ; return 1 ; } else if( key == shortcuts_tab.clearscrollback ) // Clear scrollback diff --git a/kitty_ini.txt b/kitty_ini.txt index f5fb871..cda4029 100644 --- a/kitty_ini.txt +++ b/kitty_ini.txt @@ -233,6 +233,8 @@ inputm= keyexchange= ; New session ... opennew= +; Start a new configuration box with current settings but without hostname +opennewcurrent= ; Print current clipboard content (default if SHIFT+F7) print= ; Print all window buffer content (default is F7)