diff -Nur source/MainFrm.cpp source.patch/MainFrm.cpp
old
|
new
|
|
478 | 478 | { |
479 | 479 | m_wndLocalSplitter.GetRowInfo(1,s2,temp); |
480 | 480 | m_wndLocalSplitter.GetRowInfo(0,s1,temp); |
481 | | if (s1>s2) |
| 481 | if (s1>s2) { |
482 | 482 | m_wndLocalSplitter.SetRowInfo(0,(s1+s2)/2,1); |
| 483 | m_wndLocalSplitter.RecalcLayout(); |
| 484 | } |
483 | 485 | } |
484 | 486 | else |
485 | 487 | { |
486 | 488 | m_wndLocalSplitter.GetColumnInfo(1,s2,temp); |
487 | 489 | m_wndLocalSplitter.GetColumnInfo(0,s1,temp); |
488 | | if (s1 > s2) |
| 490 | if (s1 > s2) { |
489 | 491 | m_wndLocalSplitter.SetColumnInfo(0,(s1+s2)/2,1); |
| 492 | m_wndLocalSplitter.RecalcLayout(); |
| 493 | } |
490 | 494 | } |
491 | 495 | |
492 | 496 | if (!m_nRemoteTreeViewLocation) |
493 | 497 | { |
494 | 498 | m_wndRemoteSplitter.GetRowInfo(1, s2, temp); |
495 | 499 | m_wndRemoteSplitter.GetRowInfo(0, s1, temp); |
496 | | if (s1>s2) |
| 500 | if (s1>s2) { |
497 | 501 | m_wndRemoteSplitter.SetRowInfo(0,(s1+s2)/2,1); |
| 502 | m_wndRemoteSplitter.RecalcLayout(); |
| 503 | } |
498 | 504 | } |
499 | 505 | else |
500 | 506 | { |
501 | 507 | m_wndRemoteSplitter.GetColumnInfo(1, s2, temp); |
502 | 508 | m_wndRemoteSplitter.GetColumnInfo(0, s1, temp); |
503 | | if (s1>s2) |
| 509 | if (s1>s2) { |
504 | 510 | m_wndRemoteSplitter.SetColumnInfo(0,(s1+s2)/2,1); |
| 511 | m_wndRemoteSplitter.RecalcLayout(); |
| 512 | } |
505 | 513 | } |
506 | 514 | |
507 | 515 | |
… |
… |
|
514 | 522 | m_wndMainSplitter.GetColumnInfo(0,cx,temp); |
515 | 523 | m_wndMainSplitter.GetColumnInfo(1,cx2,temp); |
516 | 524 | m_wndMainSplitter.SetColumnInfo(0,(cx+cx2)/2,0); |
| 525 | m_wndMainSplitter.RecalcLayout(); |
517 | 526 | ((CQueueCtrl*)GetQueuePane()->GetListCtrl())->UpdateStatusbar(); |
518 | 527 | |
519 | | //Restore window size and position |
520 | | RestoreSize(); |
521 | | |
522 | 528 | //Hide panes disabled in options |
523 | 529 | if (COptions::GetOptionVal(OPTION_SHOWNOTOOLBAR)) |
524 | 530 | OnViewToolbar(); |
… |
… |
|
549 | 555 | } |
550 | 556 | SetLocalFolder(folder); |
551 | 557 | |
552 | | if (COptions::GetOptionVal(OPTION_SHOWSITEMANAGERONSTARTUP)) |
553 | | { |
554 | | ShowWindow(SW_SHOW); |
555 | | OnSitemanager(); |
556 | | } |
557 | | |
558 | 558 | if (COptions::GetOptionVal(OPTION_ENABLEDEBUGMENU)) |
559 | 559 | { |
560 | 560 | CMenu *pMenu=GetMenu(); |
… |
… |
|
593 | 593 | m_pMinTrayBtn->MinTrayBtnShow(); |
594 | 594 | } |
595 | 595 | |
| 596 | //Restore window size and position |
| 597 | RestoreSize(); |
| 598 | |
| 599 | if (COptions::GetOptionVal(OPTION_SHOWSITEMANAGERONSTARTUP)) |
| 600 | OnSitemanager(); |
| 601 | |
596 | 602 | return 0; |
597 | 603 | } |
598 | 604 | |
… |
… |
|
3259 | 3265 | m_wndLocalSplitter.SetColumnInfo(0,m_PosData.cy3,0); |
3260 | 3266 | else |
3261 | 3267 | m_wndLocalSplitter.SetRowInfo(0,m_PosData.cy3,0); |
| 3268 | m_wndLocalSplitter.RecalcLayout(); |
3262 | 3269 | if (m_nRemoteTreeViewLocation) |
3263 | 3270 | m_wndRemoteSplitter.SetColumnInfo(0,m_PosData.cy4,0); |
3264 | 3271 | else |
3265 | 3272 | m_wndRemoteSplitter.SetRowInfo(0,m_PosData.cy4,0); |
| 3273 | m_wndRemoteSplitter.RecalcLayout(); |
3266 | 3274 | if (m_bSwitchPaneLayout) |
3267 | 3275 | { |
3268 | 3276 | int cx1, cx2, tmp; |
… |
… |
|
3272 | 3280 | } |
3273 | 3281 | else |
3274 | 3282 | m_wndMainSplitter.SetColumnInfo(0, m_PosData.cx, 0); |
| 3283 | m_wndMainSplitter.RecalcLayout(); |
3275 | 3284 | m_wndVertSplitter.RecalcLayout(); |
3276 | 3285 | |
3277 | 3286 | return TRUE; |
… |
… |
|
3598 | 3607 | { |
3599 | 3608 | if (COptions::GetOptionVal(OPTION_MINIMIZETOTRAY) == 1) |
3600 | 3609 | { |
| 3610 | WINDOWPLACEMENT placement; |
| 3611 | BOOL res=GetWindowPlacement(&placement); |
| 3612 | if (placement.showCmd==SW_MAXIMIZE || placement.showCmd==SW_SHOWMAXIMIZED) |
| 3613 | m_bMaxBeforeTray = true; |
| 3614 | else |
| 3615 | m_bMaxBeforeTray = false; |
3601 | 3616 | ShowWindow(SW_HIDE); |
3602 | 3617 | m_TrayIcon.AddIcon(); |
3603 | 3618 | m_TrayIcon.ShowIcon(); |
… |
… |
|
3605 | 3620 | } |
3606 | 3621 | else if (nID == SC_MINIMIZETRAY) |
3607 | 3622 | { |
| 3623 | WINDOWPLACEMENT placement; |
| 3624 | BOOL res=GetWindowPlacement(&placement); |
| 3625 | if (placement.showCmd==SW_MAXIMIZE || placement.showCmd==SW_SHOWMAXIMIZED) |
| 3626 | m_bMaxBeforeTray = true; |
| 3627 | else |
| 3628 | m_bMaxBeforeTray = false; |
3608 | 3629 | ShowWindow(SW_HIDE); |
3609 | 3630 | m_TrayIcon.AddIcon(); |
3610 | 3631 | m_TrayIcon.ShowIcon(); |
… |
… |
|
3794 | 3815 | void CMainFrame::OnTrayRestore() |
3795 | 3816 | { |
3796 | 3817 | ShowWindow(SW_RESTORE); |
3797 | | ShowWindow(SW_SHOW); |
| 3818 | if (m_bMaxBeforeTray) |
| 3819 | ShowWindow(SW_SHOWMAXIMIZED); |
| 3820 | else |
| 3821 | ShowWindow(SW_SHOW); |
3798 | 3822 | m_TrayIcon.HideIcon(); |
3799 | 3823 | } |
3800 | 3824 | |
diff -Nur source/MainFrm.h source.patch/MainFrm.h
old
|
new
|
|
161 | 161 | } m_PosData; |
162 | 162 | |
163 | 163 | // Minimize to tray button |
| 164 | BOOL m_bMaxBeforeTray; |
164 | 165 | CMinTrayBtn *m_pMinTrayBtn; |
165 | 166 | |
166 | 167 | int m_nLocalTreeViewLocation; |