Re: [Patch] Resizeable main window
Robert Collins wrote: I've committed Franks code - thanks Frank. I decided not to wait for the win98 tests, as it's been 2 weeks, which is IMO enough time for bugs to surface, from folk interested in this. ... I've uploaded a new setup. For now, I'm not going to announce this on cygwin@ - only folk following the discussion here need to be involved until we're happy with the visual appearance. I'm not unhappy with it, but Igor was indicating a number of tweaks, and Gary had some thoughts. I'm sure that there will be a number of requests from the peanut gallery relating to this as well ;) I don't have a particular appearance in mind, so generate patches, lets get some feedback, and when it's cooked, we can do another release of setup. Rob I'm happy to report that I have used setup-2.418 since Oct. 27th without any problems. The resizable chooser works very well. Isn't it time to test it in the wild? André Bleau, Cygwin's OpenGL package maintainer. Please address all questions and problem reports about Cygwin's OpenGL package to [EMAIL PROTECTED] .
RE: [Patch] Resizeable main window
I've committed Franks code - thanks Frank. I decided not to wait for the win98 tests, as it's been 2 weeks, which is IMO enough time for bugs to surface, from folk interested in this. Gary, I know we spent mucho time heading towards integration of your patch, I'm sorry that some of that effort was wasted. Yeah, that makes two of us. I'm sure you have a number of non resize related patches outstanding (ironically, the reason I had issues with your patch)... No, not really. As I've said before, the vast bulk of my work in the latest round of patches was directly related to getting the resizing to work. The vast bulk of Max's work was in getting the small amount of cleanup I did along the way, out of the way. But we've covered that ad nauseum, and Frank's patch has been approved and does more, at least short-term, than what I have. I do have some stuff in window.{cc,h} that may or may not be welcome. It was mainly for the resize stuff again. But Max got everything else AFAIK. if you'd like to see those in setup, I'm more than happy to review them as usual. I've uploaded a new setup. For now, I'm not going to announce this on cygwin@ - only folk following the discussion here need to be involved until we're happy with the visual appearance. I'm not unhappy with it, but Igor was indicating a number of tweaks, and Gary had some thoughts. I've tried it and it appears to work ok. My first response though is that the pages that aren't meant to be resizable need to be prevented from resizing. I have code for that, but I don't know if it will work with what Frank's done. Looking through the code, I'm a bit disturbed that still more global state has been added in the form of PropSheetData. I don't understand why this is necessary. The way I had it you only needed a global HWND. Also, this scares the hell out of me: The code utilizes some less public aspects of property sheets and makes certain assumptions on it's internal workings [...]. Frank, can you explain what you mean here? Does less public == undocumented == even more liable to break than MS's documented stuff? -- Gary R. Van Sickle
Re: [Patch] Resizeable main window
On Fri, 2003-10-17 at 06:59, Frank Richter wrote: On 16.10.2003 22:29, Robert Collins wrote: Before further review, I'd like you to correct such abuses of C++. Done. Please include new files in the diff. (You can use diff -Nup /dev/null newfile.cc maindiff) Saves me time guessing whether those files are all attached or not. This looks good, but: - The header in the chooser doesn't resize for me - does your framework support that? - We need some testing of older os's. code wise, please don't add more sizing tweaks other than the chooser's header until we get this in - i.e. keep it focused. - I don't like the static struct _PropSheetData idiom. How about class PropSheetData { ... static PropSheetData Instance();} PropSheetData PropSheetData::Instance() { static PropSheetData TheInstance; return TheInstance; } Cheers, Rob -- GPG key available at: http://members.aardvark.net.au/lifeless/keys.txt. signature.asc Description: This is a digitally signed message part
Re: [Fwd: Re: [Patch] Resizeable main window]
On Fri, 2003-10-17 at 07:19, Frank Richter wrote: Original Message Subject: Re: [Patch] Resizeable main window Date: Thu, 16 Oct 2003 23:19:05 +0200 From: Frank Richter [EMAIL PROTECTED] To: Robb, Sam [EMAIL PROTECTED] References: [EMAIL PROTECTED] On 16.10.2003 23:10, Robb, Sam wrote: The header on the chooser isn't resized along with the chooser, though. However, if you scroll horizontally or drag one of the columns to resize, the header appears correctly. Not for me. The header stays fixed at the original width, truncating any resized column titles. I need to know that this can be addressed before approving the patch - if your approach isn't compatible with addressing this... Rob -- GPG key available at: http://members.aardvark.net.au/lifeless/keys.txt. signature.asc Description: This is a digitally signed message part
Re: [Fwd: Re: [Patch] Resizeable main window]
On 26.10.2003 11:17, Robert Collins wrote: Not for me. The header stays fixed at the original width, truncating any resized column titles. I need to know that this can be addressed before approving the patch - if your approach isn't compatible with addressing this... This should be possible. Basically, when the list is resized due a resize of the property sheet, it gets a resize notification. Upon this notification, the pick list can appropriately resize the header. -f.r.
Re: [Patch] Resizeable main window
I've committed Franks code - thanks Frank. I decided not to wait for the win98 tests, as it's been 2 weeks, which is IMO enough time for bugs to surface, from folk interested in this. Gary, I know we spent mucho time heading towards integration of your patch, I'm sorry that some of that effort was wasted. I'm sure you have a number of non resize related patches outstanding (ironically, the reason I had issues with your patch)... if you'd like to see those in setup, I'm more than happy to review them as usual. I've uploaded a new setup. For now, I'm not going to announce this on cygwin@ - only folk following the discussion here need to be involved until we're happy with the visual appearance. I'm not unhappy with it, but Igor was indicating a number of tweaks, and Gary had some thoughts. I'm sure that there will be a number of requests from the peanut gallery relating to this as well ;) I don't have a particular appearance in mind, so generate patches, lets get some feedback, and when it's cooked, we can do another release of setup. Rob -- GPG key available at: http://members.aardvark.net.au/lifeless/keys.txt. signature.asc Description: This is a digitally signed message part
Re: [Patch] Resizeable main window
On Mon, 2003-10-27 at 07:10, Robert Collins wrote: I've uploaded a new setup. For now, I'm not going to announce this on ... snapshot. Rob -- GPG key available at: http://members.aardvark.net.au/lifeless/keys.txt. signature.asc Description: This is a digitally signed message part
Re: [Patch] Resizeable main window
On 26.10.2003 11:13, Robert Collins wrote: Please include new files in the diff. (You can use diff -Nup /dev/null newfile.cc maindiff) Saves me time guessing whether those files are all attached or not. Done. This looks good, but: - The header in the chooser doesn't resize for me - does your framework support that? Added. code wise, please don't add more sizing tweaks other than the chooser's header until we get this in - i.e. keep it focused. Sure. - I don't like the static struct _PropSheetData idiom. How about class ... Fixed. I've also uploaded an executable and source archive that contain those changes here: http://www.minet.uni-jena.de/~res/ -f.r. Index: Makefile.am === RCS file: /cvs/cygwin-apps/setup/Makefile.am,v retrieving revision 2.34 diff -u -p -r2.34 Makefile.am --- Makefile.am 30 Jul 2003 09:04:27 - 2.34 +++ Makefile.am 16 Oct 2003 20:41:09 - @@ -140,6 +140,8 @@ setup_SOURCES = \ compress_gz.h \ ConnectionSetting.cc \ ConnectionSetting.h \ + ControlAdjuster.cc \ + ControlAdjuster.h \ cygpackage.cc \ cygpackage.h \ desktop.cc \ Index: choose.cc === RCS file: /cvs/cygwin-apps/setup/choose.cc,v retrieving revision 2.133 diff -u -p -r2.133 choose.cc --- choose.cc 30 Jul 2003 07:26:47 - 2.133 +++ choose.cc 16 Oct 2003 20:41:09 - @@ -56,10 +56,31 @@ static const char *cvsid = #include port.h #include threebar.h #include Generic.h +#include ControlAdjuster.h using namespace std; extern ThreeBarProgressPage Progress; + +/* + Sizing information. + */ +static ControlAdjuster::ControlInfo ChooserControlsInfo[] = { + {IDC_CHOOSE_KEEP,false, true, true, false}, + {IDC_CHOOSE_PREV,false, true, true, false}, + {IDC_CHOOSE_CURR,false, true, true, false}, + {IDC_CHOOSE_EXP, false, true, true, false}, + {IDC_CHOOSE_VIEW,false, true, true, false}, + {IDC_LISTVIEW_POS, false, true, true, false}, + {IDC_CHOOSE_VIEWCAPTION, false, true, true, false}, + {IDC_CHOOSE_LIST,true, true, true, true }, + {0, false, false, false, false} +}; + +ChooserPage::ChooserPage () +{ + sizeProcessor.AddControlInfo (ChooserControlsInfo); +} void ChooserPage::createListview () Index: choose.h === RCS file: /cvs/cygwin-apps/setup/choose.h,v retrieving revision 2.33 diff -u -p -r2.33 choose.h --- choose.h29 Jul 2003 10:41:13 - 2.33 +++ choose.h16 Oct 2003 20:41:09 - @@ -25,9 +25,7 @@ class ChooserPage:public PropertyPage { public: - ChooserPage () - { - }; + ChooserPage (); virtual ~ ChooserPage () { }; Index: proppage.cc === RCS file: /cvs/cygwin-apps/setup/proppage.cc,v retrieving revision 2.9 diff -u -p -r2.9 proppage.cc --- proppage.cc 2 Aug 2003 00:02:01 - 2.9 +++ proppage.cc 16 Oct 2003 20:41:10 - @@ -26,12 +26,23 @@ bool PropertyPage::DoOnceForSheet = true; +/* + Sizing information for some controls that are common to all pages. + */ +static ControlAdjuster::ControlInfo DefaultControlsInfo[] = { + {IDC_HEADICON, false, true, true, false}, + {IDC_HEADSEPARATOR, true, true, true, false}, + {0, false, false, false, false} +}; + PropertyPage::PropertyPage () { proc = NULL; cmdproc = NULL; IsFirst = false; IsLast = false; + + sizeProcessor.AddControlInfo (DefaultControlsInfo); } PropertyPage::~PropertyPage () @@ -117,6 +128,9 @@ PropertyPage::DialogProc (UINT message, OnInit (); setTitleFont (); + + // Call it here so it stores the initial client rect. + sizeProcessor.UpdateSize (GetHWND ()); // TRUE = Set focus to default control (in wParam). return TRUE; @@ -140,6 +154,8 @@ PropertyPage::DialogProc (UINT message, DoOnceForSheet = false; } + GetOwner ()-AdjustPageSize (GetHWND ()); + // Set the wizard buttons apropriately if (IsFirst) { @@ -253,6 +269,11 @@ PropertyPage::DialogProc (UINT message, { return HANDLE_WM_COMMAND (GetHWND (), wParam, lParam, cmdproc); } + break; + } +case WM_SIZE: + { + sizeProcessor.UpdateSize (GetHWND ()); break; } default: Index: proppage.h === RCS file: /cvs/cygwin-apps/setup/proppage.h,v retrieving revision 2.9 diff -u -p -r2.9 proppage.h --- proppage.h 6 Oct 2003 22:19:59 - 2.9 +++ proppage.h 16 Oct 2003 20:41:10 - @@ -24,6 +24,7 @@ #include prsht.h #include window.h +#include ControlAdjuster.h class PropSheet; @@ -39,7
RE: [Patch] Resizeable main window
Rob, BTW, when this patch gets accepted, I have an idea on how to modify this code to allow more intuitive control over the elements (e.g., centering). I'll also be able to make most of the other dialogs resizeable. I'm not so sure the other dialogs want to be resizable, if by dialogs you really meant wizard pages. Certanly pages like the Welcome and Finished pages have no need for this, and the only interior page I can see where this arguably might be useful would be the host selection page, but that one needs a thourough going-over anyway. -- Gary R. Van Sickle
Re: [Patch] Resizeable main window
On Thu, 16 Oct 2003, Igor Pechtchanski wrote: On Thu, 16 Oct 2003, Frank Richter wrote: On 16.10.2003 22:29, Robert Collins wrote: Before further review, I'd like you to correct such abuses of C++. Done. Also, this patch is a bit more useful than the last one - the Chooser now sizes with the window. - f.r. Okay, this does indeed give us a resizeable chooser -- yuppee!!! The header row still behaves weirdly under Win2k (i.e., it fixes on a particular size and won't bulge until a scroll bar is touched after switching views), but it's something that can be lived with. Once this gets accepted, it would be relatively easy to make most other dialogs resizeable. One problem, as I mentioned before, would be with items that need to be centered. Frank, thank you *very much* for doing this. Igor Rob, BTW, when this patch gets accepted, I have an idea on how to modify this code to allow more intuitive control over the elements (e.g., centering). I'll also be able to make most of the other dialogs resizeable. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! I have since come to realize that being between your mentor and his route to the bathroom is a major career booster. -- Patrick Naughton