Author: gs Date: Wed Aug 29 15:23:30 2007 New Revision: 40586 URL: http://svn.opensuse.org/viewcvs/yast?rev=40586&view=rev Log: add preferredW/H Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.h Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc?rev=40586&r1=40585&r2=40586&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc Wed Aug 29 15:23:30 2007 @@ -412,15 +412,7 @@ } -/////////////////////////////////////////////////////////////////// -// -// -// METHOD NAME : NCPkgPopupDiskspace::niceSize -// METHOD TYPE : void -// -// DESCRIPTION : -// - +#if 0 long NCPkgPopupDiskspace::nicesize(YUIDimension dim) { long vdim; @@ -431,6 +423,32 @@ return ( dim == YD_HORIZ ? NCurses::cols()*2/3 : vdim ); } +#endif + +/////////////////////////////////////////////////////////////////// +// +// +// METHOD NAME : NCPkgPopupDiskspace::preferredWidth +// METHOD TYPE : int +// +int NCPkgPopupDiskspace::preferredWidth() +{ + return NCurses::cols()*2/3; +} + +/////////////////////////////////////////////////////////////////// +// +// +// METHOD NAME : NCPkgPopupDiskspace::preferredHeight +// METHOD TYPE : int +// +int NCPkgPopupDiskspace::preferredHeight() +{ + if ( NCurses::lines() > 15 ) + return 15; + else + return NCurses::lines()-4; +} /////////////////////////////////////////////////////////////////// // Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.h?rev=40586&r1=40585&r2=40586&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.h (original) +++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.h Wed Aug 29 15:23:30 2007 @@ -173,8 +173,9 @@ virtual ~NCPkgPopupDiskspace(); - virtual long nicesize(YUIDimension dim); - + virtual int preferredWidth(); + virtual int preferredHeight(); + void fillPartitionTable(); string checkDiskSpace(); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org