>> Please revert this. The behavior was intentionally >> designed to be controlled by hb_GTInfo( HB_GTI_CLOSABLE ), >> (instead of SETCANCEL()). > > Sorry but as you've seen the development list has been off-line many hours. > You've done a reversal before I can read the messages. > > Could you explain what is the intention of change because .- > > 2008-06-25 11:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) > * source/rtl/gtwvt/gtwvt.c > * Slightly changed the way CLOSE button works. > Now the close button, if enabled, will always > force a shutdown. So this setting is made independent > of SetCancel(). I choose this because there might > be cases when we need to use <Alt+C> in app code, yet > we want to allow closing the window. Previously it was > also easy to create confusing scenarios by using various > combinations of HB_GTI_CLOSABLE + SetCancel(). Another > kind of fix - without the advantage above - would be > to fully sync SetCancel() with HB_GTI_CLOSABLE. > > It's very unclear and before the change SetCancel() was respected. > > You say: "I choose this because there might be cases when we need to use > <Alt+C> in app code, yet we want to allow closing the window." > > Sorry but I don't understand. You change the behavior of GTWVT with > SetCancel() respect to GTWIN and GTWVG for something that you can do in your > code with .- > > hb_gtInfo( HB_GTI_NOTIFIERBLOCK, {|e| iif( e == HB_GTE_CLOSE, SetCancel(.T.), > nil ), 0} )
Disabling "GUI window close button" is a GT speciality feature and as such it should be best controlled by a GT speciality option. Otherwise the code hides a platform / GT difference which just cannot be hidden. IOW we should not make the impression if SETCANCEL() always disables windows-close behavior, since this is not true and cannot be true in real life (see GTWIN f.e.). IMO this is two different problem and as such they need separate control. If've been experimenting with this for weeks at the time, and the solution which you re-implemented was also unsatisfactory in real life, and it was confusing. I use SETCANCEL() regularly, as I do need <Alt+C> as regular key combination, yet I don't want to cripple the window to have non-working close functionality. It's also very confusing because the close button is _there_, it just doesn't work. When you use HB_GTI_CLOSABLE, there is clear visual evidence that the close button is disabled, since it's grayed out. But, such feature is inherently GT/platform dependent, so it's not good to use SETCANCEL(), which is fully portable. BTW, I finally settled with presenting a dialog when close button is pressed, because even graying out the close button didn't look like a very good idea either in practice. Brgds, Viktor _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour