mirror of
https://github.com/aarnt/octopi.git
synced 2025-11-21 01:54:42 +01:00
Compare commits
256 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afca94762e | ||
|
|
b9be74eaf2 | ||
|
|
5a3209dcc7 | ||
|
|
f3f8041166 | ||
|
|
80ee334925 | ||
|
|
9cbc121992 | ||
|
|
eba451cf3a | ||
|
|
c585108118 | ||
|
|
afb59dc6c2 | ||
|
|
fcd73beae4 | ||
|
|
169515a8c4 | ||
|
|
1fd0097963 | ||
|
|
ba51e3f653 | ||
|
|
ed594216cc | ||
|
|
78b16a0743 | ||
|
|
dc91892634 | ||
|
|
357c1212c1 | ||
|
|
1113611f2e | ||
|
|
31f7121901 | ||
|
|
c3d09a7095 | ||
|
|
97b90cb7cc | ||
|
|
9f4e80edd5 | ||
|
|
2974bf900b | ||
|
|
80b2a660cd | ||
|
|
01d4323f02 | ||
|
|
957f907387 | ||
|
|
e727a17ed9 | ||
|
|
380b952606 | ||
|
|
8c9b422b69 | ||
|
|
bcd269b931 | ||
|
|
f4dd17fd4b | ||
|
|
c72810d69a | ||
|
|
983a5d36a1 | ||
|
|
72036d1f43 | ||
|
|
4b58718da0 | ||
|
|
01a0cf6686 | ||
|
|
183681a4d1 | ||
|
|
d64446fe7d | ||
|
|
c9d34d5736 | ||
|
|
69ef11cae2 | ||
|
|
ad5c395e30 | ||
|
|
840bafb136 | ||
|
|
1613eca16b | ||
|
|
4587132a3e | ||
|
|
583a69195b | ||
|
|
013669d2dc | ||
|
|
64e9346c8f | ||
|
|
be91726560 | ||
|
|
a021e2d7fb | ||
|
|
dcb42e6c42 | ||
|
|
0139692edb | ||
|
|
8671c8f504 | ||
|
|
36d5a5b3db | ||
|
|
20a81da5cd | ||
|
|
7eb6773fbd | ||
|
|
209799ea95 | ||
|
|
5a0fc235a0 | ||
|
|
654cd5f7dc | ||
|
|
67f8a689af | ||
|
|
a365bcf978 | ||
|
|
9efe5e82e7 | ||
|
|
d1cb7bb7aa | ||
|
|
7884078f87 | ||
|
|
4c78b0d33a | ||
|
|
df2eb70601 | ||
|
|
e597daf289 | ||
|
|
a574c1bf74 | ||
|
|
9105033cad | ||
|
|
b78fe80e6f | ||
|
|
9c8ecdd814 | ||
|
|
477e3a0a30 | ||
|
|
6750b2880f | ||
|
|
0f17151cd1 | ||
|
|
074915b8cb | ||
|
|
b43a39084c | ||
|
|
33d50107ac | ||
|
|
56146fa77c | ||
|
|
2b8287fa3e | ||
|
|
17f390ed9c | ||
|
|
2cda92a291 | ||
|
|
2db3fbab65 | ||
|
|
bb36311dee | ||
|
|
ec34f2e310 | ||
|
|
63560a25d4 | ||
|
|
c36dbd80a4 | ||
|
|
2083e0ef92 | ||
|
|
a7c2dc19e7 | ||
|
|
0a46f47d53 | ||
|
|
8b81a019b2 | ||
|
|
f96c77b4dd | ||
|
|
fceed3f9e6 | ||
|
|
d12cc4c83e | ||
|
|
d846f0cb25 | ||
|
|
f0291a164c | ||
|
|
78e5eb7d1d | ||
|
|
b7d31f060d | ||
|
|
26a69191a0 | ||
|
|
c67efd002c | ||
|
|
58251a3bd5 | ||
|
|
6d063e6f7f | ||
|
|
3aaf4a9970 | ||
|
|
fedf3b3209 | ||
|
|
b0753af034 | ||
|
|
ab4a5e13fa | ||
|
|
f43d31877f | ||
|
|
cf061f2622 | ||
|
|
cd6e031a34 | ||
|
|
542a206d01 | ||
|
|
f97448429e | ||
|
|
95077c712b | ||
|
|
7aa6104e14 | ||
|
|
60902de817 | ||
|
|
1c851e1817 | ||
|
|
161d1cb6c9 | ||
|
|
3b90e3e6a2 | ||
|
|
86497ea2c8 | ||
|
|
2b8ed46a59 | ||
|
|
4aef1245c9 | ||
|
|
e37cb11343 | ||
|
|
26047e92a5 | ||
|
|
22586db454 | ||
|
|
3e224391fe | ||
|
|
beb6f9a114 | ||
|
|
2a84d8d728 | ||
|
|
bed9898498 | ||
|
|
4aa9a89ed5 | ||
|
|
181257ab9e | ||
|
|
680432877d | ||
|
|
4080d95306 | ||
|
|
d92a78c563 | ||
|
|
64618001f4 | ||
|
|
e8089a9f7d | ||
|
|
6821d6dca4 | ||
|
|
f266b18285 | ||
|
|
b1e966b6b6 | ||
|
|
e3d8e6fe3f | ||
|
|
4fa2a65db2 | ||
|
|
582a4ab7e4 | ||
|
|
f0c17ae27a | ||
|
|
db74213976 | ||
|
|
f55cca4827 | ||
|
|
0b53e96a71 | ||
|
|
f477ba4cf8 | ||
|
|
a24a187fe0 | ||
|
|
3da1929c70 | ||
|
|
f5e154d24a | ||
|
|
54bde33675 | ||
|
|
a771c37ca6 | ||
|
|
60c3b5fecb | ||
|
|
6d32f8ed06 | ||
|
|
40c53d073b | ||
|
|
31324ba240 | ||
|
|
c27e34da2c | ||
|
|
75a2aba102 | ||
|
|
cdcf75f60f | ||
|
|
8f0146812b | ||
|
|
e3e709f69b | ||
|
|
0db39e04dc | ||
|
|
eb77f8cbdd | ||
|
|
a471490e6e | ||
|
|
99e04027a6 | ||
|
|
52b6ab1aac | ||
|
|
f623438072 | ||
|
|
57e906c403 | ||
|
|
3e46942841 | ||
|
|
ee5d7640d2 | ||
|
|
d8d367986e | ||
|
|
343c80486e | ||
|
|
a8a486eb58 | ||
|
|
1cb131bff3 | ||
|
|
b0b2a5f1f8 | ||
|
|
bee7d84536 | ||
|
|
cb34e6dfef | ||
|
|
de00f0739d | ||
|
|
d9385ef82e | ||
|
|
692bc3eb3c | ||
|
|
1393e4dcef | ||
|
|
a3020a5136 | ||
|
|
baaf637a41 | ||
|
|
07c3339975 | ||
|
|
29e9970d68 | ||
|
|
abee17325d | ||
|
|
5cfb2f2a43 | ||
|
|
56471fb574 | ||
|
|
f259758f42 | ||
|
|
c0e3ac8c60 | ||
|
|
6ddb4c98d6 | ||
|
|
fb67cd2b86 | ||
|
|
04251cd9f9 | ||
|
|
d5ae2e0617 | ||
|
|
f6fecd4df2 | ||
|
|
38c12ec313 | ||
|
|
26813c7178 | ||
|
|
0ff2a6d5d0 | ||
|
|
401f0a5a42 | ||
|
|
4334283cc6 | ||
|
|
1947269b11 | ||
|
|
6be391371d | ||
|
|
b69baae4b8 | ||
|
|
47c0e647cc | ||
|
|
aa09b47c3a | ||
|
|
5f69d430a3 | ||
|
|
d87a0e2ce3 | ||
|
|
4761671cac | ||
|
|
e23fd407e7 | ||
|
|
891d94a66a | ||
|
|
371216bbe6 | ||
|
|
66aa26788a | ||
|
|
0ebcb5ac2c | ||
|
|
13f7240b01 | ||
|
|
160f6b184e | ||
|
|
f724249202 | ||
|
|
078e555de3 | ||
|
|
eeba5e4a07 | ||
|
|
1c2785c056 | ||
|
|
d6136e6310 | ||
|
|
4d564e6f23 | ||
|
|
0837423de9 | ||
|
|
4fd661d042 | ||
|
|
1f65bda6d9 | ||
|
|
544d2b8b48 | ||
|
|
e4b53c6601 | ||
|
|
4e49d5ee14 | ||
|
|
8dcaeba4f6 | ||
|
|
7840590d2b | ||
|
|
d2b0cf37af | ||
|
|
cabe51b673 | ||
|
|
2a3e5e5d2c | ||
|
|
3affb5e1e5 | ||
|
|
8cfc12b3c0 | ||
|
|
1ef438214e | ||
|
|
8832f929dd | ||
|
|
a436f10782 | ||
|
|
eb7ec6aacf | ||
|
|
bf0af8658b | ||
|
|
e4dd711bc4 | ||
|
|
0c01347964 | ||
|
|
747b4024f0 | ||
|
|
ada5312e5e | ||
|
|
b5a07ddad0 | ||
|
|
83902fc977 | ||
|
|
99d7bdeb15 | ||
|
|
4897d42e4a | ||
|
|
8dc42c3d36 | ||
|
|
a4b20a3b5d | ||
|
|
0a3637e806 | ||
|
|
7cdf4938fb | ||
|
|
9f684e3198 | ||
|
|
13545cfd3a | ||
|
|
6dc29b1ab0 | ||
|
|
4ba02efdb3 | ||
|
|
7d523af813 | ||
|
|
09fb50d444 | ||
|
|
b934dcd9ac | ||
|
|
e39b9b853f | ||
|
|
54b5529670 |
113
CHANGELOG
113
CHANGELOG
@@ -1,3 +1,116 @@
|
||||
0.3
|
||||
Code cleanings.
|
||||
BugFix: No need to refresh package list after a cache clean.
|
||||
BugFix: Konsole was not working with yaourt package installation.
|
||||
BugFix: Position of search icon in searchedit sometimes was wrong.
|
||||
BugFix: Some actions did not get disabled while executing a transaction.
|
||||
BugFix: Use -Ss option while searching for yaourt packages.
|
||||
BugFix: Don't show package names in yaourt package descriptions.
|
||||
BugFix: Better RazorQt compatibility.
|
||||
BugFix: Notifier: clear tooltip if no update is available (thanks to
|
||||
Anselmo L. S. Melo - anselmolsm).
|
||||
BugFix: When refreshing packages from a group, the list could become
|
||||
outdated if the user had installed/removed some package.
|
||||
BugFix: Use "yaourt -S aur/pkgname" to install yaourt packages
|
||||
(thanks to ringo32).
|
||||
BugFix: Octopi was only showing the first Optional Deps in some cases.
|
||||
Brought back the option to do a graphical system upgrade.
|
||||
Now when installing a package with optional dependencies, Octopi lets users choose
|
||||
which optional dependencies (if any) they want to install.
|
||||
Now when removing a package with dependencies, Octopi lets users choose which one they
|
||||
want to remove.
|
||||
Now Get Latest Distro News doesn't freeze the interface.
|
||||
Changed octopi main icon to octopi-green.png in PKGBUILD and
|
||||
octopi.desktop.
|
||||
Added menu "Octopi" and "System Upgrade" in octopi-notifier.
|
||||
Show Yaourt packages as outdated in default package list.
|
||||
Now it's possible to upgrade Yaourt packages even outside Yaourt group.
|
||||
Now the yellow octopi icon means there are outdated yaourt packages.
|
||||
Now octopi-notifier opens only the transaction dialog if Octopi is not running
|
||||
and user requests a system upgrade.
|
||||
Added support to remove Pacman's transaction lock file.
|
||||
Added a new notification for outdated packages on statusbar.
|
||||
Added a new status icon: an orange one for newer than repo
|
||||
installed packages.
|
||||
Added spanish (Latin America) translation.
|
||||
Added english (Great Britain) translation.
|
||||
Added portuguese (Portugal) translation.
|
||||
Added swedish translation.
|
||||
Added serbian translation.
|
||||
Added hungarian translation.
|
||||
Added new "foreign_red.png" and "octopi_green.png" icons (thanks to Alex
|
||||
Fredrich).
|
||||
Added support for pkgfile to view uninstalled package file list while in
|
||||
ArchLinux/ArchBang (thanks to Damián Nohales).
|
||||
Added an About Dialog to Octopi Notifier.
|
||||
Updated translations.
|
||||
|
||||
0.2
|
||||
Splitted the project in "octopi" and "octopi-notifier".
|
||||
Yaourt no longer runs with root permissions.
|
||||
Added support for package multi selection in Yaourt mode.
|
||||
Added option to install local packages.
|
||||
Added support for "notify-send" in "octopi-notifier".
|
||||
Added hebrew translation.
|
||||
Added lithuanian translation.
|
||||
Added norwegian bokmål translation.
|
||||
Added servian latin translation.
|
||||
Added dutch translation.
|
||||
Added russian translation.
|
||||
Added uzbek translation.
|
||||
Added finnish translation.
|
||||
Added vietnamese translation.
|
||||
Updated all other translations.
|
||||
GTK native theme is used by default in Manjaro (while not in KDE).
|
||||
Added support for Xterm terminal.
|
||||
IgnorePkg option is now used to build outdated package list.
|
||||
BugFix: Empty pkg descriptions are now shown as empty.
|
||||
|
||||
0.1.9.1
|
||||
Important bugfixes to deal with multithreaded code.
|
||||
Added a "globals.h/.cpp" file to group QFutureWatcher globals.
|
||||
Updated style changing code in main.cpp.
|
||||
BugFix: when user cancelled a sysupgrade transaction inside a
|
||||
terminal, the package actions remained disabled.
|
||||
|
||||
0.1.9
|
||||
Added yaourt support.
|
||||
Updated most of the translations.
|
||||
|
||||
0.1.8
|
||||
Added czech translation.
|
||||
Added support to ArchBang Linux.
|
||||
Added a systemtray icon notifier feature using DBus technology.
|
||||
|
||||
0.1.7.3
|
||||
Added a TRANSLATIONS file.
|
||||
Added danish translation.
|
||||
Added indonesian translation.
|
||||
Added polish translation.
|
||||
Added bulgarian translation.
|
||||
sysupgrade command line option now synchronizes database.
|
||||
Bugfix: sysupgrade must refresh packagelist after syncdatabase.
|
||||
Bugfix: if sysupgrade uses SyncFirst, makes it automatically start a second upgrade.
|
||||
|
||||
0.1.7.2
|
||||
Added catalan translation.
|
||||
Bugfix: updated new binary translation files to the resources.
|
||||
|
||||
0.1.7.1
|
||||
Bugfix: menu icons were not being shown while in Xfce.
|
||||
|
||||
0.1.7
|
||||
Added "-sysupgrade" command line option.
|
||||
Added "-removecmd" command line option.
|
||||
Added lots of translations.
|
||||
Added links to outdated package names in outdated package list.
|
||||
Added an About dialog.
|
||||
Changed the old About tab to Usage tab.
|
||||
|
||||
0.1.6.1
|
||||
Added pt_BR translation.
|
||||
Added "Open root terminal" option in File menu.
|
||||
|
||||
0.1.6
|
||||
Added a new Transaction Dialog.
|
||||
Added a Firefox-like search inside Files, News and About tabs.
|
||||
|
||||
22
INSTALL
22
INSTALL
@@ -1,10 +1,20 @@
|
||||
Installing Octopi is a pretty straightforward task.
|
||||
|
||||
Assuming you have updated Qt4 libs installed in your system, just:
|
||||
Assuming you have updated Qt4 libs installed in your system, just run:
|
||||
|
||||
1) ./qmake
|
||||
2) make
|
||||
|
||||
Octopi's binary will be generated in "./bin" dir.
|
||||
makepkg -f
|
||||
|
||||
Enjoy!
|
||||
Wait for the compilation and then install the generated package (as
|
||||
root), using:
|
||||
|
||||
pacman -U [--force] <nameOfTheGeneratedOctopiPackage.tar.xz>
|
||||
|
||||
You can also install the generated package notifier, using:
|
||||
|
||||
pacman -U [--force] <nameOfTheGeneratedOctopiNotifierPackage.tar.xz>
|
||||
|
||||
Octopi is located at the system utilities menu of your Desktop
|
||||
Environment.
|
||||
|
||||
|
||||
Enjoy!
|
||||
|
||||
68
PKGBUILD
Normal file
68
PKGBUILD
Normal file
@@ -0,0 +1,68 @@
|
||||
pkgname=('octopi' 'octopi-notifier')
|
||||
pkgver=0.3
|
||||
pkgrel=1
|
||||
pkgdesc="a powerful Pacman frontend using Qt libs"
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://octopiproject.wordpress.com"
|
||||
license=('GPL2')
|
||||
install=$pkgname.install
|
||||
makedepends=('git')
|
||||
depends=('qt4' 'xterm')
|
||||
optdepends=('kdesu: for KDE'
|
||||
'gksu: for XFCE, Gnome, LXDE, Cinnamon'
|
||||
'gnome-keyring: for password management'
|
||||
'yaourt: for AUR support'
|
||||
'octopi-notifier: for notifications'
|
||||
'pkgfile: to view uninstalled pkg contents in ArchLinux')
|
||||
provides=('octopi')
|
||||
md5sums=()
|
||||
|
||||
build() {
|
||||
cpucount=$(grep -c processor /proc/cpuinfo 2>/dev/null)
|
||||
jc=$((${cpucount:-1}))
|
||||
|
||||
#cd "$srcdir"
|
||||
msg "Starting build..."
|
||||
|
||||
cd $startdir
|
||||
qmake-qt4 $pkgname.pro
|
||||
make -j $jc
|
||||
|
||||
cd $startdir/notifier/pacmanhelper
|
||||
msg "Building pacmanhelper..."
|
||||
qmake-qt4 pacmanhelper.pro
|
||||
make -j $jc
|
||||
|
||||
cd $startdir/notifier/octopi-notifier
|
||||
msg "Building octopi-notifier..."
|
||||
qmake-qt4 octopi-notifier.pro
|
||||
make -j $jc
|
||||
}
|
||||
|
||||
package_octopi() {
|
||||
#Octopi main files
|
||||
install -D -m755 $startdir/bin/$pkgname ${pkgdir}/usr/bin/$pkgname
|
||||
install -D -m644 $startdir/$pkgname.desktop ${pkgdir}/usr/share/applications/$pkgname.desktop
|
||||
install -D -m644 $startdir/resources/images/${pkgname}_green.png ${pkgdir}/usr/share/icons/$pkgname.png
|
||||
install -D -m644 $startdir/resources/images/${pkgname}_green.png ${pkgdir}/usr/share/icons/gnome/32x32/apps/$pkgname.png
|
||||
install -D -m644 $startdir/resources/images/${pkgname}_red.png ${pkgdir}/usr/share/icons/${pkgname}_red.png
|
||||
install -D -m644 $startdir/resources/images/${pkgname}_yellow.png ${pkgdir}/usr/share/icons/${pkgname}_yellow.png
|
||||
|
||||
#Pacmanhelper service files
|
||||
install -D -m755 $startdir/notifier/bin/pacmanhelper ${pkgdir}/usr/lib/octopi/pacmanhelper
|
||||
|
||||
install -D -m644 $startdir/notifier/pacmanhelper/polkit/org.octopi.pacman.policy ${pkgdir}/usr/share/polkit-1/actions/org.octopi.pacman.policy
|
||||
install -D -m644 $startdir/notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.conf ${pkgdir}/etc/dbus-1/system.d/org.octopi.pacmanhelper.conf
|
||||
install -D -m644 $startdir/notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.xml ${pkgdir}/usr/share/dbus-1/interfaces/org.octopi.pacmanhelper.xml
|
||||
install -D -m644 $startdir/notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.service ${pkgdir}/usr/share/dbus-1/system-services/org.octopi.pacmanhelper.service
|
||||
}
|
||||
|
||||
package_octopi-notifier() {
|
||||
pkgdesc="Notifier for Octopi"
|
||||
depends=('octopi' 'libnotify')
|
||||
optdepends=('xfce4-notifyd: for notifications in XFCE')
|
||||
|
||||
#Octopi-notifier file
|
||||
install -D -m755 $startdir/notifier/bin/octopi-notifier ${pkgdir}/usr/bin/octopi-notifier
|
||||
install -D -m644 $startdir/octopi-notifier.desktop ${pkgdir}/etc/xdg/autostart/octopi-notifier.desktop
|
||||
}
|
||||
4
README
4
README
@@ -1,8 +1,8 @@
|
||||
This is Octopi, a powerful Pacman frontend using Qt libs.
|
||||
This is Octopi, a powerful Pacman/Yaourt frontend using Qt libs.
|
||||
|
||||
The project's source code is hosted at https://github.com/aarnt/octopi.
|
||||
|
||||
You'll need a privilege escalation tool to use it, once running it as
|
||||
You'll need a privilege escalation tool to use it, once running as
|
||||
root will not work. Octopi supports kdesu and gksu for that.
|
||||
|
||||
Enjoy!
|
||||
|
||||
9
THANKS
9
THANKS
@@ -1,13 +1,18 @@
|
||||
A very special thanks goes to:
|
||||
|
||||
- Alex Fredrich, for testing and suggestions
|
||||
- All Octopi translators listed in TRANSLATIONS file!
|
||||
- Alex Fredrich, for testing, suggestions and icons
|
||||
- Bernardo M. Savone (Bersil), for testing and spreading the word
|
||||
- Damián Nohales (eagleoneraptor), for pkgfile support
|
||||
- Edgar Aloísio Berger, for spreading the word by email
|
||||
- Jose Martinez (dsngjoe), for testing under Cinnamon
|
||||
- Manjaro community, for testing and suggestions
|
||||
- Manuel Tortosa, for testing, suggestions and code
|
||||
- Philip Müller, for testing, patches and suggestions
|
||||
- Philip Müller (philm), for testing, patches and suggestions
|
||||
- Riberti de Almeida Felisbino (Holmes), for spreading the word at Manjaro Linux
|
||||
Brasil
|
||||
- Ringo de kroon (ringo32), for testing and lots of suggestions
|
||||
- Sami Korkalainen (Sami-Perkele), for testing and suggestions
|
||||
- Valdir Rossi Belmonte Filho, for patching the site
|
||||
|
||||
Octopi has got much better with all your help!
|
||||
|
||||
31
TRANSLATIONS
Normal file
31
TRANSLATIONS
Normal file
@@ -0,0 +1,31 @@
|
||||
Arabic: karim (Karim Oulad Chalha)
|
||||
Brazilian Portuguese: arnt (Alexandre Albuquerque Arnt)
|
||||
Bulgarian: loot270 (Galin Iskrenov)
|
||||
Catalan: oriolfa (Oriol Fernandez)
|
||||
Czech: fri
|
||||
Danish: Snubbi (Carl Andersen)
|
||||
Dutch: jsm (Jasper van der Marel)
|
||||
English: source language
|
||||
English (Great Britain): jonathon (J Fernyhough)
|
||||
Finnish: Sami Korkalainen (Sami-Perkele)
|
||||
French: Loubrix (David Roux)
|
||||
German: Veraendert
|
||||
Greek: angel_solomos
|
||||
Hebrew: GenghisKhan
|
||||
Hungarian: lajos (Lajos Pasztor)
|
||||
Indonesian: Se7enTime (Mohamad Hasan Al Banna)
|
||||
Italian: bersil (Bernardo Miguel Savone)
|
||||
Lithuanian: liudas (Liudas Ališauskas)
|
||||
Norwegian Bokmål: viking60
|
||||
Polish: poker98face (Kuba Kaczmarzyk)
|
||||
Portuguese: arcorreia (António Correia)
|
||||
Romanian: Ayceman (Alexandru Ianu)
|
||||
Russian: macbet (Daniil) and ualmasov (Umidjon Almasov)
|
||||
Serbian: milenkin (Milena Petrović)
|
||||
Serbian-latin: GameBoyT (GameBoy)
|
||||
Spanish: tufadorin
|
||||
Spanish - Latin America: CostGranda (Cost Granda)
|
||||
Swedish: riiga
|
||||
Turkish: yfdogan (Yusuf Faruk DOĞAN)
|
||||
Uzbek: ualmasov (Umidjon Almasov)
|
||||
Vietnamese: ppanhh (Anh Phan)
|
||||
31
notifier/octopi-notifier/main.cpp
Normal file
31
notifier/octopi-notifier/main.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "../../src/unixcommand.h"
|
||||
#include "../../src/wmhelper.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (UnixCommand::isAppRunning("octopi-notifier")) return (-1);
|
||||
|
||||
QApplication a(argc, argv);
|
||||
|
||||
QApplication::setGraphicsSystem(QLatin1String("raster"));
|
||||
|
||||
if(UnixCommand::getLinuxDistro() == ectn_MANJAROLINUX &&
|
||||
!WMHelper::isKDERunning())
|
||||
{
|
||||
qApp->setStyle(new QGtkStyle());
|
||||
}
|
||||
else
|
||||
qApp->setStyle(new QCleanlooksStyle);
|
||||
|
||||
QTranslator appTranslator;
|
||||
appTranslator.load(":/resources/translations/octopi_" +
|
||||
QLocale::system().name());
|
||||
a.installTranslator(&appTranslator);
|
||||
a.setQuitOnLastWindowClosed(false);
|
||||
MainWindow w;
|
||||
QResource::registerResource("./resources.qrc");
|
||||
return a.exec();
|
||||
}
|
||||
523
notifier/octopi-notifier/mainwindow.cpp
Normal file
523
notifier/octopi-notifier/mainwindow.cpp
Normal file
@@ -0,0 +1,523 @@
|
||||
#include "mainwindow.h"
|
||||
#include "../../src/strconstants.h"
|
||||
#include "../../src/uihelper.h"
|
||||
#include "../../src/package.h"
|
||||
#include "../../src/pacmanhelperclient.h"
|
||||
#include "../../src/transactiondialog.h"
|
||||
|
||||
#include <QTimer>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <QProcess>
|
||||
#include <QMessageBox>
|
||||
|
||||
/*
|
||||
* This is Octopi Notifier slim interface code :-)
|
||||
*/
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent)
|
||||
{
|
||||
m_pacmanDatabaseSystemWatcher =
|
||||
new QFileSystemWatcher(QStringList() << ctn_PACMAN_DATABASE_DIR, this);
|
||||
|
||||
initSystemTrayIcon();
|
||||
}
|
||||
|
||||
/*
|
||||
* Let's initialize the system tray object...
|
||||
*/
|
||||
void MainWindow::initSystemTrayIcon()
|
||||
{
|
||||
m_commandExecuting = ectn_NONE;
|
||||
|
||||
m_systemTrayIcon = new QSystemTrayIcon(this);
|
||||
m_systemTrayIcon->setObjectName("systemTrayIcon");
|
||||
|
||||
m_actionExit = new QAction(IconHelper::getIconExit(), tr("Exit"), this);
|
||||
connect(m_actionExit, SIGNAL(triggered()), this, SLOT(exitNotifier()));
|
||||
|
||||
m_actionAbout = new QAction(StrConstants::getHelpAbout(), this);
|
||||
connect(m_actionAbout, SIGNAL(triggered()), this, SLOT(aboutOctopiNotifier()));
|
||||
|
||||
m_actionOctopi = new QAction(this);
|
||||
m_actionOctopi->setText("Octopi...");
|
||||
connect(m_actionOctopi, SIGNAL(triggered()), this, SLOT(startOctopi()));
|
||||
|
||||
m_actionSystemUpgrade = new QAction(this);
|
||||
m_actionSystemUpgrade->setText(tr("System upgrade"));
|
||||
connect(m_actionSystemUpgrade, SIGNAL(triggered()), this, SLOT(runOctopi()));
|
||||
|
||||
refreshAppIcon();
|
||||
|
||||
if (m_numberOfOutdatedPackages == 0 && m_numberOfOutdatedYaourtPackages == 0)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip("");
|
||||
}
|
||||
else if (m_numberOfOutdatedPackages > 0)
|
||||
{
|
||||
QString notification;
|
||||
|
||||
if (m_numberOfOutdatedPackages == 1)
|
||||
{
|
||||
notification = StrConstants::getOneNewUpdate();
|
||||
m_systemTrayIcon->setToolTip(notification);
|
||||
}
|
||||
else if (m_numberOfOutdatedPackages > 1)
|
||||
{
|
||||
notification = StrConstants::getNewUpdates().arg(m_numberOfOutdatedPackages);
|
||||
m_systemTrayIcon->setToolTip(notification);
|
||||
}
|
||||
}
|
||||
else if (m_numberOfOutdatedYaourtPackages > 0)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip("");
|
||||
|
||||
if (m_numberOfOutdatedYaourtPackages == 1)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getOneNewUpdate());
|
||||
}
|
||||
else if (m_numberOfOutdatedYaourtPackages > 1)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getNewUpdates().arg(m_numberOfOutdatedYaourtPackages));
|
||||
}
|
||||
}
|
||||
|
||||
m_systemTrayIcon->show();
|
||||
m_systemTrayIconMenu = new QMenu( this );
|
||||
m_systemTrayIconMenu->addAction(m_actionOctopi);
|
||||
m_systemTrayIconMenu->addAction(m_actionSystemUpgrade);
|
||||
m_systemTrayIconMenu->addSeparator();
|
||||
m_systemTrayIconMenu->addAction(m_actionAbout);
|
||||
m_systemTrayIconMenu->addAction(m_actionExit);
|
||||
m_systemTrayIcon->setContextMenu(m_systemTrayIconMenu);
|
||||
|
||||
connect ( m_systemTrayIcon , SIGNAL( activated( QSystemTrayIcon::ActivationReason ) ),
|
||||
this, SLOT( execSystemTrayActivated ( QSystemTrayIcon::ActivationReason ) ) );
|
||||
|
||||
m_pacmanHelperClient = new PacmanHelperClient("org.octopi.pacmanhelper", "/", QDBusConnection::systemBus(), 0);
|
||||
connect(m_pacmanHelperClient, SIGNAL(syncdbcompleted()), this, SLOT(afterPacmanHelperSyncDatabase()));
|
||||
|
||||
m_pacmanHelperTimer = new QTimer();
|
||||
m_pacmanHelperTimer->setInterval(100);
|
||||
m_pacmanHelperTimer->start();
|
||||
|
||||
connect(m_pacmanHelperTimer, SIGNAL(timeout()), this, SLOT(pacmanHelperTimerTimeout()));
|
||||
}
|
||||
|
||||
/*
|
||||
* Execs Octopi
|
||||
*/
|
||||
void MainWindow::runOctopi(bool execApplication)
|
||||
{
|
||||
QProcess proc;
|
||||
|
||||
if (!execApplication &&
|
||||
!UnixCommand::isAppRunning("octopi", true) && m_outdatedPackageList->count() > 0)
|
||||
{
|
||||
doSystemUpgrade();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (UnixCommand::getLinuxDistro() == ectn_MANJAROLINUX &&
|
||||
(!WMHelper::isKDERunning() && (!WMHelper::isRazorQtRunning())))
|
||||
{
|
||||
if (m_icon.pixmap(QSize(22,22)).toImage() ==
|
||||
IconHelper::getIconOctopiRed().pixmap(QSize(22,22)).toImage())
|
||||
{
|
||||
if (execApplication == true)
|
||||
{
|
||||
proc.startDetached("octopi -style gtk");
|
||||
}
|
||||
else proc.startDetached("octopi -sysupgrade -style gtk");
|
||||
}
|
||||
else
|
||||
{
|
||||
proc.startDetached("octopi -style gtk");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_icon.pixmap(QSize(22,22)).toImage() ==
|
||||
IconHelper::getIconOctopiRed().pixmap(QSize(22,22)).toImage())
|
||||
{
|
||||
if (execApplication == true)
|
||||
{
|
||||
proc.startDetached("octopi");
|
||||
}
|
||||
else proc.startDetached("octopi -sysupgrade");
|
||||
}
|
||||
else
|
||||
{
|
||||
proc.startDetached("octopi");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Shows Octopi Notifier About Dialog...
|
||||
*/
|
||||
void MainWindow::aboutOctopiNotifier()
|
||||
{
|
||||
QString aboutText = "<b>Octopi Notifier - " + StrConstants::getApplicationVersion() + "</b><br>";
|
||||
aboutText += "<a href=\"http://octopiproject.wordpress.com/\">http://octopiproject.wordpress.com</a><br><br>";
|
||||
aboutText += "© Alexandre Albuquerque Arnt";
|
||||
QMessageBox::about(this, StrConstants::getHelpAbout(), aboutText);
|
||||
}
|
||||
|
||||
/*
|
||||
* Hides Octopi
|
||||
*/
|
||||
void MainWindow::hideOctopi()
|
||||
{
|
||||
QProcess proc;
|
||||
proc.startDetached("octopi -hide");
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if some SU utility is available...
|
||||
* Returns false if not!
|
||||
*/
|
||||
bool MainWindow::_isSUAvailable()
|
||||
{
|
||||
//If there are no means to run the actions, we must warn!
|
||||
if (WMHelper::getSUCommand() == ctn_NO_SU_COMMAND){
|
||||
QMessageBox::critical( 0, StrConstants::getApplicationName(),
|
||||
StrConstants::getErrorNoSuCommand() +
|
||||
"\n" + StrConstants::getYoullNeedSuFrontend());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Calls only the Octopi system upgrade window
|
||||
*/
|
||||
void MainWindow::doSystemUpgrade()
|
||||
{
|
||||
//Shows a dialog indicating the targets needed to be retrieved and asks for the user's permission.
|
||||
QList<PackageListData> * targets = Package::getTargetUpgradeList();
|
||||
|
||||
//There are no new updates to install!
|
||||
if (targets->count() == 0 && m_outdatedPackageList->count() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (targets->count() == 0 && m_outdatedPackageList->count() > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QString list;
|
||||
double totalDownloadSize = 0;
|
||||
|
||||
foreach(PackageListData target, *targets)
|
||||
{
|
||||
totalDownloadSize += target.downloadSize;
|
||||
list = list + target.name + "-" + target.version + "\n";
|
||||
}
|
||||
list.remove(list.size()-1, 1);
|
||||
|
||||
totalDownloadSize = totalDownloadSize / 1024;
|
||||
QString ds = QString::number(totalDownloadSize, 'f', 2);
|
||||
|
||||
TransactionDialog question(this);
|
||||
question.removeYesButton(); //This is a more prudent behaviour!
|
||||
|
||||
if(targets->count()==1)
|
||||
question.setText(StrConstants::getRetrieveTarget() +
|
||||
"\n\n" + StrConstants::getTotalDownloadSize().arg(ds));
|
||||
else
|
||||
question.setText(StrConstants::getRetrieveTargets().arg(targets->count()) +
|
||||
"\n\n" + StrConstants::getTotalDownloadSize().arg(ds));
|
||||
|
||||
question.setWindowTitle(StrConstants::getConfirmation());
|
||||
question.setInformativeText(StrConstants::getConfirmationQuestion());
|
||||
question.setDetailedText(list);
|
||||
|
||||
m_systemUpgradeDialog = true;
|
||||
int result = question.exec();
|
||||
|
||||
if(result == QDialogButtonBox::Yes || result == QDialogButtonBox::AcceptRole)
|
||||
{
|
||||
m_systemUpgradeDialog = false;
|
||||
|
||||
//If there are no means to run the actions, we must warn!
|
||||
if (!_isSUAvailable()) return;
|
||||
|
||||
QStringList lastCommandList;
|
||||
lastCommandList.append("pacman -Su;");
|
||||
lastCommandList.append("echo -e;");
|
||||
lastCommandList.append("read -n1 -p \"" + StrConstants::getPressAnyKey() + "\"");
|
||||
|
||||
m_unixCommand = new UnixCommand(this);
|
||||
|
||||
QObject::connect(m_unixCommand, SIGNAL( finished ( int, QProcess::ExitStatus )),
|
||||
this, SLOT( doSystemUpgradeFinished(int, QProcess::ExitStatus) ));
|
||||
|
||||
toggleEnableInterface(false);
|
||||
m_actionSystemUpgrade->setEnabled(false);
|
||||
|
||||
if (result == QDialogButtonBox::AcceptRole)
|
||||
{
|
||||
m_commandExecuting = ectn_RUN_SYSTEM_UPGRADE_IN_TERMINAL;
|
||||
m_unixCommand->runCommandInTerminal(lastCommandList);
|
||||
}
|
||||
}
|
||||
else if (result == QDialogButtonBox::No)
|
||||
{
|
||||
m_systemUpgradeDialog = false;
|
||||
toggleEnableInterface(true);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* When system upgrade process is finished...
|
||||
*/
|
||||
void MainWindow::doSystemUpgradeFinished(int, QProcess::ExitStatus)
|
||||
{
|
||||
refreshAppIcon();
|
||||
|
||||
//Does it still need to upgrade another packages due to SyncFirst issues???
|
||||
if ((m_commandExecuting == ectn_RUN_SYSTEM_UPGRADE_IN_TERMINAL)
|
||||
&& m_outdatedPackageList->count() > 0)
|
||||
{
|
||||
m_commandExecuting = ectn_NONE;
|
||||
m_unixCommand->removeTemporaryActionFile();
|
||||
doSystemUpgrade();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_commandExecuting = ectn_NONE;
|
||||
m_unixCommand->removeTemporaryActionFile();
|
||||
toggleEnableInterface(true);
|
||||
}
|
||||
|
||||
/*
|
||||
* Enables and Disables some UI elements of Octopi-notifier
|
||||
*/
|
||||
void MainWindow::toggleEnableInterface(bool state)
|
||||
{
|
||||
m_actionOctopi->setEnabled(state);
|
||||
m_actionExit->setEnabled(state);
|
||||
}
|
||||
|
||||
/*
|
||||
* Whenever this timer ticks, we need to call the PacmanHelper DBus interface to sync Pacman's dbs
|
||||
*/
|
||||
void MainWindow::pacmanHelperTimerTimeout()
|
||||
{
|
||||
static bool firstTime=true;
|
||||
|
||||
if (m_commandExecuting != ectn_NONE) return;
|
||||
|
||||
if (firstTime)
|
||||
{
|
||||
m_pacmanHelperTimer->setInterval(1000 * 60 * 60);
|
||||
firstTime=false;
|
||||
}
|
||||
|
||||
m_actionOctopi->setEnabled(false);
|
||||
|
||||
if (m_outdatedPackageList->count() > 0)
|
||||
{
|
||||
m_actionSystemUpgrade->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_actionSystemUpgrade->setVisible(false);
|
||||
}
|
||||
|
||||
m_commandExecuting = ectn_SYNC_DATABASE;
|
||||
m_pacmanHelperClient->syncdb();
|
||||
}
|
||||
|
||||
/*
|
||||
* Called right after the PacmanHelper syncdb() method has finished!
|
||||
*/
|
||||
void MainWindow::afterPacmanHelperSyncDatabase()
|
||||
{
|
||||
m_actionOctopi->setEnabled(true);
|
||||
m_systemTrayIconMenu->close();
|
||||
m_commandExecuting = ectn_NONE;
|
||||
|
||||
disconnect(m_pacmanDatabaseSystemWatcher,
|
||||
SIGNAL(directoryChanged(QString)), this, SLOT(refreshAppIcon()));
|
||||
|
||||
int numberOfOutdatedPackages = m_numberOfOutdatedPackages;
|
||||
refreshAppIcon();
|
||||
|
||||
if (numberOfOutdatedPackages != m_numberOfOutdatedPackages)
|
||||
{
|
||||
if (m_numberOfOutdatedPackages > 0)
|
||||
{
|
||||
QString notification;
|
||||
|
||||
if (m_numberOfOutdatedPackages == 1)
|
||||
{
|
||||
notification = StrConstants::getOneNewUpdate();
|
||||
m_systemTrayIcon->setToolTip(notification);
|
||||
sendNotification(notification);
|
||||
}
|
||||
else if (m_numberOfOutdatedPackages > 1)
|
||||
{
|
||||
notification = StrConstants::getNewUpdates().arg(m_numberOfOutdatedPackages);
|
||||
m_systemTrayIcon->setToolTip(notification);
|
||||
sendNotification(notification);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QString notification;
|
||||
|
||||
if (numberOfOutdatedPackages == 1)
|
||||
{
|
||||
notification = StrConstants::getOneNewUpdate();
|
||||
m_systemTrayIcon->setToolTip(notification);
|
||||
sendNotification(notification);
|
||||
}
|
||||
else if (numberOfOutdatedPackages > 1)
|
||||
{
|
||||
notification = StrConstants::getNewUpdates().arg(numberOfOutdatedPackages);
|
||||
m_systemTrayIcon->setToolTip(notification);
|
||||
sendNotification(notification);
|
||||
}
|
||||
}
|
||||
|
||||
connect(m_pacmanDatabaseSystemWatcher,
|
||||
SIGNAL(directoryChanged(QString)), this, SLOT(refreshAppIcon()));
|
||||
}
|
||||
|
||||
/*
|
||||
* Uses notify-send to send a notification to the systray area
|
||||
*/
|
||||
void MainWindow::sendNotification(const QString &msg)
|
||||
{
|
||||
if (WMHelper::isXFCERunning() || WMHelper::isLXDERunning() || WMHelper::isOPENBOXRunning())
|
||||
{
|
||||
QString processToExec("notify-send");
|
||||
if (UnixCommand::hasTheExecutable(processToExec))
|
||||
{
|
||||
QProcess *send = new QProcess();
|
||||
processToExec += " -i /usr/share/icons/octopi_red.png -t 30000 \"" + StrConstants::getApplicationName() +
|
||||
"\" \"" + msg + "\"";
|
||||
send->startDetached(processToExec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If we have some outdated packages, let's put an angry red face icon in this app!
|
||||
*/
|
||||
void MainWindow::refreshAppIcon()
|
||||
{
|
||||
m_outdatedPackageList = Package::getOutdatedPackageList();
|
||||
m_outdatedYaourtPackageList = Package::getOutdatedYaourtPackageList();
|
||||
m_numberOfOutdatedPackages = m_outdatedPackageList->count();
|
||||
m_numberOfOutdatedYaourtPackages = m_outdatedYaourtPackageList->count();
|
||||
|
||||
if (m_numberOfOutdatedPackages == 0 && m_numberOfOutdatedYaourtPackages == 0)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip("");
|
||||
}
|
||||
else if (m_numberOfOutdatedPackages > 0)
|
||||
{
|
||||
if (m_numberOfOutdatedPackages == 1)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getOneNewUpdate());
|
||||
}
|
||||
else if (m_numberOfOutdatedPackages > 1)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getNewUpdates().arg(m_numberOfOutdatedPackages));
|
||||
}
|
||||
}
|
||||
else if (m_numberOfOutdatedYaourtPackages > 0)
|
||||
{
|
||||
if (m_numberOfOutdatedYaourtPackages == 1)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getOneNewUpdate());
|
||||
}
|
||||
else if (m_numberOfOutdatedYaourtPackages > 1)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getNewUpdates().arg(m_numberOfOutdatedYaourtPackages));
|
||||
}
|
||||
}
|
||||
|
||||
if(m_outdatedPackageList->count() > 0) //RED ICON!
|
||||
{
|
||||
if(m_commandExecuting == ectn_NONE)
|
||||
{
|
||||
m_actionSystemUpgrade->setEnabled(true);
|
||||
m_actionSystemUpgrade->setVisible(true);
|
||||
}
|
||||
|
||||
m_icon = (IconHelper::getIconOctopiRed());
|
||||
}
|
||||
else if(m_outdatedYaourtPackageList->count() > 0) //YELLOW ICON!
|
||||
{
|
||||
m_actionSystemUpgrade->setVisible(false);
|
||||
m_icon = (IconHelper::getIconOctopiYellow());
|
||||
}
|
||||
else //YEAHHH... GREEN ICON!
|
||||
{
|
||||
m_actionSystemUpgrade->setVisible(false);
|
||||
m_icon = (IconHelper::getIconOctopiGreen());
|
||||
}
|
||||
|
||||
setWindowIcon(m_icon);
|
||||
m_systemTrayIcon->setIcon(m_icon);
|
||||
m_systemTrayIcon->show();
|
||||
}
|
||||
|
||||
/*
|
||||
* Whenever the user clicks on the systemTray icon...
|
||||
*/
|
||||
void MainWindow::execSystemTrayActivated(QSystemTrayIcon::ActivationReason ar)
|
||||
{
|
||||
if (m_commandExecuting != ectn_NONE) return;
|
||||
|
||||
switch (ar)
|
||||
{
|
||||
case QSystemTrayIcon::DoubleClick:
|
||||
{
|
||||
if (m_outdatedPackageList->count() > 0)
|
||||
{
|
||||
runOctopi();
|
||||
}
|
||||
else
|
||||
{
|
||||
runOctopi(true);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case QSystemTrayIcon::Trigger:
|
||||
{
|
||||
if (UnixCommand::isAppRunning("octopi", true))
|
||||
{
|
||||
hideOctopi();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* When the users quit this notifier...
|
||||
*/
|
||||
void MainWindow::exitNotifier()
|
||||
{
|
||||
if (UnixCommand::isAppRunning("octopi", true))
|
||||
{
|
||||
QProcess proc;
|
||||
proc.startDetached("octopi -close");
|
||||
}
|
||||
|
||||
qApp->quit();
|
||||
}
|
||||
67
notifier/octopi-notifier/mainwindow.h
Normal file
67
notifier/octopi-notifier/mainwindow.h
Normal file
@@ -0,0 +1,67 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include "../../src/unixcommand.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QString>
|
||||
#include <QMainWindow>
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
class QIcon;
|
||||
class QMenu;
|
||||
class QAction;
|
||||
class QFileSystemWatcher;
|
||||
class PacmanHelperClient;
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
|
||||
private slots:
|
||||
|
||||
void pacmanHelperTimerTimeout();
|
||||
void afterPacmanHelperSyncDatabase();
|
||||
void execSystemTrayActivated(QSystemTrayIcon::ActivationReason);
|
||||
void refreshAppIcon();
|
||||
void runOctopi(bool execApplication = false);
|
||||
inline void startOctopi() { runOctopi(true); }
|
||||
|
||||
void aboutOctopiNotifier();
|
||||
void hideOctopi();
|
||||
void exitNotifier();
|
||||
void doSystemUpgrade();
|
||||
void doSystemUpgradeFinished(int, QProcess::ExitStatus);
|
||||
void toggleEnableInterface(bool state);
|
||||
|
||||
private:
|
||||
|
||||
int m_numberOfOutdatedPackages;
|
||||
int m_numberOfOutdatedYaourtPackages;
|
||||
bool m_systemUpgradeDialog;
|
||||
CommandExecuting m_commandExecuting;
|
||||
UnixCommand *m_unixCommand;
|
||||
|
||||
QAction *m_actionOctopi;
|
||||
QAction *m_actionSystemUpgrade;
|
||||
QAction *m_actionAbout;
|
||||
QAction *m_actionExit;
|
||||
QIcon m_icon;
|
||||
QStringList *m_outdatedPackageList;
|
||||
QStringList *m_outdatedYaourtPackageList;
|
||||
QTimer *m_pacmanHelperTimer;
|
||||
QSystemTrayIcon *m_systemTrayIcon;
|
||||
QMenu *m_systemTrayIconMenu;
|
||||
QFileSystemWatcher *m_pacmanDatabaseSystemWatcher;
|
||||
PacmanHelperClient *m_pacmanHelperClient;
|
||||
|
||||
bool _isSUAvailable();
|
||||
void initSystemTrayIcon();
|
||||
void sendNotification(const QString &msg);
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
45
notifier/octopi-notifier/octopi-notifier.pro
Normal file
45
notifier/octopi-notifier/octopi-notifier.pro
Normal file
@@ -0,0 +1,45 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2013-07-20T16:15:14
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui network dbus
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += qt console warn_on debug
|
||||
|
||||
TARGET = octopi-notifier
|
||||
TEMPLATE = app
|
||||
|
||||
DESTDIR += ../bin
|
||||
OBJECTS_DIR += ../build-octopi-notifier
|
||||
MOC_DIR += ../build-octopi-notifier
|
||||
UI_DIR += ../build-octopi-notifier
|
||||
|
||||
SOURCES += main.cpp \
|
||||
mainwindow.cpp \
|
||||
../../src/unixcommand.cpp \
|
||||
../../src/package.cpp \
|
||||
../../src/wmhelper.cpp \
|
||||
../../src/settingsmanager.cpp \
|
||||
../../src/pacmanhelperclient.cpp \
|
||||
../../src/utils/processwrapper.cpp \
|
||||
../../src/transactiondialog.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
../../src/uihelper.h \
|
||||
../../src/unixcommand.h \
|
||||
../../src/wmhelper.h \
|
||||
../../src/strconstants.h \
|
||||
../../src/package.h \
|
||||
../../src/pacmanhelperclient.h \
|
||||
../../src/utils/processwrapper.h \
|
||||
../../src/transactiondialog.h
|
||||
|
||||
FORMS += ../../ui/transactiondialog.ui
|
||||
|
||||
RESOURCES += \
|
||||
../../resources.qrc
|
||||
5
notifier/pacmanhelper/README
Normal file
5
notifier/pacmanhelper/README
Normal file
@@ -0,0 +1,5 @@
|
||||
Command used to generate the PacmanHelperAdaptor:
|
||||
|
||||
qdbusxml2cpp -c PacmanHelperAdaptor
|
||||
-a pacmanhelperadaptor.h:pacmanhelperadaptor.cpp
|
||||
polkit/org.octopi.pacmanhelper.xml
|
||||
11
notifier/pacmanhelper/main.cpp
Normal file
11
notifier/pacmanhelper/main.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "pacmanhelper.h"
|
||||
#include <QCoreApplication>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication a(argc, argv);
|
||||
|
||||
PacmanHelper pacmanHelper;
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
35
notifier/pacmanhelper/pacmanhelper.cpp
Normal file
35
notifier/pacmanhelper/pacmanhelper.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include "pacmanhelper.h"
|
||||
#include "pacmanhelperadaptor.h"
|
||||
#include <QCoreApplication>
|
||||
#include <QDBusConnection>
|
||||
#include <QProcess>
|
||||
#include <QDebug>
|
||||
|
||||
PacmanHelper::PacmanHelper(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
(void) new PacmanHelperAdaptor(this);
|
||||
|
||||
if (!QDBusConnection::systemBus().registerService("org.octopi.pacmanhelper")) {
|
||||
qDebug() << "Another helper is already running!";
|
||||
QCoreApplication::instance()->quit();
|
||||
}
|
||||
|
||||
if (!QDBusConnection::systemBus().registerObject("/", this)) {
|
||||
qDebug() << "Unable to register service interface to dbus!";
|
||||
QCoreApplication::instance()->quit();
|
||||
}
|
||||
}
|
||||
|
||||
void PacmanHelper::syncdb()
|
||||
{
|
||||
QProcess pacman;
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert("LANG", "us_EN");
|
||||
pacman.setProcessEnvironment(env);
|
||||
|
||||
QString command = "pacman -Syy";
|
||||
pacman.execute(command);
|
||||
|
||||
emit syncdbcompleted();
|
||||
}
|
||||
21
notifier/pacmanhelper/pacmanhelper.h
Normal file
21
notifier/pacmanhelper/pacmanhelper.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef PACMANHELPER_H
|
||||
#define PACMANHELPER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QtDBus/QDBusContext>
|
||||
|
||||
class PacmanHelper : public QObject, protected QDBusContext
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", "org.octopi.pacmanhelper")
|
||||
public:
|
||||
explicit PacmanHelper(QObject *parent = 0);
|
||||
|
||||
public slots:
|
||||
void syncdb();
|
||||
|
||||
signals:
|
||||
void syncdbcompleted();
|
||||
};
|
||||
|
||||
#endif // PACMANHELPER_H
|
||||
23
notifier/pacmanhelper/pacmanhelper.pro
Normal file
23
notifier/pacmanhelper/pacmanhelper.pro
Normal file
@@ -0,0 +1,23 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2013-06-01T15:00:00
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core dbus
|
||||
|
||||
CONFIG += qt console warn_on
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
DESTDIR += ../bin
|
||||
OBJECTS_DIR += ../build
|
||||
MOC_DIR += ../build
|
||||
UI_DIR += ../build
|
||||
|
||||
HEADERS += pacmanhelper.h \
|
||||
pacmanhelperadaptor.h
|
||||
|
||||
SOURCES += main.cpp \
|
||||
pacmanhelper.cpp \
|
||||
pacmanhelperadaptor.cpp
|
||||
239
notifier/pacmanhelper/pacmanhelper.pro.user
Normal file
239
notifier/pacmanhelper/pacmanhelper.pro.user
Normal file
@@ -0,0 +1,239 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by Qt Creator 2.6.2, 2013-06-03T23:20:52. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QString" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QString" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">{0dce8b8b-e9b7-4159-956b-f4c9f1085a56}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/arnt/Projects/octopi/notifier/build</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/arnt/Projects/octopi/notifier/pacmanhelper/</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">pacmanhelper</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QByteArray" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/arnt/Projects/octopi/notifier/pacmanhelper/pacmanhelper.pro</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">pacmanhelper.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
|
||||
<value type="QString">{e7ed0845-58e4-42af-91c6-0506d885beb7}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">12</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
41
notifier/pacmanhelper/pacmanhelperadaptor.cpp
Normal file
41
notifier/pacmanhelper/pacmanhelperadaptor.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* This file was generated by qdbusxml2cpp version 0.7
|
||||
* Command line was: qdbusxml2cpp -c PacmanHelperAdaptor -a pacmanhelperadaptor.h:pacmanhelperadaptor.cpp polkit/org.octopi.pacmanhelper.xml
|
||||
*
|
||||
* qdbusxml2cpp is Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
||||
*
|
||||
* This is an auto-generated file.
|
||||
* Do not edit! All changes made to it will be lost.
|
||||
*/
|
||||
|
||||
#include "pacmanhelperadaptor.h"
|
||||
#include <QtCore/QMetaObject>
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QVariant>
|
||||
|
||||
/*
|
||||
* Implementation of adaptor class PacmanHelperAdaptor
|
||||
*/
|
||||
|
||||
PacmanHelperAdaptor::PacmanHelperAdaptor(QObject *parent)
|
||||
: QDBusAbstractAdaptor(parent)
|
||||
{
|
||||
// constructor
|
||||
setAutoRelaySignals(true);
|
||||
}
|
||||
|
||||
PacmanHelperAdaptor::~PacmanHelperAdaptor()
|
||||
{
|
||||
// destructor
|
||||
}
|
||||
|
||||
void PacmanHelperAdaptor::syncdb()
|
||||
{
|
||||
// handle method call org.octopi.pacmanhelper.syncdb
|
||||
QMetaObject::invokeMethod(parent(), "syncdb");
|
||||
}
|
||||
|
||||
48
notifier/pacmanhelper/pacmanhelperadaptor.h
Normal file
48
notifier/pacmanhelper/pacmanhelperadaptor.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* This file was generated by qdbusxml2cpp version 0.7
|
||||
* Command line was: qdbusxml2cpp -c PacmanHelperAdaptor -a pacmanhelperadaptor.h:pacmanhelperadaptor.cpp polkit/org.octopi.pacmanhelper.xml
|
||||
*
|
||||
* qdbusxml2cpp is Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
||||
*
|
||||
* This is an auto-generated file.
|
||||
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||
* before re-generating it.
|
||||
*/
|
||||
|
||||
#ifndef PACMANHELPERADAPTOR_H_1370179068
|
||||
#define PACMANHELPERADAPTOR_H_1370179068
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtDBus/QtDBus>
|
||||
class QByteArray;
|
||||
template<class T> class QList;
|
||||
template<class Key, class Value> class QMap;
|
||||
class QString;
|
||||
class QStringList;
|
||||
class QVariant;
|
||||
|
||||
/*
|
||||
* Adaptor class for interface org.octopi.pacmanhelper
|
||||
*/
|
||||
class PacmanHelperAdaptor: public QDBusAbstractAdaptor
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", "org.octopi.pacmanhelper")
|
||||
Q_CLASSINFO("D-Bus Introspection", ""
|
||||
" <interface name=\"org.octopi.pacmanhelper\">\n"
|
||||
" <method name=\"syncdb\"/>\n"
|
||||
" <signal name=\"syncdbcompleted\"/>\n"
|
||||
" </interface>\n"
|
||||
"")
|
||||
public:
|
||||
PacmanHelperAdaptor(QObject *parent);
|
||||
virtual ~PacmanHelperAdaptor();
|
||||
|
||||
public: // PROPERTIES
|
||||
public Q_SLOTS: // METHODS
|
||||
void syncdb();
|
||||
Q_SIGNALS: // SIGNALS
|
||||
void syncdbcompleted();
|
||||
};
|
||||
|
||||
#endif
|
||||
15
notifier/pacmanhelper/polkit/org.octopi.pacman.policy
Normal file
15
notifier/pacmanhelper/polkit/org.octopi.pacman.policy
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
|
||||
<action id="org.octopi.pacman.syncdb">
|
||||
<description>Synchronizes databases</description>
|
||||
<message>Prevents from doing action syncdb</message>
|
||||
<defaults>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_active>auth_admin</allow_active>
|
||||
</defaults>
|
||||
</action>
|
||||
</policyconfig>
|
||||
18
notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.conf
Normal file
18
notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.conf
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE busconfig PUBLIC
|
||||
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||
<busconfig>
|
||||
|
||||
<!-- Only user root can own the foo helper -->
|
||||
<policy user="root">
|
||||
<allow own="org.octopi.pacmanhelper"/>
|
||||
</policy>
|
||||
|
||||
<!-- Allow anyone to call into the service - we'll reject callers using PolicyKit -->
|
||||
<policy context="default">
|
||||
<allow send_interface="org.octopi.pacmanhelper"/>
|
||||
<allow receive_sender="org.octopi.pacmanhelper"/>
|
||||
<allow receive_interface="org.octopi.pacmanhelper"/>
|
||||
</policy>
|
||||
|
||||
</busconfig>
|
||||
@@ -0,0 +1,4 @@
|
||||
[D-BUS Service]
|
||||
Name=org.octopi.pacmanhelper
|
||||
Exec=/usr/lib/octopi/pacmanhelper
|
||||
User=root
|
||||
9
notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.xml
Normal file
9
notifier/pacmanhelper/polkit/org.octopi.pacmanhelper.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.octopi.pacmanhelper">
|
||||
<method name="syncdb" >
|
||||
</method>
|
||||
<signal name="syncdbcompleted">
|
||||
</signal>
|
||||
</interface>
|
||||
</node>
|
||||
9
octopi-notifier.desktop
Normal file
9
octopi-notifier.desktop
Normal file
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=Octopi Notifier
|
||||
Icon=octopi
|
||||
Exec=octopi-notifier
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GNOME;GTK;System;
|
||||
#NotShowIn=GNOME;XFCE;LXDE;KDE;
|
||||
StartupNotify=true
|
||||
157
octopi.desktop
157
octopi.desktop
@@ -1,4 +1,77 @@
|
||||
[Desktop Entry]
|
||||
Categories=GNOME;GTK;System;
|
||||
Comment[en_US]=Add or remove software installed on the system
|
||||
Comment=Add or remove software installed on the system
|
||||
Comment[af]=Voeg by of verwyder sagteware geïnstalleer op die stelsel
|
||||
Comment[ar]=أضف أو أزل البرمجيات المثبتة على النظام
|
||||
Comment[as]=ব্যৱস্থাপ্ৰণালীত সংস্থাপিত চালনাজ্ঞান উন্নয়ন কৰক
|
||||
Comment[ast]=Amestar o quitar software instaláu nel sistema
|
||||
Comment[be]=Дадаць ці выдаліць апраграмаванне, усталяванае ў сістэме
|
||||
Comment[bg]=Инсталиране и деинсталиране на софтуер към системата
|
||||
Comment[bn]=সিস্টেমে সফ্টওয়্যার যোগ করুন অথবা ইনস্টল করা সফ্টওয়্যার অপসারণ
|
||||
Comment[bn_IN]=সিস্টেমে সফ্টওয়্যার যোগ করুন অথবা ইনস্টল করা সফ্টওয়্যার সরিয়ে ফেলুন
|
||||
Comment[ca@valencia]=Afig o suprimeix programari instal·lat en el sistema
|
||||
Comment[ca]=Afegeix o suprimeix programari instal·lat en el sistema
|
||||
Comment[cs]=Přidat nebo odebrat software instalovaný v systému
|
||||
Comment[da]=Tilføj eller fjern software installeret på systemet
|
||||
Comment[de]=Auf dem System installierte Software aktualisieren oder neue Software hinzufügen
|
||||
Comment[el]=Προσθαφαίρεση λογισμικού στο σύστημα
|
||||
Comment[en@shaw]=𐑨𐑛 𐑹 𐑮𐑦𐑥𐑵𐑝 𐑕𐑪𐑓𐑑𐑢𐑺 𐑦𐑯𐑕𐑑𐑷𐑤𐑛 𐑪𐑯 𐑞 𐑕𐑦𐑕𐑑𐑩𐑥
|
||||
Comment[en_GB]=Add or remove software installed on the system
|
||||
Comment[eo]=Aldoni aŭ forigi instalitan pogramaron sur via sistemo
|
||||
Comment[es]=Añadir o quitar software instalado en el sistema
|
||||
Comment[et]=Arvutisse paigaldatud tarkvara lisamine ja eemaldamine
|
||||
Comment[eu]=Gehitu edo kendu sisteman instalatutako softwarea
|
||||
Comment[fa]=حذف یا افزودن نرمافزارهای نصب شده بر روی این سیستم
|
||||
Comment[fi]=Lisää tai poista järjestelmään asennettuja ohjelmistoja
|
||||
Comment[fr]=Ajouter ou supprimer des logiciels installés sur le système
|
||||
Comment[gl]=Engadir e eliminar o software instalado no sistema
|
||||
Comment[gu]=સિસ્ટમ પર સ્થાપિત થયેલ સોફ્ટવેરને ઉમેરો અથવા દૂર કરો
|
||||
Comment[he]=הוספה או הסרה של יישומי המערכת
|
||||
Comment[hi]=सिस्टम पर संस्थापित सॉफ्टवेयर जोड़ें या हटाएँ
|
||||
Comment[hu]=Szoftverek rendszerre telepítése vagy eltávolítása
|
||||
Comment[id]=Tambah atau hapus perangkat lunak yang terpasang pada sistem
|
||||
Comment[it]=Aggiunge o rimuove software installato sul sistema
|
||||
Comment[ja]=システムにインストールされたパッケージの追加と削除
|
||||
Comment[kn]=ಗಣಕಕ್ಕೆ ತಂತ್ರಾಂಶವನ್ನು ಸೇರಿಸು ಅಥವ ಅನುಸ್ಥಾಪಿತಗೊಂಡಿರುವುದನ್ನು ತೆಗೆದು ಹಾಕು
|
||||
Comment[ko]=시스템에 설치하는 소프트웨어를 추가하거나 제거합니다
|
||||
Comment[lt]=Įdiegti ar šalinti sistemoje įdiegtą programinę įrangą
|
||||
Comment[lv]=Pievienot vai izņemt programmatūru sistēmā
|
||||
Comment[mk]=Инсталирајте или избришете софтвер на системот
|
||||
Comment[ml]=സിസ്റ്റത്തില് ഇന്സ്റ്റോള് ചെയ്തിരിക്കുന്ന സോഫ്റ്റ്വെയര് ചേര്ക്കുക അല്ലെങ്കില് നീക്കം ചെയ്യുക
|
||||
Comment[mr]=प्रणालीवर प्रतिष्ठापीत सॉफ्टवेअर समावेष करा किंवा काढूण टाका
|
||||
Comment[ms]=Menambah atau memadam perisian yang dipasang pada sistem
|
||||
Comment[nb]=Legg til eller fjern programvare på systemet
|
||||
Comment[nl]=Software installeren op, of verwijderen van het systeem
|
||||
Comment[nn]=Legg til eller fjern programvare som er installert på systemet
|
||||
Comment[or]=ତନ୍ତ୍ରରେ ସ୍ଥାପିତ ସଫ୍ଟୱେରରେ ଯୋଗକରନ୍ତୁ କିମ୍ବା କାଢ଼ି ଦିଅନ୍ତୁ
|
||||
Comment[pa]=ਸਿਸਟਮ ਉੱਤੇ ਸਾਫਟਵੇਅਰ ਇੰਸਟਾਲ ਕਰੋ ਜਾਂ ਇੰਸਟਾਲ ਕੀਤੇ ਹਟਾਓ
|
||||
Comment[pl]=Instalowanie lub usuwanie oprogramowania zainstalowanego w systemie
|
||||
Comment[pt]=Adicionar ou remover software instalado no sistema
|
||||
Comment[pt_BR]=Adicione ou remova programas instalados no sistema
|
||||
Comment[ro]=Adăugați sau ștergeți programe instalate pe sistem
|
||||
Comment[ru]=Установка и удаление программ, установленных в системе
|
||||
Comment[sk]=Pridať alebo odstrániť softvér nainštalovaný na systéme
|
||||
Comment[sl]=Nameščanje in odstranjevanje programske opreme sistema
|
||||
Comment[sr@latin]=Dodajte ili uklonite programe instalirane na ovom sistemu
|
||||
Comment[sr]=Додајте или уклоните програме инсталиране на овом систему
|
||||
Comment[sv]=Lägg till eller ta bort programvara installerad på systemet
|
||||
Comment[ta]=கணினியில் நிறுவப்பட்ட மென்பொருளை சேர்க்கவும் அல்லது நீக்கவும்
|
||||
Comment[te]=ఈ వ్యవస్థ నందు స్థాపించిన సాఫ్ట్వేర్ను జతచేయి లేదా తీసివేయి
|
||||
Comment[th]=เพิ่มหรือลบซอฟต์แวร์ที่ติดตั้งในระบบ
|
||||
Comment[tr]=Sisteminizde yüklü yazılımları ekleyin veya kaldırın
|
||||
Comment[ug]=سىستېمىڭىزغا ئورنىتىلغان يۇمشاق دېتاللارنى قوشىدۇ ياكى ئۆچۈرىدۇ
|
||||
Comment[uk]=Встановлення та вилучення програм у системі
|
||||
Comment[vi]=Thêm hoặc gỡ phần mềm cài đặt trên hệ thống
|
||||
Comment[zh_CN]=添加或删除系统中安装的软件
|
||||
Comment[zh_HK]=加入或移除系統上安裝的軟件
|
||||
Comment[zh_TW]=加入或移除系統上安裝的軟體
|
||||
Exec=octopi
|
||||
GenericName[en_US]=
|
||||
GenericName=
|
||||
Icon=octopi
|
||||
MimeType=
|
||||
Name[en_US]=Add/Remove Software
|
||||
Name=Add/Remove Software
|
||||
Name[af]=Voeg by/verwyder sagteware
|
||||
Name[ar]=إضافة وإزالة البرمجيات
|
||||
@@ -8,8 +81,8 @@ Name[be]=Дадаць/выдаліць апраграмаванне
|
||||
Name[bg]=Инсталиране/деинсталиране на софтуер
|
||||
Name[bn]=সফ্টওয়্যার যোগ/অপসারণ
|
||||
Name[bn_IN]=সফ্টওয়্যার যোগ/অপসারণ করুন
|
||||
Name[ca]=Afegeix/Suprimeix programari
|
||||
Name[ca@valencia]=Afig/Suprimeix programari
|
||||
Name[ca]=Afegeix/Suprimeix programari
|
||||
Name[cs]=Přidat/odebrat software
|
||||
Name[da]=Tilføj/fjern software
|
||||
Name[de]=Software hinzufügen/entfernen
|
||||
@@ -52,8 +125,8 @@ Name[ro]=Adăugare sau ștergere programe
|
||||
Name[ru]=Установка и удаление программ
|
||||
Name[sk]=Pridať/odstrániť softvér
|
||||
Name[sl]=Upravljanje programske opreme
|
||||
Name[sr]=Додај-уклони програме
|
||||
Name[sr@latin]=Dodaj-ukloni programe
|
||||
Name[sr]=Додај-уклони програме
|
||||
Name[sv]=Lägg till/Ta bort programvara
|
||||
Name[ta]=மென்பொருளை சேர்த்தல்/நீக்குதல்
|
||||
Name[te]=సాఫ్ట్వేర్ జతచేయి/తీసివేయి
|
||||
@@ -65,76 +138,12 @@ Name[vi]=Thêm/Gỡ phần mềm
|
||||
Name[zh_CN]=添加/删除软件
|
||||
Name[zh_HK]=加入或移除軟件
|
||||
Name[zh_TW]=加入或移除軟體
|
||||
Comment=Add or remove software installed on the system
|
||||
Comment[af]=Voeg by of verwyder sagteware geïnstalleer op die stelsel
|
||||
Comment[ar]=أضف أو أزل البرمجيات المثبتة على النظام
|
||||
Comment[as]=ব্যৱস্থাপ্ৰণালীত সংস্থাপিত চালনাজ্ঞান উন্নয়ন কৰক
|
||||
Comment[ast]=Amestar o quitar software instaláu nel sistema
|
||||
Comment[be]=Дадаць ці выдаліць апраграмаванне, усталяванае ў сістэме
|
||||
Comment[bg]=Инсталиране и деинсталиране на софтуер към системата
|
||||
Comment[bn]=সিস্টেমে সফ্টওয়্যার যোগ করুন অথবা ইনস্টল করা সফ্টওয়্যার অপসারণ
|
||||
Comment[bn_IN]=সিস্টেমে সফ্টওয়্যার যোগ করুন অথবা ইনস্টল করা সফ্টওয়্যার সরিয়ে ফেলুন
|
||||
Comment[ca]=Afegeix o suprimeix programari instal·lat en el sistema
|
||||
Comment[ca@valencia]=Afig o suprimeix programari instal·lat en el sistema
|
||||
Comment[cs]=Přidat nebo odebrat software instalovaný v systému
|
||||
Comment[da]=Tilføj eller fjern software installeret på systemet
|
||||
Comment[de]=Auf dem System installierte Software aktualisieren oder neue Software hinzufügen
|
||||
Comment[el]=Προσθαφαίρεση λογισμικού στο σύστημα
|
||||
Comment[en@shaw]=𐑨𐑛 𐑹 𐑮𐑦𐑥𐑵𐑝 𐑕𐑪𐑓𐑑𐑢𐑺 𐑦𐑯𐑕𐑑𐑷𐑤𐑛 𐑪𐑯 𐑞 𐑕𐑦𐑕𐑑𐑩𐑥
|
||||
Comment[en_GB]=Add or remove software installed on the system
|
||||
Comment[eo]=Aldoni aŭ forigi instalitan pogramaron sur via sistemo
|
||||
Comment[es]=Añadir o quitar software instalado en el sistema
|
||||
Comment[et]=Arvutisse paigaldatud tarkvara lisamine ja eemaldamine
|
||||
Comment[eu]=Gehitu edo kendu sisteman instalatutako softwarea
|
||||
Comment[fa]=حذف یا افزودن نرمافزارهای نصب شده بر روی این سیستم
|
||||
Comment[fi]=Lisää tai poista järjestelmään asennettuja ohjelmistoja
|
||||
Comment[fr]=Ajouter ou supprimer des logiciels installés sur le système
|
||||
Comment[gl]=Engadir e eliminar o software instalado no sistema
|
||||
Comment[gu]=સિસ્ટમ પર સ્થાપિત થયેલ સોફ્ટવેરને ઉમેરો અથવા દૂર કરો
|
||||
Comment[he]=הוספה או הסרה של יישומי המערכת
|
||||
Comment[hi]=सिस्टम पर संस्थापित सॉफ्टवेयर जोड़ें या हटाएँ
|
||||
Comment[hu]=Szoftverek rendszerre telepítése vagy eltávolítása
|
||||
Comment[id]=Tambah atau hapus perangkat lunak yang terpasang pada sistem
|
||||
Comment[it]=Aggiunge o rimuove software installato sul sistema
|
||||
Comment[ja]=システムにインストールされたパッケージの追加と削除
|
||||
Comment[kn]=ಗಣಕಕ್ಕೆ ತಂತ್ರಾಂಶವನ್ನು ಸೇರಿಸು ಅಥವ ಅನುಸ್ಥಾಪಿತಗೊಂಡಿರುವುದನ್ನು ತೆಗೆದು ಹಾಕು
|
||||
Comment[ko]=시스템에 설치하는 소프트웨어를 추가하거나 제거합니다
|
||||
Comment[lt]=Įdiegti ar šalinti sistemoje įdiegtą programinę įrangą
|
||||
Comment[lv]=Pievienot vai izņemt programmatūru sistēmā
|
||||
Comment[mk]=Инсталирајте или избришете софтвер на системот
|
||||
Comment[ml]=സിസ്റ്റത്തില് ഇന്സ്റ്റോള് ചെയ്തിരിക്കുന്ന സോഫ്റ്റ്വെയര് ചേര്ക്കുക അല്ലെങ്കില് നീക്കം ചെയ്യുക
|
||||
Comment[mr]=प्रणालीवर प्रतिष्ठापीत सॉफ्टवेअर समावेष करा किंवा काढूण टाका
|
||||
Comment[ms]=Menambah atau memadam perisian yang dipasang pada sistem
|
||||
Comment[nb]=Legg til eller fjern programvare på systemet
|
||||
Comment[nl]=Software installeren op, of verwijderen van het systeem
|
||||
Comment[nn]=Legg til eller fjern programvare som er installert på systemet
|
||||
Comment[or]=ତନ୍ତ୍ରରେ ସ୍ଥାପିତ ସଫ୍ଟୱେରରେ ଯୋଗକରନ୍ତୁ କିମ୍ବା କାଢ଼ି ଦିଅନ୍ତୁ
|
||||
Comment[pa]=ਸਿਸਟਮ ਉੱਤੇ ਸਾਫਟਵੇਅਰ ਇੰਸਟਾਲ ਕਰੋ ਜਾਂ ਇੰਸਟਾਲ ਕੀਤੇ ਹਟਾਓ
|
||||
Comment[pl]=Instalowanie lub usuwanie oprogramowania zainstalowanego w systemie
|
||||
Comment[pt]=Adicionar ou remover software instalado no sistema
|
||||
Comment[pt_BR]=Adicione ou remova programas instalados no sistema
|
||||
Comment[ro]=Adăugați sau ștergeți programe instalate pe sistem
|
||||
Comment[ru]=Установка и удаление программ, установленных в системе
|
||||
Comment[sk]=Pridať alebo odstrániť softvér nainštalovaný na systéme
|
||||
Comment[sl]=Nameščanje in odstranjevanje programske opreme sistema
|
||||
Comment[sr]=Додајте или уклоните програме инсталиране на овом систему
|
||||
Comment[sr@latin]=Dodajte ili uklonite programe instalirane na ovom sistemu
|
||||
Comment[sv]=Lägg till eller ta bort programvara installerad på systemet
|
||||
Comment[ta]=கணினியில் நிறுவப்பட்ட மென்பொருளை சேர்க்கவும் அல்லது நீக்கவும்
|
||||
Comment[te]=ఈ వ్యవస్థ నందు స్థాపించిన సాఫ్ట్వేర్ను జతచేయి లేదా తీసివేయి
|
||||
Comment[th]=เพิ่มหรือลบซอฟต์แวร์ที่ติดตั้งในระบบ
|
||||
Comment[tr]=Sisteminizde yüklü yazılımları ekleyin veya kaldırın
|
||||
Comment[ug]=سىستېمىڭىزغا ئورنىتىلغان يۇمشاق دېتاللارنى قوشىدۇ ياكى ئۆچۈرىدۇ
|
||||
Comment[uk]=Встановлення та вилучення програм у системі
|
||||
Comment[vi]=Thêm hoặc gỡ phần mềm cài đặt trên hệ thống
|
||||
Comment[zh_CN]=添加或删除系统中安装的软件
|
||||
Comment[zh_HK]=加入或移除系統上安裝的軟件
|
||||
Comment[zh_TW]=加入或移除系統上安裝的軟體
|
||||
Icon=octopi
|
||||
Exec=octopi
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GNOME;GTK;System;
|
||||
#NotShowIn=KDE;
|
||||
Path=
|
||||
StartupNotify=true
|
||||
|
||||
Terminal=false
|
||||
TerminalOptions=
|
||||
Type=Application
|
||||
X-DBUS-ServiceName=
|
||||
X-DBUS-StartupType=
|
||||
X-KDE-SubstituteUID=false
|
||||
X-KDE-Username=
|
||||
|
||||
12
octopi.install
Normal file
12
octopi.install
Normal file
@@ -0,0 +1,12 @@
|
||||
post_install() {
|
||||
xdg-icon-resource forceupdate --theme hicolor &> /dev/null
|
||||
update-desktop-database -q
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
post_install $1
|
||||
}
|
||||
48
octopi.pro
48
octopi.pro
@@ -4,7 +4,7 @@
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui network xml
|
||||
QT += core gui network xml dbus
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
@@ -35,7 +35,11 @@ HEADERS += src/QtSolutions/qtsingleapplication.h \
|
||||
src/QtSolutions/QtLockedFile \
|
||||
src/treeviewpackagesitemdelegate.h \
|
||||
src/searchbar.h \
|
||||
src/transactiondialog.h
|
||||
src/transactiondialog.h \
|
||||
src/pacmanhelperclient.h \
|
||||
src/globals.h \
|
||||
src/multiselectiondialog.h \
|
||||
src/utils/processwrapper.h
|
||||
|
||||
SOURCES += src/QtSolutions/qtsingleapplication.cpp \
|
||||
src/QtSolutions/qtlocalpeer.cpp \
|
||||
@@ -61,10 +65,15 @@ SOURCES += src/QtSolutions/qtsingleapplication.cpp \
|
||||
src/mainwindow_searchbar.cpp \
|
||||
src/transactiondialog.cpp \
|
||||
src/mainwindow_news.cpp \
|
||||
src/mainwindow_refresh.cpp
|
||||
src/mainwindow_refresh.cpp \
|
||||
src/pacmanhelperclient.cpp \
|
||||
src/globals.cpp \
|
||||
src/multiselectiondialog.cpp \
|
||||
src/utils/processwrapper.cpp
|
||||
|
||||
FORMS += ui/mainwindow.ui \
|
||||
ui/transactiondialog.ui
|
||||
ui/transactiondialog.ui \
|
||||
ui/multiselectiondialog.ui
|
||||
|
||||
RESOURCES += \
|
||||
resources.qrc
|
||||
@@ -73,4 +82,33 @@ OTHER_FILES += \
|
||||
src/QtSolutions/qtsinglecoreapplication.pri \
|
||||
src/QtSolutions/qtsingleapplication.pri
|
||||
|
||||
TRANSLATIONS += resources/translations/octopi_pt_BR.ts
|
||||
TRANSLATIONS += resources/translations/octopi_pt_BR.ts \
|
||||
resources/translations/octopi_fr_FR.ts \
|
||||
resources/translations/octopi_es_ES.ts \
|
||||
resources/translations/octopi_es_419.ts \
|
||||
resources/translations/octopi_el.ts \
|
||||
resources/translations/octopi_de.ts \
|
||||
resources/translations/octopi_it.ts \
|
||||
resources/translations/octopi_ro.ts \
|
||||
resources/translations/octopi_tr_TR.ts \
|
||||
resources/translations/octopi_ar.ts \
|
||||
resources/translations/octopi_ca.ts \
|
||||
resources/translations/octopi_bg.ts \
|
||||
resources/translations/octopi_pl.ts \
|
||||
resources/translations/octopi_id.ts \
|
||||
resources/translations/octopi_da.ts \
|
||||
resources/translations/octopi_cs.ts \
|
||||
resources/translations/octopi_he.ts \
|
||||
resources/translations/octopi_lt.ts \
|
||||
resources/translations/octopi_nb.ts \
|
||||
resources/translations/octopi_sr@latin.ts \
|
||||
resources/translations/octopi_sr_RS.ts \
|
||||
resources/translations/octopi_nl.ts \
|
||||
resources/translations/octopi_ru.ts \
|
||||
resources/translations/octopi_uz.ts \
|
||||
resources/translations/octopi_fi.ts \
|
||||
resources/translations/octopi_vi.ts \
|
||||
resources/translations/octopi_en_GB.ts \
|
||||
resources/translations/octopi_pt_PT.ts \
|
||||
resources/translations/octopi_sv.ts \
|
||||
resources/translations/octopi_hu.ts
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>resources/images/octopi_red.png</file>
|
||||
<file>resources/images/octopi_yellow.png</file>
|
||||
<file>resources/images/esf-search.png</file>
|
||||
<file>resources/images/esf-clear-active.png</file>
|
||||
<file>resources/images/esf-clear-hover.png</file>
|
||||
<file>resources/images/esf-border.png</file>
|
||||
<file>resources/images/esf-clear.png</file>
|
||||
<file>resources/styles/branch-closed_BW.png</file>
|
||||
<file>resources/styles/branch-closed.png</file>
|
||||
<file>resources/styles/branch-end.png</file>
|
||||
@@ -14,6 +7,13 @@
|
||||
<file>resources/styles/branch-open_BW.png</file>
|
||||
<file>resources/styles/branch-open.png</file>
|
||||
<file>resources/styles/vline.png</file>
|
||||
<file>resources/images/octopi_red.png</file>
|
||||
<file>resources/images/octopi_yellow.png</file>
|
||||
<file>resources/images/esf-search.png</file>
|
||||
<file>resources/images/esf-clear-active.png</file>
|
||||
<file>resources/images/esf-clear-hover.png</file>
|
||||
<file>resources/images/esf-border.png</file>
|
||||
<file>resources/images/esf-clear.png</file>
|
||||
<file>resources/images/installed.png</file>
|
||||
<file>resources/images/noninstalled.png</file>
|
||||
<file>resources/images/toinstall.png</file>
|
||||
@@ -22,7 +22,6 @@
|
||||
<file>resources/images/binary.png</file>
|
||||
<file>resources/images/outdated.png</file>
|
||||
<file>resources/images/unrequired.png</file>
|
||||
<file>resources/images/foreign.png</file>
|
||||
<file>resources/images/commit.png</file>
|
||||
<file>resources/images/refresh.png</file>
|
||||
<file>resources/images/exit.png</file>
|
||||
@@ -36,6 +35,40 @@
|
||||
<file>resources/images/install_item.png</file>
|
||||
<file>resources/images/remove_item.png</file>
|
||||
<file>resources/images/find.png</file>
|
||||
<file>resources/images/rss.png</file>
|
||||
<file>resources/images/newer.png</file>
|
||||
<file>resources/images/octopi_green.png</file>
|
||||
<file>resources/images/foreign_green.png</file>
|
||||
<file>resources/images/foreign_red.png</file>
|
||||
<file>resources/translations/octopi_pt_BR.qm</file>
|
||||
<file>resources/translations/octopi_fr_FR.qm</file>
|
||||
<file>resources/translations/octopi_es_ES.qm</file>
|
||||
<file>resources/translations/octopi_el.qm</file>
|
||||
<file>resources/translations/octopi_de.qm</file>
|
||||
<file>resources/translations/octopi_it.qm</file>
|
||||
<file>resources/translations/octopi_ro.qm</file>
|
||||
<file>resources/translations/octopi_tr_TR.qm</file>
|
||||
<file>resources/translations/octopi_ar.qm</file>
|
||||
<file>resources/translations/octopi_ca.qm</file>
|
||||
<file>resources/translations/octopi_bg.qm</file>
|
||||
<file>resources/translations/octopi_pl.qm</file>
|
||||
<file>resources/translations/octopi_id.qm</file>
|
||||
<file>resources/translations/octopi_da.qm</file>
|
||||
<file>resources/translations/octopi_cs.qm</file>
|
||||
<file>resources/translations/octopi_he.qm</file>
|
||||
<file>resources/translations/octopi_lt.qm</file>
|
||||
<file>resources/translations/octopi_nb.qm</file>
|
||||
<file>resources/translations/octopi_sr@latin.qm</file>
|
||||
<file>resources/translations/octopi_nl.qm</file>
|
||||
<file>resources/translations/octopi_ru.qm</file>
|
||||
<file>resources/translations/octopi_uz.qm</file>
|
||||
<file>resources/translations/octopi_fi.qm</file>
|
||||
<file>resources/translations/octopi_vi.qm</file>
|
||||
<file>resources/translations/octopi_es_419.qm</file>
|
||||
<file>resources/translations/octopi_en_GB.qm</file>
|
||||
<file>resources/translations/octopi_pt_PT.qm</file>
|
||||
<file>resources/translations/octopi_sv.qm</file>
|
||||
<file>resources/translations/octopi_sr_RS.qm</file>
|
||||
<file>resources/translations/octopi_hu.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
<h2>Octopi</h2>
|
||||
<h3><p>A Qt4-based Pacman frontend,
|
||||
licensed under the terms of <a style="color:'#4BC413'" href="http://www.gnu.org/licenses/gpl-2.0.html">GPL v2</a>.</p></h3>
|
||||
<h4><p>For more information, visit:
|
||||
<a style="color:'#4BC413'" href="http://octopiproject.wordpress.com">http://octopiproject.wordpress.com</a>.</p></h4>
|
||||
<br>
|
||||
Package classification:
|
||||
<ul type="square">
|
||||
<li><img height="16" width="16" src=":/resources/images/installed.png"> An installed package</li>
|
||||
<li><img height="16" width="16" src=":/resources/images/unrequired.png"> An installed package (not required by others)</li>
|
||||
<li><img height="16" width="16" src=":/resources/images/foreign.png"> A foreign package, installed from AUR</li>
|
||||
<li><img height="16" width="16" src=":/resources/images/noninstalled.png"> A non installed package</li>
|
||||
<li><img height="16" width="16" src=":/resources/images/outdated.png"> An outdated package</li>
|
||||
</ul>
|
||||
Basic usage help:
|
||||
<ul>
|
||||
<li>Position the mouse over a package to see its description</li>
|
||||
<li>Double click an installed package to see its contents</li>
|
||||
<li>Right click package to install/reinstall or remove it</li>
|
||||
</ul>
|
||||
Alt+key sequences:
|
||||
<ul>
|
||||
<li>Alt+1 to swtich to "Info" tab</li>
|
||||
<li>Alt+2 to swtich to "Files" tab</li>
|
||||
<li>Alt+3 to swtich to "Transaction" tab</li>
|
||||
<li>Alt+4 to swtich to "Output" tab</li>
|
||||
<li>Alt+5 to swtich to "News" tab</li>
|
||||
<li>Alt+6 or "F1" to show this help page</li>
|
||||
</ul>
|
||||
Control+key sequences:
|
||||
<ul>
|
||||
<li>Ctrl+D or "File/Sync database" to sync the local database with latest remote changes (pacman -Sy)</li>
|
||||
<li>Ctrl+U or "File/System upgrade" to make a full system upgrade (pacman -Su)</li>
|
||||
<li>Ctrl+L to find a package in the package list</li>
|
||||
<li>Ctrl+N or "View/Non installed" to show/hide non installed packages</li>
|
||||
<li>Ctrl+M or "Transaction/Commit" to start installation/removal of selected packages</li>
|
||||
<li>Ctrl+B or "Transaction/Rollback" to clear the selection of to be removed/installed packages</li>
|
||||
<li>Ctrl+G or "File/Get latest distro news" to retrieve the latest RSS based distro news</li>
|
||||
<li>Ctrl+Q or "File/Exit" to exit the application</li>
|
||||
</ul>
|
||||
Control+shift+key sequences:
|
||||
<ul>
|
||||
<li>Ctrl+Shift+C to clean local packages cache (pacman -Sc)</li>
|
||||
<li>Ctrl+Shift+G to display all package groups</li>
|
||||
</ul>
|
||||
F+key sequences:
|
||||
<ul>
|
||||
<li>F1 to show this help page</li>
|
||||
<li>F4 to open a Terminal within the selected directory at Files tab</li>
|
||||
<li>F6 to open a File Manager whitin the selected directory at Files tab</li>
|
||||
<li>F10 to maximize/demaximize package list view</li>
|
||||
<li>F12 to maximize/demaximize Tab's view</li>
|
||||
</ul>
|
||||
<p>
|
||||
<br>
|
||||
<i>Alexandre Albuquerque Arnt - Author</i>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
resources/images/foreign_red.png
Normal file
BIN
resources/images/foreign_red.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
resources/images/newer.png
Normal file
BIN
resources/images/newer.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
resources/images/octopi_green.png
Normal file
BIN
resources/images/octopi_green.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
resources/images/rss.png
Normal file
BIN
resources/images/rss.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
resources/translations/octopi_ar.qm
Normal file
BIN
resources/translations/octopi_ar.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_ar.ts
Normal file
1046
resources/translations/octopi_ar.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_bg.qm
Normal file
BIN
resources/translations/octopi_bg.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_bg.ts
Normal file
1046
resources/translations/octopi_bg.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_ca.qm
Normal file
BIN
resources/translations/octopi_ca.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_ca.ts
Normal file
1046
resources/translations/octopi_ca.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_cs.qm
Normal file
BIN
resources/translations/octopi_cs.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_cs.ts
Normal file
1046
resources/translations/octopi_cs.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_da.qm
Normal file
BIN
resources/translations/octopi_da.qm
Normal file
Binary file not shown.
1050
resources/translations/octopi_da.ts
Normal file
1050
resources/translations/octopi_da.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_de.qm
Normal file
BIN
resources/translations/octopi_de.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_de.ts
Normal file
1046
resources/translations/octopi_de.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_el.qm
Normal file
BIN
resources/translations/octopi_el.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_el.ts
Normal file
1046
resources/translations/octopi_el.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_en_GB.qm
Normal file
BIN
resources/translations/octopi_en_GB.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_en_GB.ts
Normal file
1046
resources/translations/octopi_en_GB.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_es_419.qm
Normal file
BIN
resources/translations/octopi_es_419.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_es_419.ts
Normal file
1046
resources/translations/octopi_es_419.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_es_ES.qm
Normal file
BIN
resources/translations/octopi_es_ES.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_es_ES.ts
Normal file
1046
resources/translations/octopi_es_ES.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_fi.qm
Normal file
BIN
resources/translations/octopi_fi.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_fi.ts
Normal file
1046
resources/translations/octopi_fi.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_fr_FR.qm
Normal file
BIN
resources/translations/octopi_fr_FR.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_fr_FR.ts
Normal file
1046
resources/translations/octopi_fr_FR.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_he.qm
Normal file
BIN
resources/translations/octopi_he.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_he.ts
Normal file
1046
resources/translations/octopi_he.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_hu.qm
Normal file
BIN
resources/translations/octopi_hu.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_hu.ts
Normal file
1046
resources/translations/octopi_hu.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_id.qm
Normal file
BIN
resources/translations/octopi_id.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_id.ts
Normal file
1046
resources/translations/octopi_id.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_it.qm
Normal file
BIN
resources/translations/octopi_it.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_it.ts
Normal file
1046
resources/translations/octopi_it.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_lt.qm
Normal file
BIN
resources/translations/octopi_lt.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_lt.ts
Normal file
1046
resources/translations/octopi_lt.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_nb.qm
Normal file
BIN
resources/translations/octopi_nb.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_nb.ts
Normal file
1046
resources/translations/octopi_nb.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_nl.qm
Normal file
BIN
resources/translations/octopi_nl.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_nl.ts
Normal file
1046
resources/translations/octopi_nl.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_pl.qm
Normal file
BIN
resources/translations/octopi_pl.qm
Normal file
Binary file not shown.
1045
resources/translations/octopi_pl.ts
Normal file
1045
resources/translations/octopi_pl.ts
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_pt_PT.qm
Normal file
BIN
resources/translations/octopi_pt_PT.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_pt_PT.ts
Normal file
1046
resources/translations/octopi_pt_PT.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_ro.qm
Normal file
BIN
resources/translations/octopi_ro.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_ro.ts
Normal file
1046
resources/translations/octopi_ro.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_ru.qm
Normal file
BIN
resources/translations/octopi_ru.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_ru.ts
Normal file
1046
resources/translations/octopi_ru.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_sr@latin.qm
Normal file
BIN
resources/translations/octopi_sr@latin.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_sr@latin.ts
Normal file
1046
resources/translations/octopi_sr@latin.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_sr_RS.qm
Normal file
BIN
resources/translations/octopi_sr_RS.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_sr_RS.ts
Normal file
1046
resources/translations/octopi_sr_RS.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_sv.qm
Normal file
BIN
resources/translations/octopi_sv.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_sv.ts
Normal file
1046
resources/translations/octopi_sv.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_tr_TR.qm
Normal file
BIN
resources/translations/octopi_tr_TR.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_tr_TR.ts
Normal file
1046
resources/translations/octopi_tr_TR.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_uz.qm
Normal file
BIN
resources/translations/octopi_uz.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_uz.ts
Normal file
1046
resources/translations/octopi_uz.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_vi.qm
Normal file
BIN
resources/translations/octopi_vi.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_vi.ts
Normal file
1046
resources/translations/octopi_vi.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -37,12 +37,12 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "../mainwindow.h"
|
||||
|
||||
#include "qtsingleapplication.h"
|
||||
#include "qtlocalpeer.h"
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
/*!
|
||||
\class QtSingleApplication qtsingleapplication.h
|
||||
\brief The QtSingleApplication class provides an API to detect and
|
||||
@@ -285,7 +285,7 @@ void QtSingleApplication::setActivationWindow(QWidget* aw, bool activateOnMessag
|
||||
{
|
||||
actWin = aw;
|
||||
if (activateOnMessage)
|
||||
connect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow()));
|
||||
connect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow(const QString&)));
|
||||
else
|
||||
disconnect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow()));
|
||||
}
|
||||
@@ -317,9 +317,9 @@ QWidget* QtSingleApplication::activationWindow() const
|
||||
|
||||
\sa setActivationWindow(), messageReceived(), initialize()
|
||||
*/
|
||||
void QtSingleApplication::activateWindow()
|
||||
void QtSingleApplication::activateWindow(const QString &message)
|
||||
{
|
||||
if (actWin) {
|
||||
if (actWin && message == "RAISE") {
|
||||
actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
|
||||
actWin->raise();
|
||||
if (actWin->isHidden())
|
||||
@@ -327,8 +327,70 @@ void QtSingleApplication::activateWindow()
|
||||
else
|
||||
actWin->activateWindow();
|
||||
}
|
||||
}
|
||||
else if (actWin && message == "HIDE") {
|
||||
if (!actWin->isHidden())
|
||||
actWin->hide();
|
||||
else
|
||||
{
|
||||
actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
|
||||
actWin->raise();
|
||||
if (actWin->isHidden())
|
||||
actWin->show();
|
||||
}
|
||||
}
|
||||
else if (actWin && message == "SYSUPGRADE") {
|
||||
actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
|
||||
actWin->raise();
|
||||
if (actWin->isHidden())
|
||||
actWin->show();
|
||||
else
|
||||
actWin->activateWindow();
|
||||
|
||||
MainWindow *mw = qobject_cast<MainWindow *>(actWin);
|
||||
|
||||
if (mw)
|
||||
{
|
||||
if (!mw->isExecutingCommand())
|
||||
{
|
||||
mw->doSystemUpgrade();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (actWin && message == "CLOSE") {
|
||||
if (!actWin->close())
|
||||
{
|
||||
if (actWin->isHidden())
|
||||
{
|
||||
actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
|
||||
actWin->raise();
|
||||
if (actWin->isHidden())
|
||||
actWin->show();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (actWin && message.contains("pkg.tar.xz")) {
|
||||
actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
|
||||
actWin->raise();
|
||||
if (actWin->isHidden())
|
||||
actWin->show();
|
||||
else
|
||||
actWin->activateWindow();
|
||||
|
||||
QStringList packagesToInstallList =
|
||||
message.split(",", QString::SkipEmptyParts);
|
||||
|
||||
MainWindow *mw = qobject_cast<MainWindow *>(actWin);
|
||||
|
||||
if (mw)
|
||||
{
|
||||
if (!mw->isExecutingCommand())
|
||||
{
|
||||
mw->setPackagesToInstallList(packagesToInstallList);
|
||||
mw->doInstallLocalPackages();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn void QtSingleApplication::messageReceived(const QString& message)
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
|
||||
public Q_SLOTS:
|
||||
bool sendMessage(const QString &message, int timeout = 5000);
|
||||
void activateWindow();
|
||||
void activateWindow(const QString &message);
|
||||
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
105
src/globals.cpp
Normal file
105
src/globals.cpp
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* This file is part of Octopi, an open-source GUI for pacman.
|
||||
* Copyright (C) 2013 Alexandre Albuquerque Arnt
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include "globals.h"
|
||||
#include "mainwindow.h"
|
||||
#include "packagecontroller.h"
|
||||
|
||||
#include <QStandardItem>
|
||||
#include <QFutureWatcher>
|
||||
#include <QtConcurrentRun>
|
||||
|
||||
QFutureWatcher<QString> g_fwToolTip;
|
||||
QFutureWatcher<QList<PackageListData> *> g_fwPacman;
|
||||
QFutureWatcher<QList<QString> *> g_fwPacmanGroup;
|
||||
QFutureWatcher<QList<PackageListData> *> g_fwYaourt;
|
||||
QFutureWatcher<QList<PackageListData> *> g_fwYaourtMeta;
|
||||
QFutureWatcher<YaourtOutdatedPackages *> g_fwOutdatedYaourtPackages;
|
||||
QFutureWatcher<QString> g_fwDistroNews;
|
||||
|
||||
/*
|
||||
* Given a packageName, returns its description
|
||||
*/
|
||||
QString showPackageInfo(QString pkgName)
|
||||
{
|
||||
MainWindow *mw = MainWindow::returnMainWindow();
|
||||
QStandardItem * si = mw->getAvailablePackage(pkgName, ctn_PACKAGE_DESCRIPTION_COLUMN);
|
||||
|
||||
if (si == 0) return "";
|
||||
|
||||
QString description = si->text();
|
||||
if (description.trimmed().isEmpty()) return "";
|
||||
|
||||
int space = description.indexOf(" ");
|
||||
QString desc = description.mid(space+1);
|
||||
int size = desc.size();
|
||||
|
||||
if (desc.size() > 120)
|
||||
{
|
||||
desc.chop(size - 120);
|
||||
desc = desc + " ...";
|
||||
}
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
||||
/*
|
||||
* Starts the non blocking search for Pacman packages...
|
||||
*/
|
||||
QList<PackageListData> * searchPacmanPackages()
|
||||
{
|
||||
return Package::getPackageList();
|
||||
}
|
||||
|
||||
/*
|
||||
* Starts the non blocking search for Pacman packages...
|
||||
*/
|
||||
QList<QString> * searchPacmanPackagesFromGroup(QString groupName)
|
||||
{
|
||||
return Package::getPackagesOfGroup(groupName);
|
||||
}
|
||||
|
||||
/*
|
||||
* Starts the non blocking search for Yaourt packages...
|
||||
*/
|
||||
QList<PackageListData> * searchYaourtPackages(QString searchString)
|
||||
{
|
||||
return Package::getYaourtPackageList(searchString);
|
||||
}
|
||||
|
||||
/*
|
||||
* Starts the non blocking retrive of Yaourt outdated package versions...
|
||||
* Results in a hash: [key] Yaourt pkg name / [value] Yaourt pkg version available
|
||||
*/
|
||||
YaourtOutdatedPackages * getOutdatedYaourtPackages()
|
||||
{
|
||||
YaourtOutdatedPackages * res = new YaourtOutdatedPackages();
|
||||
res->content = Package::getYaourtOutdatedPackagesNameVersion();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* Starts the non blocking search for RSS distro news...
|
||||
*/
|
||||
QString getLatestDistroNews()
|
||||
{
|
||||
return PackageController::retrieveDistroNews(true);
|
||||
}
|
||||
51
src/globals.h
Normal file
51
src/globals.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* This file is part of Octopi, an open-source GUI for pacman.
|
||||
* Copyright (C) 2013 Alexandre Albuquerque Arnt
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef MAINWINDOW_GLOBALS_H
|
||||
#define MAINWINDOW_GLOBALS_H
|
||||
|
||||
#include "strconstants.h"
|
||||
|
||||
#include <QStandardItem>
|
||||
#include <QFutureWatcher>
|
||||
#include <QtConcurrentRun>
|
||||
|
||||
struct YaourtOutdatedPackages
|
||||
{
|
||||
public:
|
||||
QHash<QString, QString> content;
|
||||
};
|
||||
|
||||
extern QFutureWatcher<QString> g_fwToolTip;
|
||||
extern QFutureWatcher<QList<PackageListData> *> g_fwPacman;
|
||||
extern QFutureWatcher<QList<QString> *> g_fwPacmanGroup;
|
||||
extern QFutureWatcher<QList<PackageListData> *> g_fwYaourt;
|
||||
extern QFutureWatcher<QList<PackageListData> *> g_fwYaourtMeta;
|
||||
extern QFutureWatcher<YaourtOutdatedPackages *> g_fwOutdatedYaourtPackages;
|
||||
extern QFutureWatcher<QString> g_fwDistroNews;
|
||||
|
||||
QString showPackageInfo(QString pkgName);
|
||||
QList<PackageListData> * searchPacmanPackages();
|
||||
QList<QString> * searchPacmanPackagesFromGroup(QString groupName);
|
||||
QList<PackageListData> * searchYaourtPackages(QString searchString);
|
||||
YaourtOutdatedPackages * getOutdatedYaourtPackages();
|
||||
QString getLatestDistroNews();
|
||||
|
||||
#endif // MAINWINDOW_GLOBALS_H
|
||||
70
src/main.cpp
70
src/main.cpp
@@ -31,21 +31,48 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
ArgumentList *argList = new ArgumentList(argc, argv);
|
||||
QApplication::setGraphicsSystem(QLatin1String("raster"));
|
||||
QString packagesToInstall;
|
||||
QString arg;
|
||||
|
||||
if (!argList->getSwitch("-style"))
|
||||
for (int c=1; c<argc; c++)
|
||||
{
|
||||
//if (!WMHelper::isKDERunning())
|
||||
arg = argv[c];
|
||||
if (arg.contains("pkg.tar.xz"))
|
||||
{
|
||||
QApplication::setStyle(new QCleanlooksStyle());
|
||||
packagesToInstall += arg + ",";
|
||||
}
|
||||
}
|
||||
|
||||
QtSingleApplication app( StrConstants::getApplicationName(), argc, argv );
|
||||
|
||||
//This sends a message just to awake the socket-based QtSinleApplication engine
|
||||
app.sendMessage("ping app...");
|
||||
if (app.isRunning())
|
||||
{
|
||||
if (argList->getSwitch("-sysupgrade"))
|
||||
{
|
||||
app.sendMessage("SYSUPGRADE");
|
||||
}
|
||||
else if (argList->getSwitch("-close"))
|
||||
{
|
||||
app.sendMessage("CLOSE");
|
||||
}
|
||||
else if (argList->getSwitch("-hide"))
|
||||
{
|
||||
app.sendMessage("HIDE");
|
||||
}
|
||||
else if (!packagesToInstall.isEmpty())
|
||||
{
|
||||
app.sendMessage(packagesToInstall);
|
||||
}
|
||||
else
|
||||
{
|
||||
app.sendMessage("RAISE");
|
||||
}
|
||||
|
||||
if (app.isRunning()) return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//This sends a message just to awake the socket-based QtSinleApplication engine
|
||||
app.sendMessage("RAISE");
|
||||
|
||||
QTranslator appTranslator;
|
||||
appTranslator.load(":/resources/translations/octopi_" +
|
||||
@@ -62,13 +89,42 @@ int main(int argc, char *argv[])
|
||||
return(0);
|
||||
}
|
||||
|
||||
if (UnixCommand::isRootRunning()){
|
||||
if (UnixCommand::isRootRunning() && !WMHelper::isKDERunning()){
|
||||
QMessageBox::critical( 0, StrConstants::getApplicationName(), StrConstants::getErrorRunningWithRoot());
|
||||
return ( -2 );
|
||||
}
|
||||
|
||||
MainWindow w;
|
||||
app.setActivationWindow(&w);
|
||||
app.setQuitOnLastWindowClosed(false);
|
||||
|
||||
if (!argList->getSwitch("-style"))
|
||||
{
|
||||
if (UnixCommand::getLinuxDistro() == ectn_MANJAROLINUX &&
|
||||
(!WMHelper::isKDERunning() && (!WMHelper::isRazorQtRunning())))
|
||||
{
|
||||
app.setStyle(new QGtkStyle());
|
||||
}
|
||||
else
|
||||
{
|
||||
app.setStyle(new QCleanlooksStyle());
|
||||
}
|
||||
}
|
||||
|
||||
if (argList->getSwitch("-sysupgrade"))
|
||||
{
|
||||
w.setCallSystemUpgrade();
|
||||
}
|
||||
|
||||
if (!packagesToInstall.isEmpty())
|
||||
{
|
||||
QStringList packagesToInstallList =
|
||||
packagesToInstall.split(",", QString::SkipEmptyParts);
|
||||
|
||||
w.setPackagesToInstallList(packagesToInstallList);
|
||||
}
|
||||
|
||||
w.setRemoveCommand("Rcs"); //argList->getSwitchArg("-removecmd", "Rcs"));
|
||||
w.show();
|
||||
|
||||
QResource::registerResource("./resources.qrc");
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "treeviewpackagesitemdelegate.h"
|
||||
#include "searchbar.h"
|
||||
#include "packagecontroller.h"
|
||||
#include "globals.h"
|
||||
#include <iostream>
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QStandardItemModel>
|
||||
@@ -39,17 +41,31 @@
|
||||
#include <QMessageBox>
|
||||
#include <QComboBox>
|
||||
#include <QModelIndex>
|
||||
#include <iostream>
|
||||
#include <QDesktopServices>
|
||||
#include <QFileDialog>
|
||||
#include <QHash>
|
||||
#include <QFutureWatcher>
|
||||
#include <QtConcurrentRun>
|
||||
|
||||
using namespace QtConcurrent;
|
||||
|
||||
/*
|
||||
* MainWindow's constructor: basic UI init
|
||||
*/
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow)
|
||||
QMainWindow(parent), ui(new Ui::MainWindow)
|
||||
{
|
||||
m_foundFilesInPkgFileList = new QList<QModelIndex>();
|
||||
m_indFoundFilesInPkgFileList = 0;
|
||||
m_callSystemUpgrade = false;
|
||||
m_initializationCompleted=false;
|
||||
m_cbGroups = 0;
|
||||
m_listOfPackages = 0;
|
||||
m_listOfPackagesFromGroup = 0;
|
||||
m_systemUpgradeDialog = false;
|
||||
m_cic = 0;
|
||||
m_outdatedYaourtPackageList = new QStringList();
|
||||
m_outdatedYaourtPackagesNameVersion = new QHash<QString, QString>();
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
@@ -69,62 +85,91 @@ MainWindow::~MainWindow()
|
||||
*/
|
||||
void MainWindow::show()
|
||||
{
|
||||
loadSettings();
|
||||
restoreGeometry(SettingsManager::getWindowSize());
|
||||
if(m_initializationCompleted == false)
|
||||
{
|
||||
UnixCommand::getIgnorePkg();
|
||||
loadSettings();
|
||||
restoreGeometry(SettingsManager::getWindowSize());
|
||||
|
||||
m_initializationCompleted=false;
|
||||
m_commandExecuting=ectn_NONE;
|
||||
m_commandQueued=ectn_NONE;
|
||||
m_leFilterPackage = new SearchLineEdit(this);
|
||||
m_commandExecuting=ectn_NONE;
|
||||
m_commandQueued=ectn_NONE;
|
||||
m_leFilterPackage = new SearchLineEdit(this);
|
||||
|
||||
setWindowTitle(StrConstants::getApplicationName() + " " + StrConstants::getApplicationVersion());
|
||||
setMinimumSize(QSize(850, 600));
|
||||
setWindowTitle(StrConstants::getApplicationName());
|
||||
setMinimumSize(QSize(850, 600));
|
||||
|
||||
initStatusBar();
|
||||
initTabOutput();
|
||||
initTabInfo();
|
||||
initTabFiles();
|
||||
initTabTransaction();
|
||||
initTabHelpAbout();
|
||||
initTabNews();
|
||||
initLineEditFilterPackages();
|
||||
initPackageTreeView();
|
||||
initTabOutput();
|
||||
initTabInfo();
|
||||
initTabFiles();
|
||||
initTabTransaction();
|
||||
initTabHelpUsage();
|
||||
initTabNews();
|
||||
initLineEditFilterPackages();
|
||||
initPackageTreeView();
|
||||
|
||||
//Let's watch for changes in the Pacman db dir!
|
||||
m_pacmanDatabaseSystemWatcher =
|
||||
new QFileSystemWatcher(QStringList() << ctn_PACMAN_DATABASE_DIR, this);
|
||||
connect(m_pacmanDatabaseSystemWatcher, SIGNAL(directoryChanged(QString)), this, SLOT(metaBuildPackageList()));
|
||||
qApp->setStyleSheet(StrConstants::getMenuCSS());
|
||||
|
||||
qApp->setStyleSheet(StrConstants::getMenuCSS());
|
||||
loadPanelSettings();
|
||||
initActions();
|
||||
initStatusBar();
|
||||
initToolButtonPacman();
|
||||
initToolButtonYaourt();
|
||||
initAppIcon();
|
||||
initToolBar();
|
||||
initTabWidgetPropertiesIndex();
|
||||
refreshDistroNews(false);
|
||||
|
||||
loadPanelSettings();
|
||||
|
||||
initActions();
|
||||
initAppIcon();
|
||||
initToolBar();
|
||||
initTabWidgetPropertiesIndex();
|
||||
refreshDistroNews(false);
|
||||
|
||||
QMainWindow::show();
|
||||
|
||||
/* This timer is needed to beautify GUI initialization... */
|
||||
timer = new QTimer();
|
||||
connect(timer, SIGNAL(timeout()), this, SLOT(buildPackageList()));
|
||||
timer->start(0.1);
|
||||
refreshComboBoxGroups();
|
||||
QMainWindow::show();
|
||||
metaBuildPackageList();
|
||||
}
|
||||
else
|
||||
QMainWindow::show();
|
||||
}
|
||||
|
||||
/*
|
||||
* If we have some outdated packages, let's put an angry red face icon in this app!
|
||||
* Retrieves a pointer to Output's QTextBrowser object
|
||||
*/
|
||||
void MainWindow::refreshAppIcon()
|
||||
QTextBrowser *MainWindow::_getOutputTextBrowser()
|
||||
{
|
||||
if(m_outdatedPackageList->count() > 0)
|
||||
QTextBrowser *ret=0;
|
||||
QTextBrowser *text =
|
||||
ui->twProperties->widget(ctn_TABINDEX_OUTPUT)->findChild<QTextBrowser*>("textOutputEdit");
|
||||
|
||||
if (text)
|
||||
{
|
||||
setWindowIcon(IconHelper::getIconOctopiRed());
|
||||
ret = text;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* This SLOT is called whenever user clicks a url inside output's textBrowser
|
||||
*/
|
||||
void MainWindow::outputTextBrowserAnchorClicked(const QUrl &link)
|
||||
{
|
||||
if (link.toString().contains("goto:"))
|
||||
{
|
||||
QString pkgName = link.toString().mid(5);
|
||||
|
||||
QStandardItemModel * sim = _getCurrentSelectedModel();
|
||||
QList<QStandardItem*> foundItems =
|
||||
sim->findItems(pkgName, Qt::MatchExactly, ctn_PACKAGE_NAME_COLUMN);
|
||||
|
||||
if (foundItems.count() > 0)
|
||||
{
|
||||
QStandardItem * si = foundItems.first();
|
||||
QModelIndex indexIcon = sim->index(si->row(), ctn_PACKAGE_ICON_COLUMN);
|
||||
QModelIndex proxyIndex = m_proxyModelPackages->mapFromSource(indexIcon);
|
||||
ui->tvPackages->scrollTo(proxyIndex, QAbstractItemView::PositionAtCenter);
|
||||
ui->tvPackages->setCurrentIndex(proxyIndex);
|
||||
_changeTabWidgetPropertiesIndex(ctn_TABINDEX_INFORMATION);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setWindowIcon(IconHelper::getIconOctopiYellow());
|
||||
QDesktopServices::openUrl(link);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +213,7 @@ void MainWindow::outputOutdatedPackageList()
|
||||
QString outdatedVersion = getOutdatedPackageVersionByName(m_outdatedPackageList->at(c));
|
||||
QString availableVersion = getInstalledPackageVersionByName(m_outdatedPackageList->at(c));
|
||||
|
||||
html += "<tr><td>" + pkg +
|
||||
html += "<tr><td><a href=\"goto:" + pkg + "\">" + pkg +
|
||||
"</td><td align=\"right\"><b><font color=\"#E55451\">" +
|
||||
outdatedVersion +
|
||||
"</b></font></td><td align=\"right\">" +
|
||||
@@ -189,6 +234,62 @@ void MainWindow::outputOutdatedPackageList()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints the list of outdated Yaourt packages to the Output tab.
|
||||
*/
|
||||
void MainWindow::outputOutdatedYaourtPackageList()
|
||||
{
|
||||
//We cannot output any list if there is a running transaction!
|
||||
if (m_commandExecuting != ectn_NONE) return;
|
||||
|
||||
QString html = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">";
|
||||
QString anchorBegin = "anchorBegin";
|
||||
html += "<a id=\"" + anchorBegin + "\"></a>";
|
||||
|
||||
clearTabOutput();
|
||||
|
||||
if(m_outdatedYaourtPackageList->count()==1){
|
||||
html += "<h3>" + StrConstants::getOneOutdatedPackage() + "</h3>";
|
||||
}
|
||||
else
|
||||
{
|
||||
html += "<h3>" +
|
||||
StrConstants::getOutdatedPackages().arg(m_outdatedYaourtPackageList->count()) + "</h3>";
|
||||
}
|
||||
|
||||
html += "<br><table border=\"0\">";
|
||||
html += "<tr><th width=\"25%\" align=\"left\">" + StrConstants::getName() +
|
||||
"</th><th width=\"18%\" align=\"right\">" +
|
||||
StrConstants::getOutdatedVersion() +
|
||||
"</th><th width=\"18%\" align=\"right\">" +
|
||||
StrConstants::getAvailableVersion() + "</th></tr>";
|
||||
|
||||
for (int c=0; c < m_outdatedYaourtPackageList->count(); c++)
|
||||
{
|
||||
QString pkg = m_outdatedYaourtPackageList->at(c);
|
||||
QString outdatedVersion = getInstalledPackageVersionByName(m_outdatedYaourtPackageList->at(c));
|
||||
QString availableVersion = m_outdatedYaourtPackagesNameVersion->value(m_outdatedYaourtPackageList->at(c));
|
||||
|
||||
html += "<tr><td><a href=\"goto:" + pkg + "\">" + pkg +
|
||||
"</td><td align=\"right\"><b><font color=\"#E55451\">" +
|
||||
outdatedVersion +
|
||||
"</b></font></td><td align=\"right\">" +
|
||||
availableVersion + "</td></tr>";
|
||||
}
|
||||
|
||||
writeToTabOutput(html);
|
||||
|
||||
QTextBrowser *text =
|
||||
ui->twProperties->widget(ctn_TABINDEX_OUTPUT)->findChild<QTextBrowser*>("textOutputEdit");
|
||||
|
||||
if (text)
|
||||
{
|
||||
text->scrollToAnchor(anchorBegin);
|
||||
}
|
||||
|
||||
ui->twProperties->setCurrentIndex(ctn_TABINDEX_OUTPUT);
|
||||
}
|
||||
|
||||
/*
|
||||
* Removes all text inside the TabOutput editor
|
||||
*/
|
||||
@@ -249,20 +350,52 @@ QString MainWindow::getInstalledPackageVersionByName(const QString &pkgName)
|
||||
*/
|
||||
QStandardItem *MainWindow::getAvailablePackage(const QString &pkgName, const int index)
|
||||
{
|
||||
QStandardItemModel *sim;
|
||||
|
||||
if (m_cbGroups->currentText() == StrConstants::getYaourtGroup()
|
||||
&& m_modelPackages &&
|
||||
m_modelPackages->rowCount() > 0)
|
||||
{
|
||||
sim = m_modelPackages;
|
||||
}
|
||||
else if (m_modelPackagesClone && m_modelPackagesClone->rowCount() > 0)
|
||||
{
|
||||
sim = m_modelPackagesClone;
|
||||
}
|
||||
else return 0;
|
||||
|
||||
QList<QStandardItem *> foundItems =
|
||||
m_modelPackages->findItems(pkgName, Qt::MatchExactly, ctn_PACKAGE_NAME_COLUMN);
|
||||
QStandardItem *res;
|
||||
sim->findItems(pkgName, Qt::MatchExactly, ctn_PACKAGE_NAME_COLUMN);
|
||||
QStandardItem *res=0;
|
||||
|
||||
if (foundItems.count() > 0)
|
||||
{
|
||||
QStandardItem * si = foundItems.first();
|
||||
QStandardItem * aux = m_modelPackages->item(si->row(), index);
|
||||
QStandardItem * aux = sim->item(si->row(), index);
|
||||
res = aux->clone();
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets a flag to call the System Upgrade action as soom as it's possible
|
||||
*/
|
||||
void MainWindow::setCallSystemUpgrade()
|
||||
{
|
||||
m_callSystemUpgrade = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets a flag that holds the remove command to be used in transactions
|
||||
*/
|
||||
void MainWindow::setRemoveCommand(const QString &removeCommand)
|
||||
{
|
||||
m_removeCommand = removeCommand;
|
||||
m_removeCommand.remove("=");
|
||||
m_removeCommand.remove("-");
|
||||
}
|
||||
|
||||
/*
|
||||
* Searchs model modelInstalledPackages by a package name and returns if it is already installed
|
||||
*/
|
||||
@@ -329,7 +462,7 @@ void MainWindow::changePackageListModel()
|
||||
|
||||
if (ui->actionNonInstalledPackages->isChecked())
|
||||
{
|
||||
if(m_cbGroups->currentIndex() == 0)
|
||||
if(m_cbGroups->currentIndex() == 0 || m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
{
|
||||
m_modelPackages->setHorizontalHeaderLabels(
|
||||
sl << "" << StrConstants::getName() << StrConstants::getVersion() << StrConstants::getRepository());
|
||||
@@ -344,7 +477,7 @@ void MainWindow::changePackageListModel()
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_cbGroups->currentIndex() == 0)
|
||||
if(m_cbGroups->currentIndex() == 0 || m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
{
|
||||
m_modelInstalledPackages->setHorizontalHeaderLabels(
|
||||
sl << "" << StrConstants::getName() << StrConstants::getVersion() << StrConstants::getRepository());
|
||||
@@ -393,14 +526,14 @@ QStandardItemModel *MainWindow::_getCurrentSelectedModel()
|
||||
|
||||
if(ui->actionNonInstalledPackages->isChecked())
|
||||
{
|
||||
if(m_cbGroups->currentIndex() == 0)
|
||||
if(m_cbGroups->currentIndex() == 0 || m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
sim = m_modelPackages;
|
||||
else
|
||||
sim = m_modelPackagesFromGroup;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_cbGroups->currentIndex() == 0)
|
||||
if(m_cbGroups->currentIndex() == 0 || m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
sim = m_modelInstalledPackages;
|
||||
else
|
||||
sim = m_modelInstalledPackagesFromGroup;
|
||||
@@ -431,21 +564,52 @@ void MainWindow::execContextMenuPackages(QPoint point)
|
||||
menu->addAction(ui->actionFindFileInPackage);
|
||||
menu->addSeparator();
|
||||
}
|
||||
|
||||
if((si->icon().pixmap(QSize(22,22)).toImage()) !=
|
||||
IconHelper::getIconForeignRed().pixmap(QSize(22,22)).toImage()
|
||||
&& (si->icon().pixmap(QSize(22,22)).toImage()) !=
|
||||
IconHelper::getIconForeignGreen().pixmap(QSize(22,22)).toImage())
|
||||
{
|
||||
/*QStandardItem *siName = sim->item(mi.row(), ctn_PACKAGE_NAME_COLUMN);
|
||||
//Does this package have non installed optional dependencies?
|
||||
QStringList optDeps = Package::getOptionalDeps(siName->text());
|
||||
QStringList optionalPackages;
|
||||
|
||||
foreach(QString optDep, optDeps)
|
||||
{
|
||||
QString candidate = optDep;
|
||||
int points = candidate.indexOf(":");
|
||||
candidate = candidate.mid(0, points).trimmed();
|
||||
|
||||
if(!isPackageInstalled(candidate))
|
||||
{
|
||||
optionalPackages.append(candidate);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//if(optionalPackages.count())
|
||||
//{
|
||||
// menu->addAction(ui->actionInstallOptDeps);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
bool allSameType = true;
|
||||
bool allInstallable = true;
|
||||
bool allRemovable = true;
|
||||
bool allRemovable = true;
|
||||
int numberOfSelPkgs = ui->tvPackages->selectionModel()->selectedRows().count();
|
||||
int numberOfAUR = 0;
|
||||
|
||||
foreach(QModelIndex item, ui->tvPackages->selectionModel()->selectedRows())
|
||||
{
|
||||
QModelIndex mi = m_proxyModelPackages->mapToSource(item);
|
||||
QStandardItem *si = sim->item(mi.row(), ctn_PACKAGE_ICON_COLUMN);
|
||||
QStandardItem *siRepo = sim->item(mi.row(), ctn_PACKAGE_REPOSITORY_COLUMN);
|
||||
|
||||
if((si->icon().pixmap(QSize(22,22)).toImage()) ==
|
||||
IconHelper::getIconForeign().pixmap(QSize(22,22)).toImage())
|
||||
if(siRepo->text() == StrConstants::getForeignRepositoryName())
|
||||
{
|
||||
allInstallable = false;
|
||||
numberOfAUR++;
|
||||
}
|
||||
else if((si->icon().pixmap(QSize(22,22)).toImage()) ==
|
||||
IconHelper::getIconNonInstalled().pixmap(QSize(22,22)).toImage())
|
||||
@@ -454,29 +618,30 @@ void MainWindow::execContextMenuPackages(QPoint point)
|
||||
}
|
||||
}
|
||||
|
||||
if (allSameType)
|
||||
if(allInstallable)
|
||||
{
|
||||
if(allInstallable)
|
||||
{
|
||||
menu->addAction(ui->actionInstall);
|
||||
menu->addAction(ui->actionInstall);
|
||||
|
||||
if (m_cbGroups->currentIndex() != 0)
|
||||
{
|
||||
menu->addAction(ui->actionInstallGroup);
|
||||
}
|
||||
if (m_cbGroups->currentIndex() != 0 && m_cbGroups->currentText() != StrConstants::getYaourtGroup())
|
||||
{
|
||||
menu->addAction(ui->actionInstallGroup);
|
||||
}
|
||||
}
|
||||
else if (allInstallable == false && numberOfAUR == numberOfSelPkgs)
|
||||
{
|
||||
menu->addAction(ui->actionInstallYaourt);
|
||||
}
|
||||
|
||||
if(allRemovable)
|
||||
if(allRemovable)
|
||||
{
|
||||
menu->addAction(ui->actionRemove);
|
||||
|
||||
if (m_cbGroups->currentIndex() != 0 && m_cbGroups->currentText() != StrConstants::getYaourtGroup())
|
||||
{
|
||||
menu->addAction(ui->actionRemove);
|
||||
|
||||
if (m_cbGroups->currentIndex() != 0)
|
||||
//Is this group already installed?
|
||||
if (m_modelInstalledPackagesFromGroup->rowCount() == m_modelPackagesFromGroup->rowCount())
|
||||
{
|
||||
//Is this group already installed?
|
||||
if (m_modelInstalledPackagesFromGroup->rowCount() == m_modelPackagesFromGroup->rowCount())
|
||||
{
|
||||
menu->addAction(ui->actionRemoveGroup);
|
||||
}
|
||||
menu->addAction(ui->actionRemoveGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -504,7 +669,8 @@ void MainWindow::collapseAllContentItems(){
|
||||
*/
|
||||
void MainWindow::collapseThisContentItems(){
|
||||
QTreeView *tv = ui->twProperties->currentWidget()->findChild<QTreeView *>("tvPkgFileList") ;
|
||||
if ( tv != 0 ){
|
||||
if ( tv != 0 )
|
||||
{
|
||||
tv->repaint(tv->rect());
|
||||
QCoreApplication::processEvents();
|
||||
QStandardItemModel *sim = qobject_cast<QStandardItemModel*>(tv->model());
|
||||
@@ -518,7 +684,8 @@ void MainWindow::collapseThisContentItems(){
|
||||
*/
|
||||
void MainWindow::expandAllContentItems(){
|
||||
QTreeView *tv = ui->twProperties->currentWidget()->findChild<QTreeView *>("tvPkgFileList") ;
|
||||
if ( tv != 0 ){
|
||||
if ( tv != 0 )
|
||||
{
|
||||
tv->repaint(tv->rect());
|
||||
QCoreApplication::processEvents();
|
||||
tv->expandAll();
|
||||
@@ -530,7 +697,8 @@ void MainWindow::expandAllContentItems(){
|
||||
*/
|
||||
void MainWindow::expandThisContentItems(){
|
||||
QTreeView *tv = ui->twProperties->currentWidget()->findChild<QTreeView *>("tvPkgFileList") ;
|
||||
if ( tv != 0 ){
|
||||
if ( tv != 0 )
|
||||
{
|
||||
tv->repaint(tv->rect());
|
||||
QCoreApplication::processEvents();
|
||||
QStandardItemModel *sim = qobject_cast<QStandardItemModel*>(tv->model());
|
||||
@@ -543,8 +711,10 @@ void MainWindow::expandThisContentItems(){
|
||||
* This method does the job of collapsing the given item and its children
|
||||
*/
|
||||
void MainWindow::_collapseItem(QTreeView* tv, QStandardItemModel* sim, QModelIndex mi){
|
||||
for (int i=0; i<sim->rowCount(mi); i++){
|
||||
if (sim->hasChildren(mi)){
|
||||
for (int i=0; i<sim->rowCount(mi); i++)
|
||||
{
|
||||
if (sim->hasChildren(mi))
|
||||
{
|
||||
QCoreApplication::processEvents();
|
||||
tv->collapse(mi);
|
||||
QModelIndex mi2 = mi.child(i, 0);
|
||||
@@ -616,7 +786,7 @@ void MainWindow::execContextMenuPkgFileList(QPoint point)
|
||||
{
|
||||
menu.addAction(ui->actionOpenFile);
|
||||
}
|
||||
if (f.exists() && UnixCommand::isTextFile(selectedPath))
|
||||
if (!UnixCommand::isRootRunning() && f.exists() && UnixCommand::isTextFile(selectedPath))
|
||||
{
|
||||
menu.addAction(ui->actionEditFile);
|
||||
}
|
||||
@@ -719,6 +889,20 @@ void MainWindow::_closeTabFilesSearchBar()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Extracts the base file name from an absolute file name.
|
||||
*/
|
||||
QString MainWindow::_extractBaseFileName(const QString &fileName)
|
||||
{
|
||||
QString baseFileName(fileName);
|
||||
|
||||
if (fileName.endsWith('/')) {
|
||||
baseFileName.remove(baseFileName.size()-1, 1);
|
||||
}
|
||||
|
||||
return baseFileName.right(baseFileName.size() - baseFileName.lastIndexOf('/') -1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Whenever user double clicks the package list items, app shows the contents of the selected package
|
||||
*/
|
||||
@@ -844,7 +1028,6 @@ void MainWindow::headerViewPackageListSortIndicatorClicked( int col, Qt::SortOrd
|
||||
{
|
||||
m_PackageListOrderedCol = col;
|
||||
m_PackageListSortOrder = order;
|
||||
|
||||
saveSettings(ectn_PackageList);
|
||||
}
|
||||
|
||||
@@ -949,7 +1132,6 @@ void MainWindow::openTerminal()
|
||||
*/
|
||||
void MainWindow::openDirectory(){
|
||||
QString dir = getSelectedDirectory();
|
||||
|
||||
if (!dir.isEmpty())
|
||||
{
|
||||
WMHelper::openDirectory(dir);
|
||||
@@ -961,9 +1143,25 @@ void MainWindow::openDirectory(){
|
||||
*/
|
||||
void MainWindow::openRootTerminal()
|
||||
{
|
||||
//If there are no means to run the actions, we must warn!
|
||||
if (!_isSUAvailable()) return;
|
||||
|
||||
m_unixCommand->openRootTerminal();
|
||||
}
|
||||
|
||||
/*
|
||||
* Open a file chooser dialog for the user to select local packages to install (pacman -U)
|
||||
*/
|
||||
void MainWindow::installLocalPackage()
|
||||
{
|
||||
m_packagesToInstallList =
|
||||
QFileDialog::getOpenFileNames(this, StrConstants::getFileChooserTitle(),
|
||||
QDir::homePath(), "*pkg.tar.xz");
|
||||
|
||||
if (m_packagesToInstallList.count() > 0)
|
||||
doInstallLocalPackages();
|
||||
}
|
||||
|
||||
/*
|
||||
* Brings the user to the tab Files and position cursor inside searchBar
|
||||
* so he can find any file the selected package may have
|
||||
|
||||
158
src/mainwindow.h
158
src/mainwindow.h
@@ -22,9 +22,13 @@
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include "unixcommand.h"
|
||||
#include "uihelper.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QItemSelection>
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QMainWindow>
|
||||
#include <QToolButton>
|
||||
#include <QList>
|
||||
#include <QUrl>
|
||||
|
||||
@@ -34,12 +38,14 @@ class QStandardItemModel;
|
||||
class QStandardItem;
|
||||
class QModelIndex;
|
||||
class QTimer;
|
||||
class QFileSystemWatcher;
|
||||
class QLabel;
|
||||
class QComboBox;
|
||||
class QListView;
|
||||
class QProgressBar;
|
||||
class QTextBrowser;
|
||||
class QMenu;
|
||||
class SearchLineEdit;
|
||||
class QAction;
|
||||
|
||||
//Column indices for Package's treeview
|
||||
const int ctn_PACKAGE_ICON_COLUMN(0);
|
||||
@@ -54,7 +60,7 @@ const int ctn_TABINDEX_FILES(1);
|
||||
const int ctn_TABINDEX_TRANSACTION(2);
|
||||
const int ctn_TABINDEX_OUTPUT(3);
|
||||
const int ctn_TABINDEX_NEWS(4);
|
||||
const int ctn_TABINDEX_HELPABOUT(5);
|
||||
const int ctn_TABINDEX_HELPUSAGE(5);
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
@@ -64,28 +70,19 @@ class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
public slots:
|
||||
void show();
|
||||
|
||||
static MainWindow* returnMainWindow()
|
||||
{
|
||||
static MainWindow *w=0;
|
||||
if (w != 0) return w;
|
||||
foreach (QWidget *widget, QApplication::topLevelWidgets())
|
||||
{
|
||||
if (widget->objectName() == "MainWindow")
|
||||
w = (MainWindow*) widget;
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
QStandardItemModel *getModelPackages(){ return m_modelPackages; }
|
||||
QStandardItem *getAvailablePackage(const QString &pkgName, const int index);
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void keyPressEvent(QKeyEvent* ke);
|
||||
void keyReleaseEvent(QKeyEvent *ke);
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
|
||||
CPUIntensiveComputing *m_cic;
|
||||
|
||||
UnixCommand *m_unixCommand;
|
||||
bool m_initializationCompleted;
|
||||
|
||||
@@ -96,11 +93,27 @@ private:
|
||||
QSortFilterProxyModel *m_proxyModelPackages;
|
||||
QFileSystemWatcher *m_pacmanDatabaseSystemWatcher;
|
||||
|
||||
//Controls if the dialog showing the packages to be upgraded is opened
|
||||
bool m_systemUpgradeDialog;
|
||||
|
||||
//Searches /etc/pacman.conf to see if ILoveCandy is there
|
||||
bool m_iLoveCandy;
|
||||
|
||||
//Controls the calling of System Upgrade action
|
||||
bool m_callSystemUpgrade;
|
||||
|
||||
//Controls if this Linux box has yaourt installed
|
||||
bool m_hasYaourt;
|
||||
|
||||
//Controls if the NewsTab must be showed
|
||||
bool m_gotoNewsTab;
|
||||
|
||||
//Holds the remove command to be used: -Rcs/-R/-Rs or whichever the user has choosen
|
||||
QString m_removeCommand;
|
||||
|
||||
//This model provides the list of ALL packages (installed + non-installed)
|
||||
QStandardItemModel *m_modelPackages;
|
||||
QStandardItemModel *m_modelPackagesClone;
|
||||
|
||||
//This model provides the list of ONLY installed packages
|
||||
QStandardItemModel *m_modelInstalledPackages;
|
||||
@@ -114,9 +127,21 @@ private:
|
||||
//This model provides the list of pending actions of a transaction
|
||||
QStandardItemModel *m_modelTransaction;
|
||||
|
||||
//This member holds the result list of Yaourt packages searched by the user
|
||||
QList<PackageListData> *m_listOfYaourtPackages;
|
||||
|
||||
//This member holds the list of Pacman packages available
|
||||
QList<PackageListData> *m_listOfPackages;
|
||||
|
||||
//This member holds the list of Pacman packages from the selected group
|
||||
QList<QString> *m_listOfPackagesFromGroup;
|
||||
|
||||
//This member holds the target list retrieved by the pacman command which will be executed
|
||||
QStringList *m_targets;
|
||||
|
||||
//This member holds the list of packages to install with "pacman -U" command
|
||||
QStringList m_packagesToInstallList;
|
||||
|
||||
//This member holds the current command type being executed by Octopi
|
||||
CommandExecuting m_commandExecuting;
|
||||
CommandExecuting m_commandQueued;
|
||||
@@ -129,13 +154,23 @@ private:
|
||||
|
||||
int m_PackageListOrderedCol;
|
||||
Qt::SortOrder m_PackageListSortOrder;
|
||||
QTimer *timer;
|
||||
|
||||
QStringList *m_outdatedPackageList;
|
||||
QStringList *m_outdatedYaourtPackageList;
|
||||
QHash<QString, QString> *m_outdatedYaourtPackagesNameVersion;
|
||||
|
||||
QLabel *m_lblSelCounter; //Holds the number of selected packages
|
||||
QLabel *m_lblTotalCounters; //Holds the total number of packages
|
||||
QProgressBar *m_progressWidget;
|
||||
|
||||
QToolButton *m_toolButtonPacman;
|
||||
QMenu *m_menuToolButtonPacman;
|
||||
QAction *m_actionInstallPacmanUpdates;
|
||||
|
||||
QToolButton *m_toolButtonYaourt;
|
||||
QMenu *m_menuToolButtonYaourt;
|
||||
QAction *m_actionInstallYaourtUpdates;
|
||||
|
||||
QByteArray m_horizontalSplit;
|
||||
|
||||
int m_numberOfInstalledPackages;
|
||||
@@ -169,11 +204,13 @@ private:
|
||||
//Tab Files related methods
|
||||
void _closeTabFilesSearchBar();
|
||||
void _selectFirstItemOfPkgFileList();
|
||||
QString _extractBaseFileName(const QString &fileName);
|
||||
QString getSelectedDirectory();
|
||||
|
||||
void initTabFiles();
|
||||
void initActions();
|
||||
void refreshStatusBar();
|
||||
void clearStatusBar();
|
||||
|
||||
//Tab Transaction related methods
|
||||
bool _isThereAPendingTransaction();
|
||||
@@ -191,6 +228,7 @@ private:
|
||||
void initTabTransaction();
|
||||
|
||||
//Tab Output related methods
|
||||
QTextBrowser *_getOutputTextBrowser();
|
||||
void _collapseItem(QTreeView* tv, QStandardItemModel* sim, QModelIndex mi);
|
||||
void _expandItem(QTreeView* tv, QStandardItemModel* sim, QModelIndex* mi);
|
||||
void _positionTextEditCursorAtEnd();
|
||||
@@ -208,18 +246,16 @@ private:
|
||||
|
||||
QString retrieveDistroNews(bool searchForLatestNews = true);
|
||||
QString parseDistroNews();
|
||||
void showDistroNews(QString distroRSSXML, bool searchForLatestNews = true);
|
||||
void initTabNews();
|
||||
void initTabHelpAbout();
|
||||
|
||||
public slots:
|
||||
void show();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void keyPressEvent(QKeyEvent* ke);
|
||||
void keyReleaseEvent(QKeyEvent *ke);
|
||||
void initTabHelpUsage();
|
||||
void refreshStatusBarToolButtons();
|
||||
|
||||
private slots:
|
||||
void initToolButtonPacman();
|
||||
void initToolButtonYaourt();
|
||||
void showToolButtonYaourt();
|
||||
|
||||
//TreeView methods
|
||||
void collapseAllContentItems();
|
||||
void collapseThisContentItems();
|
||||
@@ -231,6 +267,7 @@ private slots:
|
||||
void openDirectory();
|
||||
|
||||
void openRootTerminal();
|
||||
void installLocalPackage();
|
||||
|
||||
void findFileInPackage();
|
||||
|
||||
@@ -240,9 +277,21 @@ private slots:
|
||||
void tvTransactionRowsInserted(const QModelIndex& parent, int, int);
|
||||
void tvTransactionRowsRemoved(const QModelIndex& parent, int, int);
|
||||
|
||||
void buildPackagesFromGroupList(const QString &groupName);
|
||||
void buildPackageList();
|
||||
void _deleteStandardItemModel(QStandardItemModel * sim);
|
||||
|
||||
void _rebuildPackageList();
|
||||
|
||||
void buildPackagesFromGroupList();
|
||||
void buildPackageList(bool nonBlocking=true);
|
||||
void metaBuildPackageList();
|
||||
void onComboGroupsChanged();
|
||||
|
||||
void _cloneModelPackages();
|
||||
void preBuildPackageList();
|
||||
void preBuildPackagesFromGroupList();
|
||||
void preBuildYaourtPackageList();
|
||||
void preBuildYaourtPackageListMeta();
|
||||
void buildYaourtPackageList();
|
||||
|
||||
void headerViewPackageListSortIndicatorClicked(int col, Qt::SortOrder order);
|
||||
void changePackageListModel();
|
||||
@@ -250,6 +299,7 @@ private slots:
|
||||
void execContextMenuPackages(QPoint point);
|
||||
void execContextMenuPkgFileList(QPoint point);
|
||||
void execContextMenuTransaction(QPoint point);
|
||||
void execSystemTrayActivated(QSystemTrayIcon::ActivationReason);
|
||||
|
||||
//SearchLineEdit methods
|
||||
void reapplyPackageFilter();
|
||||
@@ -261,16 +311,21 @@ private slots:
|
||||
void changedTabIndex();
|
||||
void invalidateTabs(); //This method clears the current information showed on tab.
|
||||
|
||||
void doSyncDatabase();
|
||||
void doSystemUpgrade(bool syncDatabase = false);
|
||||
void doRemoveAndInstall();
|
||||
void doRemove();
|
||||
void doRemovePacmanLockFile();
|
||||
void doInstall();
|
||||
void doCleanCache();
|
||||
void doSyncDatabase();
|
||||
void doYaourtUpgrade();
|
||||
|
||||
void doInstallYaourtPackage();
|
||||
void doRemoveYaourtPackage();
|
||||
|
||||
void disableTransactionActions();
|
||||
void enableTransactionActions();
|
||||
void toggleTransactionActions(const bool value);
|
||||
void toggleSystemActions(const bool value);
|
||||
void doCommitTransaction();
|
||||
void doRollbackTransaction();
|
||||
|
||||
@@ -281,16 +336,23 @@ private slots:
|
||||
|
||||
void insertIntoRemovePackage();
|
||||
void insertIntoInstallPackage();
|
||||
|
||||
void insertIntoInstallPackageOptDeps(const QString &packageName);
|
||||
bool insertIntoRemovePackageDeps(const QStringList &dependencies);
|
||||
|
||||
void insertGroupIntoRemovePackage();
|
||||
void insertGroupIntoInstallPackage();
|
||||
|
||||
void maximizePackagesTreeView(bool pSaveSettings = true);
|
||||
void maximizePropertiesTabWidget(bool pSaveSettings = true);
|
||||
void outputOutdatedPackageList();
|
||||
void outputOutdatedYaourtPackageList();
|
||||
|
||||
void onTabNewsSourceChanged(QUrl newSource);
|
||||
void refreshDistroNews(bool searchForLatestNews = true, bool gotoNewsTab = true);
|
||||
void postRefreshDistroNews();
|
||||
|
||||
void onHelpUsage();
|
||||
void onHelpAbout();
|
||||
void onPressDelete();
|
||||
void changeTransactionActionsState();
|
||||
@@ -306,6 +368,36 @@ private slots:
|
||||
void searchBarFindNextEx();
|
||||
void searchBarFindPreviousEx();
|
||||
void searchBarClosedEx();
|
||||
void outputTextBrowserAnchorClicked(const QUrl & link);
|
||||
|
||||
public slots:
|
||||
void doSystemUpgrade(bool syncDatabase = false);
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
static MainWindow* returnMainWindow()
|
||||
{
|
||||
static MainWindow *w=0;
|
||||
if (w != 0) return w;
|
||||
foreach (QWidget *widget, QApplication::topLevelWidgets())
|
||||
{
|
||||
if (widget->objectName() == "MainWindow")
|
||||
w = (MainWindow*) widget;
|
||||
}
|
||||
return w;
|
||||
}
|
||||
|
||||
QStandardItemModel *getModelPackages(){ return m_modelPackages; }
|
||||
QStandardItem *getAvailablePackage(const QString &pkgName, const int index);
|
||||
|
||||
void setCallSystemUpgrade();
|
||||
void setRemoveCommand(const QString &removeCommand);
|
||||
void setPackagesToInstallList(QStringList pkgList){ m_packagesToInstallList = pkgList; }
|
||||
void doInstallLocalPackages();
|
||||
|
||||
bool isExecutingCommand(){ return m_commandExecuting != ectn_NONE; }
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user