summaryrefslogtreecommitdiff
authordrw <drw>2004-11-16 17:26:28 (UTC)
committer drw <drw>2004-11-16 17:26:28 (UTC)
commit36f98a2f0438edf82e4f326660786207ee46d87d (patch) (unidiff)
treef6413c1a9c281083ba63b952f1ae21c2092d9836
parent43773cc47947f88f48aa7a9f64ff58defff70c83 (diff)
downloadopie-36f98a2f0438edf82e4f326660786207ee46d87d.zip
opie-36f98a2f0438edf82e4f326660786207ee46d87d.tar.gz
opie-36f98a2f0438edf82e4f326660786207ee46d87d.tar.bz2
Fix bug #1464 - correctly reapply filters
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/mainwindow.cpp52
1 files changed, 31 insertions, 21 deletions
diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp
index 991cc81..807bddd 100644
--- a/noncore/settings/packagemanager/mainwindow.cpp
+++ b/noncore/settings/packagemanager/mainwindow.cpp
@@ -1,48 +1,48 @@
1/* 1/*
2                This file is part of the OPIE Project 2 This file is part of the OPIE Project
3 3
4 =. Copyright (c) 2003 Dan Williams <drw@handhelds.org> 4 =. Copyright (c) 2003 Dan Williams <drw@handhelds.org>
5             .=l. 5 .=l.
6           .>+-= 6 .>+-=
7 _;:,     .>    :=|. This file is free software; you can 7_;:, .> :=|. This file is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU General Public 9:`=1 )Y*s>-.-- : the terms of the GNU General Public
10.="- .-=="i,     .._ License as published by the Free Software 10.="- .-=="i, .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; either version 2 of the License, 11- . .-<_> .<> Foundation; either version 2 of the License,
12     ._= =}       : or (at your option) any later version. 12 ._= =} : or (at your option) any later version.
13    .%`+i>       _;_. 13 .%`+i> _;_.
14    .i_,=:_.      -<s. This file is distributed in the hope that 14 .i_,=:_. -<s. This file is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of 16 : .. .:, . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General
19..}^=.=       =       ; Public License for more details. 19..}^=.= = ; Public License for more details.
20++=   -.     .`     .: 20++= -. .` .:
21 :     =  ...= . :.=- You should have received a copy of the GNU 21: = ...= . :.=- You should have received a copy of the GNU
22 -.   .:....=;==+<; General Public License along with this file; 22-. .:....=;==+<; General Public License along with this file;
23  -_. . .   )=.  = see the file COPYING. If not, write to the 23 -_. . . )=. = see the file COPYING. If not, write to the
24    --        :-=` Free Software Foundation, Inc., 24 -- :-=` Free Software Foundation, Inc.,
25 59 Temple Place - Suite 330, 25 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA. 26 Boston, MA 02111-1307, USA.
27 27
28*/ 28*/
29 29
30#include "mainwindow.h" 30#include "mainwindow.h"
31#include "installdlg.h" 31#include "installdlg.h"
32#include "filterdlg.h" 32#include "filterdlg.h"
33#include "promptdlg.h" 33#include "promptdlg.h"
34#include "entrydlg.h" 34#include "entrydlg.h"
35#include "packageinfodlg.h" 35#include "packageinfodlg.h"
36 36
37#include <qpe/qcopenvelope_qws.h> 37#include <qpe/qcopenvelope_qws.h>
38#include <qpe/qpeapplication.h> 38#include <qpe/qpeapplication.h>
39#include <qpe/resource.h> 39#include <qpe/resource.h>
40 40
41#include <qaction.h> 41#include <qaction.h>
42#include <qdir.h> 42#include <qdir.h>
43#include <qlayout.h> 43#include <qlayout.h>
44#include <qlineedit.h> 44#include <qlineedit.h>
45#include <qmenubar.h> 45#include <qmenubar.h>
46#include <qmessagebox.h> 46#include <qmessagebox.h>
47#include <qpopupmenu.h> 47#include <qpopupmenu.h>
48#include <qtimer.h> 48#include <qtimer.h>
@@ -510,48 +510,58 @@ void MainWindow::slotApply()
510 // Create package manager output widget 510 // Create package manager output widget
511 InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Apply changes" ), true, 511 InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Apply changes" ), true,
512 removeCmd, removeList, 512 removeCmd, removeList,
513 installCmd, installList, 513 installCmd, installList,
514 upgradeCmd, upgradeList ); 514 upgradeCmd, upgradeList );
515 connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); 515 connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
516 516
517 // Display widget 517 // Display widget
518 m_widgetStack.addWidget( dlg, 3 ); 518 m_widgetStack.addWidget( dlg, 3 );
519 m_widgetStack.raiseWidget( dlg ); 519 m_widgetStack.raiseWidget( dlg );
520} 520}
521 521
522void MainWindow::slotCloseDlg() 522void MainWindow::slotCloseDlg()
523{ 523{
524 // Close install dialog 524 // Close install dialog
525 delete m_widgetStack.visibleWidget(); 525 delete m_widgetStack.visibleWidget();
526 526
527 // Reload package list 527 // Reload package list
528 initPackageInfo(); 528 initPackageInfo();
529 529
530 // Update Opie launcher links 530 // Update Opie launcher links
531 QCopEnvelope e("QPE/System", "linkChanged(QString)"); 531 QCopEnvelope e("QPE/System", "linkChanged(QString)");
532 QString lf = QString::null; 532 QString lf = QString::null;
533 e << lf; 533 e << lf;
534
535 // Reapply any filters previously set
536 if ( m_actionShowNotInstalled->isOn() )
537 slotShowNotInstalled();
538 else if ( m_actionShowInstalled->isOn() )
539 slotShowInstalled();
540 else if ( m_actionShowUpdated->isOn() )
541 slotShowUpdated();
542 else if ( m_actionFilter->isOn() )
543 slotFilter( true );
534} 544}
535 545
536void MainWindow::slotConfigure() 546void MainWindow::slotConfigure()
537{ 547{
538 if ( m_packman.configureDlg( false ) ) 548 if ( m_packman.configureDlg( false ) )
539 { 549 {
540 if ( PromptDlg::ask( tr( "Config updated" ), 550 if ( PromptDlg::ask( tr( "Config updated" ),
541 tr( "The configuration has been updated. Do you want to update server and package information now?" ), 551 tr( "The configuration has been updated. Do you want to update server and package information now?" ),
542 tr( "Yes" ), tr( "No" ), this ) == 1 ) 552 tr( "Yes" ), tr( "No" ), this ) == 1 )
543 { 553 {
544 // Update package list and reload package info 554 // Update package list and reload package info
545 slotUpdate(); 555 slotUpdate();
546 } 556 }
547 } 557 }
548} 558}
549 559
550void MainWindow::slotShowNotInstalled() 560void MainWindow::slotShowNotInstalled()
551{ 561{
552 OPackageList *packageList; 562 OPackageList *packageList;
553 if ( m_actionShowNotInstalled->isOn() ) 563 if ( m_actionShowNotInstalled->isOn() )
554 { 564 {
555 m_actionShowInstalled->setOn( false ); 565 m_actionShowInstalled->setOn( false );
556 m_actionShowUpdated->setOn( false ); 566 m_actionShowUpdated->setOn( false );
557 m_actionFilter->setOn( false ); 567 m_actionFilter->setOn( false );