-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 4 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 10 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.h | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 53db477..d1be8d0 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp @@ -47,17 +47,17 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : // packageListSearch( parent, name ), // packageListDocLnk( parent, name ) { setCaption( tr("Package Manager") ); settings = new PackageManagerSettings(this,0,TRUE); listViewPackages = new PackageListView( this,"listViewPackages",settings ); setCentralWidget( listViewPackages ); listViewPackages->addList( tr("feeds"), &packageListServers ); - listViewPackages->addList( tr("ipkgfind"), &packageListSearch ); + listViewPackages->addList( tr("ipkgfind&killefiz"), &packageListSearch ); listViewPackages->addList( tr("documents"), &packageListDocLnk ); ipkg = new PmIpkg( settings, this ); packageListServers.setSettings( settings ); packageListSearch.setSettings( settings ); packageListDocLnk.setSettings( settings ); pvDebug(9,"packageListServers.update"); packageListServers.update(); pvDebug(9,"packageListDocLnk.update"); @@ -187,17 +187,17 @@ void MainWindow::makeMenu() findAction = new QAction( tr( "Filter" ), QString::null, 0, this, 0 ); connect( findAction, SIGNAL( toggled(bool) ), this, SLOT( findShow(bool) ) ); findAction->setToggleAction( true ); findAction->addTo( viewMenu ); //SEARCH searchBar = new QPEToolBar(this); addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); - label = new QLabel( tr("ipkgfind: "), searchBar ); + label = new QLabel( tr("Search: "), searchBar ); // label->setBackgroundMode( PaletteForeground ); searchBar->setHorizontalStretchable( TRUE ); searchEdit = new QLineEdit( searchBar, "seachEdit" ); searchBar->setStretchableWidget( searchEdit ); // connect( searchEdit, SIGNAL( textChanged( const QString & ) ), // this, SLOT( displayList() ) ); a = new QAction( tr( "Clear Search" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), searchEdit, SLOT( clear() ) ); diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index d29036b..71e9b88 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp @@ -20,31 +20,31 @@ #include <qdir.h> #include <qfile.h> #include <qgroupbox.h> #include <qmultilineedit.h> #include <qstring.h> #include <qcheckbox.h> #include <qtextstream.h> #include <qtextview.h> - +#include <qmessagebox.h> #include <qprogressbar.h> #include <qpushbutton.h> #include <qlayout.h> #include <stdlib.h> #include <unistd.h> #include "mainwindow.h" //#define OPROCESS PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f ) - : QObject ( p ) + : QObject ( p ), shellWarning(true) { settings = s; runwindow = new RunWindow( p, name, true, f ); #ifdef OPROCESS ipkgProcess = new OProcess(); connect ( ipkgProcess, SIGNAL(receivedStdout(OProcess*,char*,int)), this, SLOT(getIpkgOutput(OProcess*,char*,int))); @@ -151,16 +151,22 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest ) if (lineStr.contains("Done")) ret = true; if (lineStr!=lineStrOld) out(lineStr); lineStrOld = lineStr; qApp->processEvents(); } } pclose(fp); + if (!ret && shellWarning) + { + shellWarning = false; + QMessageBox::critical( runwindow, tr("install failure"), + tr("<p>Did you start me from the command line?</p>")); + } #endif //out( "Finished!"); pvDebug(2,QString(ret?"success\n":"failure\n")); return ret; } void PmIpkg::makeLinks(Package *pack) { diff --git a/noncore/unsupported/oipkg/pmipkg.h b/noncore/unsupported/oipkg/pmipkg.h index 28bc5dd..662800a 100644 --- a/noncore/unsupported/oipkg/pmipkg.h +++ b/noncore/unsupported/oipkg/pmipkg.h @@ -33,32 +33,32 @@ public: PmIpkg( PackageManagerSettings* , QWidget* p=0, const char * name=0, WFlags f=0 ); ~PmIpkg(); int linkOpp; void loadList( PackageList* ); void commit(); void update(); void show(); - /** No descriptions */ void clearLists(); public slots: void doIt(); void install(); void remove(); void installFile(const QString &fileName, const QString &dest=""); void removeFile(const QString &fileName, const QString &dest=""); void createLinks( const QString &dest ); void removeLinks( const QString &dest ); //private slots: void getIpkgOutput(OProcess *proc, char *buffer, int buflen); private: + bool shellWarning; OProcess *ipkgProcess; PackageManagerSettings* settings; RunWindow *runwindow; InstallDialog *installDialog; QList<Package> to_remove; QList<Package> to_install; void makeLinks(Package*); void linkPackage( QString, QString ); |