Author: coolo
Date: Sun Feb 17 14:29:54 2008
New Revision: 44565
URL: http://svn.opensuse.org/viewcvs/yast?rev=44565&view=rev
Log:
still too many crashes, but at least it looks a little
less silly now
Modified:
trunk/qt-pkg/src/YQPackageSelectorPluginImpl.cc
trunk/qt-pkg/src/YQPkgLangList.cc
trunk/qt-pkg/src/YQPkgLangList.h
Modified: trunk/qt-pkg/src/YQPackageSelectorPluginImpl.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPackageSelectorPluginImpl.cc?rev=44565&r1=44564&r2=44565&view=diff
==============================================================================
--- trunk/qt-pkg/src/YQPackageSelectorPluginImpl.cc (original)
+++ trunk/qt-pkg/src/YQPackageSelectorPluginImpl.cc Sun Feb 17 14:29:54 2008
@@ -35,7 +35,9 @@
// term of the package selection dialog, creates the widget
// tree and creates the YQPackageSelector.
//
+extern "C" {
YQPackageSelectorPluginImpl PSP;
+}
YPackageSelector * YQPackageSelectorPluginImpl::createPackageSelector( YWidget * parent,
long modeFlags )
Modified: trunk/qt-pkg/src/YQPkgLangList.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgLangList.cc?rev=44565&r1=44564&r2=44565&view=diff
==============================================================================
--- trunk/qt-pkg/src/YQPkgLangList.cc (original)
+++ trunk/qt-pkg/src/YQPkgLangList.cc Sun Feb 17 14:29:54 2008
@@ -23,6 +23,7 @@
#include "YUILog.h"
#include
+#include <QHeaderView>
#include "YQi18n.h"
#include "utf8.h"
#include "YQPkgLangList.h"
@@ -48,6 +49,12 @@
setAllColumnsShowFocus( true );
setHeaderLabels(headers);
+ setSortingEnabled( true );
+ header()->setSortIndicatorShown( true );
+ header()->setClickable( true );
+
+ sortByColumn( nameCol(), Qt::AscendingOrder );
+
connect( this, SIGNAL( currentItemChanged ( QTreeWidgetItem *, QTreeWidgetItem * ) ),
this, SLOT ( filter() ) );
@@ -71,9 +78,6 @@
yuiDebug() << "Filling language list" << endl;
zypp::LocaleSet locales = zypp::getZYpp()->pool().getAvailableLocales();
-#warning FIXME: had to hardcode examples for now
- locales.insert( zypp::Locale( "de_DE" ) );
- locales.insert( zypp::Locale( "de" ) );
for ( zypp::LocaleSet::const_iterator it = locales.begin();
it != locales.end();
@@ -132,8 +136,26 @@
}
+void
+YQPkgLangList::updateActions( YQPkgObjListItem * item)
+{
+#if 0
+ YQPkgLangListItem *litem;
+ if ( !item)
+ litem = dynamic_cast ( currentItem() );
+ else
+ litem = dynamic_cast ( item );
+#endif
-
+ actionSetCurrentInstall->setEnabled( true );
+ actionSetCurrentDontInstall->setEnabled( true );
+ actionSetCurrentTaboo->setEnabled( true );
+ actionSetCurrentProtected->setEnabled( false );
+
+ actionSetCurrentKeepInstalled->setEnabled( false );
+ actionSetCurrentDelete->setEnabled( false );
+ actionSetCurrentUpdate->setEnabled( false );
+}
YQPkgLangListItem::YQPkgLangListItem( YQPkgLangList * langList,
Modified: trunk/qt-pkg/src/YQPkgLangList.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/qt-pkg/src/YQPkgLangList.h?rev=44565&r1=44564&r2=44565&view=diff
==============================================================================
--- trunk/qt-pkg/src/YQPkgLangList.h (original)
+++ trunk/qt-pkg/src/YQPkgLangList.h Sun Feb 17 14:29:54 2008
@@ -69,6 +69,11 @@
**/
void addLangItem( const zypp::Locale & lang );
+ /**
+ * update from base class to not access selectables
+ **/
+ virtual void updateActions( YQPkgObjListItem * item = 0);
+
public:
/**
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org