Opened 14 years ago

Last modified 14 years ago

#1468 closed Patch

Splitter position not save correct

Reported by: tommywu Owned by:
Priority: normal Component: Other
Keywords: Cc: tommywu, Tim Kosse
Component version: Operating system type:
Operating system version:

Description

Queue splitter postion not save correct if site manager
open on startup.

Attachments (4)

filezilla_size.patch (5.9 KB) - added by tommywu 14 years ago.
splitter position not save correct
filezilla_size_2.patch (390 bytes) - added by tommywu 14 years ago.
splitter position not save correct if site manager not open at startup
filezilla_size_4.patch (831 bytes) - added by tommywu 14 years ago.
restore the splitter size after ShowRow?
filezilla_size_5.patch (3.9 KB) - added by tommywu 14 years ago.
restore max. size attribute after tray, and call RestoreSize() after initilize before OnSiteManager()

Download all attachments as: .zip

Change History (16)

Changed 14 years ago by tommywu

Attachment: filezilla_size.patch added

splitter position not save correct

comment:1 Changed 14 years ago by Tim Kosse

Thanks, applied.

Btw, there's a slight problem with your patches: Between the
block header lines there are unix style line endings, while
between the patch data, there are DOS style line endings.
This confuses my text editor.

comment:2 Changed 14 years ago by tommywu

Sorry about the format, because I use MSYS's diff to
generate patch from Windows. The source files using DOS
style, but the diff command using unix style.

Which style should I use next time? Is unix style ok for you?
I'll run dos2unix before I run diff command, this will
generate unix style patch file. Just like the new patch I
just sent for patch #1163490.

comment:3 Changed 14 years ago by tommywu

I think we still need to sub 27 if site manager not open on
startup.

Changed 14 years ago by tommywu

Attachment: filezilla_size_2.patch added

splitter position not save correct if site manager not open at startup

comment:4 Changed 14 years ago by Tim Kosse

I had to remove the -=27, it caused the queue pane to grow
when FZ was maximized, regardless if the site manager was
opened on startup or not. Do you see any negative behaiour
now that wasn't there before?

comment:5 Changed 14 years ago by tommywu

But in my environment (Windows XP english on ThinkPad X31,
1024x768).

Before this patch, when FZ was maximized:

  1. site manager opened on startup (or using the Edit

Setting), the queue pane will grow every time.

  1. site manage not opened on startup (also didn't open the

Edit Setting dialog), the queue pane will keep the size.

After this patch (also remove -=27), when FZ was maximized:

  1. site manager opened on startup, the queue pane will keep

the size.

  1. site manager not opened on startup, the queue pane will

shrink every time.

That's why I need -=27 for the site manager not open on startup.

I'll try to test it on other machine, also try to trace the
code to find the reason.

comment:6 Changed 14 years ago by tommywu

hm... for another machine of mine (windows 2000, 1024*768
also), yes, we don't need -=27 anymore, I'll try to find out
why this not work in my ThinkPad X31.

comment:7 Changed 14 years ago by tommywu

I don't know why cause this, but in my X31 laptop, the
splitter positon will change after calling HideRow(), I just
save the value before calling HideRow() and restore it after
HideRow().

--- source/MainFrm.cpp Mon Mar 21 16:53:07 2005
+++ source.patch/MainFrm.cpp Mon Mar 21 16:55:25 2005
@@ -967,7 +967,13 @@

Hide the queue if visible
m_wndVertSplitter.SetRedraw(FALSE);
if (m_bShowQueue)

+ {
+ int cy2, tmp;
+
+ m_wndVertSplitter.GetRowInfoEx(1,cy2,tmp);

m_wndVertSplitter.HideRow(2,1);

+ m_wndVertSplitter.SetRowInfo(1,cy2,0);
+ }

}
Now only the main splitter gets resized
CFrameWnd::OnSize(nType, cx, cy);

comment:8 Changed 14 years ago by tommywu

sorry, forget this patch, it still not work for release
version in my laptop.

comment:9 Changed 14 years ago by Tim Kosse

Do you have XP Themes enabled? I have it disabled and Win2K
has no theme support either.

comment:10 Changed 14 years ago by tommywu

Ok. This one work for me now.
I don't know why the HideRow() and ShowRow() in OnSize()
will change the position of spiltter in my machine.
After apply this patch, it will restore the position after
ShowRow().

--- source/MainFrm.cpp Mon Mar 21 16:53:07 2005
+++ source.patch/MainFrm.cpp Mon Mar 21 18:09:14 2005
@@ -954,6 +954,8 @@

void CMainFrame::OnSize(UINT nType, int cx, int cy)
{

+ int cy2, tmp;
+

if (m_wndStatusBar.GetSafeHwnd())
{

if (nType!=SIZE_MAXIMIZED)

@@ -967,7 +969,10 @@

Hide the queue if visible
m_wndVertSplitter.SetRedraw(FALSE);
if (m_bShowQueue)

+ {
+ m_wndVertSplitter.GetRowInfoEx(1,cy2,tmp);

m_wndVertSplitter.HideRow(2,1);

+ }

}
Now only the main splitter gets resized
CFrameWnd::OnSize(nType, cx, cy);

@@ -975,7 +980,11 @@

{

Restore the queue
if (m_bShowQueue)

+ {

m_wndVertSplitter.ShowRow(2);

+ m_wndVertSplitter.SetRowInfo(1,cy2,0);
+ m_wndVertSplitter.RecalcLayout();
+ }

m_wndVertSplitter.SetRedraw(TRUE);
m_wndVertSplitter.RedrawWindow();

}

Changed 14 years ago by tommywu

Attachment: filezilla_size_4.patch added

restore the splitter size after ShowRow?

comment:11 Changed 14 years ago by tommywu

XP theme enabled? I think yes, but I've tried the Windows XP
and Windows Classic theme, both them will shrink the queue
panel size if the site manager not opened on startup.

By the way, the final patch work for me.

comment:12 Changed 14 years ago by tommywu

Ok. I think I fix this problem now.

  1. We should call RestoreSize() after all process in

Create() to avoid the position change again (I still don't
know why it make different result in my X31).

  1. We should call OnSiteManager() after we call RestoreSize().
  2. Maybe we should call RecalcLayout() after we using

SetRowInfo() or SetColumnInfo().

This will fix the problem in my X31, for lost the queue
panel position .

And I also find another problem fixed in this patch.
If we using Minmize to Tray button, then restore it again.
The window will lost maximized status (because we call
ShowWindow(SW_SHOW) in OnTrayRestore(), we should use
ShowWindow(SW_SHOWMAXIMIZED) to restore the maximized status).

Changed 14 years ago by tommywu

Attachment: filezilla_size_5.patch added

restore max. size attribute after tray, and call RestoreSize() after initilize before OnSiteManager()

Note: See TracTickets for help on using tickets.