Author: gs
Date: Mon Nov 5 13:41:40 2007
New Revision: 41792
URL: http://svn.opensuse.org/viewcvs/yast?rev=41792&view=rev
Log:
create NCPkgPopupTree (build rpmGroupsTree correctly),
creation of other NCPkgPopups... not yet activated
Modified:
branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc
branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc
branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui
branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.h
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc?rev=41792&r1=41791&r2=41792&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorPlugin.cc Mon Nov 5 13:41:40 2007
@@ -76,6 +76,7 @@
NCWidget * firstChild = dynamic_cast(YDialog::currentDialog()->firstChild());
if ( firstChild )
NCMIL << "FIRST child: " << firstChild << endl;
+ NCMIL << "Selector: " << w << endl;
// FIXME ???
return (YPackageSelector *)(w);
}
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc?rev=41792&r1=41791&r2=41792&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc Mon Nov 5 13:41:40 2007
@@ -184,6 +184,11 @@
// fill the package table with packages belonging to the default filter
if ( pkgList )
{
+ if ( packager )
+ {
+ packager->createPopups();
+ }
+
// fill the list with packages (or patches)
pkgList->fillDefaultList( );
Modified: branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui?rev=41792&r1=41791&r2=41792&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/README_mod-ui Mon Nov 5 13:41:40 2007
@@ -111,6 +111,8 @@
------------------
TODO: initialize header in constructor, set each header item separately
+ setHeader(): call YTable::setTableHeader ???
+
Common issues:
- Use WidgetFactory create methods, e.g. in NCAskForDirectory/File
Modified: branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc?rev=41792&r1=41791&r2=41792&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc Mon Nov 5 13:41:40 2007
@@ -398,7 +398,8 @@
UIERR << "ERROR package selection: No package selector existing." << endl;
return YCPVoid();
}
-
+ // FIXME - remove debug logging
+ NCMIL << "Dump current dialog in YNCursesUI::runPkgSelection" << endl;
// debug: dump the widget tree
dialog->dumpDialogWidgetTree();
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc?rev=41792&r1=41791&r2=41792&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.cc Mon Nov 5 13:41:40 2007
@@ -201,45 +201,11 @@
saveState ();
- if ( !youMode )
- {
- // create the selections popup
- selectionPopup = new NCPkgPopupSelection( wpos( 1, 1 ), this, NCPkgPopupSelection::S_Selection );
- // create the patterns popup
- patternPopup = new NCPkgPopupSelection( wpos( 1, 1 ), this, NCPkgPopupSelection::S_Pattern );
-
- _rpmGroupsTree = new YRpmGroupsTree ();
- // get the rpm groups
- ZyppPoolIterator b = zyppPkgBegin ();
- ZyppPoolIterator e = zyppPkgEnd ();
- ZyppPoolIterator i;
- for ( i = b; i != e; ++i )
- {
- ZyppPkg zyppPkg = tryCastToZyppPkg( (*i)->theObj() );
- if ( zyppPkg )
- {
- _rpmGroupsTree->addRpmGroup (zyppPkg->group ());
- }
- }
-
- // create language popup
- languagePopup = new NCPkgPopupSelection( wpos( 1,1 ), this, NCPkgPopupSelection::S_Language );
-
- // create the filter popup
- filterPopup = new NCPkgPopupTree( wpos( 1, 1 ), this );
- }
-
- // create the search popup
- searchPopup = new NCPkgPopupSearch( wpos( 1, 1 ), this );
-
- // the dependency popup
- depsPopup = new NCPkgPopupDeps( wpos( 3, 8 ), this );
-
- // the disk space popup
- diskspacePopup = new NCPkgPopupDiskspace( wpos( (NCurses::lines() - 15)/2, NCurses::cols()/6 ), testMode );
+ // creation of the popups is moved to createPopups()
}
+
///////////////////////////////////////////////////////////////////
//
// Destructor
@@ -280,6 +246,59 @@
}
}
+void NCPackageSelector::createPopups()
+{
+ if ( !youMode )
+ {
+#if 0
+ // create the selections popup
+ selectionPopup = new NCPkgPopupSelection( wpos( 1, 1 ), this, NCPkgPopupSelection::S_Selection );
+ // create the patterns popup
+ patternPopup = new NCPkgPopupSelection( wpos( 1, 1 ), this, NCPkgPopupSelection::S_Pattern );
+#endif
+ _rpmGroupsTree = new YRpmGroupsTree ();
+ // get the rpm groups
+ ZyppPoolIterator b = zyppPkgBegin ();
+ ZyppPoolIterator e = zyppPkgEnd ();
+ ZyppPoolIterator i;
+ for ( i = b; i != e; ++i )
+ {
+ ZyppPkg zyppPkg = tryCastToZyppPkg( (*i)->theObj() );
+ if ( zyppPkg )
+ {
+ _rpmGroupsTree->addRpmGroup (zyppPkg->group ());
+ NCMIL << "Adding group: " << zyppPkg->group() << endl;
+ }
+ }
+#if 0
+ // create language popup
+ languagePopup = new NCPkgPopupSelection( wpos( 1,1 ), this, NCPkgPopupSelection::S_Language );
+#endif
+ // create the filter popup
+ filterPopup = new NCPkgPopupTree( wpos( 1, 1 ), this );
+ }
+#if 0
+ // create the search popup
+ searchPopup = new NCPkgPopupSearch( wpos( 1, 1 ), this );
+
+ // the dependency popup
+ depsPopup = new NCPkgPopupDeps( wpos( 3, 8 ), this );
+
+ // the disk space popup
+ diskspacePopup = new NCPkgPopupDiskspace( wpos( (NCurses::lines() - 15)/2, NCurses::cols()/6 ), testMode );
+#endif
+}
+
+YStringTreeItem * NCPackageSelector::getDefaultRpmGroup()
+{
+ NCMIL << "Calling getDefaultRpmGroup()" << endl;
+
+ if ( filterPopup )
+ return filterPopup->getDefaultGroup();
+ else
+ return 0;
+}
+
void NCPackageSelector::createFilterMenu()
{
bool selections;
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.h?rev=41792&r1=41791&r2=41792&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPackageSelector.h Mon Nov 5 13:41:40 2007
@@ -129,6 +129,8 @@
* Destructor
*/
virtual ~NCPackageSelector();
+
+ void createPopups();
/**
* Fills the package table
@@ -200,7 +202,7 @@
* Gets default RPM group (the first group)
* @return YStringTreeItem *
*/
- YStringTreeItem * getDefaultRpmGroup() { return filterPopup->getDefaultGroup(); }
+ YStringTreeItem * getDefaultRpmGroup();
/**
* @return the rpm groups
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc?rev=41792&r1=41791&r2=41792&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc Mon Nov 5 13:41:40 2007
@@ -257,8 +257,9 @@
{
NCDBG << "TRANSLATION: " << child->value().translation() << endl;
- addItem( parentClone );
-
+ if ( parentClone )
+ addItem( parentClone );
+
clone = parentClone;
cloneTree( child, clone );
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org