diff --git a/0.74_My_PuTTY/version.h b/0.74_My_PuTTY/version.h index d849390..3b0ca55 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,7 +#define BINARY_VERSION 0,74,2,8 #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 7f8f011..45a4fb7 100644 --- a/0.74_My_PuTTY/windows/version_minor.txt +++ b/0.74_My_PuTTY/windows/version_minor.txt @@ -1 +1 @@ -7 +8 diff --git a/0.74_My_PuTTY/windows/window.c b/0.74_My_PuTTY/windows/window.c index b11d753..5a46bd4 100644 --- a/0.74_My_PuTTY/windows/window.c +++ b/0.74_My_PuTTY/windows/window.c @@ -322,6 +322,9 @@ void logfile_reinit(void *handle) ; void set_cmd_line( const char * st ) ; +/* Flag to manage first connection */ +bool first_connect = true ; + #ifdef MOD_INTEGRATED_KEYGEN int WINAPI KeyGen_WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show); #endif @@ -3333,10 +3336,13 @@ else if((UINT_PTR)wParam == TIMER_INIT) { // Initialisation { if( strlen( buffer ) > 0 ) MessageBox( hwnd, buffer, "Notes", MB_OK ) ; } // On met le focus sur la fenĂȘtre - BringWindowToTop( hwnd ) ; - SetForegroundWindow( hwnd ) ; + if( first_connect ) { + if( GetVisibleFlag()!=VISIBLE_TRAY ) { + BringWindowToTop( hwnd ) ; + SetForegroundWindow( hwnd ) ; + } + } - // Envoi automatiquement dans le systeme tray si besoin if( GetAutoSendToTray() ) ManageToTray( hwnd ) ; @@ -3373,6 +3379,8 @@ else if((UINT_PTR)wParam == TIMER_INIT) { // Initialisation } RefreshBackground( hwnd ) ; + + first_connect = false ; } else if((UINT_PTR)wParam == TIMER_DND){ @@ -3473,23 +3481,23 @@ else if((UINT_PTR)wParam == TIMER_BLINKTRAYICON) { // Clignotement de l'icone d static int BlinkingState = 0 ; static HICON hBlinkingIcon = NULL ; - if( GetVisibleFlag()!=VISIBLE_TRAY ) - { KillTimer( hwnd, TIMER_BLINKTRAYICON ) ; TrayIcone.hIcon = hBlinkingIcon ; BlinkingState = 0 ; break ; } + if( GetVisibleFlag()!=VISIBLE_TRAY ) { + KillTimer( hwnd, TIMER_BLINKTRAYICON ) ; TrayIcone.hIcon = hBlinkingIcon ; BlinkingState = 0 ; break ; + } if( (BlinkingState%2)==0 ) { hBlinkingIcon = TrayIcone.hIcon ; TrayIcone.hIcon = LoadIcon(NULL, NULL) ; Shell_NotifyIcon(NIM_MODIFY, &TrayIcone) ; BlinkingState++ ; - } - else { + } else { if( hBlinkingIcon ) { TrayIcone.hIcon = hBlinkingIcon ; Shell_NotifyIcon(NIM_MODIFY, &TrayIcone) ; BlinkingState++ ; if(MaxBlinkingTime) if(BlinkingState>=MaxBlinkingTime) { KillTimer( hwnd, TIMER_BLINKTRAYICON ) ; BlinkingState = 0 ; break ; } - } } } +} #ifdef MOD_RECONNECT else if((UINT_PTR)wParam == TIMER_RECONNECT) { if( !backend ) { @@ -8259,19 +8267,21 @@ static void wintw_bell(TermWin *tw, int mode) if(conf_get_bool(conf,CONF_foreground_on_bell) ) { // Tester avec sleep 4 ; echo -e '\a' if( IsIconic(hwnd) ) SwitchToThisWindow( hwnd, TRUE ) ; else SetForegroundWindow( MainHwnd ) ; - } - else { + } else { if( mode == BELL_VISUAL ) { if( IsIconic(hwnd) ) FlashWindow(hwnd, TRUE) ; else flash_window(2) ; - } - else { if( conf_get_int(conf,CONF_beep_ind)==B_IND_FLASH ) flash_window(2) ; } + } else { + if( conf_get_int(conf,CONF_beep_ind)==B_IND_FLASH ) flash_window(2) ; } + } } else if( GetVisibleFlag()==VISIBLE_TRAY ) { - if( conf_get_bool(conf,CONF_foreground_on_bell) ) { SendMessage( MainHwnd, WM_COMMAND, IDM_FROMTRAY, 0 ); } - else if(mode == BELL_VISUAL) SetTimer(hwnd, TIMER_BLINKTRAYICON, (int)500, NULL) ; + if( conf_get_bool(conf,CONF_foreground_on_bell) ) { + SendMessage( MainHwnd, WM_COMMAND, IDM_FROMTRAY, 0 ) ; + } else if(mode == BELL_VISUAL) + SetTimer(hwnd, TIMER_BLINKTRAYICON, (int)500, NULL) ; //SendMessage( MainHwnd, WM_COMMAND, IDM_FROMTRAY, 0 ); //flash_window(2); /* start */ //ShowWindow( MainHwnd, SW_MINIMIZE); diff --git a/docs/version.txt b/docs/version.txt index 9f8c88f..1534e78 100644 --- a/docs/version.txt +++ b/docs/version.txt @@ -1 +1 @@ -0.74.2.7 \ No newline at end of file +0.74.2.8 \ No newline at end of file diff --git a/kitty.c b/kitty.c index 84ccb1c..1b775cb 100644 --- a/kitty.c +++ b/kitty.c @@ -959,9 +959,6 @@ int DebugAddPassword( const char*fct, const char*pwd ) ; void SetPasswordInConfig( const char * password ) { int len ; char bufpass[1024] ; - -debug_log("password=%s\n",password) ; - if( (!GetUserPassSSHNoSave())&&(password!=NULL) ) { len = strlen( password ) ; if( len > 126 ) len = 126 ;