-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 64 |
1 files changed, 31 insertions, 33 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index e184f6b..e489d2d 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp | |||
@@ -98,22 +98,26 @@ MainWindow :: MainWindow() | |||
98 | 98 | ||
99 | mb->insertItem( tr( "Packages" ), popup ); | 99 | mb->insertItem( tr( "Packages" ), popup ); |
100 | 100 | ||
101 | // Search menu | 101 | // View menu |
102 | popup = new QPopupMenu( this ); | 102 | popup = new QPopupMenu( this ); |
103 | 103 | ||
104 | a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); | 104 | actionUninstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 ); |
105 | a->setWhatsThis( tr( "Click here to search for text in package names." ) ); | 105 | actionUninstalled->setToggleAction( TRUE ); |
106 | connect( a, SIGNAL( activated() ), this, SLOT( displayFindBar() ) ); | 106 | actionUninstalled->setWhatsThis( tr( "Click here to show packages available which have not been installed." ) ); |
107 | a->addTo( popup ); | 107 | connect( actionUninstalled, SIGNAL( activated() ), this, SLOT( filterUninstalledPackages() ) ); |
108 | actionUninstalled->addTo( popup ); | ||
108 | 109 | ||
109 | actionFindNext = new QAction( tr( "Find next" ), Resource::loadIconSet( "next" ), QString::null, 0, this, 0 ); | 110 | actionInstalled = new QAction( tr( "Show installed packages" ), QString::null, 0, this, 0 ); |
110 | actionFindNext->setEnabled( FALSE ); | 111 | actionInstalled->setToggleAction( TRUE ); |
111 | actionFindNext->setWhatsThis( tr( "Click here to search for the package name containing the text you are searching for." ) ); | 112 | actionInstalled->setWhatsThis( tr( "Click here to show packages currently installed on this device." ) ); |
112 | connect( actionFindNext, SIGNAL( activated() ), this, SLOT( repeatFind() ) ); | 113 | connect( actionInstalled, SIGNAL( activated() ), this, SLOT( filterInstalledPackages() ) ); |
113 | actionFindNext->addTo( popup ); | 114 | actionInstalled->addTo( popup ); |
114 | actionFindNext->addTo( findBar ); | ||
115 | 115 | ||
116 | // Show 'quick jump' keypad? | 116 | actionUpdated = new QAction( tr( "Show updated packages" ), QString::null, 0, this, 0 ); |
117 | actionUpdated->setToggleAction( TRUE ); | ||
118 | actionUpdated->setWhatsThis( tr( "Click here to show packages currently installed on this device which have a newer version available." ) ); | ||
119 | connect( actionUpdated, SIGNAL( activated() ), this, SLOT( filterUpgradedPackages() ) ); | ||
120 | actionUpdated->addTo( popup ); | ||
117 | 121 | ||
118 | popup->insertSeparator(); | 122 | popup->insertSeparator(); |
119 | 123 | ||
@@ -128,31 +132,25 @@ MainWindow :: MainWindow() | |||
128 | connect( a, SIGNAL( activated() ), this, SLOT( setFilterCategory() ) ); | 132 | connect( a, SIGNAL( activated() ), this, SLOT( setFilterCategory() ) ); |
129 | a->addTo( popup ); | 133 | a->addTo( popup ); |
130 | 134 | ||
131 | mb->insertItem( tr( "Search" ), popup ); | 135 | popup->insertSeparator(); |
132 | |||
133 | 136 | ||
134 | // View menu | 137 | a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); |
135 | popup = new QPopupMenu( this ); | 138 | a->setWhatsThis( tr( "Click here to search for text in package names." ) ); |
139 | connect( a, SIGNAL( activated() ), this, SLOT( displayFindBar() ) ); | ||
140 | a->addTo( popup ); | ||
136 | 141 | ||
137 | actionUninstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 ); | 142 | actionFindNext = new QAction( tr( "Find next" ), Resource::loadIconSet( "next" ), QString::null, 0, this, 0 ); |
138 | actionUninstalled->setToggleAction( TRUE ); | 143 | actionFindNext->setEnabled( FALSE ); |
139 | actionUninstalled->setWhatsThis( tr( "Click here to show packages available which have not been installed." ) ); | 144 | actionFindNext->setWhatsThis( tr( "Click here to find the next package name containing the text you are searching for." ) ); |
140 | connect( actionUninstalled, SIGNAL( activated() ), this, SLOT( filterUninstalledPackages() ) ); | 145 | connect( actionFindNext, SIGNAL( activated() ), this, SLOT( repeatFind() ) ); |
141 | actionUninstalled->addTo( popup ); | 146 | actionFindNext->addTo( popup ); |
147 | actionFindNext->addTo( findBar ); | ||
142 | 148 | ||
143 | actionInstalled = new QAction( tr( "Show installed packages" ), QString::null, 0, this, 0 ); | 149 | mb->insertItem( tr( "View" ), popup ); |
144 | actionInstalled->setToggleAction( TRUE ); | ||
145 | actionInstalled->setWhatsThis( tr( "Click here to show packages currently installed on this device." ) ); | ||
146 | connect( actionInstalled, SIGNAL( activated() ), this, SLOT( filterInstalledPackages() ) ); | ||
147 | actionInstalled->addTo( popup ); | ||
148 | 150 | ||
149 | actionUpdated = new QAction( tr( "Show updated packages" ), QString::null, 0, this, 0 ); | ||
150 | actionUpdated->setToggleAction( TRUE ); | ||
151 | actionUpdated->setWhatsThis( tr( "Click here to show packages currently installed on this device which have a newer version available." ) ); | ||
152 | connect( actionUpdated, SIGNAL( activated() ), this, SLOT( filterUpgradedPackages() ) ); | ||
153 | actionUpdated->addTo( popup ); | ||
154 | 151 | ||
155 | popup->insertSeparator(); | 152 | // Options menu |
153 | popup = new QPopupMenu( this ); | ||
156 | 154 | ||
157 | a = new QAction( tr( "Configure" ), Resource::loadPixmap( "aqpkg/config" ), QString::null, 0, this, 0 ); | 155 | a = new QAction( tr( "Configure" ), Resource::loadPixmap( "aqpkg/config" ), QString::null, 0, this, 0 ); |
158 | a->setWhatsThis( tr( "Click here to configure this application." ) ); | 156 | a->setWhatsThis( tr( "Click here to configure this application." ) ); |
@@ -171,7 +169,7 @@ MainWindow :: MainWindow() | |||
171 | connect( a, SIGNAL( activated() ), this, SLOT( displayAbout() ) ); | 169 | connect( a, SIGNAL( activated() ), this, SLOT( displayAbout() ) ); |
172 | a->addTo( popup ); | 170 | a->addTo( popup ); |
173 | 171 | ||
174 | mb->insertItem( tr( "View" ), popup ); | 172 | mb->insertItem( tr( "Options" ), popup ); |
175 | 173 | ||
176 | // Finish find toolbar creation | 174 | // Finish find toolbar creation |
177 | a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); | 175 | a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); |