-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Back on this subject :) Il 10/06/2013 10:09, Gabriele Mohr ha scritto:> Change below would break usage in yast disk:
diff --git a/src/NCTable.cc b/src/NCTable.cc
@@ -543,7 +587,7 @@ NCursesEvent NCTable::wHandleInput( wint_t key ) else { toggleCurrentItem(); - if ( notify() && immediateMode() ) + if ( notify() || immediateMode() )
-> breaks 'yast disk' module/volume management (when adding a volume group and selecting a device). { return NCursesEvent::ValueChanged; }
You say that yast disk is broken there, but i cannot see why :( First you introduced a new event there so i believe you changed yast disk behavior also. Second i'm looking comments and code of YTable /** * Deliver even more events than with notify() set. * * With "notify" alone, a table widget sends an ActivatedEvent when the * user double-clicks an item or presses the "space" key on it. It does * not send an event when the user just sends another item. * * With "immediate", it also sends a SelectionChangedEvent when the user * selects another item. "immediate" implicitly includes "notify". **/ bool immediateMode() const; Nothing says ValueChanged, and nothing says that SelectionChange cannot be for one more item. But what i cannot understand really is: "immediate" implicitly includes "notify And the code supports that: void YTable::setImmediateMode( bool immediateMode ) { priv->immediateMode = immediateMode; if ( immediateMode ) setNotify( true ); } It smells like a bug in NCTable implementation to me because ( notify() && immediateMode() ) and immediateMode() are the same clause. That's why i set an || clause, to get both... but reading the comment better i think i cannot return SelectionChanged || Activated when we have both e.g. immediateMode() is true (... it also sends a SelectionChanged...). Cheers, Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlG8fXIACgkQqEs9DA4DquDXSwCeLW8R/fLXEPD6k0UDasZ+1c9H NzQAnibl9YAihnpzVdAP3xfNfQ+nYj8+ =ImMQ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org