880 Commits

Author SHA1 Message Date
Alexandre Arnt
5b8dfb0388 - Removed unused parameters from Octopi's main project file. 2021-01-11 12:25:47 -03:00
Alexandre Arnt
50e1c6bb85 - Release preparation... 2021-01-11 11:24:50 -03:00
Alexandre Arnt
4805a95ff8 - Updated translation. 2021-01-08 15:17:46 -03:00
Alexandre Arnt
c5688495c0 - BugFix: Clicking on printed outdated packages in Output tab did not
send to corresponding package in the main list after a 'Check updates'.
2021-01-06 21:57:57 -03:00
Alexandre Arnt
400c4750fd - Removed unneeded code. 2021-01-06 21:30:41 -03:00
Alexandre Arnt
ab8af8bc6e - Refactorings to decouple some logic. 2021-01-06 19:00:49 -03:00
Alexandre Arnt
bb06f38da9 Merge branch 'master' of https://github.com/aarnt/octopi 2021-01-02 10:21:42 -03:00
Alexandre Arnt
7f15a34bc9 - Updated translations. 2021-01-02 10:21:34 -03:00
Alexandre Arnt
8e9e0d05e9 Update README.md 2020-12-30 19:05:25 -03:00
Alexandre Arnt
a85d8af58f Update README.md 2020-12-30 19:04:50 -03:00
Alexandre Arnt
241f9e7241 - Supress buggy string in parser. 2020-12-22 15:41:30 -03:00
Alexandre Arnt
b5fda06f3e - BugFix: Prevent icon changes in notifier when there were transaction
errors.
2020-12-22 14:50:26 -03:00
Alexandre Arnt
ded5f7313a Updated translations. 2020-12-22 10:21:32 -03:00
Alexandre Arnt
cda6193af7 Updated translations 2020-12-21 11:55:24 -03:00
Alexandre Arnt
d23117a714 - Remove www from Arch url;
- Updated translations.
2020-12-19 17:44:51 -03:00
Alexandre Arnt
226d0425c4 - Small refactor. 2020-12-17 16:51:31 -03:00
Alexandre Arnt
70d6220f4e - BugFix: WM detection now uses "ps -aux";
- Updated translations.
2020-12-17 10:06:19 -03:00
Alexandre Arnt
a6349334a1 Updated translations 2020-12-11 09:47:07 -03:00
Alexandre Arnt
9f228d393a - Updated translations. 2020-12-10 16:20:48 -03:00
Alexandre Arnt
8599400779 - Updated translations. 2020-12-10 11:08:16 -03:00
Alexandre Arnt
eef29fb556 - String fix. 2020-12-08 11:03:36 -03:00
Alexandre Arnt
773caf0e0c - Prevent users from running Octopi, Notifier and Cache Cleaner outside
"/usr/bin" dir.
2020-12-07 13:34:45 -03:00
Alexandre Arnt
70f1445df5 Merge branch 'master' of https://github.com/aarnt/octopi 2020-12-01 18:55:54 -03:00
Alexandre Arnt
d35f3759a9 Removed service target 2020-12-01 18:55:07 -03:00
Alexandre Arnt
590c4143e1 Update CHANGELOG
Fixed typo
2020-11-30 18:41:07 -03:00
Alexandre Arnt
42e8e4ed2b - Bugfix in flag initialization. 2020-11-30 15:56:25 -03:00
Alexandre Arnt
6563139418 - BugFix: Disable Info/Files tab refresh while typing in filter/search
line edit.
2020-11-30 15:15:14 -03:00
Alexandre Arnt
6209e80e4c - Whenever user selects "Check updates" in notifier and octopi is
running, octopi processes the request.
2020-11-29 11:03:15 -03:00
Alexandre Arnt
5e1e70666e Updated screenshot 2020-11-29 10:23:39 -03:00
Alexandre Arnt
4c93c474ff - BugFix: disable "change install reason option" while in transaction;
- Disable stop button after post-download phase in pacman.
2020-11-29 10:10:23 -03:00
Alexandre Arnt
e5ef5085e5 - BugFix: KaOS fixes to kcp search and install.
- BugFix: Statusbar showed a number of packages when the list was empty
(the previous value).
2020-11-27 17:44:28 -03:00
Alexandre Arnt
3b94072502 - Reverted changes in open PKGBUILD methods;
- Keep open PKGBUILD options enabled while building packages.
2020-11-26 11:22:56 -03:00
Alexandre Arnt
535c70e695 - Trying to use another download method in open PKBUILD/diff. 2020-11-25 18:48:29 -03:00
Alexandre Arnt
0d1a835f66 - Added support to gedit in editFile method. 2020-11-25 16:38:52 -03:00
Alexandre Arnt
36f5c818d1 - Refactorings in propertiestabwidget calls and openfile code. 2020-11-25 12:06:08 -03:00
Alexandre Arnt
e8794007d6 - Updated CHANGELOG. 2020-11-25 11:24:44 -03:00
Alexandre Arnt
033b327ee6 - Refactorings for AUR based variable names. 2020-11-25 10:49:14 -03:00
Alexandre Arnt
9258b3a252 - Added support to build multiple foreign packages at the same time
(they are first copied to the Actions' tree view just like official
packages).
2020-11-24 20:13:04 -03:00
Alexandre Arnt
beb8d45dac - Some small refactorings. 2020-11-23 19:08:32 -03:00
Alexandre Arnt
34d38280ff - Another try to fix terminal issues while in AUR. 2020-11-23 12:32:24 -03:00
Alexandre Arnt
e553367f22 - Fixed some crashes from previous changes. 2020-11-20 18:59:30 -03:00
Alexandre Arnt
a7cf805cda - BugFix: If you tried to execute octopi after upgrading your system
with notifier you got a notifier crash and an octopi freeze (thanks to
linuxer for pointing that out).
2020-11-16 19:57:51 -03:00
Alexandre Arnt
fd1b3516f4 - Added "Open news in a browser" option on right clicking the News tab. 2020-11-15 10:58:51 -03:00
Alexandre Arnt
6e05037eb9 - Added a red border in the AUR warning rectangle;
- Removed unused code in optionsdialog.cpp.
2020-11-11 18:32:30 -03:00
Alexandre Arnt
5845f49b79 Updated screenshot 2020-11-11 17:59:54 -03:00
Alexandre Arnt
d7c2d23dfa - Removed unused code. 2020-11-11 12:42:34 -03:00
Alexandre Arnt
6bebce8693 - BugFix: Removed tab focus from stop transaction button. 2020-11-11 12:29:42 -03:00
Alexandre Arnt
483bdf85e1 - BugFix: Removed tab focus from "outdated" buttons at statusbar. 2020-11-11 12:25:44 -03:00
Alexandre Arnt
4ae0c6f436 - BugFix: "total download size" showed the value 0 in Notifier if the
database was not synched.
2020-11-11 12:15:44 -03:00
Alexandre Arnt
3da5a4eac5 - BugFix: Tab navigation improvements. 2020-11-10 19:40:26 -03:00
Alexandre Arnt
83087072c2 - Updated getPackageSize code. 2020-11-10 15:09:03 -03:00
Alexandre Arnt
268dea6272 - Removed unused test. 2020-11-10 12:29:27 -03:00
Alexandre Arnt
b966faa0dd - Added "Depends On" and "Make Deps" fields at Info tab while in AUR
mode.
2020-11-10 12:15:31 -03:00
Alexandre Arnt
2f96f12386 - Added support for '^' and '$' chars in AUR search. 2020-11-10 11:06:29 -03:00
Alexandre Arnt
3e50690e0c - BugFix in Open PKGBUILD/Show PKGBUILD diff with "Package base" code. 2020-11-08 22:22:42 -03:00
Alexandre Arnt
c53774609b - Added "Show PKGBUILD diff" option to show the differences between latest
and previous PKGBUILD files of the selected AUR package in a text editor.
2020-11-08 10:38:48 -03:00
Alexandre Arnt
e3f626da8f - Removed unused code. 2020-11-07 19:27:00 -03:00
Alexandre Arnt
ce1821f8dd - Added "Open PKGBUILD" option to open the AUR PKGBUILD file in a text
editor.
2020-11-07 19:12:53 -03:00
Alexandre Arnt
ecc737d336 - Updated searchlineedit style for not found itens while in KaOS. 2020-11-06 12:10:48 -03:00
Alexandre Arnt
e553a4f045 Merge branch 'master' of https://github.com/aarnt/octopi 2020-11-05 19:59:47 -03:00
Alexandre Arnt
cfb04970a8 - Updated CHANGELOG file. 2020-11-05 19:59:27 -03:00
Alexandre Arnt
bd7d92d18b Merge pull request #457 from Tereius/master
Introduce CMake build system
2020-11-05 19:56:21 -03:00
Alexandre Arnt
cc9811b6de - Updated CHANGELOG file. 2020-11-05 17:12:26 -03:00
Alexandre Arnt
746bb9d7da - Synced octopi-sudo code from lxqt-sudo 0.16.0. 2020-11-05 17:06:15 -03:00
Alexandre Arnt
a3f84b1573 - BugFix in help content. 2020-11-04 19:32:21 -03:00
Alexandre Arnt
7a63e3fc2f - Changed aurvote code to fix an issue. 2020-11-04 18:22:18 -03:00
Alexandre Arnt
885ec83b23 - Debug aurvote code. 2020-11-04 17:10:47 -03:00
Alexandre Arnt
91fdfc8c47 - Another aurvote debug code. 2020-11-04 17:07:18 -03:00
Alexandre Arnt
aa71f64d95 - More debug information in aurvote code. 2020-11-04 16:20:13 -03:00
Alexandre Arnt
188f71b46b - Added "Maintainer", "Last Modified" and "Out-of-date" fields
at Info tab while in AUR mode.
2020-11-03 18:29:23 -03:00
Alexandre Arnt
9825be81b4 - Added "Build directory" option in AUR tab on options dialog, so users
can change where makepkg builds the source code.
2020-10-26 17:53:40 -03:00
Alexandre Arnt
20f4eb2810 - BugFix: Do not permit changing install reason while in AUR mode. 2020-10-25 19:08:51 -03:00
Alexandre Arnt
79a7f4f698 - BugFix: Restored support for command line parameters like "-
sysupgrade-noconfirm" and "-style";
- BugFix: Updated "-help" output text..
2020-10-25 11:10:15 -03:00
Alexandre Arnt
039f98130d - BugFix in pkg version/outdated version. 2020-10-23 20:20:11 -03:00
Alexandre Arnt
c780060214 - Optional package dependencies are now installed with "--asdeps"
parameter.
2020-10-23 19:15:01 -03:00
Alexandre Arnt
a34ba69c24 - Added option to "Change Install Reason" of selected packages
(Explicitly <-> As Dependency).
2020-10-22 18:11:09 -03:00
Alexandre Arnt
af881e7912 - BugFix: Running Notifier within a DE session would lead to a
"Suspicious execution method" error.
2020-10-22 15:10:52 -03:00
Alexandre Arnt
93f3c74a59 - BugFix: Pressing ESC in repoeditor could ask if you wanted to save
your changes even if there were no changes made.
2020-10-20 19:32:36 -03:00
Björn Stresing
db058e35f5 Add Qt5 package min. version check 2020-10-20 19:38:28 +02:00
Björn Stresing
d1347b1820 Update README.md, change install location of octphelper and octopi-sudo 2020-10-20 16:35:34 +02:00
Björn Stresing
33ceb0178f Add missing files to install target, add missing translations 2020-10-17 19:53:13 +02:00
Björn Stresing
baeb542b38 Merge remote-tracking branch 'upstream/master' into master 2020-10-17 18:11:27 +02:00
Alexandre Arnt
fd787a74fc - Faster instant search code. 2020-10-12 15:32:56 -03:00
Alexandre Arnt
e60c516177 - Added a faster refresh package list code after checking for updates;
- Replaced "foreach" for "for".
2020-10-12 14:58:35 -03:00
Alexandre Arnt
b32e94e0ce - BugFix: removed unused code. 2020-10-10 15:29:25 -03:00
Alexandre Arnt
67f6692a48 - Added option to display "Licenses", "Installed Size", "Build Date",
"Install Date" and "Install Reason" columns in the package list;
- Added "Install Date" at Info tab;
- Added "Licenses" at Info tab while in AUR mode.
2020-10-10 15:05:58 -03:00
Alexandre Arnt
0ad770c83e - Striping some unused code. 2020-10-05 12:18:23 -03:00
Alexandre Arnt
05a891b2a6 BugFix: updated wrong path reference. 2020-10-05 10:37:15 -03:00
Alexandre Arnt
a1ed637f31 - Removed string replaces from generated sysinfo file. 2020-10-04 19:24:59 -03:00
Alexandre Arnt
8ae7a0fd8f BugFix: QtSingleApplication class does not like messing with TMPDIR
variable too...
2020-10-04 19:10:42 -03:00
Alexandre Arnt
42064d75df - A new release cycle begins: 0.11 (dev);
- Updated PKGBUILD file following MatMoul's suggestion;
- Removed unused speedup service;
- BugFix: unset TMPDIR environment variable on every Octo tool startup
(to avoid "octopi-helper[aborted]: Couldn't attach to memory" errors).
2020-10-04 18:22:05 -03:00
Björn Stresing
064cb3ded3 Set correct CMake octopi version 2020-10-04 21:58:55 +02:00
Björn Stresing
5d36b8a957 Introduce CMake build system 2020-10-04 21:39:28 +02:00
Alexandre Arnt
f6961a89ca Updated Manjaro news url 2020-07-19 14:40:55 -03:00
Alexandre Arnt
2d9c34fa18 Merge branch 'master' of https://github.com/aarnt/octopi 2020-07-18 19:01:58 -03:00
Alexandre Arnt
aed6d3948a - Updated translations. 2020-07-18 19:01:26 -03:00
Alexandre Arnt
c19a324cda Update README.md
Updated readme file
2020-07-10 09:45:32 -03:00
Alexandre Arnt
614e3b8bd3 - BugFix: Don't let tab 1 and 2 disablement trigger refresh. 2020-07-06 14:26:09 -03:00
Alexandre Arnt
a575a04981 - Use space key to refresh info and tab files and restrict auto
refreshing info tab.
2020-07-03 19:43:44 -03:00
Alexandre Arnt
b4899bcedc - RefreshTabInfo code update. 2020-07-03 19:07:18 -03:00
Alexandre Arnt
e159abaafc Merge branch 'master' of https://github.com/aarnt/octopi 2020-07-02 17:16:08 -03:00
Alexandre Arnt
e55090a066 - BugFix in tab files refresh;
- QRegularExpression fixes.
2020-07-02 17:15:25 -03:00
Alexandre Arnt
ec89b8a2bc Update README.md 2020-07-02 13:43:36 -03:00
Alexandre Arnt
95faab97a9 - Release preparation. 2020-07-01 18:05:26 -03:00
Alexandre Arnt
a7108f0835 - Updated README.md file. 2020-07-01 17:24:55 -03:00
Alexandre Arnt
48bf47fa48 - BugFix: checks for octopi-sudo in main before execution. 2020-06-29 11:25:10 -03:00
Alexandre Arnt
2a5f9b32b6 - Updated supported Linux readme. 2020-06-29 11:11:22 -03:00
Alexandre Arnt
208f689118 - BugFix with AUR debuging timer. 2020-06-28 23:10:00 -03:00
Alexandre Arnt
f7f34a6562 - BugFix in AUR/optionsdialog. 2020-06-28 22:30:54 -03:00
Alexandre Arnt
ad8732ef81 - Added support for Artix Linux news. 2020-06-28 21:58:18 -03:00
Alexandre Arnt
b432c40c26 - Initial support to Artix Linux. 2020-06-28 14:22:18 -03:00
Alexandre Arnt
3d1b4678bc - BugFix in menuRepository action;
- Initial Artix Linux support.
2020-06-28 14:12:14 -03:00
Alexandre Arnt
363374f639 - Updated translations. 2020-06-25 17:03:01 -03:00
Alexandre Arnt
8141393314 - Get tabs 1 and 2 locked during actions. 2020-06-24 15:40:19 -03:00
Alexandre Arnt
76330f8b17 - Enable a more complete UI lockdown during transactions;
- BugFix: Enable "Find a file" context menu option on a non installed
pkg.
2020-06-24 12:12:36 -03:00
Alexandre Arnt
7da9c3edc0 - Added "xdg-open" to the openFile() possibilities. 2020-06-24 10:07:31 -03:00
Alexandre Arnt
f5b22fba98 - Code update due to Qt 5.15 version. 2020-06-22 21:54:16 -03:00
Alexandre Arnt
8defc3bdd0 - Small refactoring in wmhelper code. 2020-06-13 18:25:08 -03:00
Alexandre Arnt
71238d3e93 - Updated translations. 2020-06-13 15:48:24 -03:00
Alexandre Arnt
121ad0d634 - BugFix: Notifier was not detaching shared memory when pinged from
helper;
- Removed unused code.
2020-06-13 14:43:08 -03:00
Alexandre Arnt
ad28a0678f - BugFix in wmhelper.cpp with Qt 5.15. 2020-06-12 14:11:58 -03:00
Alexandre Arnt
3db8415077 - Huge batch of changes due to Qt5 5.15 release. ***Testing needed!*** 2020-06-12 13:55:02 -03:00
Alexandre Arnt
6c3b63f98f - Added option to change terminal's color scheme, font family and font
size through ~/.config/octopi/octopi.conf;
- BugFix in outdated aur statusbar button.
2020-05-26 17:03:39 -03:00
Alexandre Arnt
f3a14edab0 - Reverted some code for bug fixing. 2020-05-24 11:43:34 -03:00
Alexandre Arnt
043931eb2a - Yaourt is no more... 2020-05-22 17:59:08 -03:00
Alexandre Arnt
1c578367b7 - Reverted some changes to fix some user crashes. 2020-05-22 17:00:00 -03:00
Alexandre Arnt
28e4c0f989 - Updated code for refreshAppIcon after a outputdialog close;
- Updated translation;
2020-05-21 17:22:43 -03:00
Alexandre Arnt
46535831d3 - Reverted change: Let's not toy with established things. 2020-05-20 15:57:22 -03:00
Alexandre Arnt
d1048abc9f - BugFix: Defer building of outdated, unrequired and foreign pkg lists
after mainwindow pops on the screen.
2020-05-20 15:04:50 -03:00
Alexandre Arnt
8dcc30ca9e - Fixed octopi-sudo version. 2020-05-17 23:06:05 -03:00
Alexandre Arnt
b87ed8345b - BugFix in parser. 2020-05-16 16:52:54 -03:00
Alexandre Arnt
4b3507539c - Enhances AUR code at getOutdatedAURList;
- BugFix in pikaur code.
2020-05-02 19:57:38 -03:00
Alexandre Arnt
6008d37c19 - Another AurVote try... 2020-05-02 12:20:47 -03:00
Alexandre Arnt
6b601439cc - Show AurVote debug info to help users with AUR login issues. To enable
just run Octopi as: "/usr/bin/octopi -d".
2020-05-02 11:51:09 -03:00
Alexandre Arnt
0dad821102 - Added option "--devel" in AUR tab to check for newer versions of dev
packages;
2020-04-27 20:34:18 -03:00
Alexandre Arnt
739397211e Updated txs 2020-04-27 15:29:45 -03:00
Alexandre Arnt
5bb1faa43b - Fixed buggy str in parser. 2020-04-25 17:18:31 -03:00
Alexandre Arnt
524f305cc2 - Merge octopi-sudo code with lxqt-sudo changes;
- Fixed compilation error;
2020-04-25 15:07:36 -03:00
Alexandre Arnt
c56d777c96 - Removed another buggy str in parser. 2020-04-19 21:44:04 -03:00
Alexandre Arnt
8e8decae26 - Removed buggy string in parser;
- Code clean;
2020-04-19 21:25:33 -03:00
Alexandre Arnt
e727c8e598 - Updated translations. 2020-04-04 21:27:40 -03:00
Alexandre Arnt
275d159d81 Merge pull request #439 from luis-pereira/notifier-drop-foreach
Drop Qt foreach
2020-04-04 21:24:01 -03:00
Alexandre Arnt
a2802044a6 Merge pull request #438 from luis-pereira/helper-drop-foreach
Drop Qt foreach
2020-04-04 21:22:27 -03:00
Luís Pereira
218f27bce0 Drop Qt foreach
Use C++11 range for loop. foreach will be removed from Qt.
2020-04-03 16:37:44 +01:00
Luís Pereira
10c97c96c3 Drop Qt foreach
Use C++11 range for loop. foreach will be removed from Qt.
2020-04-02 18:51:30 +01:00
Alexandre Arnt
0066009d11 Updated PKGBUILD 2020-04-01 18:54:13 -03:00
Alexandre Arnt
e46899b4f5 - Set COLORTERM and TERM variables for qtermwidget in octopi and
notifier.
2020-04-01 15:51:09 -03:00
Alexandre Arnt
ed61820026 BugFix: AUR upgrades in notifier were not setting m_commandExecuting flag. 2020-04-01 15:29:14 -03:00
Alexandre Arnt
3db8927f28 - Updated CHANGELOG. 2020-03-30 19:31:29 -03:00
Alexandre Arnt
1eff031e23 - BugFix: Default to remove AUR packages using pacman -R (thanks to
mputterf).
2020-03-30 19:20:06 -03:00
Alexandre Arnt
e2c87e2c50 - Fixed wrong project site on PKGBUILD and Help tab (thanks to
simonbcn);
- Updated translations.
2020-03-30 18:14:36 -03:00
Alexandre Arnt
58797754eb Merge pull request #430 from luis-pereira/delete-nullptr
Don't check for nullptr before delete
2020-03-29 19:02:45 -03:00
Alexandre Arnt
88590ec964 Merge pull request #429 from luis-pereira/modernize
Modernize
2020-03-29 19:02:16 -03:00
Luís Pereira
c770253981 Don't check for nullptr before delete
It's fine to delete a nullptr pointer.
Improves readability.
2020-03-26 16:29:43 +00:00
Luís Pereira
67dc305cc9 Use equals delete
Mark unimplemented private special member functions with = delete.
Done by clang-tidy.
2020-03-25 15:37:15 +00:00
Luís Pereira
a4454951e4 Use bool literals
Finds integer literals which are cast to bool.
Done by clang-tidy.
2020-03-25 15:18:41 +00:00
Luís Pereira
4fdcb953e8 Port towards C++ headers
Done by clang-tidy.
2020-03-25 14:29:24 +00:00
Luís Pereira
11e437b5b5 Port towards C++11 nullptr
Done by clang-tidy.
2020-03-25 13:21:54 +00:00
Alexandre Arnt
3dc3fa73ec - Updated CHANGELOG. 2020-03-24 20:16:15 -03:00
Alexandre Arnt
dad4f38804 Merge branch 'master' of https://github.com/aarnt/octopi 2020-03-24 19:36:00 -03:00
Alexandre Arnt
bb0bc7b3f2 - Updated translations. 2020-03-24 19:35:05 -03:00
Alexandre Arnt
46ef3655c1 Merge pull request #428 from luis-pereira/strict-iterators
Don't mix const and non const iterators
2020-03-24 19:22:08 -03:00
Alexandre Arnt
11010fbf23 Merge pull request #427 from luis-pereira/sudo-string-casts
sudo: Don't use implicit string conversions
2020-03-24 19:21:38 -03:00
Alexandre Arnt
af1d5829c9 Merge pull request #426 from luis-pereira/repoeditor-string-casts
repoeditor: Don't use implicit string conversions
2020-03-24 19:19:50 -03:00
Alexandre Arnt
abccec8324 Merge pull request #425 from luis-pereira/notifier-string-casts
notifier: Don't use implicit string conversions
2020-03-24 19:18:53 -03:00
Alexandre Arnt
70b36e25df Merge pull request #424 from luis-pereira/helper-string-casts
helper: Don't use implicit string conversions
2020-03-24 19:15:44 -03:00
Alexandre Arnt
94d368337f Merge pull request #423 from luis-pereira/ccachecleaner-string-casts
ccachecleaner: Don't use implicit string conversions
2020-03-24 19:14:30 -03:00
Luís Pereira
36ffdbaa86 Don't mix const and non const iterators
It prevents detachments but also caches some subtle bugs.
Found by Clazy.
2020-03-24 17:08:36 +00:00
Luís Pereira
ec48262a24 sudo: Don't use implicit string conversions
Enforcing it also.
2020-03-23 22:50:14 +00:00
Luís Pereira
2dd6888d28 repoeditor: Don't use implicit string conversions
Enforcing it also.
2020-03-23 21:57:10 +00:00
Luís Pereira
b21774789d notifier: Don't use implicit string conversions
Enforcing it also.
2020-03-23 18:02:27 +00:00
Luís Pereira
f7f8067263 helper: Don't use implicit string conversions
Enforcing it also.
2020-03-23 16:21:20 +00:00
Luís Pereira
f491a77ee0 ccachecleaner: Don't use implicit string conversions
Enforcing it also.
2020-03-23 14:25:44 +00:00
Alexandre Arnt
0d86bc1e2f - Updated translations. 2020-03-20 19:02:48 -03:00
Alexandre Arnt
cd2cc7045e Merge pull request #422 from luis-pereira/no-implicit-string-casts
No implicit string casts
2020-03-20 18:59:59 -03:00
Luís Pereira
ff65bad532 Don't use implict conversions from QByteArray
Enforce it with QT_NO_CAST_FROM_BYTEARRAY.
2020-03-20 19:26:01 +00:00
Luís Pereira
4a366da7d9 Don't use implict Url conversions from strings
Enforce it with QT_NO_URL_CAST_FROM_STRING.
2020-03-20 19:22:54 +00:00
Luís Pereira
64b143b843 Don't use implicit conversions to ASCII
Enforce it with QT_NO_CAST_TO_ASCII.
2020-03-20 18:53:31 +00:00
Luís Pereira
ff7f108e58 Don't use implicit char to QString conversion, part 2
Make the conversions explicit.
Enforcing it also with QT_NO_CAST_FROM_ASCII.
2020-03-20 17:54:58 +00:00
Luís Pereira
95d8882854 Don't use implicit char to QString conversion, part 1
Reduce the number of unneeded memory allocations.
Make the conversions explicit.
Done automatically by Clazy. The remaining cases will be done by hand.
2020-03-20 17:40:45 +00:00
Alexandre Arnt
fa4451316c Merge pull request #419 from luis-pereira/use-qstring-multi-arg
Don't use chained QString::arg() calls
2020-03-16 22:17:58 -03:00
Alexandre Arnt
1ead404fac Merge pull request #420 from luis-pereira/use-qstring-ref
Use QString::xxxxRef()
2020-03-16 22:17:43 -03:00
Alexandre Arnt
af48197cdc - Updated txs. 2020-03-16 21:46:04 -03:00
Luís Pereira
22c807eb00 Use QString::xxxxRef()
Instead of QString::xxxx(). It avoids temporary heap allocations.
xxxx can be mid, left, right.
Found by clazy.
2020-03-16 19:29:56 +00:00
Luís Pereira
c25660d304 Don't use chained QString::arg() calls
Use the multi-arg overload to save memory allocations.
Found by clazy.
2020-03-16 13:15:24 +00:00
Alexandre Arnt
292506e020 - Updated screenshot. 2020-03-08 17:48:19 -03:00
Alexandre Arnt
dab4844ebe - BugFix: Keep search method selected by the user until Octopi is
closed;
- BugFix: Notifier just upgrades in Octopi if it has outdated pkgs
available.
2020-03-08 17:38:07 -03:00
Alexandre Arnt
cd3df70032 - Updated tx;
- Updated exit icon;
- BugFix: Never disable exit menu.
2020-03-08 10:34:01 -03:00
Alexandre Arnt
6817c63d83 - Simpler code on app close event. 2020-03-07 22:57:43 -03:00
Alexandre Arnt
071d489af0 - Fix for Lumina. 2020-03-07 17:55:42 -03:00
Alexandre Arnt
a433ea673f - Added Lumina desktop support. 2020-03-07 17:20:19 -03:00
Alexandre Arnt
fe0a38b7fc - BugFixes in pacmanExec deletion. 2020-03-06 23:28:23 -03:00
Alexandre Arnt
9e32b7846c - Updated makeURLClickable code. 2020-03-06 21:23:26 -03:00
Alexandre Arnt
ce8eb46a69 - Small fixes in parser;
- No searchbar in default notifier terminal;
- Code cleanups.
2020-03-04 11:57:33 -03:00
Alexandre Arnt
05f3607fb2 - Updated txs. 2020-03-02 11:45:51 -03:00
Alexandre Arnt
99f737e3cc - Updated txs. 2020-02-24 11:16:31 -03:00
Alexandre Arnt
2d0ffd8174 - Updated txs. 2020-02-19 22:33:59 -03:00
Alexandre Arnt
9f7ff44164 - Updated txs. 2020-02-17 12:03:37 -03:00
Alexandre Arnt
316a91d102 - BugFix on F5 code 2020-02-15 18:02:41 -03:00
Alexandre Arnt
000c00b346 - BugFix: Don't let some shortcuts be executed while an action is
running;
- Updated txs.
2020-02-15 16:52:00 -03:00
Alexandre Arnt
fae53c8d6e - Updated txs. 2020-02-10 21:31:35 -03:00
Alexandre Arnt
23c0ada511 - Updated translation. 2020-02-07 19:19:41 -03:00
Alexandre Arnt
a812cf5316 - Reverting link color hard coding. We can configure themes to change
anything.
2020-02-07 19:10:23 -03:00
Alexandre Arnt
6742daf14c - Updated searchlineedit.cpp 2020-02-06 20:06:05 -03:00
Alexandre Arnt
61b77290fe - Updated icons. 2020-02-06 19:57:12 -03:00
Alexandre Arnt
6a0a8002d9 - Reverting... 2020-02-06 19:02:33 -03:00
Alexandre Arnt
5d49c4bd96 - Change searchlineedit behaviour on plasma. 2020-02-06 18:46:55 -03:00
Alexandre Arnt
1072a3612f - Added espace at the end of output pkg lists. 2020-02-06 18:18:29 -03:00
Alexandre Arnt
3fece6a554 - Updated translations. 2020-02-06 18:04:47 -03:00
Alexandre Arnt
d459833b44 - Updated translations. 2020-02-06 12:45:13 -03:00
Alexandre Arnt
0f217461a2 - bugfix in searchlineedit code. 2020-02-06 12:18:42 -03:00
Alexandre Arnt
926c7ef117 - Removed useless img. 2020-02-06 12:04:09 -03:00
Alexandre Arnt
9f90ed5f76 - BugFix: scroll problems with some themes. 2020-02-06 11:36:43 -03:00
Alexandre Arnt
ca6826b3d7 - Updated screenshot. 2020-02-06 10:56:30 -03:00
Alexandre Arnt
846615374f - Changed searchlineedit style. 2020-02-06 01:22:59 -03:00
Alexandre Arnt
e9e7ca3df8 - Updated hyperlink color. 2020-02-05 23:42:31 -03:00
Alexandre Arnt
cf7e52d71e - Changed hyperlink color to green. 2020-02-05 22:58:01 -03:00
Alexandre Arnt
1f384616c7 - Updated translations. 2020-02-05 21:46:59 -03:00
Alexandre Arnt
8b99edab3e - Updated translations. 2020-02-02 10:29:11 -03:00
Alexandre Arnt
10f7c2307c -Updated translations. 2020-02-01 19:06:21 -03:00
Alexandre Arnt
505621cc6d - BugFix in has changes check. 2020-01-29 17:16:00 -03:00
Alexandre Arnt
d9f6e6da92 - Remove unused class. 2020-01-29 16:34:24 -03:00
Alexandre Arnt
a05add18cd - Updated translations. 2020-01-28 10:58:50 -03:00
Alexandre Arnt
fd5dcc07fa - Updated translations. 2020-01-25 20:12:25 -03:00
Alexandre Arnt
f67e3f27e8 - Updated translations. 2020-01-21 19:27:30 -03:00
Alexandre Arnt
b838d2fa26 - Compile fix and internet check fix. 2020-01-21 19:10:24 -03:00
Alexandre Arnt
e846990877 - Fixed proxy settings on helper. 2020-01-17 17:30:08 -03:00
Alexandre Arnt
2250904a90 - Introduction of proxy usage support. 2020-01-17 17:02:39 -03:00
Alexandre Arnt
6500cb9e2e - Updated helper test code. 2020-01-15 21:46:03 -03:00
Alexandre Arnt
66311c1f4d - Use msg with bold. 2020-01-15 14:49:40 -03:00
Alexandre Arnt
dd261f4ed2 - Improved output messages on installing yay-bin package. 2020-01-15 14:24:08 -03:00
Alexandre Arnt
0d2ea072ca - Removed unused code. 2020-01-14 22:03:27 -03:00
Alexandre Arnt
c6293bf567 - Commented test code. 2020-01-13 22:51:33 -03:00
Alexandre Arnt
622631bb1c - Updated translation;
- Fixed cancel actions on exit code.
2020-01-13 22:47:08 -03:00
Alexandre Arnt
5438954d7c - Fixed cache-cleaner shared mem code;
- Add stopTransaction return code to fix wrong behaviour.
2020-01-12 12:32:21 -03:00
Alexandre Arnt
7931b5f626 - Show QtermWidget search box on notifier's AUR upgrades;
- BugFix: Make notifier code consistent with AUR upgrades;
2020-01-12 11:09:56 -03:00
Alexandre Arnt
a32d8c6193 - Updated README.md file. 2020-01-11 20:35:13 -03:00
Alexandre Arnt
2cde060e2f - BugFix: Disable Notifier menu actions while upgrading. 2020-01-11 17:23:27 -03:00
Alexandre Arnt
64e82a2f34 - Added ko and tr translations. 2020-01-11 15:35:12 -03:00
Alexandre Arnt
0d322a718e - Notifier: Let escape key be recognized on terminal while upgrading
packages.
2020-01-11 10:50:18 -03:00
Alexandre Arnt
00e3ee492f - Updated translations;
- Updated sharedmem code cleanup code;
- Updated octo tools cross checks.
2020-01-11 10:19:55 -03:00
Alexandre Arnt
da2f616509 - Changes in notifier sharedmem code. 2020-01-11 00:18:45 -03:00
Alexandre Arnt
81fbb39c35 - Fixes in SharedMem code. 2020-01-10 23:13:54 -03:00
Alexandre Arnt
2334d2684e - Add some testing code. 2020-01-08 23:39:56 -03:00
Alexandre Arnt
63bb50a602 - Updated translations. 2020-01-08 22:19:55 -03:00
Alexandre Arnt
e187d54d0b - Updated translations. 2020-01-06 21:23:31 -03:00
Alexandre Arnt
26029b124d - Updated project site on about dialog. 2020-01-06 21:21:52 -03:00
Alexandre Arnt
4dc4a42570 - Updated pkg extension support. 2020-01-06 21:15:14 -03:00
Alexandre Arnt
69706789e2 - Removed fixed size font from info tab code. 2020-01-04 22:06:50 -03:00
Alexandre Arnt
337dc296ac - Updated screenshot. 2020-01-04 21:52:02 -03:00
Alexandre Arnt
fddcbc72b5 - Updated CHANGELOG. 2020-01-04 21:45:45 -03:00
Alexandre Arnt
c6a5028306 - Updated icon file. 2020-01-04 16:48:10 -03:00
Alexandre Arnt
791cc24d1e - Added specific icon for foreign non installed pkg. 2020-01-04 16:11:03 -03:00
Alexandre Arnt
b741c49f2d - Add code to print dotpacnew file list summary on notifier (if any). 2020-01-04 15:23:04 -03:00
Alexandre Arnt
8b83830c15 - Print .pacnew list summary after upgrade. 2020-01-04 14:57:37 -03:00
Alexandre Arnt
c4cec0b122 - Updated translations. 2020-01-04 14:00:50 -03:00
Alexandre Arnt
74a519472a - Updated translations. 2020-01-04 09:39:04 -03:00
Alexandre Arnt
e452f82542 - Some icon changes. 2020-01-04 09:17:33 -03:00
Alexandre Arnt
c67771698a - Updated README.md file. 2020-01-03 21:37:33 -03:00
Alexandre Arnt
fa9f4ce1c7 - Updated PKGBUILD file. 2020-01-03 17:29:48 -03:00
Alexandre Arnt
c0538bd1ba - Updated translations. 2020-01-03 16:54:04 -03:00
Alexandre Arnt
6a91e57b58 - Updated repoeditor translations. 2020-01-02 22:54:39 -03:00
Alexandre Arnt
4b5887b232 - Updated src strings. 2020-01-02 22:46:50 -03:00
Alexandre Arnt
6046669135 - BugFix: Don't let user exits Repoeditor without answering if he wants
to save changes.
2020-01-02 21:58:23 -03:00
Alexandre Arnt
aa4d30261b - Updated translations. 2020-01-02 16:57:38 -03:00
Alexandre Arnt
b8bf9495d0 - Reverted a change in window behaviour. 2020-01-02 14:56:17 -03:00
Alexandre Arnt
4f7822b4fb - Updated notifier windows behaviour. 2020-01-02 14:53:59 -03:00
Alexandre Arnt
2910f6ad34 Updated translations. 2020-01-02 10:04:10 -03:00
Alexandre Arnt
f41beff873 - Updated translations. 2019-12-31 09:41:46 -03:00
Alexandre Arnt
31fb2dac94 - String fixes. 2019-12-30 23:23:11 -03:00
Alexandre Arnt
7424ba3d60 - Bugfix in Options Dialog exec code. 2019-12-30 22:34:33 -03:00
Alexandre Arnt
26e5cd3514 - Updated translations. 2019-12-30 18:19:30 -03:00
Alexandre Arnt
0a7f7c782e - Updated translations. 2019-12-29 22:44:00 -03:00
Alexandre Arnt
5d6a3af63b - Updated mainwindow.ui. 2019-12-29 22:13:18 -03:00
Alexandre Arnt
90b237b9c8 - Updated translations;
- Fixed voting code.
2019-12-29 22:00:05 -03:00
Alexandre Arnt
dd71f2df80 - Bugfix in optionsdialog.ui. 2019-12-29 21:34:37 -03:00
Alexandre Arnt
c9be44ab2f - Options Dialog fixes. 2019-12-29 21:17:08 -03:00
Alexandre Arnt
6642916612 - Updated menu. 2019-12-29 20:06:30 -03:00
Alexandre Arnt
4dae7f8af4 - Source str fix. 2019-12-29 19:43:22 -03:00
Alexandre Arnt
894928eed3 - Updated git ignore file. 2019-12-29 15:09:00 -03:00
Alexandre Arnt
3f8a5a6bd5 - Updated translations. 2019-12-29 14:54:23 -03:00
Alexandre Arnt
784fc6f20e - Updated source strings. 2019-12-29 14:43:47 -03:00
Alexandre Arnt
f5d49c6ef6 - Let's print 0 Bytes as well on upgrade transaction dialog. 2019-12-29 11:54:41 -03:00
Alexandre Arnt
9c8617d452 - Color removal in pacman parser and notifier bugfix in output window
focus.
2019-12-29 11:27:59 -03:00
Alexandre Arnt
0867327d2a - BugFix in foreign pkg description tooltip code. 2019-12-27 22:28:23 -03:00
Alexandre Arnt
4df7758e82 - Updated checkupdates exit code in notifier. 2019-12-27 10:31:54 -03:00
Alexandre Arnt
25965581ab - BugFix with new checkupdates return code. 2019-12-26 14:56:27 -03:00
Alexandre Arnt
33b72056a9 - Updated README.md. 2019-12-26 14:38:22 -03:00
Alexandre Arnt
ffc984824d - Updated README.md. 2019-12-23 16:42:28 -03:00
Alexandre Arnt
5cccfce28e - Linux distros die... 2019-12-23 16:33:33 -03:00
Alexandre Arnt
fe27630042 - Refactorings. 2019-12-23 14:53:57 -03:00
Alexandre Arnt
29180a1040 - Couple of small refactorings. 2019-12-23 14:25:53 -03:00
Alexandre Arnt
24789355be - Updated gitignore file. 2019-12-23 13:43:32 -03:00
Alexandre Arnt
edb0f4b369 - Updated translations. 2019-12-23 13:19:05 -03:00
Alexandre Arnt
91b6dd48fe - BugFix: Sometimes terminal actions did not end correctly. 2019-12-23 11:58:56 -03:00
Alexandre Arnt
f667d025c5 - Updated AUR msg size in optionsdialog.ui. 2019-12-23 11:11:08 -03:00
Alexandre Arnt
7131a6bc84 - Defaults to using ALPM backend 2019-12-20 21:36:51 -03:00
Alexandre Arnt
9d60096df9 - Remove + from string. 2019-12-15 18:16:40 -03:00
Alexandre Arnt
494403333b - Removed redundant code (default is monospace font). 2019-12-15 18:07:57 -03:00
Alexandre Arnt
8c25a5299d - Bugfix in help. 2019-12-15 17:35:12 -03:00
Alexandre Arnt
c51789c892 - Help fix. 2019-12-15 17:30:47 -03:00
Alexandre Arnt
6bdef66282 - Bugfixes in foreign desc and actions exec. 2019-12-15 16:42:07 -03:00
Alexandre Arnt
7796ad2a55 Bugfix in running actions on terminal not refreshing outdated pkg list. 2019-12-14 20:13:14 -03:00
Alexandre Arnt
5241d0f58c - Comment bash history flood code in terminal (thx to demm). 2019-12-04 14:40:23 -03:00
Alexandre Arnt
f09c7753ab - Changed default behaviour in notifier with KSTATUS flag. 2019-12-03 18:24:50 -03:00
Alexandre Arnt
92a42d5c9b - Remove old helper if it still exists 2019-12-03 17:56:52 -03:00
Alexandre Arnt
06b3f8c6b1 - Updated some comments 2019-12-02 23:05:53 -03:00
Alexandre Arnt
700809bc77 - Updated README.md file. 2019-12-02 22:55:45 -03:00
Alexandre Arnt
ca8196007c - Changed helper binary name to "octphelper". 2019-12-02 21:57:04 -03:00
Alexandre Arnt
698ce813c1 - Added version in helper. 2019-12-02 20:57:03 -03:00
Alexandre Arnt
6ad8d296ad - Refactorings in helper. 2019-12-02 18:59:00 -03:00
Alexandre Arnt
b8a781e3c4 - Use full bin path. 2019-12-02 17:48:35 -03:00
Alexandre Arnt
0f4d0d2cde - Use full bin path in helper. 2019-12-02 09:55:10 -03:00
Alexandre Arnt
195aca81bb - Temp Refactoring. 2019-11-24 06:07:25 -03:00
Alexandre Arnt
162b31ef2a - Updated readme file. 2019-11-22 16:56:45 -03:00
Alexandre Arnt
d076398cce - Added AUR use warning at optionsdialog.ui. 2019-11-22 16:14:58 -03:00
Alexandre Arnt
abeee87c69 - Refactoring in help code. 2019-11-22 15:46:53 -03:00
Alexandre Arnt
836cb01391 - Refactorings in cleaner and helper code. 2019-11-22 15:14:03 -03:00
Alexandre Arnt
529a867a95 - Removed unused code. 2019-11-22 10:45:14 -03:00
Alexandre Arnt
4b719f5106 - Refactorings in helper code. 2019-11-22 10:30:21 -03:00
Alexandre Arnt
b9cfee3163 Updated readme file 2019-11-22 09:26:12 -03:00
Alexandre Arnt
5e9cd21f2b - Change dir to home at termwidget.cpp. 2019-11-21 22:04:48 -03:00
Alexandre Arnt
9eb1faa8ca - Bugfix in parser when installing linux packages. 2019-11-21 21:32:12 -03:00
Alexandre Arnt
a3e53728e3 - Added octopi-mainwindow.png file. 2019-11-21 12:19:18 -03:00
Alexandre Arnt
c1dd1dd669 Merge branch 'master' of https://github.com/aarnt/octopi 2019-11-21 11:59:33 -03:00
Alexandre Arnt
2623504bc8 - Refactorings in actions code. 2019-11-21 11:59:09 -03:00
Alexandre Arnt
6caaef4b9a Merge pull request #403 from MatMoul/master
Update Exec in .desktop files
2019-11-19 17:37:50 -03:00
MatMoul
7b3ccfb67d Update Exec in .desktop files 2019-11-19 20:52:36 +01:00
Alexandre Arnt
377bbc702a - Make CacheCleaner/Helper more secure. 2019-11-18 22:54:43 -03:00
Alexandre Arnt
f388a9cc8c - Refactorings in local pkg install. 2019-11-18 18:08:47 -03:00
Alexandre Arnt
a3707b857d - Bugfixes in install code. 2019-11-17 00:03:30 -03:00
Alexandre Arnt
23323442f2 - Better comment. 2019-11-16 22:48:39 -03:00
Alexandre Arnt
8f13211b8b - Refactorings for calm warnings down. 2019-11-16 22:32:46 -03:00
Alexandre Arnt
c9a8e2156f - More refactorings in notifier/helper/octopi. 2019-11-16 21:25:50 -03:00
Alexandre Arnt
614850f056 - Refactorings to make Octopi more secure. 2019-11-16 19:25:00 -03:00
Alexandre Arnt
4fe304e5bf - Bugfix in double context menu connections in AUR mode;
- Removed unused code.
2019-11-16 16:31:59 -03:00
Alexandre Arnt
20e6874771 - Refactorings in helper. 2019-11-16 15:10:45 -03:00
Alexandre Arnt
2610359c29 - refactorings in helper. 2019-11-16 15:06:48 -03:00
Alexandre Arnt
24099a0892 - removed unneeded code 2019-11-16 15:01:36 -03:00
Alexandre Arnt
04127c4ab9 - Got rid of all unsafe execution methods. 2019-11-16 14:55:01 -03:00
Alexandre Arnt
296a7848b4 - Only -ts in octopi-sudo! 2019-11-16 13:44:59 -03:00
Alexandre Arnt
041688a996 - Let helper only get from mem. 2019-11-16 12:20:46 -03:00
Alexandre Arnt
46f5efb418 - Added "copy" command to octopi's embedded terminal context menu. 2019-11-16 12:18:59 -03:00
Alexandre Arnt
abc5e76913 - Make .bak file more robust. 2019-11-16 11:24:43 -03:00
Alexandre Arnt
15899fccbd - Using the proper shell in helper. 2019-11-16 10:41:11 -03:00
Alexandre Arnt
b048c1c002 - RepoEditor now saves window size/position. 2019-11-16 10:20:39 -03:00
Alexandre Arnt
a38b24afc4 - Refactorings in octopi/notifier code. 2019-11-16 08:55:48 -03:00
Alexandre Arnt
8c50c14fe0 - Refactoring to cachecleaner code. 2019-11-15 19:08:05 -03:00
Alexandre Arnt
01b5e3c01b - Refactorings in sudo. 2019-11-15 18:29:27 -03:00
Alexandre Arnt
1b92868b15 - Migration to memory trans. 2019-11-15 18:19:26 -03:00
Alexandre Arnt
0e8805e5eb - Refactoring in helper. 2019-11-15 11:46:29 -03:00
Alexandre Arnt
661d28956b - BugFix in terminal exec code. 2019-11-15 11:39:20 -03:00
Alexandre Arnt
cdead9468c - Refactorings in helper. 2019-11-15 10:47:03 -03:00
Alexandre Arnt
9aad3f97b6 - Helper refactorings. 2019-11-14 17:56:33 -03:00
Alexandre Arnt
002fd0180e - Sharedmem refactorings. 2019-11-13 23:42:05 -03:00
Alexandre Arnt
245db0572a - Refactorings in helper. 2019-11-13 15:36:58 -03:00
Alexandre Arnt
f913972868 - Couple of Refactorings. 2019-11-13 13:38:14 -03:00
Alexandre Arnt
db2eecd8bc - Various bugfixes and enhancements. 2019-11-12 23:37:10 -03:00
Alexandre Arnt
3f912fe637 - Reverted change. 2019-11-12 19:48:19 -03:00
Alexandre Arnt
0e7a6c15a7 - Bugfix in local install. 2019-11-12 17:58:52 -03:00
Alexandre Arnt
5eb575e496 - Bugfixes in helper and refactorings. 2019-11-12 17:34:21 -03:00
Alexandre Arnt
b93df38efa - Some KaOS bugfixes. 2019-11-10 19:34:40 -03:00
Alexandre Arnt
bbe56f6f2d - Bugfixes in AUR mode switch. 2019-11-08 21:56:42 -03:00
Alexandre Arnt
149517e436 - BugFix: pacman pkg list shows no value when text is cleared after an
AUR search.
2019-11-07 14:35:20 -03:00
Alexandre Arnt
907432c0b3 - Test conectivity (if enabled) in temp yay download. 2019-11-07 13:49:33 -03:00
Alexandre Arnt
b5c7526cea - Comment unused code. 2019-11-07 11:46:34 -03:00
Alexandre Arnt
de8019d8fc - Removed "expac" dependency. 2019-11-06 23:11:24 -03:00
Alexandre Arnt
aacec874d7 - Reverted tx commit. 2019-11-06 13:15:11 -03:00
Alexandre Arnt
b5dd3922a3 - Updated tx. 2019-11-06 11:32:17 -03:00
Alexandre Arnt
ed4a1d8f21 - Removed unneeded tx. 2019-11-06 11:24:29 -03:00
Alexandre Arnt
2a2eb93187 - Remove temp yay download files. 2019-11-05 14:07:46 -03:00
Alexandre Arnt
4eaed8dba6 - Cosmetic fix in AUR/pacman list switch. 2019-11-04 23:30:01 -03:00
Alexandre Arnt
4b0703ece5 - AUR code updated. 2019-11-04 23:12:17 -03:00
Alexandre Arnt
b3c5378920 - Remove unused code. 2019-11-04 17:47:36 -03:00
Alexandre Arnt
2b4b20b9fa - Updated aur/switch button code. 2019-11-04 17:36:31 -03:00
Alexandre Arnt
3e4db580eb - Fix in focus when "crtl+shift+O" used. 2019-11-04 13:56:06 -03:00
Alexandre Arnt
091f0a12b6 - BugFix: outdatedversion with ")" char. 2019-11-04 11:43:26 -03:00
Alexandre Arnt
8ccc3016c7 - Updated tab info code. 2019-11-04 09:07:08 -03:00
Alexandre Arnt
0f17fb16c4 - Help usage changes;
- Added "ctrl+shift_O" to get AUR outdated packages;
- Context menu fixes for AUR pkgs.
2019-11-03 23:36:51 -03:00
Alexandre Arnt
8890a7cb87 - Updated help usage text. 2019-11-03 22:19:55 -03:00
Alexandre Arnt
4a273bd826 Fixed sudo's README.md file. 2019-11-03 12:57:08 -03:00
Alexandre Arnt
f4c3222174 - Updated README.md file. 2019-11-03 12:44:35 -03:00
Alexandre Arnt
1d44a52981 - Added "ctrl+shift+A" option on Help/Usage text. 2019-11-03 12:36:24 -03:00
Alexandre Arnt
ccabf3d4e9 - Whenever user selects "options" at notifier and octopi is running, we
open options from Octopi.
2019-11-03 11:24:31 -03:00
Alexandre Arnt
ed0a6c8b82 Changed behaviour in notifier to show updates when systray icon is clicked. 2019-10-31 22:34:48 -03:00
Alexandre Arnt
044bf6c594 Merge branch 'master' of https://github.com/aarnt/octopi 2019-10-31 21:27:23 -03:00
Alexandre Arnt
af37001a64 - Test if "expac" is installed. 2019-10-31 21:26:49 -03:00
Alexandre Arnt
84810b9a97 Update README.md
Fixed a typo
2019-10-31 13:49:24 -03:00
Alexandre Arnt
f7e5e6ed7b - Added 'expac' dependency to speed up refresh code. 2019-10-28 00:19:09 -03:00
Alexandre Arnt
95ff43b71d - Added shortcut to list all AUR voted packages. 2019-10-27 11:08:31 -03:00
Alexandre Arnt
1ecdba57bd - Some bugfixes. 2019-10-23 23:31:06 -03:00
Alexandre Arnt
7c5e3f9f27 - BugFix: checkupdates now returns 1 when no update is available. 2019-10-15 22:00:20 -03:00
Alexandre Arnt
87b0a8e7af - Add support to arcolinux 2019-10-06 21:05:45 -03:00
Alexandre Arnt
930b4c023f - Added method to retrieve all user voted package names. 2019-10-01 23:24:36 -03:00
Alexandre Arnt
13848f9525 - Fix in aurvote.cpp. 2019-10-01 19:41:59 -03:00
Alexandre Arnt
0f43222795 - Fix in optionsdialog.ui. 2019-09-23 18:04:21 -03:00
Alexandre Arnt
a88a20775d - Uniformization of fontsize in optionsdialog.ui. 2019-09-23 17:57:52 -03:00
Alexandre Arnt
d04cf46c61 - BugFix: missing class in project file. 2019-09-23 17:24:33 -03:00
Alexandre Arnt
0bec405a61 - BugFix: missing ../src/qaesencryption.* file at .pro. 2019-09-23 15:51:58 -03:00
Alexandre Arnt
99a2fb5c8f - Text fix. 2019-09-21 11:35:23 -03:00
Alexandre Arnt
274da64555 - BugFixes in SettingsManager code. 2019-09-21 11:27:57 -03:00
Alexandre Arnt
ed43e44883 - Refactorings. 2019-09-21 00:21:11 -03:00
Alexandre Arnt
01ea313e93 - BugFixes in pkg list and panel save settings. 2019-09-21 00:05:32 -03:00
Alexandre Arnt
ee03eb4a67 - Added option to download a temporary yay-bin to enable AUR. 2019-09-20 22:13:51 -03:00
Alexandre Arnt
bf615b96a7 - Refactorings. 2019-09-20 11:20:58 -03:00
Alexandre Arnt
ce1374844a - Refactorings. 2019-09-20 10:08:52 -03:00
Alexandre Arnt
6f191e2dba - Removed SwagArch support. RIP SwagArch :-( 2019-09-20 09:59:48 -03:00
Alexandre Arnt
07cd087d9e - Fix AUR tab showing at OptionsDialog. 2019-09-20 09:32:48 -03:00
Alexandre Arnt
bc659f50dc - Some refactorings;
- Asks user if he wants to vote for Octopi (at connection test).
2019-09-20 09:18:12 -03:00
Alexandre Arnt
98c4b4dc70 - Added support for EndeavourOS (former Antergos). 2019-09-20 00:04:41 -03:00
Alexandre Arnt
7a0ff75fba - Some refactorings. 2019-09-19 21:57:00 -03:00
Alexandre Arnt
c2b1c84268 - Added option to vote/unvote in AUR packages using aur.archlinux.org
login.
2019-09-19 21:43:23 -03:00
Alexandre Arnt
12b34017e7 - BugFix: Sometimes non-outdated AUR packages did not get refreshed;
- Position at the tab that generated an error in Options dialog.
2019-09-15 18:42:48 -03:00
Alexandre Arnt
d76eb8b1c8 - Some icon changes in notifier. 2019-09-15 12:13:10 -03:00
Alexandre Arnt
9a679424d7 - BugFix: Let YAY tool upgrade its outdated packages. 2019-09-10 22:20:51 -03:00
Alexandre Arnt
6855629524 Merge pull request #390 from nicolasfella/desktopentry
Set desktop file name
2019-09-03 10:25:00 -03:00
Nicolas Fella
87206bbcc8 Set desktop file name 2019-09-03 00:27:38 +02:00
Alexandre Arnt
395291481a Merge branch 'master' of https://github.com/aarnt/octopi 2019-09-01 22:58:58 -03:00
Alexandre Arnt
2a5fe191b0 - Added class to support AUR vote;
- BugFix: Now Actions tab is disable while in AUR mode;
- Refactorings here and there.
2019-09-01 22:54:24 -03:00
Alexandre Arnt
c5d39dae42 - Added class to support AUR vote;
- BugFix: Now Actions tab is disable while in AUR mode;
- Refactorings here and there.
2019-09-01 22:25:26 -03:00
Alexandre Arnt
2f601d3650 Merge branch 'master' of https://github.com/aarnt/octopi
Merge PKGBUILD...
2019-08-18 19:35:23 -03:00
Alexandre Arnt
f3128bf86d - Renamed Transaction tab to Actions tab;
- Fixed deprecated code.
2019-08-18 19:32:16 -03:00
Alexandre Arnt
b4d38db487 Merge pull request #387 from Maryse47/patch-1
PKGBUILD: build from git instead of tarball
2019-08-15 13:41:42 -03:00
Maryse47
f9aa8573a5 PKGBUILD: build from git instead of tarball 2019-08-14 19:03:47 +00:00
Alexandre Arnt
31060ae2b2 - Added tooltip "Upgrading..." while Notifier is upgrading the system.
- BugFix: "exists in filesystem" messages during transactions are shown
again.
2019-07-21 19:52:57 -03:00
Alexandre Arnt
72a922a080 - Helper no longer execs if pacman is already running outside;
- Added option to enable/disable internet checking;
- Maximization of properties pane now hides tab bar.
2019-07-13 20:12:28 -03:00
Alexandre Arnt
d23565750a - unused parm. 2019-06-30 19:58:00 -03:00
Alexandre Arnt
841a0310cf Fix paste error 2019-06-25 22:55:30 -03:00
Alexandre Arnt
198cc22caf - Added option to disable confirmation dialog in system upgrade;
- Added security check to cancel system upgrades in GUI when pacman is
in the list;
- Couple of fixes in some files.
2019-06-25 22:46:38 -03:00
Alexandre Arnt
bf229e28ce - Removed unused code;
- Added accelerators to menuitens.
2019-06-24 22:08:57 -03:00
Alexandre Arnt
c780fddb47 - Removed unused code. 2019-06-23 21:38:30 -03:00
Alexandre Arnt
43ed522fa8 - Fixes some files. 2019-06-20 23:04:09 -03:00
Alexandre Arnt
d79b079677 - Fixed typo. 2019-06-20 22:19:38 -03:00
Alexandre Arnt
b0448a4bd7 - Updated files. 2019-06-20 22:18:17 -03:00
Alexandre Arnt
e0792d776f - Fixed PKGBUILD to always use latest git version;
- Fixed notifier to always use mandatory qtermwidget.
2019-06-20 21:59:18 -03:00
Alexandre Arnt
45941fa780 - Updated helper path;
- Added check for 'octopi-helper' in Octopi.
2019-06-20 21:05:10 -03:00
Alexandre Arnt
fdcb59ae4a - BugFix: ESC was not closing upgrade dialog in notifier if command had
finished.
2019-06-19 22:58:59 -03:00
Alexandre Arnt
ed2100c40f - Some missing LXQt files. 2019-06-19 22:42:49 -03:00
Alexandre Arnt
6d55356219 - Various important changes to make Octopi run smoothly with only one
terminal and one sudo tool.
2019-06-19 22:40:44 -03:00
Alexandre Arnt
7b6b8d79b1 - Added .gitignore file. 2019-06-18 23:10:31 -03:00
Alexandre Arnt
29860a0d80 - Bugfix 2019-06-18 23:04:09 -03:00
Alexandre Arnt
954419baa3 - Added a built-in default priviledge scalation tool: "octopi-sudo" as a
slightly modified version of "lxqt-sudo" project.
2019-06-18 22:59:42 -03:00
Alexandre Arnt
8b05da2c3b - BugFix: Do not show warning when trying to ESC after a system upgrade
is done in notifier.
2019-06-18 15:07:21 -03:00
Alexandre Arnt
ef3e5c6197 - Notifier folder reorganization. 2019-06-18 14:38:36 -03:00
Alexandre Arnt
306b846b9d - Small fixes. 2019-06-18 11:06:34 -03:00
Alexandre Arnt
5d54c1f28f - Removed no longer used pacmanhelper code. 2019-06-18 10:38:46 -03:00
Alexandre Arnt
4b883b4870 Got rid of default exit icon 2019-06-17 20:51:30 -03:00
Alexandre Arnt
2f5c563236 - Removed support to terminal selection. Octopi now only works with
QTERMWIDGET.
2019-06-17 19:11:08 -03:00
Alexandre Arnt
f94ee1a04b - User can now press ESC and abort sysupgrade in notifier;
- Checkupdates code fixes;
2019-05-12 10:23:48 -03:00
Alexandre Arnt
1060b3c800 - Fixed checkupdates code. 2019-05-11 21:11:28 -03:00
Alexandre Arnt
1717ec4ceb - BugFix: Notifier should use same PacmanExec code for checkUpdates. 2019-05-11 20:36:59 -03:00
Alexandre Arnt
ddb1131ea8 - Removed unused method. 2019-05-11 20:07:11 -03:00
Alexandre Arnt
8fa0f1d4b8 - BugFix: checkupdates would return more than 1 time from QProcess and
generate a QList index out of bounds exception.
2019-05-11 20:03:59 -03:00
Alexandre Arnt
7b81db5ce1 Merge pull request #374 from Maryse47/Maryse47-patch-1
octopihelper: fix install path
2019-04-23 17:28:22 -03:00
Alexandre Arnt
3d9dbfb5fa Merge pull request #375 from Maryse47/Maryse47-patch-2
PKGBUILD fixes
2019-04-23 17:26:56 -03:00
Alexandre Arnt
18ce8177f7 - Bugfix in notifier code. 2019-04-22 22:23:54 -03:00
Alexandre Arnt
2145455c12 - Bugfixes in aur search code. 2019-04-22 22:15:15 -03:00
Alexandre Arnt
882f876e2b - BugFix in mainwindow_transaction.cpp code. 2019-04-22 21:15:02 -03:00
Maryse47
ab87f72781 PKGBUILD fixes
Double quote variables
Call default buildflags in octopi.pro
Add PFREFIX
2019-04-22 17:29:09 +00:00
Maryse47
b3c67e5d8f octopihelper: fix install path
Without those rules octopi-helper is installed to /octopi root dir.
2019-04-22 16:55:38 +00:00
Alexandre Arnt
abc15557d9 - BugFixes in aur code 2019-04-21 23:15:24 -03:00
Alexandre Arnt
8b1e670281 - BugFix in row colors switch string. 2019-04-21 19:40:41 -03:00
Alexandre Arnt
499cbbe9b9 - Added option for changing use of alternating row colors in package
list.
2019-04-21 19:27:56 -03:00
Alexandre Arnt
31555d6bc4 - BugFix: Let's clear check update lists before we check it again :-) 2019-04-21 17:33:51 -03:00
Alexandre Arnt
7a32ba9ea2 - Adapting notifier to use "checkupdates" instead "pacman -Syy". 2019-04-21 17:18:51 -03:00
Alexandre Arnt
a1775be6b0 BugFix: make "open terminal here" option work with qtermwidget. 2019-04-21 14:25:43 -03:00
Alexandre Arnt
22b89268c0 - Refactorings based on cppcheck execution. 2019-04-21 12:32:22 -03:00
Alexandre Arnt
c1d60de3cc - Updated README.md file. 2019-04-21 12:01:53 -03:00
Alexandre Arnt
b550b4d7bf - Warn users of changes. 2019-04-21 11:53:51 -03:00
Alexandre Arnt
2e577dbbb2 - Removed unused code. 2019-04-21 11:51:16 -03:00
Alexandre Arnt
b21ad34f77 - Refactorings proposed by cppcheck tool. 2019-04-21 11:05:40 -03:00
Alexandre Arnt
4e9028462e - Code refactorings in SettingsManager. 2019-04-21 09:56:35 -03:00
Alexandre Arnt
24e73b68c9 - Added "yay" AUR tool support;
- Reworked AUR tab in Options dialog.
2019-04-19 22:27:39 -03:00
Alexandre Arnt
c1c8d8e91a - A couple of refactorings. 2019-04-19 17:41:42 -03:00
Alexandre Arnt
a6e171abee BugFix in outputOutdatedPackageList code. 2019-04-19 17:33:38 -03:00
Alexandre Arnt
67ded2c136 - Removed unused code in notifier;
- Added checkupdates file check in octopi.
2019-04-18 16:56:02 -03:00
Alexandre Arnt
85acca454f - pacmanhelper is not needed anymore. 2019-04-18 16:48:42 -03:00
Alexandre Arnt
679477296f - Commented all syncDatabase code. 2019-04-18 16:42:55 -03:00
Alexandre Arnt
62a443dc31 - Updated Sync db action name. 2019-04-18 16:22:05 -03:00
Alexandre Arnt
67bfc99983 - Changes to mark outdated packages in the pkg list after a "check
updates" command.
2019-04-18 16:08:33 -03:00
Alexandre Arnt
4fb2ea22f4 - BugFix: Changed 'Sync database' to 'Check updates' command. 2019-04-18 15:34:37 -03:00
Alexandre Arnt
94d1cd3c27 Update CHANGELOG
Updated CHANGELOG file.
2019-04-16 13:43:43 -03:00
Alexandre Arnt
178bbc1751 - BugFix: Notifier now uses "checkupdates" instead "pacman -Sy[y]" 2019-04-15 22:40:38 -03:00
Alexandre Arnt
743f85015a - BugFix: Always do a "pacman -Syu" in System Upgrade and remove Sync
database option.
- BugFix: Pkg build date obeys Locale datetime format.
- Removed "Sync database" option to mitigate "partial updates" issues.
2019-04-15 22:04:11 -03:00
Alexandre Arnt
ff8c2c8435 Code fixes. 2019-04-13 19:41:52 -03:00
Alexandre Arnt
82f525c21e - Some code fixes for terminal.cpp. 2019-04-13 13:13:23 -03:00
Alexandre Arnt
941e467b93 - Removed some unused code and changed sysinfo msg. 2019-04-13 12:25:18 -03:00
Alexandre Arnt
5e6be67cc9 - BugFix: Speed improvements in package list building. 2019-04-11 21:22:50 -03:00
Alexandre Arnt
34c446fc29 - Added support for GNOME file manager/editor.
-  BugFix: Added support for symbolic lynks in "open file".
2019-04-10 22:31:03 -03:00
Alexandre Arnt
0ee7ca1a74 - Trying to maximize startup speed with foreign pkg code
- Initial support to SwagArch distro
2019-04-09 22:53:35 -03:00
Alexandre Arnt
408cbd6446 - Updated generated SysInfo msg. 2019-03-30 17:35:30 -03:00
Alexandre Arnt
535f2c1839 - Let's speed up TransactionDialog if there are outdated packages. 2019-03-30 12:13:22 -03:00
Alexandre Arnt
ec43d1ef12 - Refinements in SysInfo code. 2019-03-30 11:37:36 -03:00
Alexandre Arnt
0848e2f75e - Added option to never synchronize package db in Notifier. 2019-03-30 11:19:53 -03:00
Alexandre Arnt
cd68e45ac4 - Updated README.md file. 2019-03-30 10:34:11 -03:00
Alexandre Arnt
957d4e8a03 - BugFix: SysInfo no longer pushes the collected logs to a remote paste
service. It saves them locally.
2019-03-29 23:02:22 -03:00
Alexandre Arnt
27d053f5fb - BugFix: pikaur was not showing outdated pkgs. 2019-03-28 21:59:00 -03:00
Alexandre Arnt
16f5d0deeb Merge pull request #321 from ewilly/master
Added Pikaur (AUR tool) support
2019-03-28 20:22:50 -03:00
Alexandre Arnt
81c2232609 - Updated translations. 2019-03-27 21:53:11 -03:00
Alexandre Arnt
2f64c66b63 - BugFix: MultiselectionDialog did not resize pkg description
automatically.
2019-03-26 20:44:30 -03:00
Alexandre Arnt
76ee38a2d3 Merge pull request #369 from Maryse47/patch-1
Fix typo in PKGBUILD
2019-03-22 11:47:38 -03:00
Maryse47
fe495319e2 Fix typo in PKGBUILD
The correct filename is https://github.com/aarnt/octopi/blob/master/octopihelper/octopi-helper.pro
2019-03-22 12:45:11 +00:00
ewilly
f33ec2cc48 Fix issue when remove with --noedit param 2019-03-18 19:10:41 +01:00
ewilly
3e5257cae9 Merge branch 'master' of git://github.com/aarnt/octopi into aarnt-master 2019-03-17 10:48:27 +01:00
Alexandre Arnt
c7eb428c9e - Reverted buggy sysupgrade change. 2019-03-12 21:44:28 -03:00
Alexandre Arnt
63610228f2 BugFix: Some packages were not displaying Optional Deps at Info tab. 2019-03-11 22:06:57 -03:00
Alexandre Arnt
1cc1036468 Added option to exit Octopi while a transaction is already running. 2019-03-10 21:50:48 -03:00
Alexandre Arnt
adfd514772 - Added another supported command to octopihelper. 2019-03-10 19:33:26 -03:00
Alexandre Arnt
79731ccb69 BugFix: OptionsDialog was not saving AUR settings if tab changed before
clicking OK.
2019-03-10 12:04:01 -03:00
Alexandre Arnt
9cb3f72a9b - Bugfix in notifier code. 2019-03-10 11:50:41 -03:00
Alexandre Arnt
1dba4e4565 - Obligatory readme file... 2019-03-07 22:13:24 -03:00
Alexandre Arnt
9600933b63 - Huge batch of changes mostly related to adding support for sudo (and
NOPASSWD) thru the use of "octopi-helper" subproject.

NOPASSWD mode will *ONLY* work when using "lxqt-sudo" root escalation
tool.
2019-03-07 22:10:09 -03:00
ewilly
ec5a01925f Merge branch 'aarnt-master' 2019-01-04 17:44:23 +01:00
ewilly
d0a55bba67 Merge branch 'master' of git://github.com/aarnt/octopi into aarnt-master 2019-01-04 17:43:52 +01:00
Alexandre Arnt
df6f0467a5 - BugFix: Changed command to Reinstall/Update when package is already installed or outdated. 2019-01-04 17:25:27 +01:00
Alexandre Arnt
3d6f0723f5 - Bumped version number. 2019-01-04 17:25:27 +01:00
Alexandre Arnt
3ee20b8b76 - Changed ptpb SysInfo logic to show more parameters and keep it remotely for 15 minutes. - Left click on package icon in package list brings context menu. - BugFix: Notifier checked for available internet connection too early with an error dialog box. 2019-01-04 17:25:27 +01:00
Alexandre Arnt
359584ba93 - BugFix: If user chooses QTermWidget as his terminal, "Open root
terminal" doesn't work.
2019-01-03 21:52:43 -02:00
Alexandre Arnt
fa8083599a - BugFix: Info and Files tabs were not showing any info automaticaly
when switching between foreign tool/pacman lists.
- BugFix: Reset visited packages list when switching between foreign and
pacman tools.
2019-01-03 12:11:09 -02:00
Alexandre Arnt
25971985ee - Tried to lighten the burden of opening transaction dialog when there
are many updates available in a sysupgrade.
2019-01-03 11:12:31 -02:00
Alexandre Arnt
b0613be2a2 - Added "Info" option in package list context menu.
- BugFix: Clear filter line edit when navigating thru package anchors at
Info tab.
2019-01-02 20:36:51 -02:00
Alexandre Arnt
241169308a - BugFix: Changed command to Reinstall/Update when package is already
installed or outdated.
2019-01-02 18:04:47 -02:00
Alexandre Arnt
58757a23a2 - Bumped version number. 2019-01-02 17:37:08 -02:00
Alexandre Arnt
e062b9c5f8 - Changed ptpb SysInfo logic to show more parameters and keep it
remotely for 15 minutes.
- Left click on package icon in package list brings context menu.
- BugFix: Notifier checked for available internet connection too early
with an error dialog box.
2019-01-02 17:02:21 -02:00
ewilly
ead4189904 Merge pull request #7 from aarnt/master
Update
2018-12-03 19:12:06 +01:00
Alexandre Arnt
cdbaccaadd Merge pull request #356 from sudobaal/lxsudo
lxqt-sudo behavior changed, see https://github.com/lxqt/lxqt/issues/1534
2018-12-03 09:14:18 -02:00
Ludovic Richard
80414e2177 lxqt-sudo behavior changed, see https://github.com/lxqt/lxqt/issues/1534 2018-10-28 12:02:24 +13:00
Alexandre Arnt
b7fa1be650 Merge pull request #348 from xfix/patch-1
Replace us_EN language with en_US
2018-09-05 10:50:38 -03:00
Konrad Borowski
f46d16ca03 Replace us_EN language with en_US
There is no such language as us_EN
2018-08-25 10:06:15 +02:00
ewilly
7d7910f934 Update 2018-06-10 18:59:38 +02:00
ewilly
6a5637023f Merge branch 'master' into master 2018-06-10 15:02:53 +02:00
Alexandre Arnt
251822c887 - Updated PKGBUILD. 2018-06-08 16:06:21 -03:00
Alexandre Arnt
553068128b - Enhanced embeded terminal behaviour.
- Bumped version number to 0.9.0.
2018-06-08 15:53:58 -03:00
Alexandre Arnt
aea5e2cf09 - Removed "loading" from the pattern of green messages. 2018-06-07 16:57:01 -03:00
Alexandre Arnt
91dfad1faf - Enhancements in help/about dialog. 2018-06-07 15:23:49 -03:00
Alexandre Arnt
6f2401e10a - Removed unused code. 2018-06-07 11:52:49 -03:00
Alexandre Arnt
72c0a0ba11 - Dropped PacBSD from the list of compatible distros. 2018-06-07 11:42:33 -03:00
Alexandre Arnt
fa7e88d370 - BugFix: We do not need wait cursors when we are using threads ;-) 2018-06-06 18:09:45 -03:00
Alexandre Arnt
3935abcd82 - BugFix: Another way to test network connectivity. 2018-06-06 17:03:14 -03:00
Alexandre Arnt
10c78af877 - BugFix in sysinfo code. 2018-06-06 15:34:06 -03:00
Alexandre Arnt
2d2b29f0d0 - BugFix: Make SysInfo runs in its own thread, so UI is not blocked. 2018-06-06 15:28:36 -03:00
Alexandre Arnt
45fa9697ad - BugFix in code that checks updated news. 2018-06-05 19:38:48 -03:00
Alexandre Arnt
f0bf295aab - BugFix: Local package install inside qtermwidget needed a SIGNAL
connect to work;
- Prevent the use of "--force" option if pacman version >= 5.1.
2018-06-05 18:47:03 -03:00
Alexandre Arnt
17123d9428 - Updated README.md file. 2018-06-05 18:00:26 -03:00
Alexandre Arnt
b9f0c6b73c - Do NOT clear search string when switching between AUR/pacman. 2018-06-05 17:37:19 -03:00
Alexandre Arnt
a64adfb404 - BugFix: Better not clear embeded console after aur transaction. 2018-06-05 17:13:00 -03:00
Alexandre Arnt
f192bc7aa6 - BugFix: Better way to deal with updated news. 2018-06-05 17:10:26 -03:00
Alexandre Arnt
1c07b57afa - BugFix: If threre are updated News after a synchronization, let's goto
the News Tab.
2018-06-05 11:03:22 -03:00
Alexandre Arnt
e054cb0218 - Updated translations. 2018-06-05 10:42:52 -03:00
Alexandre Arnt
5009ee232c - BugFix: Let's not show AUR tab in optionsdialog if we are running
Parabola Linux.
2018-06-04 19:13:04 -03:00
ewilly
78604ed1f6 Merge pull request #5 from aarnt/master
Merge
2018-06-04 23:07:05 +02:00
Alexandre Arnt
42918df4a3 - BugFix: Chinese users do not ping google.com. 2018-06-04 11:24:58 -03:00
Alexandre Arnt
cafc92e030 Update README.md
Updated some distro sites.
2018-06-03 14:50:03 -03:00
Alexandre Arnt
be5fa78234 - BugFix: Remove only Octopi tools related temporary files
(qtsingleapp*).
2018-06-03 14:09:43 -03:00
Alexandre Arnt
cb16ea67de - Added pacman-contrib dependency for new pacman 5.1.
- Added a check at cache cleaner's startup.
2018-06-03 12:23:42 -03:00
ewilly
ab5866427e Merge pull request #4 from aarnt/master
- BugFix in Qt 5.11 compile.
2018-05-30 06:27:50 +02:00
Alexandre Arnt
b9654265f9 - BugFix in Qt 5.11 compile. 2018-05-29 10:32:07 -03:00
ewilly
598eff9abd Merge pull request #3 from aarnt/master
update from aarnt
2018-05-09 09:00:45 +02:00
Alexandre Arnt
73b1028fe8 - BugFix: sysinfo tests for internet connection. 2018-05-09 08:58:04 +02:00
Alexandre Arnt
abe3060ea9 - BugFix: Better search without "error". 2018-05-09 08:58:04 +02:00
Alexandre Arnt
2b644de025 - BugFix: Exec internet tests before some commands in Octopi and
Notifier.
2018-05-09 08:58:04 +02:00
Alexandre Arnt
ba802c6a7d - Added missed translation files.
- BugFix: Do not let program display an avalanche of internet related
errors.
- Let mirror-check display its internet errors.
2018-05-09 08:58:04 +02:00
Alexandre Arnt
2555fa645b - Removed unused code/Fix typo. 2018-05-09 08:58:04 +02:00
Alexandre Arnt
96300a0491 - BugFix: Use current octopi icon for notifer/help/about dialog. 2018-05-09 08:58:04 +02:00
Alexandre Arnt
d454c7e8f4 - BugFix in progressbar with mirrorcheck. 2018-05-09 08:58:04 +02:00
Alexandre Arnt
e1954e0821 - Added Hindi translation (thanks to Panwar108). 2018-05-09 08:58:04 +02:00
Alexandre Arnt
36aff057a5 - BugFix: UI hint for this not so fast operation. 2018-05-09 08:58:04 +02:00
Alexandre Arnt
70a68fde41 - BugFix: Let internal terminal receive focus when maximized/restored. 2018-05-09 08:58:04 +02:00
Alexandre Arnt
6af126c47c - BugFix in terminal cancel code. 2018-05-09 08:58:04 +02:00
Alexandre Arnt
7d5db3e3c7 - BugFix: Add Alt+7 shortcut to access terminal tab. 2018-05-09 08:58:04 +02:00
Alexandre Arnt
3547036a00 - BugFix: Make F11 works inside terminal tab. 2018-05-09 08:58:04 +02:00
Alexandre Arnt
3988003c17 - BugFix: Show progressbar with wait cursor. 2018-05-09 08:58:04 +02:00
Alexandre Arnt
1e585a9876 - Updated translation. 2018-05-09 08:58:04 +02:00
Alex Nemeth
5a2e61ba13 Enable HiDPI icons 2018-05-09 08:58:04 +02:00
Alexandre Arnt
3460389d2f Update PKGBUILD
Removed "gist" from optional dependencies.
2018-05-09 08:58:04 +02:00
Alexandre Arnt
0a599bfb0e - Remove gist / Add ptpb support (thanks to demm). 2018-05-09 08:58:04 +02:00
sheinz
d084dc016a Fixed processing multiple IgnorePkg/IgnoregGroup statements 2018-05-09 08:58:04 +02:00
sheinz
66b9e7ee1f Concatenate multiple IgnorePkg/IgnoreGroup statements 2018-05-09 08:58:04 +02:00
Alexandre Arnt
c413caadd1 - BugFix: sysinfo tests for internet connection. 2018-05-06 19:55:25 -03:00
Alexandre Arnt
bff4de2189 - BugFix: Better search without "error". 2018-05-06 18:54:24 -03:00
Alexandre Arnt
a9d9eb30d3 - BugFix: Exec internet tests before some commands in Octopi and
Notifier.
2018-05-06 18:23:46 -03:00
ewilly
f9063cf252 Pikaur : Fix color & search in aur 2018-05-04 16:23:35 +02:00
Alexandre Arnt
61f6a199e9 - Added missed translation files.
- BugFix: Do not let program display an avalanche of internet related
errors.
- Let mirror-check display its internet errors.
2018-04-29 16:38:55 -03:00
Alexandre Arnt
e59fe5ac8c - Removed unused code/Fix typo. 2018-05-06 16:04:43 -03:00
Alexandre Arnt
ee79c35b62 Merge pull request #320 from sheinz/fix-multiple-ignorepkg
Handle multiple IgnorePkg/IgnoreGroup statements
2018-05-06 12:57:52 -03:00
Alexandre Arnt
a3b1eaf68b - BugFix: Use current octopi icon for notifer/help/about dialog. 2018-04-29 16:07:11 -03:00
Alexandre Arnt
9a419e5ab6 - BugFix in progressbar with mirrorcheck. 2018-04-29 15:39:53 -03:00
Alexandre Arnt
8f82f46852 - Added Hindi translation (thanks to Panwar108). 2018-04-29 15:19:31 -03:00
Alexandre Arnt
f45a5a903a - BugFix: UI hint for this not so fast operation. 2018-04-29 14:33:21 -03:00
Alexandre Arnt
6b727bf114 - BugFix: Let internal terminal receive focus when maximized/restored. 2018-04-29 14:21:32 -03:00
Alexandre Arnt
2fad59554b - BugFix in terminal cancel code. 2018-04-29 14:15:35 -03:00
Alexandre Arnt
e8c3ff875c - BugFix: Add Alt+7 shortcut to access terminal tab. 2018-04-29 13:58:29 -03:00
Alexandre Arnt
12b7338b51 - BugFix: Make F11 works inside terminal tab. 2018-04-29 12:35:32 -03:00
Alexandre Arnt
c615f97362 - BugFix: Show progressbar with wait cursor. 2018-04-29 11:42:42 -03:00
Alexandre Arnt
d36e793864 - Updated translation. 2018-04-28 19:56:13 -03:00
Alexandre Arnt
f6fd67a33e Merge pull request #326 from alex47/master
Enable HiDPI icons
2018-04-28 09:58:06 -03:00
Alex Nemeth
b9958cafc9 Enable HiDPI icons 2018-04-28 11:39:46 +02:00
Alexandre Arnt
3849c5ad31 Update PKGBUILD
Removed "gist" from optional dependencies.
2018-04-26 17:43:11 -03:00
Alexandre Arnt
60bd2cd082 - Remove gist / Add ptpb support (thanks to demm). 2018-04-23 17:52:38 -03:00
ewilly
f9692ddd48 Pikaur : use --color=never 2018-04-22 21:49:30 +02:00
ewilly
5e29bc7145 Merge pull request #1 from aarnt/master
Merge from original
2018-04-22 18:32:04 +02:00
Alexandre Arnt
845311daf2 - BugFix: When you removed the only installed pkg while in AUR mode,
statusbar counters were not shown.
2018-04-21 21:44:23 -03:00
Alexandre Arnt
d35247c92a - BugFix: Show progress widget earlier in AUR (un)selection. 2018-04-21 19:38:54 -03:00
Alexandre Arnt
e8613527b6 BugFix: Exec internet tests before some commands. 2018-04-21 19:08:41 -03:00
ewilly
c053cf21a6 Added Pikaur (AUR tool) support 2018-04-03 22:08:27 +02:00
sheinz
e46725e998 Fixed processing multiple IgnorePkg/IgnoregGroup statements 2018-04-01 01:42:30 +03:00
Alexandre Arnt
27de3460cb - BugFix in test. 2018-03-31 19:17:12 -03:00
Alexandre Arnt
c067a37787 - Name of AUR package in Info tab act as link to its site at https://
aur.archlinux.org.
2018-03-31 18:51:40 -03:00
Alexandre Arnt
6bc18dd768 - Updated README.md file. 2018-03-31 14:48:35 -03:00
Alexandre Arnt
c9dbaebec4 - BugFix: Do not ask twice for password if a pacman lck file exists. 2018-03-31 14:23:04 -03:00
Alexandre Arnt
640d5633b4 - Added a couple of constants. 2018-03-31 12:19:23 -03:00
sheinz
b3887c8138 Concatenate multiple IgnorePkg/IgnoreGroup statements 2018-03-31 02:25:49 +03:00
Alexandre Arnt
14c69b0b53 - Updated translations. 2018-03-30 14:07:55 -03:00
Alexandre Arnt
13218919aa - BugFix: Do not disable AUR icon while in AUR mode. 2018-03-30 13:59:04 -03:00
Alexandre Arnt
465e23f98d - Added Trizen (AUR tool) support. 2018-03-30 13:43:56 -03:00
Alexandre Arnt
b578189f0d - Removed unused code. 2018-03-29 19:28:46 -03:00
Alexandre Arnt
fb7a1f9d6b - BugFix: Disable alien icon while in transaction. 2018-03-17 21:03:51 -03:00
Alexandre Arnt
3e3c6ae0fc Merge pull request #317 from scachemaille/scachemaille-patch-#315
Run octopi-repoeditor as normal user
2018-02-18 17:53:30 -03:00
Alexandre Arnt
eca942ec96 Merge pull request #313 from tim241/master
Fixed README.md
2018-02-15 11:12:31 -02:00
Stéphane
ff6c3c74e6 Run octopi-repoeditor as normal user
fix #315
2018-02-14 23:54:29 +01:00
Tim Wanders
9c886b1800 Update README.md 2018-02-13 17:46:27 +01:00
Alexandre Arnt
52e111f5ab - BugFix: QProcess was not calling "pacman" command anymore (at least
inside this service code). Had to add complete path to the command (a Qt
5.10 change).
2018-01-06 23:15:25 -02:00
Alexandre Arnt
669e85b63d - Updated CHANGELOG file. 2018-01-06 20:12:13 -02:00
Alexandre Arnt
035cd35ada - Bugfix in parser code. 2018-01-06 20:09:14 -02:00
Alexandre Arnt
fbe16eea44 - uncomment a code. 2018-01-06 19:23:06 -02:00
Alexandre Arnt
dab1bc3752 - Make "DO_NOT_USE_AUR" as default AUR tool :) 2018-01-06 18:45:34 -02:00
Alexandre Arnt
b48f4896e7 - Updated translations. 2018-01-06 18:10:52 -02:00
Alexandre Arnt
82acc74c24 - Back at using "pacman -Syy" in pacmanhelper.cpp. 2017-12-27 14:25:54 -02:00
Alexandre Arnt
8b4721320e Merge pull request #303 from Vincent43/patch-1
Support custom compiler flags in PKGBUILD
2017-12-19 10:10:21 -02:00
Vincent43
d0ec92cd24 Support custom compiler flags in PKGBUILD
Qmake doesn't honor user defined flags by default.
2017-12-16 11:02:18 +00:00
Alexandre Arnt
1759559de0 - Updated CHANGELOG file. 2017-12-03 14:26:04 -02:00
Alexandre Arnt
98c91ae853 Merge pull request #302 from dkorzhevin/master
Small syntax fixes
2017-12-10 18:32:44 -02:00
Alexandre Arnt
a401e12573 Updated termwidget related code. 2017-12-10 18:15:08 -02:00
Dmytro Korzhevin
2f45944be4 Update release-translations.sh 2017-12-06 17:36:25 +02:00
Dmytro Korzhevin
76aa51fa2e Small syntax fixes 2017-12-06 17:29:33 +02:00
Alexandre Arnt
28d85c366a - Comment history change. 2017-12-03 17:45:10 -02:00
Alexandre Arnt
3e303ce310 Refactorings. 2017-12-03 17:23:55 -02:00
Alexandre Arnt
e08f7a8815 - Added Terminal dialog in Notifier (AUR update) if user compiles
project with libqtermwidget5 support.
2017-12-03 16:32:15 -02:00
Alexandre Arnt
91e559e35f - New class: TermWidget, extending QTermWidget. 2017-12-03 13:06:09 -02:00
Alexandre Arnt
5d6c5771cb - Added Terminal tab if user compiles project with libqtermwidget5
support.
2017-12-03 02:19:31 -02:00
Alexandre Arnt
24cb7b2eaf - Updated translations. 2017-11-30 15:33:58 -02:00
Alexandre Arnt
69fd73301b - Added initial QTermWidget testing;
- Fixed a string bug in parser.
2017-12-02 17:51:40 -02:00
Alexandre Arnt
3d6928a391 - Refresh UI on install local pkg. 2017-12-01 22:32:55 -02:00
Alexandre Arnt
f56bbbc168 - Comment debug code. 2017-12-01 17:15:18 -02:00
Alexandre Arnt
673167059c - BugFix in aur code. 2017-12-01 15:20:35 -02:00
Alexandre Arnt
365ddc48ea - New code to remove colors from strings. 2017-12-01 13:19:41 -02:00
Alexandre Arnt
cda91af947 - Refactorings in UnixCommand class;
- Trying to debug pacaur error;
2017-11-30 20:20:30 -02:00
Alexandre Arnt
2fb2266d96 - Updated translations. 2017-11-30 12:39:37 -02:00
Alexandre Arnt
0f77565fdb - BugFix: Infinite wait cursor in Cache Cleaner when user press Enter
for more than two seconds in the spin boxes.
2017-11-30 12:22:59 -02:00
Alexandre Arnt
05c03ebdec - Now we save outputdialog window size and position;
- Removed some buggy str from parser.
2017-11-29 13:16:25 -02:00
Alexandre Arnt
c346876f94 - BugFix: kcp refresh was not showing pkg numbers at statusbar
sometimes;
- Updated translations;
2017-11-29 11:26:54 -02:00
Alexandre Arnt
497cc66ea4 - BugFix in package list column code;
- BugFix: do not show backend tab in optionsdialog if we do not have
alpm compiled code.
2017-11-28 20:23:27 -02:00
Alexandre Arnt
dfddcdcdcb - Refactorings. 2017-11-28 16:06:13 -02:00
Alexandre Arnt
139f3642aa - Make AUR button disable whenever user chooses a pkg group. 2017-11-28 15:53:04 -02:00
Alexandre Arnt
b6aab3a315 - Instantsearch fixes. 2017-11-28 13:01:20 -02:00
Alexandre Arnt
329fae945d - Instantsearch changes. 2017-11-28 15:03:33 -02:00
Alexandre Arnt
d14bb8ea31 - Updated translations. 2017-11-28 12:39:20 -02:00
Alexandre Arnt
23f0205037 - Instantsearch fixes. 2017-11-28 12:27:34 -02:00
Alexandre Arnt
4ad97ac0a1 - instantsearch fixes. 2017-11-28 12:08:48 -02:00
Alexandre Arnt
2d6d0f76b4 - instantsearch fixes. 2017-11-28 12:02:40 -02:00
Alexandre Arnt
ca25f656cb - InstantSearch fixes. 2017-11-28 11:58:42 -02:00
Alexandre Arnt
1fbcb598ce - KCP needs diff treat. 2017-11-28 10:55:56 -02:00
Alexandre Arnt
67e2e1f246 - BugFix: When user selected another search option, line edit was not
being cleared.
2017-11-28 10:39:27 -02:00
Alexandre Arnt
bb8636c5ee - bugfix in instant search behaviour. 2017-11-27 19:07:43 -02:00
Alexandre Arnt
1f4cee54f6 - BugFix: kcp pkg listing was not being printed. 2017-11-27 17:58:04 -02:00
Alexandre Arnt
7cd00bbc05 - Updated translations. 2017-11-27 12:45:46 -02:00
Alexandre Arnt
08b7ec4999 - Trying to behave better in AUR searches. 2017-11-27 17:25:03 -02:00
Alexandre Arnt
e8779ccbf6 - BugFix: Notifier's about dialog was never screen centered. 2017-11-27 12:41:35 -02:00
Alexandre Arnt
f94457f12c - Updated translation. 2017-11-27 10:08:34 -02:00
Alexandre Arnt
e9c6174942 - Added support for ESC key to close cachecleaner;
- Refactorings in mainwindow code.
2017-11-27 11:52:41 -02:00
Alexandre Arnt
d6fcc3cf56 - UI fix. 2017-11-26 20:45:04 -02:00
Alexandre Arnt
b09b9de684 - Disable stop transaction when synching db finds pkgfile str. 2017-11-27 10:31:54 -02:00
Alexandre Arnt
ff118927ed - Updated README.md file. 2017-11-27 10:03:07 -02:00
Alexandre Arnt
c36eb4095d - Updated translations;
- Use pkg numbers and stop transaction button as default config.
2017-11-26 22:33:26 -02:00
Alexandre Arnt
50a8036f4d - BugFix: No tooltip in notifier when green icon. 2017-11-26 22:23:41 -02:00
Alexandre Arnt
930fc5ac77 - Updated translations. 2017-11-26 22:04:35 -02:00
Alexandre Arnt
fb0947ae7c - We only search for outdated AUR pkgs if the option is enabled. 2017-11-26 21:53:52 -02:00
Alexandre Arnt
967a6328f9 - Never show stop transaction button if no progress bar visible;
- Do not check for outdated AUR pkgs if we have outdated standard ones
in notifier.
2017-11-26 20:11:29 -02:00
Alexandre Arnt
8ae9b55214 - Arch BSD now is PacBSD. 2017-11-26 19:34:29 -02:00
Alexandre Arnt
be36c2937b - Updated translations. 2017-11-26 19:25:00 -02:00
Alexandre Arnt
0dde2ab86e - Updated README.md file. 2017-11-26 19:11:55 -02:00
Alexandre Arnt
d54d3d8cd0 - Updated README.md file. 2017-11-26 19:08:32 -02:00
Alexandre Arnt
22622a7d71 Merge branch 'master' of https://github.com/aarnt/octopi 2017-11-26 19:05:09 -02:00
Alexandre Arnt
e0817e2fb0 - Overhaul in distro url news feeds. 2017-11-26 19:04:38 -02:00
Alexandre Arnt
f3898716f3 - Updated translations. 2017-11-26 17:15:37 -02:00
Alexandre Arnt
4eaca6c9b3 - Let's PacmanExec determines when the stop transaction button can
appear.
2017-11-26 16:23:28 -02:00
Alexandre Arnt
f09bfc7003 - Removed Arming as a green word. 2017-11-26 15:51:27 -02:00
Alexandre Arnt
d5d756d82d - BugFix in OptionsDialog UI. 2017-11-26 15:24:06 -02:00
Alexandre Arnt
941aece11e - Group pane now spans all window's height. 2017-11-26 14:49:05 -02:00
Alexandre Arnt
21953d09d4 - BugFix: Opens file selector in current file path. 2017-11-26 14:26:45 -02:00
Alexandre Arnt
9e4fa4b7a3 - BugFix: repoeditor now runs as normal user and asks for root password
on save;
- Added stop transaction button in notifier;
- BugFix: Forbid repoeditor root running.
2017-11-26 14:14:48 -02:00
Alexandre Arnt
347bd0ceb1 - Added option to enable/disable search for outdated AUR pkgs;
- Fixes in AUR code;
2017-11-25 19:27:37 -02:00
Alexandre Arnt
b8747195ed - Added General tab in optionsdialog code.
- BugFix in pkg counters code.
2017-11-25 16:33:20 -02:00
Alexandre Arnt
8800c47f55 - Updated translation;
- BugFix: new image.
2017-11-25 12:14:53 -02:00
Alexandre Arnt
e9773c1c86 - Added button after progressbar to stop current running transaction;
- BugFix: never let pkgcounter value be higher than numberofpkgs.
2017-11-25 12:01:22 -02:00
Alexandre Arnt
5289caadff - Returned to previous 'terminate transaction' code. 2017-11-25 02:06:41 -02:00
Alexandre Arnt
dd04860401 - Parser changes: added counter for processed packages.
- BugFix in optionsdialog code.
2017-11-25 01:33:50 -02:00
Alexandre Arnt
eed57cf144 - Added option to remove pacman db lock from notifier. 2017-11-20 19:30:17 -02:00
Alexandre Arnt
6e0ebe9fc0 - Get the info about instant search at loadSettings. 2017-11-20 18:07:06 -02:00
Alexandre Arnt
404a156f2b - Added "Search/Use Instant Search" toggle. 2017-11-20 17:39:30 -02:00
Alexandre Arnt
a699915ea7 - BugFixes in cancelProcess code. 2017-11-20 15:46:30 -02:00
Alexandre Arnt
fbc4b54811 - Do not sync nor upgrade in notifier if pacman db is locked. 2017-11-20 12:31:10 -02:00
Alexandre Arnt
a4de722874 - Reverted lineedit focus. 2017-11-20 12:12:48 -02:00
Alexandre Arnt
c82f3c02fc - BugFix: After outdated AUR pkg check, the pkg list lost current index
info.
2017-11-20 12:10:37 -02:00
Alexandre Arnt
17101da9b2 - BugFix: System upgrade shortcut changed to "ctrl+P" as "ctrl+U" is
used to cut text in QLineEdit widgets.
2017-11-20 11:25:54 -02:00
Alexandre Arnt
ccb1418a34 - Removed unused qml file. 2017-11-19 23:39:05 -02:00
Alexandre Arnt
0864632d9e - Changed most of "RegExp" code to "RegularExpression".
- BugFix: If Notifier hid Octopi and was closed, Octopi's window would
stay hidden.
2017-11-19 23:07:43 -02:00
Alexandre Arnt
7ca2f7e93e - BugFix: Anchor description was not working when there was a "<" char;
- BugFix: Reworked drag code;
- BugFix: orange strings must be caught before green ones!
2017-11-17 10:05:35 -02:00
Alexandre Arnt
be162818cb - Added support fo drag pacman packages to Octopi's mainwindow so they
can be installed.
2017-11-16 23:03:16 -02:00
Alexandre Arnt
a1759d85fa - BugFix for aurupgrade message. 2017-11-16 22:06:21 -02:00
Alexandre Arnt
af32397c04 - Added option to upgrade outdated foreign packages from Octopi
Notifier.
2017-11-16 20:49:22 -02:00
Alexandre Arnt
d74618d332 - Better way to kill running pacman transaction. 2017-11-16 16:09:50 -02:00
Alexandre Arnt
5c9be7cbd1 - Removed cleanCache (ctrl+shift+C) command, as we have octopi-cache-
cleaner for that!
2017-11-16 15:40:07 -02:00
Alexandre Arnt
4121c1e2a9 - BugFix: AUR tab in optionsdialog should honor which tool is installed
and disables it when not.
2017-11-16 15:34:03 -02:00
Alexandre Arnt
11fd4530ce - BugFix: When no AUR helper exists, the group of packages panel stayed
disabled.
2017-11-16 14:20:22 -02:00
Alexandre Arnt
b456284f75 - BugFix: Cache Cleaner now saves its window geometry. 2017-11-15 22:55:10 -02:00
Alexandre Arnt
122ae6a6ff - If we do not have more than 1 terminal, we do not show option to
change it.
2017-11-15 22:31:14 -02:00
Alexandre Arnt
e09727b56d - Updated translations 2017-11-15 22:15:10 -02:00
Alexandre Arnt
10c114a867 - Bugfixes when dealing with outdated aur pkgs. 2017-11-15 20:08:59 -02:00
Alexandre Arnt
a6bcf4ddbf - BugFix: Every time we change AUR tool we must refresh notifier icon. 2017-11-15 19:29:24 -02:00
Alexandre Arnt
b7936681cf - Add option to do not use an AUR tool. 2017-11-15 19:19:12 -02:00
Alexandre Arnt
e232c0bb5e - BugFix: check box too small. 2017-11-15 13:40:52 -02:00
Alexandre Arnt
e235be9895 - Added "pacman" info at Notifier's about dialog. 2017-11-15 13:35:11 -02:00
Alexandre Arnt
95d5debfee - Added configurable "--noconfirm" and "--noedit" options to pacaur and
"--noconfirm" to yaourt.
2017-11-15 13:21:54 -02:00
Alexandre Arnt
a274a3d9ae - Added "ctrl+Z" to cancel running transaction;
- BugFix: crash when sysupgrading with pacman lock file.
2017-11-14 17:11:04 -02:00
Alexandre Arnt
51e8d51562 - Code cleanup. 2017-11-14 12:09:53 -02:00
Alexandre Arnt
3ddf0118fc - Changed F12 behaviour to F11 key. 2017-11-14 11:56:26 -02:00
Alexandre Arnt
31f980ff4f - UI string fix. 2017-11-13 11:42:43 -02:00
Alexandre Arnt
dfb0dbfa90 - Updated translations. 2017-10-10 12:33:01 -03:00
Alexandre Arnt
9d566cc6c1 Merge pull request #297 from bwendell/master
Open Octopi if left click on SystemTray icon
2017-10-10 12:23:19 -03:00
Alexandre Arnt
0c2d4dddd5 Merge pull request #298 from totte/master
Update utils.cpp with the new address for the Chakra RSS feed
2017-09-08 13:14:39 -03:00
totte
e34c251523 Update utils.cpp with the new address for the Chakra RSS feed 2017-09-08 14:38:24 +02:00
Benjamin Wendell
8325cb6b43 Open Octopi if left click on SystemTray icon 2017-09-06 15:44:13 -07:00
Alexandre Arnt
7eead7588d - Updated translations. 2017-08-22 11:54:35 -03:00
Alexandre Arnt
ae100280e3 Merge branch 'master' of https://github.com/aarnt/octopi 2017-08-22 11:52:14 -03:00
Alexandre Arnt
5b951aac4f - Remove test code. 2017-08-22 11:51:42 -03:00
Alexandre Arnt
ff5cdadf4d Merge pull request #268 from bwendell/master
Remove empty error box in CacheCleaner
2017-08-21 10:56:25 -03:00
Alexandre Arnt
1e669d08a0 Merge pull request #295 from txe/fix-issue-235
BugFix: no outdated AUR packages detected
2017-08-21 10:55:35 -03:00
Evgenii Guryanov
c5ae8d2980 BugFix: no outdated AUR packages detected 2017-08-19 13:37:43 +03:00
Benjamin Wendell
ec8f49b0d7 Remove empty error box 2017-08-05 18:26:52 -07:00
Alexandre Arnt
a1b0a5ec97 - Updated translations. 2017-06-29 13:33:15 -03:00
Alexandre Arnt
487c80b475 - Updated translations. 2017-06-20 17:19:44 -03:00
Alexandre Arnt
cec926a090 - BugFix: squashed a warning compiling with clang :) 2017-06-16 13:56:18 -03:00
Alexandre Arnt
23623f9cee - Updated translations. 2017-06-16 10:58:25 -03:00
Alexandre Arnt
f92aa3426c - BugFix: sync packages was disabled when returnig to pkg list after
clicking AUR button.
2017-06-14 15:14:41 -03:00
Alexandre Arnt
989617366a - We must maintain "else" clause in case ALPM stop working. 2017-06-14 10:58:39 -03:00
Alexandre Arnt
96324d4595 - Removed unused strs. 2017-06-14 10:41:22 -03:00
Alexandre Arnt
17ba947380 - Updated translations. 2017-06-14 10:26:32 -03:00
Alexandre Arnt
bab0aa8ebc - Fix in aur refresh list. 2017-06-13 17:59:12 -03:00
Alexandre Arnt
b44226bea7 - Updated project file. 2017-06-13 12:55:51 -03:00
Alexandre Arnt
d56ebd1ff9 - Updated translations. 2017-06-13 10:52:22 -03:00
Alexandre Arnt
e034d1bf03 - BugFix in enable/disable action code. 2017-06-12 18:04:53 -03:00
Alexandre Arnt
e99ae35661 - Update translations. 2017-06-12 17:39:45 -03:00
Alexandre Arnt
d283de66b5 - BugFix in OptionsDialog text. 2017-06-12 17:16:20 -03:00
Alexandre Arnt
4d690d6ca8 - Bugfix in translatable text. 2017-06-12 15:42:33 -03:00
Alexandre Arnt
604ab88b09 - Added SU tool value analysis on startup. 2017-06-09 12:54:23 -03:00
Alexandre Arnt
cad306b6de - Implement "AUTOMATIC" for SU Tool value. 2017-06-09 11:21:30 -03:00
Alexandre Arnt
6363f7c386 - BugFix in OptionsDialog code. 2017-06-08 23:21:12 -03:00
Alexandre Arnt
c8abdc6343 - Bugfix in OptionsDialog. 2017-06-08 22:58:33 -03:00
Alexandre Arnt
9a12e9831b - Fixed KAOS condition. 2017-06-08 22:49:55 -03:00
Alexandre Arnt
d470485c49 - Removed unused code. 2017-06-08 22:40:30 -03:00
Alexandre Arnt
ad292fa496 - Added code for SU tool tab in OptionsDialog. 2017-06-08 22:31:47 -03:00
Alexandre Arnt
0f4cb05418 - Add more tabs to OptionsDialog. 2017-06-08 18:09:49 -03:00
Alexandre Arnt
3f3fb1e2ab - Removed some unused defines. 2017-06-07 14:37:48 -03:00
Alexandre Arnt
fc44e72bb1 - Fix for strconstants.cpp in pro files. 2017-06-07 10:27:44 -03:00
Alexandre Arnt
de915f748f - Add strconstants.cpp to project. 2017-06-06 12:12:26 -03:00
Alexandre Arnt
968f1f213d - Fix for string loss (in certain locales) in installation.log. 2017-05-16 13:01:09 -03:00
Alexandre Arnt
19eb70e425 - Fix for pacaur outdated list. 2017-05-05 15:08:08 -03:00
Alexandre Arnt
e5544644a7 Merge pull request #234 from flying-sheep/unicode-arrows
switched “->” to “→”
2017-05-04 13:17:54 -03:00
Philipp A
8781c23939 switched “->” to “→” 2017-05-04 10:32:13 +02:00
Alexandre Arnt
8e89cae659 - removed unused include. 2017-05-01 21:57:32 -03:00
Alexandre Arnt
a22f80c053 - Refactored method. 2017-05-01 18:51:08 -03:00
Alexandre Arnt
9a1d042fb8 - BugFix: 'yaourt' and 'pacaur' no longer honor "-a" option when
querying outdated foreign packages;
- Refactored getForeignRepositoryToolName method.
2017-05-01 18:44:10 -03:00
Alexandre Arnt
f7dbf97c53 - Useless assignment. 2017-04-29 23:18:20 -03:00
Alexandre Arnt
eb34d25272 - BugFix: No tools menu was shown when no tools available, but there was
'Options'!
2017-04-29 22:32:59 -03:00
Alexandre Arnt
d6a8313a19 - Modified KDE code for searchlineedit style sheet. 2017-04-18 17:44:21 -03:00
Alexandre Arnt
1020f7a498 - Updated CHANGELOG. 2017-04-18 15:29:48 -03:00
Alexandre Arnt
4232475053 - Updated some translations. 2017-04-18 15:11:47 -03:00
Alexandre Arnt
42d4126a5d Merge pull request #225 from mbb78/master
Change font family from "sansserif" to "Sans Serif"
2017-02-28 22:44:14 -03:00
Luís Coimbra
aa9f71cfd7 Change font family from "sansserif" to "Sans Serif"
Issue #222: Font family "sansserif" creates a conflict with Microsoft's font "SansSerif" if installed. Qt is unable to draw this font because of a bad cmap table. Aliases and substitutions by using fontconfig don't work, only blacklisting. Working formats include "sans serif" and "sans-serif". I went with "Sans Serif" to stay coherent with the patch applied by Manjaro Team.
2017-02-28 22:15:47 +00:00
Alexandre Arnt
18bccb8e5b - Find line edit is always focused when the program starts. 2017-02-22 17:16:06 -03:00
Alexandre Arnt
e3576c31a3 - BugFix: Forgot to call alpm_utils free code in alpmbackend.cpp.
- Removed unused notifier code.
2017-01-17 12:10:49 -02:00
Alexandre Arnt
53f06c0382 - BugFix: System upgrade button was not disabled while synching packages
in notifier;
- BugFix: searchlineedit font fix.
2017-01-12 14:57:22 -02:00
Alexandre Arnt
cfad0498b8 Merge pull request #215 from aarnt/revert-210-outputdialog-ui
Revert "Created ui file for OutputDialog"
2017-01-11 18:22:43 -02:00
Alexandre Arnt
24e3ad5ed5 Revert "Created ui file for OutputDialog" 2017-01-11 18:22:07 -02:00
Alexandre Arnt
7a2abbc325 Merge pull request #210 from flying-sheep/outputdialog-ui
Created ui file for OutputDialog
2017-01-11 13:31:24 -03:00
Alexandre Arnt
30adc49bc0 Merge branch 'master' into outputdialog-ui 2017-01-11 13:31:14 -03:00
Alexandre Arnt
c9cbafcf40 - Code cleanup at OptionsDialog. 2016-12-21 16:59:37 -02:00
Alexandre Arnt
80d5fed085 - Suppress translations of some interface itens. 2016-12-20 17:53:27 -02:00
Alexandre Arnt
d3a1a4bf1b - Added some comments in OptionsDialog. 2016-12-20 15:11:21 -02:00
Philipp A
b7560ca07b extracted more to UI files 2016-12-17 12:46:52 +01:00
Alexandre Arnt
0f814c8e16 - Updated OptionsDialog code. 2016-12-16 21:03:15 -02:00
Alexandre Arnt
e864ea1999 - Updated OptionsDialog code.
- Now Notifier calls OptionsDialog instead of SetupDialog.
2016-12-16 17:52:59 -02:00
Philipp A
89d47bf147 created ui file for OutputDialog 2016-12-16 19:29:07 +01:00
Alexandre Arnt
9929836cc4 - Updated OptionsDialog code. 2016-12-16 12:43:19 -02:00
Alexandre Arnt
0b31ebdee6 - Updated Options Dialog code.
- Added Tools/Options menu entry.
2016-12-15 18:00:20 -02:00
Alexandre Arnt
ff25031d1e - Updated Options Dialog code. 2016-12-14 18:02:19 -02:00
Alexandre Arnt
4a540cfd7b - Updated code in OptionsDialog. 2016-12-13 17:33:42 -02:00
Alexandre Arnt
bf39bfe921 - Added new OptionsDialog class/UI. 2016-12-12 17:22:59 -02:00
Alexandre Arnt
b95a8f985e - Changed default values in CacheCleaner. 2016-12-02 16:12:24 -02:00
Alexandre Arnt
144c3f2ed7 Merge pull request #205 from tsujan/fix_lxqt
Use lxqt-sudo under LXQt
2016-11-10 11:57:07 -02:00
Tsu Jan
bc5a017695 Use lxqt-sudo under LXQt
Fixes https://github.com/aarnt/octopi/issues/204.
2016-10-25 16:34:47 +03:30
Alexandre Arnt
0cff45f88c Merge branch 'master' of https://github.com/aarnt/octopi 2016-10-22 21:28:21 -02:00
Alexandre Arnt
b54f6904d4 - BugFix: Let's not forget the important "break" statement in switches,
so Octopi icons can change color.
2016-10-22 21:27:58 -02:00
Alexandre Arnt
7a2e7850ad Merge pull request #202 from scachemaille/patch-1
Make KSTATUS works with ALPM_BACKEND addition
2016-10-17 16:21:30 -02:00
Alexandre Arnt
4d0bc6caa9 - Fixed method name bug. 2016-10-17 07:11:11 -02:00
Alexandre Arnt
13bb6b516a - Updated code for App icon. 2016-10-16 21:31:19 -02:00
Stéphane
872d5fc7f7 Make KSTATUS works with ALPM_BACKEND addition
Makes KSTATUS definiton works with the addition of ALPM_BACKEND definition in the project file
2016-10-17 00:29:34 +02:00
Alexandre Arnt
13e19d0c16 - BugFix: Use right object to test AUR package size;
- Added Config Dialog core methods.
2016-10-16 16:05:16 -02:00
Alexandre Arnt
1d334f5e27 Merge branch 'master' of https://github.com/aarnt/octopi 2016-10-16 11:24:35 -02:00
Alexandre Arnt
a8e998993c BugFix: Whenever user syncs databases (notifier included), we set new
lastsynctime value in .conf.
2016-10-16 11:23:55 -02:00
Alexandre Arnt
dfaa9b0a00 Update README.md
Fixed ArchBang web site.
2016-10-13 13:09:19 -03:00
Alexandre Arnt
9b34e85cea - Removed a refresh code. 2016-10-03 11:21:17 -03:00
Alexandre Arnt
22f8b2b12f - Removed alpm_octopi_utils line. 2016-09-26 16:03:14 -03:00
Alexandre Arnt
cdea76dd14 - Notifier: Removed unneeded division from upgrade size. 2016-09-26 15:17:47 -03:00
Alexandre Arnt
88bee2da43 Merge pull request #199 from demmm/master
Move autostart to octopi-notifier.pro
2016-09-26 14:34:57 -03:00
demmm
e5b27d290b move autostart to octopi-notifier.pro 2016-09-26 12:21:39 -04:00
demmm
3cc847e532 Merge pull request #2 from aarnt/master
merge master
2016-09-26 16:18:12 +00:00
Alexandre Arnt
b97a2bbb6d - Moved .desktop file to correct place. 2016-09-26 13:05:24 -03:00
Alexandre Arnt
b390774d1b - Removed "Version 5.3" test in ".pro". 2016-09-26 12:46:04 -03:00
Alexandre Arnt
112e2783f8 Merge pull request #190 from demmm/master
Update build files
2016-09-26 12:27:07 -03:00
Alexandre Arnt
d69961746d - Added a separator "\". 2016-09-26 12:12:52 -03:00
demmm
494cb645bd license is gpl 2.0 2016-09-26 11:08:30 -04:00
Alexandre Arnt
2b1c527171 Update README.md
Update qmake to qmake-qt5
2016-09-26 10:37:01 -03:00
demmm
695b1ad660 move the .desktop install to the respective pro files 2016-09-26 01:46:06 -04:00
demmm
97d244cb4c add install section to all .pro files
remove lib section & most of bin section from octopi.pro
adjust PKGBUILD to use make install in each subdir
cp the needed .png in prepare, or ship in the resources dir?
2016-09-26 01:32:07 -04:00
Alexandre Arnt
a91978941d Updated README instructions 2016-09-25 15:40:21 -03:00
Alexandre Arnt
6564a2cebd Updated README instructions 2016-09-25 15:39:27 -03:00
Alexandre Arnt
2d1fe16358 Updated README instructions 2016-09-25 15:38:18 -03:00
demmm
56e1d5577c add octopi.png to pro file for install 2016-09-25 12:22:47 -04:00
demmm
67a4a6d85d adjusted PKGBUILD 2016-09-25 12:11:58 -04:00
demmm
a8bc660efa Merge pull request #1 from aarnt/master
Merge upstream changes
2016-09-25 15:51:18 +00:00
Alexandre Arnt
74d6b88fb0 - Added link support in all package lists at Info tab;
- BugFix: implement ALPM backend in notifier.
2016-09-25 12:36:05 -03:00
Alexandre Arnt
7b464f2f2e - Fix doc. 2016-09-24 22:10:42 -03:00
Alexandre Arnt
e43ceb07cc - Updated translations. 2016-09-24 22:03:54 -03:00
demmm
5f23e1bbd6 added install section to octopi.pro
this means package section in PKGBUILD is complete simplified
2016-09-02 18:06:00 -04:00
demmm
b6e53777bd Not a GTK app
Make it a generic desktop entry, not Gnome specific
Might need testing if this still works on a Gnome install
2016-09-01 17:51:12 -04:00
demmm
271c7e191f Update octopi.install
Remove parts that are replaced with pacman hooks
correct the remove systemctl call
2016-09-01 17:48:42 -04:00
demmm
ef2589b73b Redo PKGBUILD
Ship as one complete app
Remove obsolete startdir refs
Add knotifications & alpm_octopi_utils depends, show in the optional sed lines they can be removed
add system as group
stable release build does not have a git depend
2016-09-01 17:46:33 -04:00
Alexandre Arnt
a45ca53c2e - Moved alpm_octopi_utils to its own repository. 2016-08-31 18:13:40 -03:00
Alexandre Arnt
6b57c75bd6 - Add AUTHORS file. 2016-08-31 17:46:12 -03:00
Alexandre Arnt
014ef652ff - Added new subproject alpm_octopi_utils. 2016-08-31 17:36:03 -03:00
Alexandre Arnt
eeefd39035 - BugFix: Pkg Column width save/restore code. 2016-08-29 16:10:40 -03:00
Alexandre Arnt
a76e2daa0a - Added support for building the pkg list with alpm lib (plus a new
Download size column).
2016-08-28 21:01:49 -03:00
Alexandre Arnt
c33bbd30c6 - BugFix: Some pkg download/installed sizes were not showing properly at
Info tab.
2016-08-26 23:20:51 -03:00
Alexandre Arnt
1e7bbed24b - BugFix: If we find an outdated AUR pkg in the official pkg list, we
remove it.
2016-08-24 22:51:24 -03:00
Alexandre Arnt
37629fa69b - BugFix: If we find an outdated AUR pkg in the official pkg list, we
remove it.
2016-08-24 22:06:02 -03:00
Alexandre Arnt
51759fa6dd - BugFix: Using the alpm algorithm for package version comparison.
Previous code was reporting false newer packages.
2016-08-24 12:18:43 -03:00
Alexandre Arnt
deaa0f8911 Merge pull request #186 from Oxalin/master
Add an AUR filter submenu
2016-08-24 10:43:30 -03:00
Alexandre Demers
922b042914 Add an AUR filter submenu
Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com>
2016-08-23 23:27:53 -04:00
Alexandre Arnt
12c1295761 Merge pull request #185 from AlmAck/master
removed "--nofork" and "-c" option
2016-08-23 18:09:00 -03:00
AlmAck
7326de54c6 removed the "-c" option, pass directly the file with the instructions 2016-08-22 19:52:48 +02:00
AlmAck
9a6a03cf79 removed "--nofork" parameter, removed upstream with konsole >=16.08.0 2016-08-22 19:50:44 +02:00
Alexandre Arnt
cdea9b37a3 Merge pull request #184 from totte/master
Update source with the new address for Chakra
2016-08-22 12:18:09 -03:00
H W Tovetjärn
6e50e5adcb Update utils.cpp with new address for Chakra
The new address is chakralinux.org
2016-08-22 17:13:43 +02:00
H W Tovetjärn
ebb5aecc82 Update README.md with new address for Chakra
It's chakralinux.org now, rather than chakraos.org
2016-08-22 17:11:42 +02:00
Alexandre Arnt
b4c825b9c9 Merge pull request #182 from Pilzschaf/fix-issue-#180
Fix issue #180 shows the user a message box when close event is ignored
2016-08-18 15:58:39 -03:00
pilzschaf
e53d10d736 Improved indentation of code 2016-08-18 19:10:46 +02:00
pilzschaf
2701df7a9b Added message box when user tries to close octopi when there is a command executing. Fixes issue #180 2016-08-18 19:04:33 +02:00
Alexandre Arnt
f07959e06b BugFix: Install local packages did not work with space separated paths
(thanks to voanhcuoc for pointing it out).
2016-08-13 22:32:07 -03:00
Alexandre Arnt
9e710f3ec7 - Updated Croatian translation;
- Added default english translation to minimize translation work when
fixing string bugs;
2016-08-13 21:50:24 -03:00
Alexandre Arnt
28777174bc - BugFix: Optional dependencies dialog can now be resized and new value
is persisted on disk.
2016-08-06 19:31:09 -03:00
Alexandre Arnt
8fd614e8ca Merge branch 'master' of https://github.com/aarnt/octopi 2016-08-06 18:50:06 -03:00
Alexandre Arnt
2978da8b46 - Updated translations;
- BugFix: Max time in minutes for notification interval was not honoring
> 1380.
2016-08-06 18:49:29 -03:00
Alexandre Arnt
dfdb01424a Merge pull request #174 from philmmanjaro/patch-2
- Updated Manjaro RSS site
2016-07-30 08:45:01 -03:00
Philip Müller
632e58de8f - Updated Manjaro RSS site 2016-07-30 11:15:11 +02:00
Alexandre Arnt
752e52f75e - Added slovenian translation (thanks to the translation crew);
- Updated ukrainian translation.
2016-07-17 15:39:53 -03:00
Alexandre Arnt
ec6349230b - BugFix: Whenever we get a "pkgX: requires pkgY" upgrade bug, we show
the terminal to the user.
2016-07-17 15:22:21 -03:00
Alexandre Arnt
bb4512614b - Tries to do a manual sysupgrade when "pacman -Spu" prints a "breaks
dependency" string.
2016-06-26 19:09:33 -03:00
Alexandre Arnt
59140395e9 Merge pull request #171 from ccr-tools/master
Replace ccr with chaser
2016-06-08 15:08:45 -03:00
Alexandre Arnt
d051250a57 - Updated KaOS RSS site. 2016-06-08 15:05:22 -03:00
rshipp
a3687cbd21 Replace ccr with chaser 2016-06-06 19:12:45 -06:00
Alexandre Arnt
468fcd881c Merge pull request #168 from flying-sheep/noframe
Remove frame on output dialog
2016-05-25 21:24:08 -03:00
Philipp A
34f7ddd3bd Removing frame on output dialog 2016-05-25 09:56:45 +02:00
Alexandre Arnt
dea7426857 - Speed up the method. 2016-05-08 21:21:26 -03:00
Alexandre Arnt
fb117c4a65 - BugFix: Do not let some keys work when running a transaction... 2016-05-07 18:38:15 -03:00
Alexandre Arnt
8ca633171a - Added "Install Reason" field at Info tab;
- Prevent the user to install partial upgrades in his system (some of
the outdated packages).
2016-05-07 18:30:48 -03:00
Alexandre Arnt
c43008fed5 - Updated translations. 2016-05-05 22:51:50 -03:00
Alexandre Arnt
4a03666e82 - Another dev cycle begins...
- BugFix: About and System Upgrade dialogs could be opened twice in
notifier.
2016-04-08 19:04:15 -03:00
Alexandre Arnt
6d92b42636 Update README.md
Fixed wrong url in README.
2016-03-31 11:05:09 -03:00
483 changed files with 77016 additions and 28478 deletions

14
.gitignore vendored
View File

@@ -1,9 +1,21 @@
*.user
.qmake.stash
Makefile
bin/**
build/**
helper/*.o
helper/moc*.*
helper/octphelper
cachecleaner/bin/**
cachecleaner/build/**
notifier/bin/**
notifier/build/**
qrc_resources.cpp
octopi.pro.user
qrc_resources.cpp
repoeditor/bin/**
repoeditor/build/**
sudo/*.o
sudo/moc*.*
sudo/octopi-sudo
sudo/qrc*.cpp
sudo/ui_pass*.h

View File

@@ -6,3 +6,4 @@ file_filter = resources/translations/octopi_<lang>.ts
source_file = resources/translations/octopi_en.ts
source_lang = en
type = QT

212
CHANGELOG
View File

@@ -1,4 +1,160 @@
0.8.1
0.11 (dev)
Added support for CMake build system (thanks to Tereius).
Added support to build multiple foreign packages at once (they are first copied
to the Actions' tree view just like official packages).
Added "Open PKGBUILD" option to open the AUR PKGBUILD file in a text editor.
Added "Show PKGBUILD diff" option to show the differences between latest and previous
PKGBUILD files of the selected AUR package in a text editor.
Added "Install Date" at Info tab.
Added "Licenses", "Maintainer", "Depends On", "Make Deps", "Last Modified" and "Out-of-date"
fields at Info tab while in AUR mode.
Added option to display "Licenses", "Installed Size", "Build Date", "Install Date" and
"Install Reason" columns in the package list.
Added option to "Change Install Reason" of selected packages (Explicitly <-> As Dependency).
Added a faster refresh package list code after checking for updates.
Added "Build directory" option in AUR tab on options dialog, so users can change where
makepkg builds the source code.
Added support for '^' and '$' chars in AUR search
Added "Open news in a browser" option on right clicking the News tab.
Optional package dependencies are now installed with "--asdeps" parameter.
Octopi-sudo code was synced to match project "lxqt-sudo" version 0.16.0.
Updated PKGBUILD file following MatMoul's suggestion.
Removed unused speedup service.
Prevent users from running Octopi, Notifier and Cache Cleaner outside "/usr/bin" dir.
BugFix: Disable Info/Files tab refresh while typing in filter/search line edit.
BugFix: unset TMPDIR environment variable on every Octo tool startup
(to avoid "octopi-helper[aborted]: Couldn't attach to memory" errors).
BugFix: "total download size" showed the value 0 in Notifier if the database was not synched.
BugFix: Pressing ESC in repoeditor could ask if you wanted to save your changes even
if there were no changes made.
BugFix: Running Notifier within a DE session could lead to a "Suspicious execution method" error.
BugFix: If you tried to execute octopi after upgrading your system with notifier you got a
notifier crash and an octopi freeze (thanks to linuxer for pointing that out).
BugFix: Prevent icon changes in notifier when there were transaction errors.
BugFix: The list of targets to install were not showing ok in the transaction dialog.
BugFix: Restored support for command line parameters like "-sysupgrade-noconfirm" and "-style".
BugFix: Updated "-help" output text.
BugFix: Tab navigation improvements.
BugFix: Statusbar showed a number of packages when the list was empty (the previous value).
BugFix: Clicking on printed outdated packages in Output tab did not send to corresponding
package in the main list after a 'Check updates'.
BugFix: WM detection now uses "ps -aux".
0.10.0 (2020-07-19)
Added a built-in default priviledge escalation tool: "octopi-sudo" as a slightly modified version
of "lxqt-sudo" project (version 0.15.0). It's the only escalation tool supported!
Added option to vote/unvote for AUR packages using aur.archlinux.org login.
Added "pikaur" AUR tool support (thanks to ewilly).
Added "yay" AUR tool support.
Added option "--devel" in AUR tab to check for newer versions of dev packages.
Added option to download a temporary yay-bin to enable AUR.
Updated some UI icons and added an specific one for foreign non installed pkg.
Dropped support for external terminal applications. QTermWidget is mandatory now!
Print ".pacnew" file list summary after upgrade (if any).
Added Lumina desktop support.
RepoEditor now saves window size and position.
Added "copy" command to octopi's embedded terminal context menu.
Added option to enable/disable confirmation dialog in system upgrade.
Added option to enable/disable internet checking.
Renamed Transaction tab to Actions tab.
Added left click support on package icon in package list to launch context menu.
Added option to never check for package updates in Notifier.
Added tooltip "Upgrading..." while Notifier is upgrading the system.
Added "Info" option in package list context menu.
Added ArcoLinux, Artix Linux, CondresOS and EndeavourOS distro support.
Added support for sudo (and NOPASSWD) executing thru new octopi-helper subproject.
Added option to exit Octopi while a transaction is already running.
Added support for GNOME file manager/editor.
Added option for changing use of alternating row colors in package list.
Added a redesigned AUR tab in Options dialog.
Added option to change terminal's color scheme, font family and font size through ~/.config/octopi/octopi.conf.
Maximization of properties pane now hides tab bar.
BugFix: Many clazy/manual code enhancements merged from luis-pereira (from LXQt organization).
BugFix: AUR upgrades in notifier were not setting m_commandExecuting flag.
BugFix: Make notifier code consistent with AUR upgrades.
BugFix: Replaced 'Sync database' command text to 'Check updates'.
BugFix: Always do a "pacman -Syu" in System Upgrade.
BugFix: Notifier now uses "checkupdates" instead "pacman -Sy[y]". This means Octopi no longer can lead
the OS to a "partial updates" state and works gracefully with other package tools.
BugFix: Don't let user exits RepoEditor without answerig if he wants to save changes.
BugFix: Sometimes non-outdated AUR packages did not get refreshed.
BugFix: Now Actions tab is disable while in AUR mode.
BugFix: Make "Open terminal here" option work with qtermwidget.
BugFix: Added support for symbolic lynks in "open file".
BugFix: Pkg build date obeys Locale datetime format.
BugFix: SysInfo no longer pushes the collected logs to a remote paste service. It saves them locally.
BugFix: "exists in filesystem" messages during transactions are shown again.
BugFix: MultiselectionDialog did not resize pkg description automatically.
BugFix: Some packages were not displaying Optional Deps at Info tab.
BugFix: Huge delay when scrolling thru large package list.
BugFix: Speed improvements in package list building.
BugFix: OptionsDialog was not saving AUR settings if tab changed before clicking OK.
BugFix: Changed Manjaro news url.
BugFix: Notifier checked for available internet connection too early with an error dialog box.
BugFix: Changed command string to Reinstall/Update when package is already installed or outdated.
BugFix: Clear filter line edit when navigating thru package anchors at Info tab.
BugFix: Info and Files tabs were not showing any info automaticaly when switching between
foreign tool/pacman lists.
BugFix: Enable a more complete UI lockdown during transactions.
BugFix: Enable "Find a file" context menu option on a non installed pkg.
0.9.0 (2018-06-08)
Parser changes: added counter for processed packages.
Group pane now spans all window's height.
SysInfo now uses ptpb site and does not block interface.
Added Trizen (AUR tool) support.
Added Terminal tab if user compiles project with libqtermwidget5 support.
Added Terminal dialog in Notifier (AUR update) if user compiles project with
libqtermwidget5 support.
Added an Options dialog to Octopi and Notifier.
Added button after progressbar to stop current running transaction.
Added configurable "--noconfirm" and "--noedit" options to pacaur and "--noconfirm" to yaourt.
Added "Search/Use Instant Search" toggle.
Added slovenian translation (thanks to the translation crew).
Added support fo drag pacman packages to Octopi's mainwindow so they can be installed.
Added "Install Reason" field at Info tab.
Added support for ALPM utils lib (thanks to guinux, from Pamac project). So, now it's possible to
show "Download Size" in package list.
Added link support in all Info tab package lists.
Added option to upgrade outdated foreign packages from Octopi Notifier.
Added Hindi translation (thanks to Panwar108).
Name of AUR package in Info tab act as link to its site at https://aur.archlinux.org.
Search line edit is always focused when the program starts.
Prevent user to install partial upgrades in his system (ex: only some of the outdated packages).
Do NOT clear search string when switching between AUR/pacman.
BugFix: If threre are updated News after a synchronization, let's goto the News Tab.
BugFix: Remove only Octopi tools related temporary files (qtsingleapp*).
BugFix: Do not let program display an avalanche of internet related errors.
BugFix: Exec internet tests before some commands in Octopi and Notifier.
BugFix: Parser was not outputing repository errors when syncinc.
BugFix: repoeditor now runs as normal user and asks for root password on save.
BugFix: If Notifier hid Octopi and was closed, Octopi's window would stay hidden.
BugFix: Notifier's about dialog was never screen centered.
BugFix: When no AUR helper exists, the group of packages panel stayed disabled.
BugFix: Cache Cleaner now saves its window geometry.
BugFix: Infinite wait cursor in Cache Cleaner when user press Enter for more than two
seconds in the spin boxes.
BugFix: Some pkg download/installed sizes were not showing properly at Info tab.
BugFix: If we find an outdated AUR pkg in the official pkg list, we remove it.
BugFix: Install local packages did not work with space separated paths
(thanks to voanhcuoc for pointing it out).
BugFix: About and System Upgrade dialogs could be opened twice in notifier.
BugFix: Max time in minutes for notification interval was not honoring > 1380.
BugFix: Optional dependencies dialog can now be resized and new value is
persisted on disk.
BugFix: Using the alpm algorithm for package version comparison. Previous code
was reporting false newer packages.
BugFix: System upgrade button was not disabled while synching packages in notifier.
BugFix: searchlineedit font fix.
BugFix: 'yaourt' and 'pacaur' no longer honor "-a" option when querying outdated
foreign packages.
BugFix: System upgrade shortcut changed to "ctrl+P" as "ctrl+U" is used to cut text in
QLineEdit widgets.
BugFix: When user selected another search option, line edit was not being cleared.
BugFix: Disable alien icon while in transaction.
BugFix: Do not ask twice for password if a pacman lck file exists.
0.8.1 (2016-03-27)
BugFix: Updated CHAKRA RSS site (thanks to s8321414).
BugFix: Distro news now works with https KaOS site.
BugFix: Files tab was not refreshing when enabling KCP mode in KaOS.
@@ -21,7 +177,7 @@
Added support for lxqt-sudo tool (thanks to Manjaro team).
Added "pkgfile -u" (if available) in sync db transaction.
0.8.0
0.8.0 (2015-11-08)
This is a Qt5 only version (with the exception of 'octopi-notifier').
BugFix: Speed optimizations in startup code (AUR outdated list).
BugFix: Octopi now honors the $SHELL variable (thanks to LAC1213).
@@ -52,7 +208,7 @@
Help/About dialog now shows Pacman information.
StatusBar msg got updated with number of selected packages more visible.
0.7.0
0.7.0 (2015-04-27)
Major speed fix: Faster pkg list building.
Reverted to showing ALL packages at startup.
Added a systemd service to speed up the very first octopi startup time.
@@ -82,7 +238,7 @@
BugFix: If user had no gksu/kdesu/root when clicking "clean" button in
cachecleaner, cursor would remain waiting (thanks to imperator-).
0.6.0
0.6.0 (2015-02-27)
BugFix: Pkg list was being refreshed twice sometimes.
BugFix: Removed some buggy strings from Output tab while in KF5.
BugFix: ArrowUp/Down, PageUp/Down and Home/End keys now refresh Package Info tab.
@@ -110,7 +266,7 @@
Refactorings in SearchLineEdit.
BugFixes in RepoEditor translation support (repoeditor is now in Transifex too).
0.5.0
0.5.0 (2014-11-08)
BugFix: RepoEditor would not compile with Qt5 lib (thanks to Philm).
BugFix: Suppress GConf error strings in output.
BugFix: mate-terminal is returning code 255 even when execution of
@@ -136,14 +292,14 @@
Added support for KStatusNotifier while in KDE (thanks to brcha).
Updated translations.
0.4.2
0.4.2 (2014-07-26)
BugFix: when searching AUR pkgs, given search string was not being matched
by package descriptions.
BugFix: Sometimes got a gconf bug string at sync db.
Updated a bunch of translations.
Added support for the new kcp tool (Go version).
0.4.1
0.4.1 (2014-07-12)
Added basque translation (thanks to tarteka).
Added es_AR translation (thanks to javier).
Added japanese translation (thanks to UTUMI Hirosi - utuhiro78).
@@ -171,7 +327,7 @@
Added Search by file feature (pacman -Qo).
Added a string validator in the search edit widget.
0.4.0
0.4.0 (2014-05-24)
Huge refactorings in model/view that brings consistent memory and
speed improvements - a single model and a central data storage (thanks to
Thomas Binkau - tbinkau).
@@ -225,7 +381,7 @@
Fixed getBuildDate code to always convert dates to english format.
Updated some translations.
0.3.2
0.3.2 (2014-02-14)
Cleaned unused code.
Added icon for mirror-check while in KaOS.
Does a mirror-check at startup while in KaOS.
@@ -240,7 +396,7 @@
BugFix: When the user had no yaourt in the system, there were a zombie
octopi process 'left running'.
0.3.1
0.3.1 (2014-01-14)
Added support for Qt5.
Added chinese (Taiwan), malay, slovak and ukrainian translations.
Added support to KaOS, a lean KDE centric Linux distro.
@@ -251,7 +407,7 @@
first searches into transaction queue for them.
BugFix: Prevent header resizing in File and Transaction tabs.
0.3
0.3.0 (2013-11-03)
Code cleanings.
BugFix: No need to refresh package list after a cache clean.
BugFix: Konsole was not working with yaourt package installation.
@@ -298,7 +454,7 @@
Added an About Dialog to Octopi Notifier.
Updated translations.
0.2
0.2.0 (2013-08-24)
Splitted the project in "octopi" and "octopi-notifier".
Yaourt no longer runs with root permissions.
Added support for package multi selection in Yaourt mode.
@@ -319,23 +475,23 @@
IgnorePkg option is now used to build outdated package list.
BugFix: Empty pkg descriptions are now shown as empty.
0.1.9.1
0.1.9.1 (2013-07-14)
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
0.1.9 (2013-07-09)
Added yaourt support.
Updated most of the translations.
0.1.8
0.1.8 (2013-06-16)
Added czech translation.
Added support to ArchBang Linux.
Added a systemtray icon notifier feature using DBus technology.
0.1.7.3
0.1.7.3 (2013-05-26)
Added a TRANSLATIONS file.
Added danish translation.
Added indonesian translation.
@@ -345,14 +501,14 @@ terminal, the package actions remained disabled.
Bugfix: sysupgrade must refresh packagelist after syncdatabase.
Bugfix: if sysupgrade uses SyncFirst, makes it automatically start a second upgrade.
0.1.7.2
0.1.7.2 (2013-05-17)
Added catalan translation.
Bugfix: updated new binary translation files to the resources.
0.1.7.1
0.1.7.1 (2013-05-11)
Bugfix: menu icons were not being shown while in Xfce.
0.1.7
0.1.7 (2013-05-11)
Added "-sysupgrade" command line option.
Added "-removecmd" command line option.
Added lots of translations.
@@ -360,11 +516,11 @@ terminal, the package actions remained disabled.
Added an About dialog.
Changed the old About tab to Usage tab.
0.1.6.1
0.1.6.1 (2013-04-25)
Added pt_BR translation.
Added "Open root terminal" option in File menu.
0.1.6
0.1.6 (2013-04-12)
Added a new Transaction Dialog.
Added a Firefox-like search inside Files, News and About tabs.
Added support for Chakra.
@@ -372,33 +528,33 @@ terminal, the package actions remained disabled.
Added option to execute any transaction inside a terminal.
Changed ProgressDialog to a progressBar at the screen bottom.
0.1.5
0.1.5 (2013-04-06)
Added option to search packages by description and name.
Added support for pacman version 4.1.
Transactions with conflict errors can be re-executed inside a terminal.
Reworked Manjaro Linux theme.
0.1.4.1
0.1.4.1 (2013-03-30)
Bugfix release
Added total download size information in transaction dialog.
0.1.4
0.1.4 (2013-03-28)
Added a Manjaro Linux theme.
Changed position of filter line edit to the toolbar.
0.1.3
0.1.3 (2013-03-19)
Added better support to Qt dark themes.
Added context menu support inside Files tab.
Made URLs clickable inside Output tab.
Fixed the annoying Packager information display bug.
0.1.2
0.1.2 (2013-03-18)
Tons of refactorings and bugfixes.
Small changes in UI.
0.1.1
0.1.1 (2013-03-17)
Added all six tabs.
Added support for groups of packages.
0.1.0
0.1.0 (2013-03-11)
Initial Proof of Concept release.

116
CMakeLists.txt Normal file
View File

@@ -0,0 +1,116 @@
cmake_minimum_required(VERSION 3.5)
project(octopi VERSION 0.11.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_THREAD_PREFER_PTHREAD True)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_subdirectory(sudo)
add_subdirectory(helper)
add_subdirectory(notifier)
add_subdirectory(cachecleaner)
add_subdirectory(repoeditor)
find_package(Qt5 5.14.0 REQUIRED COMPONENTS Core Gui Network Xml Widgets LinguistTools)
find_package(qtermwidget5 REQUIRED)
find_package(alpm_octopi_utils REQUIRED)
set(CMAKE_AUTOMOC ON)
file(GLOB TS_FILES LIST_DIRECTORIES false "${CMAKE_CURRENT_LIST_DIR}/resources/translations/*.ts")
qt5_add_translation(qmFiles ${TS_FILES})
set(src
src/QtSolutions/qtsingleapplication.cpp
src/QtSolutions/qtlocalpeer.cpp
repoeditor/repoentry.cpp
src/aurvote.cpp
src/propertiestabwidget.cpp
src/qaesencryption.cpp
src/repoconf.cpp
src/main.cpp
src/mainwindow.cpp
src/strconstants.cpp
src/searchlineedit.cpp
src/argumentlist.cpp
src/settingsmanager.cpp
src/package.cpp
src/unixcommand.cpp
src/wmhelper.cpp
src/treeviewpackagesitemdelegate.cpp
src/mainwindow_init.cpp
src/mainwindow_transaction.cpp
src/mainwindow_events.cpp
src/mainwindow_help.cpp
src/searchbar.cpp
src/mainwindow_searchbar.cpp
src/transactiondialog.cpp
src/mainwindow_news.cpp
src/mainwindow_refresh.cpp
src/globals.cpp
src/multiselectiondialog.cpp
src/packagerepository.cpp
src/model/packagemodel.cpp
src/ui/octopitabinfo.cpp
src/utils.cpp
src/terminal.cpp
src/pacmanexec.cpp
src/optionsdialog.cpp
src/packagetreeview.cpp
src/termwidget.cpp
src/alpmbackend.cpp)
set(header
src/QtSolutions/qtsingleapplication.h
src/QtSolutions/qtlocalpeer.h
repoeditor/repoentry.h
src/aurvote.h
src/propertiestabwidget.h
src/qaesencryption.h
src/repoconf.h
src/mainwindow.h
src/strconstants.h
src/searchlineedit.h
src/argumentlist.h
src/settingsmanager.h
src/uihelper.h
src/package.h
src/unixcommand.h
src/wmhelper.h
src/treeviewpackagesitemdelegate.h
src/searchbar.h
src/transactiondialog.h
src/globals.h
src/multiselectiondialog.h
src/packagerepository.h
src/model/packagemodel.h
src/ui/octopitabinfo.h
src/utils.h
src/terminal.h
src/pacmanexec.h
src/constants.h
src/optionsdialog.h
src/packagetreeview.h
src/termwidget.h
src/alpmbackend.h)
set(ui ui/mainwindow.ui ui/transactiondialog.ui ui/multiselectiondialog.ui ui/optionsdialog.ui)
set(qrc resources.qrc)
qt5_wrap_ui(src ${ui})
qt5_add_resources(src ${qrc})
add_executable(octopi ${src} ${header} ${qmFiles})
target_compile_definitions(octopi PRIVATE OCTOPI_EXTENSIONS ALPM_BACKEND QT_DEPRECATED_WARNINGS QT_USE_QSTRINGBUILDER QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_FROM_BYTEARRAY)
target_include_directories(octopi PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
target_link_libraries(octopi PRIVATE Qt5::Core Qt5::Gui Qt5::Network Qt5::Xml Qt5::Widgets qtermwidget5 alpm_octopi_utils)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/resources/images/octopi_green.png" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
file(RENAME "${CMAKE_CURRENT_BINARY_DIR}/octopi_green.png" "${CMAKE_CURRENT_BINARY_DIR}/octopi.png")
install(TARGETS octopi RUNTIME DESTINATION bin LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/octopi.desktop" DESTINATION share/applications)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/octopi.png" "${CMAKE_CURRENT_SOURCE_DIR}/resources/images/octopi_green.png" DESTINATION share/icons/gnome/32x32/apps)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/octopi.png" "${CMAKE_CURRENT_SOURCE_DIR}/resources/images/octopi_green.png"
"${CMAKE_CURRENT_SOURCE_DIR}/resources/images/octopi_red.png" "${CMAKE_CURRENT_SOURCE_DIR}/resources/images/octopi_yellow.png" DESTINATION share/icons)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" DESTINATION share/licenses/octopi)

17
INSTALL
View File

@@ -1,6 +1,6 @@
Installing Octopi is a pretty straightforward task.
Assuming you have updated Qt4(*) libs installed in your system, all
Assuming you have updated Qt5 libs installed in your system, all
you have to do is run:
makepkg -f
@@ -8,21 +8,10 @@ you have to do is run:
Wait for the compilation and then install the generated package (as
root), using:
pacman -U [--force] <nameOfTheGeneratedOctopiPackage.tar.xz>
pacman -U <nameOfTheGeneratedOctopiPackage.tar.[xz|zst]>
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
Octopi is located on the system utilities menu of your Desktop
Environment.
Enjoy!
(*) Octopi is also Qt5 compatible, you'll only have to adjust the
"depends" section in PKGBUILD.
If you are compiling Octopi in a KDE centric-distro like KaOS and Chakra, you should
first uncomment the "#define NO_GTK_STYLE" string located at "src/main.cpp" and
"notifier/octopi-notifier/main.cpp", otherwise it won't compile at all.

139
PKGBUILD
View File

@@ -1,107 +1,52 @@
pkgname=('octopi' 'octopi-notifier' 'octopi-repoeditor' 'octopi-cachecleaner')
pkgver=0.8.1
pkgname=octopi
pkgver=0.11.0
pkgrel=1
pkgdesc="a powerful Pacman frontend using Qt libs"
pkgdesc="This is Octopi, a powerful Pacman frontend using Qt libs"
url="https://tintaescura.com/projects/octopi/"
arch=('i686' 'x86_64')
url="http://octopiproject.wordpress.com"
license=('GPL2')
install=$pkgname.install
depends=('alpm_octopi_utils' 'pkgfile' 'qtermwidget' 'sudo')
makedepends=('git')
depends=('qt4' 'qt5-quickcontrols' 'xterm')
optdepends=('kdesu: for KDE'
'gksu: for XFCE, Gnome, LXDE, Cinnamon'
'gnome-keyring: for password management'
'gist: for SysInfo report'
'yaourt: for AUR support'
'octopi-notifier: for notifications'
'pkgfile: to view uninstalled pkg contents in ArchLinux')
provides=('octopi')
md5sums=()
groups=('system')
install=octopi.install
source=("git+https://github.com/aarnt/octopi.git")
md5sums=('SKIP')
build() {
cpucount=$(grep -c processor /proc/cpuinfo 2>/dev/null)
jc=$((${cpucount:-1}))
#cd "$srcdir"
msg "Starting build..."
cd $startdir
qmake-qt5 $pkgname.pro
make -j $jc
cd $startdir/notifier/pacmanhelper
msg "Building pacmanhelper..."
qmake-qt5 pacmanhelper.pro
make -j $jc
cd $startdir/notifier/octopi-notifier
msg "Building octopi-notifier..."
qmake-qt4 octopi-notifier.pro
make -j $jc
cd $startdir/repoeditor
msg "Building octopi-repoeditor..."
qmake-qt5 octopi-repoeditor.pro
make -j $jc
cd $startdir/cachecleaner
msg "Building octopi-cachecleaner..."
qmake-qt5 octopi-cachecleaner.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
#speedup files
install -D -m755 $startdir/speedup/speedup-octopi.sh ${pkgdir}/usr/bin/speedup-octopi.sh
install -D -m644 $startdir/speedup/${pkgname}.service ${pkgdir}/etc/systemd/system/${pkgname}.service
#Pacmaneditor files
install -D -m755 $startdir/repoeditor/bin/octopi-repoeditor ${pkgdir}/usr/bin/octopi-repoeditor
#Cachecleaner files
install -D -m755 $startdir/cachecleaner/bin/octopi-cachecleaner ${pkgdir}/usr/bin/octopi-cachecleaner
install -D -m644 $startdir/cachecleaner/octopi-cachecleaner.desktop ${pkgdir}/usr/share/applications/octopi-cachecleaner.desktop
}
package_octopi-notifier() {
pkgdesc="Notifier for Octopi"
depends=('libnotify')
optdepends=('octopi: launch graphical package manager from tray'
'xfce4-notifyd: for notifications in XFCE')
#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
#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
}
package_octopi-repoeditor() {
pkgdesc="Repoeditor for Octopi"
prepare() {
cd "${pkgname}"
#Octopi-repoeditor file
install -D -m755 $startdir/repoeditor/bin/octopi-repoeditor ${pkgdir}/usr/bin/octopi-repoeditor
# enable the kstatus switch, disable if you wish to build without Plasma/knotifications support
sed -e "s|DEFINES += ALPM_BACKEND #KSTATUS|DEFINES += ALPM_BACKEND KSTATUS|" -i notifier/octopi-notifier.pro
cp resources/images/octopi_green.png resources/images/octopi.png
}
build() {
cd "${pkgname}"
echo "Starting build..."
qmake-qt5 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" octopi.pro
make
_subdirs="cachecleaner helper notifier repoeditor sudo"
for _subdir in $_subdirs; do
pushd $_subdir
echo "Building octopi-$_subdir..."
qmake-qt5 PREFIX=/usr QMAKE_CFLAGS="${CFLAGS}" QMAKE_CXXFLAGS="${CXXFLAGS}" QMAKE_LFLAGS="${LDFLAGS}" "octopi-$_subdir.pro"
make
popd
done
}
package_octopi-cachecleaner() {
pkgdesc="Cachecleaner for Octopi"
package() {
cd "${pkgname}"
make INSTALL_ROOT="${pkgdir}" install
#Octopi-cachecleaner file
install -D -m755 $startdir/cachecleaner/bin/octopi-cachecleaner ${pkgdir}/usr/bin/octopi-cachecleaner
install -D -m644 $startdir/cachecleaner/$pkgname.desktop ${pkgdir}/usr/share/applications/$pkgname.desktop
_subdirs="cachecleaner helper notifier repoeditor sudo"
for _subdir in $_subdirs; do
pushd $_subdir
make INSTALL_ROOT="${pkgdir}" install
popd
done
}

143
README.md
View File

@@ -1,57 +1,136 @@
## This is Octopi, a powerful Pacman/AUR frontend using Qt libs.
## This is Octopi, a powerful Pacman/AUR front end using Qt libs.
The project site is hosted at https://octopiproject.wordpress.com
![Main window](https://raw.githubusercontent.com/aarnt/octopi/master/octopi-mainwindow.png)
The project site is hosted on https://tintaescura.com/projects/octopi
Currently, 10 Linux distros are compatible with it
* [Antergos] (https://antergos.com/)
* [ArchBang] (http://wiki.archbang.org/index.php?title=Main_Page)
* [Arch] (https://www.archlinux.org/)
* [ArchBSD] (https://pacbsd.org/)
* [Chakra] (https://chakraos.org/)
* [KaOS] (http://kaosx.us/)
* [Manjaro] (http://manjaro.github.io/)
* [mooOS] (http://mooos.org/)
* [Netrunner (rolling)]
(http://www.netrunner.com/netrunner-rolling-release/)
* [Parabola GNU/Linux-libre] (http://www.parabola.nu/https/)
* [ArchBang](http://archbang.org/)
* [Arch Linux](https://www.archlinux.org/)
* [ArcoLinux](https://arcolinux.info/)
* [Artix Linux](https://artixlinux.org)
* [Chakra](https://chakralinux.org/)
* [CondresOS](https://condresos.codelinsoft.it/)
* [EndeavourOS](https://endeavouros.com/)
* [KaOS](https://kaosx.us/)
* [Manjaro](https://manjaro.org/)
* [Parabola GNU/Linux-libre](https://www.parabola.nu/)
### What you must install in your system to have Octopi fully functional
### What you must install in order to have Octopi fully functional
You'll need a privilege escalation tool to use it, once running as
root will ONLY work in KDE. Octopi supports gksu, kdesu and lxqt-sudo for
that.
You'll need:
* [Alpm_octopi_utils](https://github.com/aarnt/alpm_octopi_utils/) library
* A helper to execute pacman commands called "octphelper", available on "./helper" dir
* A privilege escalation tool called "octopi-sudo", available on "./sudo" dir
* qtermwidget >= 0.14.1 in order to build Octopi with embedded terminal support
### To install Octopi using pacman
### Simple steps to build Octopi code
Assuming you have Qt5 libs properly installed, go to the directory where the code is located:
If Octopi package is available in your distro's repository, you can just type:
```
$ cd OCTOPI_PATH
$ qmake
# pacman -S octopi
```
### Steps to build Octopi source code (qmake)
Assuming you have vala compiler and Qt5 libs properly installed, follow these steps:
```
$ git clone https://github.com/aarnt/alpm_octopi_utils
$ cd alpm_octopi_utils
$ make
# make install
$ cd ..
$ git clone https://github.com/aarnt/octopi
$ cd octopi/sudo
$ qmake-qt5
$ make
# make install
$ cd ../helper
$ qmake-qt5
$ make
# make install
$ cd ../notifier
$ qmake-qt5
$ make
# make install
$ cd ../cachecleaner
$ qmake-qt5
$ make
# make install
$ cd ../repoeditor
$ qmake-qt5
$ make
# make install
$ cd ..
$ qmake-qt5
$ make
# make install
```
You can also use the available PKGBUILD script that helps you build Octopi with all its tools:
```
$ cd OCTOPI_PATH
$ cd OCTOPI_PATH (where you git cloned the source code)
$ makepkg -f
```
### How to enable the "alien" icon at toolbar
### Steps to build Octopi source code (CMake)
To enable AUR support, you'll need to install "yaourt" or "pacaur" in your system.
In Chakra, "ccr" will be supported out of the box.
In KaOS, "kcp" will be supported out of the box.
As an alternative to qmake, Octopi can also be built with CMake. Make sure that at least CMake 3.5 is installed.
At first build and install alpm_octopi_utils.
```
$ git clone https://github.com/aarnt/alpm_octopi_utils
$ cd alpm_octopi_utils
$ mkdir build_dir && cd build_dir
$ cmake -G "Unix Makefiles" .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
$ make
$ sudo make install
```
After that build and install Octopi.
```
$ git clone https://github.com/aarnt/octopi
$ cd octopi
$ mkdir build_dir && cd build_dir
$ cmake -G "Unix Makefiles" .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
$ make
$ sudo make install
```
### To run Octopi
```
$ /usr/bin/octopi
```
### To run Octopi Notifier
```
$ /usr/bin/octopi-notifier
```
### To enable AUR support (that "green alien" icon on toolbar)
You'll need to install [pacaur](https://github.com/rmarquis/pacaur),
[pikaur](https://github.com/actionless/pikaur), [trizen](https://github.com/trizen/trizen) or
[yay](https://github.com/Jguer/yay) in your system.
If neither of the previous tools are found Octopi will download latest "yay-bin" github binary.
In Chakra, [chaser](https://github.com/ccr-tools/chaser) will be supported out of the box.
In KaOS, [kcp](https://github.com/bvaudour/kcp) will be supported out of the box.
### Ways to help/support Octopi
* You can "Star" it at the Github page - https://github.com/aarnt/octopi/star
* You can vote in the AUR package available at https://aur.archlinux.org/packages/octopi/
* You can translate it to your mother language at https://www.transifex.com/projects/p/octopi/
* You can follow author's twitter account at https://twitter.com/aaarnt
* You can buy author's technical book (currently in portuguese) about Octopi and Qt5 at
* You can "Star" it on the Github page - https://github.com/aarnt/octopi/
* You can vote in the AUR package available on https://aur.archlinux.org/packages/octopi/
* You can translate it to your mother language on https://www.transifex.com/projects/p/octopi/
* You can follow author's twitter account on https://twitter.com/aaarnt
* You can buy author's technical book (currently in portuguese) about Octopi and Qt5 on
http://www.amazon.com.br/Aprendendo-Qt-com-projeto-Octopi-ebook/dp/B015ICHKV6
* You can write a review about it (text / video)
* You can donate money to the project Paypal - http://sourceforge.net/donate/index.php?group_id=186459

View File

@@ -6,3 +6,4 @@ file_filter = resources/translations/octopi_cachecleaner_<lang>.ts
source_file = resources/translations/octopi_cachecleaner_en.ts
source_lang = en
type = QT

View File

@@ -0,0 +1,55 @@
find_package(Qt5 REQUIRED COMPONENTS Core Network Xml Widgets LinguistTools)
set(CMAKE_AUTOMOC ON)
file(GLOB TS_FILES LIST_DIRECTORIES false "${CMAKE_CURRENT_LIST_DIR}/resources/translations/*.ts")
qt5_add_translation(qmFiles ${TS_FILES})
set(src
main.cpp
cachecleaner.cpp
packagegroupmodel.cpp
../src/strconstants.cpp
../src/qaesencryption.cpp
../src/unixcommand.cpp
../src/wmhelper.cpp
../src/terminal.cpp
../src/settingsmanager.cpp
../src/searchlineedit.cpp
../src/utils.cpp
../src/package.cpp
../src/QtSolutions/qtsingleapplication.cpp
../src/QtSolutions/qtlocalpeer.cpp
#../src/QtSolutions/qtlockedfile.cpp
../src/QtSolutions/qtsinglecoreapplication.cpp)
set(header
cachecleaner.h
packagegroupmodel.h
../src/strconstants.h
../src/qaesencryption.h
../src/unixcommand.h
../src/wmhelper.h
../src/terminal.h
../src/settingsmanager.h
../src/searchlineedit.h
../src/utils.h
../src/package.h
../src/QtSolutions/qtsingleapplication.h
../src/QtSolutions/qtlocalpeer.h
#../src/QtSolutions/qtlockedfile.h
../src/QtSolutions/qtsinglecoreapplication.h)
set(ui ui/cachecleaner.ui)
set(qrc resources.qrc)
qt5_wrap_ui(src ${ui})
qt5_add_resources(src ${qrc})
add_executable(octopi-cachecleaner ${src} ${header} ${qmFiles})
target_compile_definitions(octopi-cachecleaner PRIVATE QT_USE_QSTRINGBUILDER QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_FROM_BYTEARRAY)
target_include_directories(octopi-cachecleaner PRIVATE ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/src/QtSolutions" ${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
target_link_libraries(octopi-cachecleaner PRIVATE Qt5::Core Qt5::Network Qt5::Xml Qt5::Widgets)
install(TARGETS octopi-cachecleaner RUNTIME DESTINATION bin LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/octopi-cachecleaner.desktop" DESTINATION share/applications)

View File

@@ -20,9 +20,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "cachecleaner.h"
#include "ui_cachecleaner.h"
#include "../src/strconstants.h"
#include <QKeyEvent>
#include <QTcpServer>
#include <QTcpSocket>
#include <QMessageBox>
/*
* CacheCleaner window constructor
*/
@@ -30,7 +34,6 @@ CacheCleaner::CacheCleaner(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::CacheCleaner)
{
//UI initialization
ui->setupUi(this);
@@ -40,19 +43,23 @@ CacheCleaner::CacheCleaner(QWidget *parent) :
int keepUninstalled = SettingsManager::getKeepNumUninstalledPackages();
ui->keepUninstalledPackagesSpinner->setValue(keepUninstalled);
//create package group wrappers
m_installed = new PackageGroupModel("",
m_installed = new PackageGroupModel(QLatin1String(""),
ui->installedPackagesList,
ui->keepInstalledPackagesSpinner,
ui->refreshInstalledButton,
ui->cleanInstalledButton);
m_uninstalled = new PackageGroupModel("-u",
m_uninstalled = new PackageGroupModel(QStringLiteral("-u"),
ui->uninstalledPackagesList,
ui->keepUninstalledPackagesSpinner,
ui->refreshUninstalledButton,
ui->refreshUninstalledButton,
ui->cleanUninstalledButton);
m_tcpServer = new QTcpServer(this);
connect(m_tcpServer, &QTcpServer::newConnection, this, &CacheCleaner::onSendInfoToOctopiHelper);
restoreGeometry(SettingsManager::getCacheCleanerWindowSize());
}
/*
@@ -65,11 +72,88 @@ CacheCleaner::~CacheCleaner()
delete ui;
}
/*
* Start listening for helper connections
*/
bool CacheCleaner::startServer()
{
bool res=true;
if (!m_tcpServer->listen(QHostAddress::LocalHost, 12703))
{
QMessageBox::critical(this, StrConstants::getApplicationName(),
QStringLiteral("Unable to start the server: %1.")
.arg(m_tcpServer->errorString()));
res=false;
}
return res;
}
/*
* Answers Helper if CacheCleaner is executing actions
*/
void CacheCleaner::onSendInfoToOctopiHelper()
{
QString msg;
QByteArray block;
QDataStream out(&block, QIODevice::WriteOnly);
out.setVersion(QDataStream::Qt_5_10);
//Is octopi-helper running?
bool isHelperExecuting=UnixCommand::isOctopiHelperRunning();
bool commandExecuting = (m_installed->isExecutingCommand || m_uninstalled->isExecutingCommand);
if (isHelperExecuting && commandExecuting)
{
msg=QLatin1String("Octopi est occupatus");
out << msg;
}
else if (isHelperExecuting && !commandExecuting)
{
msg=QLatin1String("Octopi serenum est");
out << msg;
}
else
{
msg=QLatin1String("Atramento nigro");
out << msg;
}
QTcpSocket *clientConnection = m_tcpServer->nextPendingConnection();
if (clientConnection->isOpen())
{
connect(clientConnection, &QAbstractSocket::disconnected,
clientConnection, &QObject::deleteLater);
clientConnection->write(block);
clientConnection->disconnectFromHost();
}
//m_installed->isExecutingCommand=false;
//m_uninstalled->isExecutingCommand=false;
}
/*
* Save settings when closing window
*/
void CacheCleaner::closeEvent(QCloseEvent *)
{
QByteArray windowSize=saveGeometry();
SettingsManager::setCacheCleanerWindowSize(windowSize);
SettingsManager::setKeepNumInstalledPackages(ui->keepInstalledPackagesSpinner->value());
SettingsManager::setKeepNumUninstalledPackages(ui->keepUninstalledPackagesSpinner->value());
}
/*
* Whenever user presses ESC, we quit the program
*/
void CacheCleaner::keyPressEvent(QKeyEvent *ke)
{
if (ke->key() == Qt::Key_Escape)
{
close();
}
}

View File

@@ -25,6 +25,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "packagegroupmodel.h"
class QTcpServer;
namespace Ui {
class CacheCleaner;
}
@@ -38,16 +40,21 @@ class CacheCleaner : public QMainWindow
private:
Ui::CacheCleaner *ui;
PackageGroupModel *m_installed;
PackageGroupModel *m_uninstalled;
QTcpServer *m_tcpServer;
private slots:
void onSendInfoToOctopiHelper();
public:
explicit CacheCleaner(QWidget *parent = 0);
~CacheCleaner();
bool startServer();
protected:
void closeEvent(QCloseEvent *);
void keyPressEvent(QKeyEvent *);
};
#endif // CACHECLEANER_H

View File

@@ -19,10 +19,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "cachecleaner.h"
#include "../src/strconstants.h"
#include "../src/QtSolutions/qtsingleapplication.h"
#include <QApplication>
#include <QMessageBox>
#include <QTranslator>
#include <QLocale>
#include <QLibraryInfo>
@@ -30,27 +31,59 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
int main( int argc, char *argv[] )
{
QtSingleApplication app( "Cache Cleaner - Octopi", argc, argv );
unsetenv("TMPDIR");
QtSingleApplication app( QStringLiteral("Cache Cleaner - Octopi"), argc, argv );
//If there is already an instance running...
if (app.isRunning())
{
app.sendMessage("RAISE");
app.sendMessage(QStringLiteral("RAISE"));
return 0;
}
app.sendMessage("RAISE");
app.sendMessage(QStringLiteral("RAISE"));
QTranslator appTranslator;
appTranslator.load(":/resources/translations/octopi_cachecleaner_" +
appTranslator.load(QLatin1String(":/resources/translations/octopi_cachecleaner_") +
QLocale::system().name());
app.installTranslator(&appTranslator);
if (UnixCommand::isRootRunning()){
QMessageBox::critical( 0, StrConstants::getApplicationName(), StrConstants::getErrorRunningWithRoot());
return (-2);
}
if (!UnixCommand::hasTheExecutable(QStringLiteral("paccache")))
{
QMessageBox::critical( 0, StrConstants::getApplicationName(), StrConstants::getExecutableCouldNotBeFound().arg(QStringLiteral("\"paccache\"")));
return (-3);
}
if (!QFile::exists(ctn_OCTOPI_HELPER_PATH))
{
qDebug() << "Aborting cache-cleaner as 'octphelper' binary could not be found! [" << ctn_OCTOPI_HELPER_PATH << "]";
return (-4);
}
if (!QFile::exists(ctn_OCTOPISUDO))
{
qDebug() << "Aborting cache-cleaner as 'octopi-sudo' binary could not be found! [" << ctn_OCTOPISUDO << "]";
return (-5);
}
if (!UnixCommand::isOctoToolRunning(QStringLiteral("octopi-cachecle")))
{
QMessageBox::critical(nullptr, StrConstants::getApplicationName(), StrConstants::getErrorRunOctopiCacheCleanerAsUsrBin());
return (-6);
}
CacheCleaner w;
app.setActivationWindow(&w);
w.show();
if (w.startServer())
{
app.setActivationWindow(&w);
w.show();
QResource::registerResource(QStringLiteral("./resources.qrc"));
QResource::registerResource("./resources.qrc");
return app.exec();
return app.exec();
}
}

View File

@@ -1,7 +1,7 @@
[Desktop Entry]
Name=Octopi CacheCleaner
Icon=octopi
Exec=octopi-cachecleaner
Exec=/usr/bin/octopi-cachecleaner
Terminal=false
Type=Application
Categories=GNOME;GTK;System;

View File

@@ -7,6 +7,14 @@
QT += core gui network xml widgets
CONFIG += qt console warn_on debug
# Disable automatic string conversions
DEFINES += QT_USE_QSTRINGBUILDER \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_TO_ASCII \
QT_NO_URL_CAST_FROM_STRING \
QT_NO_CAST_FROM_BYTEARRAY
TEMPLATE = app
DESTDIR += bin
OBJECTS_DIR += build
@@ -16,6 +24,7 @@ UI_DIR += build
HEADERS += cachecleaner.h \
packagegroupmodel.h \
../src/strconstants.h \
../src/qaesencryption.h \
../src/unixcommand.h \
../src/wmhelper.h \
../src/terminal.h \
@@ -32,6 +41,8 @@ HEADERS += cachecleaner.h \
SOURCES += main.cpp \
cachecleaner.cpp \
packagegroupmodel.cpp \
../src/strconstants.cpp \
../src/qaesencryption.cpp \
../src/unixcommand.cpp \
../src/wmhelper.cpp \
../src/terminal.cpp \
@@ -50,6 +61,7 @@ RESOURCES += resources.qrc
TRANSLATIONS += resources/translations/octopi_cachecleaner_pt_BR.ts \
resources/translations/octopi_cachecleaner_fr_FR.ts \
resources/translations/octopi_cachecleaner_fr.ts \
resources/translations/octopi_cachecleaner_es_ES.ts \
resources/translations/octopi_cachecleaner_es_419.ts \
resources/translations/octopi_cachecleaner_es_AR.ts \
@@ -66,6 +78,8 @@ TRANSLATIONS += resources/translations/octopi_cachecleaner_pt_BR.ts \
resources/translations/octopi_cachecleaner_da.ts \
resources/translations/octopi_cachecleaner_cs.ts \
resources/translations/octopi_cachecleaner_he.ts \
resources/translations/octopi_cachecleaner_hi.ts \
resources/translations/octopi_cachecleaner_hi_IN.ts \
resources/translations/octopi_cachecleaner_lt.ts \
resources/translations/octopi_cachecleaner_nb.ts \
resources/translations/octopi_cachecleaner_sr@latin.ts \
@@ -79,6 +93,7 @@ TRANSLATIONS += resources/translations/octopi_cachecleaner_pt_BR.ts \
resources/translations/octopi_cachecleaner_en_GB.ts \
resources/translations/octopi_cachecleaner_pt_PT.ts \
resources/translations/octopi_cachecleaner_sv.ts \
resources/translations/octopi_cachecleaner_sl.ts \
resources/translations/octopi_cachecleaner_hu.ts \
resources/translations/octopi_cachecleaner_zh_TW.ts \
resources/translations/octopi_cachecleaner_ms_MY.ts \
@@ -89,5 +104,28 @@ TRANSLATIONS += resources/translations/octopi_cachecleaner_pt_BR.ts \
resources/translations/octopi_cachecleaner_gl_ES.ts \
resources/translations/octopi_cachecleaner_ast.ts \
resources/translations/octopi_cachecleaner_hr.ts \
resources/translations/octopi_cachecleaner_zh-Hans.ts
resources/translations/octopi_cachecleaner_zh_CN.ts
resources/translations/octopi_cachecleaner_zh-Hans.ts \
resources/translations/octopi_cachecleaner_zh_CN.ts \
resources/translations/octopi_cachecleaner_ko.ts
# install
isEmpty(PREFIX) {
PREFIX = /usr
}
isEmpty(BINDIR) {
BINDIR = $$PREFIX/bin
}
isEmpty(DATADIR) {
DATADIR = $$PREFIX/share
}
target.path = $$BINDIR
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = .
desktop.path = $$DATADIR/applications
desktop.files += cachecleaner/octopi-cachecleaner.desktop
INSTALLS += target desktop

View File

@@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "packagegroupmodel.h"
#include "../src/strconstants.h"
#include <QSharedMemory>
#include <QApplication>
#include <QMessageBox>
@@ -49,6 +50,8 @@ PackageGroupModel::PackageGroupModel(QString optionsString,
{
m_cleanButton->setText(tr("Clean"));
m_sharedMemory=new QSharedMemory(QStringLiteral("org.arnt.octopi"), this);
//setup UI slots
connect( m_spinner, SIGNAL( valueChanged(int) ), SLOT( updateKeepArchives() ) );
connect( m_spinner, SIGNAL( valueChanged(int) ), SLOT( refreshCacheView() ) );
@@ -56,6 +59,8 @@ PackageGroupModel::PackageGroupModel(QString optionsString,
connect( m_refreshButton, SIGNAL( clicked() ), SLOT( refreshCacheView() ) );
connect( m_cleanButton, SIGNAL( clicked() ), SLOT( cleanCache() ) );
isExecutingCommand = false;
//refresh cache informations at startup
refreshCacheView();
}
@@ -65,6 +70,7 @@ PackageGroupModel::PackageGroupModel(QString optionsString,
*/
PackageGroupModel::~PackageGroupModel()
{
UnixCommand::removeSharedMemFiles();
delete m_acc;
delete m_cmd;
}
@@ -94,7 +100,7 @@ void PackageGroupModel::keepArchivesChanged()
*/
QString PackageGroupModel::getOptions()
{
return m_optionsString + " -k " + QString::number(m_spinner->value());
return m_optionsString + QLatin1String("-k ") + QString::number(m_spinner->value());
}
/*
@@ -102,6 +108,8 @@ QString PackageGroupModel::getOptions()
*/
void PackageGroupModel::refreshCacheView()
{
if (isExecutingCommand) return;
//update UI for background refresh
QApplication::setOverrideCursor(Qt::WaitCursor);
m_acc->reset();
@@ -115,7 +123,13 @@ void PackageGroupModel::refreshCacheView()
QObject::connect(m_cmd, SIGNAL( finished ( int, QProcess::ExitStatus )),
this, SLOT( finishedDryrun ( int, QProcess::ExitStatus )) );
m_cmd->executeCommandAsNormalUser("paccache -v -d " + getOptions());
QStringList sl;
sl << QStringLiteral("-v");
sl << QStringLiteral("-d");
QStringList opt = getOptions().split(QStringLiteral(" "), Qt::SkipEmptyParts);
sl << opt;
m_cmd->executeCommandAsNormalUser(QStringLiteral("/usr/bin/paccache"), sl);
isExecutingCommand = true;
}
/*
@@ -132,7 +146,7 @@ bool PackageGroupModel::isSUAvailable()
else if (WMHelper::getSUCommand() == ctn_NO_SU_COMMAND){
QMessageBox::critical( 0, StrConstants::getApplicationName(),
StrConstants::getErrorNoSuCommand() +
"\n" + StrConstants::getYoullNeedSuFrontend());
QLatin1String("\n") + StrConstants::getYoullNeedSuFrontend());
return false;
}
else
@@ -144,6 +158,8 @@ bool PackageGroupModel::isSUAvailable()
*/
void PackageGroupModel::cleanCache()
{
if (isExecutingCommand || UnixCommand::isPacmanDbLocked()) return;
if (!isSUAvailable())
return;
@@ -157,8 +173,10 @@ void PackageGroupModel::cleanCache()
QObject::connect(m_cmd, SIGNAL( finished ( int, QProcess::ExitStatus )),
this, SLOT( finishedClean( int, QProcess::ExitStatus )) );
QByteArray tmp = "paccache -r " + getOptions().toLatin1();
m_cmd->executeCommand(QLatin1String(tmp), ectn_LANG_USER_DEFINED);
isExecutingCommand = true;
const QString tmp = QLatin1String("paccache -r ") + getOptions();
//UnixCommand::removeTemporaryFiles();
m_cmd->executeCommandWithSharedMemHelper(tmp, m_sharedMemory);
}
/*
@@ -172,10 +190,12 @@ void PackageGroupModel::finishedDryrun(int exitCode, QProcess::ExitStatus)
QApplication::restoreOverrideCursor();
isExecutingCommand = false;
if(exitCode > 1)
{
//process failed, provide info on errors
QMessageBox::critical(m_listView, "Error whith the underlying process", m_acc->getErrors());
QMessageBox::critical(m_listView, QStringLiteral("Error whith the underlying process"), m_acc->getErrors());
}
else if (exitCode == 0)
{
@@ -198,10 +218,11 @@ void PackageGroupModel::finishedClean(int exitCode, QProcess::ExitStatus)
QApplication::restoreOverrideCursor();
isExecutingCommand = false;
if(exitCode != 0)
{
//process failed, provide info on errors
QMessageBox::critical(m_listView, "Error whith the underlying process",m_acc->getErrors());
//process failed, return to main window
m_refreshButton->setEnabled(true);
m_cleanButton->setEnabled(true);
}
@@ -218,9 +239,9 @@ void PackageGroupModel::finishedClean(int exitCode, QProcess::ExitStatus)
* @param output The output of the dryrun process
*/
void PackageGroupModel::processDryrunResult(QString output) {
QStringList lines = output.split(QRegExp("\\n"), QString::SkipEmptyParts);
QStringList lines = output.split(QRegularExpression(QStringLiteral("\\n")), Qt::SkipEmptyParts);
if(lines.length() == 1 || output.contains("*.pkg.tar?(.+([^.]))"))
if(lines.length() == 1 || output.contains(QLatin1String("*.pkg.tar?(.+([^.]))")))
{
//"==> no candidate packages found for pruning"
m_cleanButton->setText(tr("Clean"));
@@ -239,14 +260,14 @@ void PackageGroupModel::processDryrunResult(QString output) {
else if(i == lines.length() - 1)
{
//extract size from "==> finished dry run: 8 candidates (disk space saved: 19.11 MiB)")
QStringList components = line.split(" ");
QStringList components = line.split(QStringLiteral(" "));
QString unit = components.takeLast();
unit.remove(unit.length() - 1, 1);
QString size = components.takeLast();
m_cleanButton->setText(tr("Clean %1").arg(" " + size + " " + unit));
m_cleanButton->setText(tr("Clean %1").arg(QLatin1Char(' ') + size + QLatin1Char(' ') + unit));
}
else
m_listView->addItem(line);

View File

@@ -82,10 +82,12 @@ class PackageGroupModel : public QObject
private:
bool isSUAvailable();
QSharedMemory *m_sharedMemory;
public:
PackageGroupModel(QString, QListWidget *, QSpinBox *, QPushButton *, QPushButton *);
~PackageGroupModel();
bool isExecutingCommand;
protected:
QString m_optionsString;

View File

@@ -18,7 +18,10 @@
<file>resources/translations/octopi_cachecleaner_fi.qm</file>
<file>resources/translations/octopi_cachecleaner_fi_FI.qm</file>
<file>resources/translations/octopi_cachecleaner_fr_FR.qm</file>
<file>resources/translations/octopi_cachecleaner_fr.qm</file>
<file>resources/translations/octopi_cachecleaner_he.qm</file>
<file>resources/translations/octopi_cachecleaner_hi.qm</file>
<file>resources/translations/octopi_cachecleaner_hi_IN.qm</file>
<file>resources/translations/octopi_cachecleaner_hu.qm</file>
<file>resources/translations/octopi_cachecleaner_id.qm</file>
<file>resources/translations/octopi_cachecleaner_it.qm</file>
@@ -36,7 +39,9 @@
<file>resources/translations/octopi_cachecleaner_sr@latin.qm</file>
<file>resources/translations/octopi_cachecleaner_sr_RS.qm</file>
<file>resources/translations/octopi_cachecleaner_sv.qm</file>
<file>resources/translations/octopi_cachecleaner_sl.qm</file>
<file>resources/translations/octopi_cachecleaner_tr_TR.qm</file>
<file>resources/translations/octopi_cachecleaner_tr.qm</file>
<file>resources/translations/octopi_cachecleaner_uk.qm</file>
<file>resources/translations/octopi_cachecleaner_uz.qm</file>
<file>resources/translations/octopi_cachecleaner_vi.qm</file>
@@ -44,5 +49,6 @@
<file>resources/translations/octopi_cachecleaner_zh-Hans.qm</file>
<file>resources/translations/octopi_cachecleaner_zh_CN.qm</file>
<file>resources/translations/octopi_cachecleaner_hr.qm</file>
<file>resources/translations/octopi_cachecleaner_ko.qm</file>
</qresource>
</RCC>

View File

@@ -4,7 +4,7 @@
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation>Llimpiador de caché - Octopi</translation>
<translation>Llimpiador de la caché - Octopi</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
@@ -21,7 +21,7 @@
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="82"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="157"/>
<source>Number of old versions to keep</source>
<translation>Númberu de versiones vieyes pa caltener</translation>
<translation>Númberu de versiones vieyes a caltener</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>

View File

@@ -4,7 +4,7 @@
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation>Netejador de la cau (Cache) - Octopi</translation>
<translation>Netejador de la cau - Octopi</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>

View File

@@ -4,7 +4,7 @@
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation>Cache Renser - Octopi</translation>
<translation>Cache-renser - Octopi</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>

View File

@@ -4,7 +4,7 @@
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation>Cache säubern - Octopi</translation>
<translation>Zwischenspeicher säubern - Octopi</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>

View File

@@ -15,7 +15,7 @@
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="150"/>
<source>Keep :</source>
<translation>Säilytä</translation>
<translation>Säilytä:</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="82"/>

View File

@@ -40,12 +40,12 @@
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
<source>Clean</source>
<translation>Putsaa</translation>
<translation>Tyhjennä</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
<source>Clean %1</source>
<translation>Putsattu 1%</translation>
<translation>Tyhjennä %1</translation>
</message>
</context>
</TS>

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="fr" version="2.0">
<context>
<name>CacheCleaner</name>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation>Nettoyeur de cache - Octopi</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
<source>Uninstalled packages</source>
<translation>Paquets non installés</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="150"/>
<source>Keep :</source>
<translation>Conserver :</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="82"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="157"/>
<source>Number of old versions to keep</source>
<translation>Nombre d&apos;anciennes versions à conserver</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="183"/>
<source>Refresh</source>
<translation>Actualiser</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
<source>Installed packages</source>
<translation>Paquets installés</translation>
</message>
</context>
<context>
<name>PackageGroupModel</name>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
<source>Clean</source>
<translation>Nettoyer</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
<source>Clean %1</source>
<translation>Nettoyer %1</translation>
</message>
</context>
</TS>

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="hi" version="2.0">
<context>
<name>CacheCleaner</name>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation> - </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
<source>Uninstalled packages</source>
<translation> </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="150"/>
<source>Keep :</source>
<translation> :</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="82"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="157"/>
<source>Number of old versions to keep</source>
<translation> </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="183"/>
<source>Refresh</source>
<translation> ि </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
<source>Installed packages</source>
<translation> </translation>
</message>
</context>
<context>
<name>PackageGroupModel</name>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
<source>Clean</source>
<translation></translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
<source>Clean %1</source>
<translation>%1 </translation>
</message>
</context>
</TS>

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="hi_IN" version="2.0">
<context>
<name>CacheCleaner</name>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation> - </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
<source>Uninstalled packages</source>
<translation> </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="150"/>
<source>Keep :</source>
<translation> :</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="82"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="157"/>
<source>Number of old versions to keep</source>
<translation> </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="183"/>
<source>Refresh</source>
<translation> ि </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
<source>Installed packages</source>
<translation> </translation>
</message>
</context>
<context>
<name>PackageGroupModel</name>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
<source>Clean</source>
<translation></translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
<source>Clean %1</source>
<translation>%1 </translation>
</message>
</context>
</TS>

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ko" version="2.0">
<context>
<name>CacheCleaner</name>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation> - Octopi</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
<source>Uninstalled packages</source>
<translation> </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="150"/>
<source>Keep :</source>
<translation> :</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="82"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="157"/>
<source>Number of old versions to keep</source>
<translation> </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="183"/>
<source>Refresh</source>
<translation> </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
<source>Installed packages</source>
<translation> </translation>
</message>
</context>
<context>
<name>PackageGroupModel</name>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
<source>Clean</source>
<translation></translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
<source>Clean %1</source>
<translation>%1 </translation>
</message>
</context>
</TS>

View File

@@ -4,12 +4,12 @@
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation>Limpeza do Cache - Octopi</translation>
<translation>Limpador do Cache - Octopi</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
<source>Uninstalled packages</source>
<translation>Pacotes não instalados</translation>
<translation>Pacotes desinstalados</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>

View File

@@ -4,7 +4,7 @@
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation>Limpador de cache - Octopi</translation>
<translation>Limpar Cache - Octopi</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="sl" version="2.0">
<context>
<name>CacheCleaner</name>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation>Čistilnik predpomnilnika - Octopi</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
<source>Uninstalled packages</source>
<translation>Odstranjeni paketi</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="150"/>
<source>Keep :</source>
<translation>Obdrži:</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="82"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="157"/>
<source>Number of old versions to keep</source>
<translation>Število namestitvenih datotek za obržati</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="183"/>
<source>Refresh</source>
<translation>Osveži</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
<source>Installed packages</source>
<translation>Nameščeni paketi</translation>
</message>
</context>
<context>
<name>PackageGroupModel</name>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
<source>Clean</source>
<translation>Počisti</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
<source>Clean %1</source>
<translation>Počisti %1</translation>
</message>
</context>
</TS>

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.0">
<context>
<name>CacheCleaner</name>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation>Ön Bellek Temizleyici - Octupi</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
<source>Uninstalled packages</source>
<translation>Kaldırılmış paketler</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="150"/>
<source>Keep :</source>
<translation>Sakla:</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="82"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="157"/>
<source>Number of old versions to keep</source>
<translation>Saklanacak eski versiyonların sayısı</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="183"/>
<source>Refresh</source>
<translation>Yenile</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
<source>Installed packages</source>
<translation>Yüklenmiş paketler</translation>
</message>
</context>
<context>
<name>PackageGroupModel</name>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
<source>Clean</source>
<translation>Temizle</translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
<source>Clean %1</source>
<translation>Temiz %1</translation>
</message>
</context>
</TS>

View File

@@ -32,7 +32,7 @@
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
<source>Installed packages</source>
<translation>Установлені пакунки</translation>
<translation>Встановлені пакунки</translation>
</message>
</context>
<context>

View File

@@ -1,15 +1,15 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh-Hans" version="2.0">
<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_CN" version="2.0">
<context>
<name>CacheCleaner</name>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation> - Octopi</translation>
<translation> - Octopi </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
<source>Uninstalled packages</source>
<translation></translation>
<translation></translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="75"/>
@@ -21,7 +21,7 @@
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="82"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="157"/>
<source>Number of old versions to keep</source>
<translation></translation>
<translation></translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>
@@ -32,7 +32,7 @@
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
<source>Installed packages</source>
<translation></translation>
<translation></translation>
</message>
</context>
<context>

13
helper/CMakeLists.txt Normal file
View File

@@ -0,0 +1,13 @@
find_package(Qt5 REQUIRED COMPONENTS Core Network)
set(CMAKE_AUTOMOC ON)
set(src main.cpp octopihelper.cpp ../src/argumentlist.cpp)
set(header octopihelper.h ../src/argumentlist.h)
add_executable(octphelper ${src} ${header})
target_compile_definitions(octphelper PRIVATE QT_DEPRECATED_WARNINGS QT_USE_QSTRINGBUILDER QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_FROM_BYTEARRAY QT_NO_FOREACH)
target_include_directories(octphelper PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
target_link_libraries(octphelper PRIVATE Qt5::Core Qt5::Network)
install(TARGETS octphelper RUNTIME DESTINATION lib/octopi LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)

5
helper/README.md Normal file
View File

@@ -0,0 +1,5 @@
## OCTOPI-HELPER
This is a simple helper to execute octopi transactions. It aims to ease integration with sudo NOPASSWD switch.
NOPASSWD mode will *ONLY* work with integrated ["octopi-sudo"](https://github.com/aarnt/octopi/tree/master/sudo) root escalation tool.

67
helper/main.cpp Normal file
View File

@@ -0,0 +1,67 @@
/*
* This file is part of Octopi, an open-source GUI for pacman.
* Copyright (C) 2019 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 "octopihelper.h"
#include "../src/argumentlist.h"
#include <unistd.h>
#include <QCoreApplication>
#include <QTextStream>
bool isRootRunning()
{
int uid = geteuid();
return (uid == 0);
}
int main(int argc, char *argv[])
{
ArgumentList *argList = new ArgumentList(argc, argv);
if (argList->getSwitch(QStringLiteral("-version")))
{
QTextStream qout(stdout);
qout << "octopi-helper: version " << ctn_OCTOPI_HELPER_VERSION << Qt::endl;
return 0;
}
if (!isRootRunning())
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Only root can run..." << Qt::endl;
return ctn_NO_ROOT_RUNNING;
}
QCoreApplication a(argc, argv);
unsetenv("TMPDIR");
OctopiHelper helper;
if (argList->getSwitch(QStringLiteral("-ts")))
{
return helper.executePkgTransactionWithSharedMem();
}
else
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Suspicious execution method" << Qt::endl;
return ctn_SUSPICIOUS_EXECUTION_METHOD;
}
}

49
helper/octopi-helper.pro Normal file
View File

@@ -0,0 +1,49 @@
QT -= gui
QT += core network
CONFIG += c++11 console
CONFIG -= app_bundle
TARGET = octphelper
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# Disable automatic string conversions
DEFINES += QT_USE_QSTRINGBUILDER \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_TO_ASCII \
QT_NO_URL_CAST_FROM_STRING \
QT_NO_CAST_FROM_BYTEARRAY \
QT_NO_FOREACH
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
HEADERS += \
../src/argumentlist.h \
octopihelper.h
SOURCES += \
main.cpp \
../src/argumentlist.cpp \
octopihelper.cpp
# install
isEmpty(PREFIX) {
PREFIX = /usr
}
isEmpty(LIBDIR) {
LIBDIR = $$PREFIX/lib
}
target.path = $$LIBDIR/octopi
sources.files = $$SOURCES $$HEADERS *.pro
sources.path = .
INSTALLS += target

521
helper/octopihelper.cpp Normal file
View File

@@ -0,0 +1,521 @@
/*
* This file is part of Octopi, an open-source GUI for pacman.
* Copyright (C) 2019 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 "../src/constants.h"
#include "octopihelper.h"
#include <QProcess>
#include <QDir>
#include <QObject>
#include <QTextStream>
#include <QSharedMemory>
#include <QRegularExpression>
#include <QStringLiteral>
#include <QTcpSocket>
#include <QDataStream>
#include <QFile>
#include <QSettings>
QFile *OctopiHelper::m_temporaryFile = nullptr;
/*
* Removes temporary transaction files
*/
void removeTemporaryFiles()
{
QDir tempDir(QDir::tempPath());
QStringList nameFilters;
nameFilters << QStringLiteral(".qt_temp_octopi*");
const QFileInfoList list = tempDir.entryInfoList(nameFilters, QDir::Dirs | QDir::Files | QDir::System | QDir::Hidden);
for(const auto &file : list){
QFile fileAux(file.filePath());
if (!file.isDir()){
fileAux.remove();
}
else{
QDir dir(file.filePath());
const QFileInfoList listd = dir.entryInfoList(QDir::Files | QDir::System);
for(const auto &filed : listd){
QFile fileAuxd(filed.filePath());
fileAuxd.remove();
}
dir.rmdir(file.filePath());
}
}
}
/*
* Returns the SHELL environment variable, if not set defaults to bash.
*/
QString getShell()
{
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
QString shell = env.value(QStringLiteral("SHELL"), QStringLiteral("/usr/bin/bash"));
QFileInfo fi(shell);
if (fi.fileName() == QLatin1String("fish"))
return QStringLiteral("/usr/bin/bash");
else
return fi.fileName();
}
/*
* If justOneInstance = false (default), returns TRUE if one instance of the app is ALREADY running
* Otherwise, it returns TRUE if the given app is running.
*/
bool isAppRunning(const QString &appName, bool justOneInstance)
{
QStringList slParam;
QProcess proc;
slParam << QStringLiteral("-C");
slParam << appName;
proc.start(QStringLiteral("/usr/bin/ps"), slParam);
proc.waitForFinished();
QString out = QString::fromUtf8(proc.readAll());
proc.close();
if (justOneInstance)
{
if (out.count(appName)>0)
return true;
else
return false;
}
else
{
if (out.count(appName)>1)
return true;
else
return false;
}
}
OctopiHelper::OctopiHelper()
{
//If old helper still exists, let's remove it
if (QFileInfo::exists(QStringLiteral("/usr/lib/octopi/octopi-helper")))
QFile::remove(QStringLiteral("/usr/lib/octopi/octopi-helper"));
m_exitCode = -9999;
m_process = new QProcess();
//m_suspiciousChars = QStringLiteral("(\\s|[][!#$&'()*,;<=+>?\\^`{}|~])");
m_suspiciousChars = QStringLiteral("[!#$&'()*,;<=>?\\^`{}|~\\[\\]]");
//These settings enable all "pacman" output go thru QProcess output methods
m_process->setProcessChannelMode(QProcess::ForwardedChannels);
m_process->setInputChannelMode(QProcess::ForwardedInputChannel);
}
OctopiHelper::~OctopiHelper()
{
m_process->close();
if (m_temporaryFile != nullptr)
QFile::remove(m_temporaryFile->fileName());
removeTemporaryFiles();
}
/*
* Logs passed str in a file called "octphelper.log" (for debugging purposes)
*/
void OctopiHelper::log(const QString &str)
{
QString fname = QStringLiteral("/usr/lib/octopi/octphelper.log");
QFile file(fname);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
return;
QTextStream out(&file);
out << str << Qt::endl;
file.flush();
file.close();
}
/*
* A bit of settings to better run "pacman" commands using QProcess
*/
QProcessEnvironment OctopiHelper::getProcessEnvironment()
{
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.remove(QStringLiteral("LANG"));
env.remove(QStringLiteral("LC_MESSAGES"));
env.insert(QStringLiteral("LANG"), QStringLiteral("C"));
env.insert(QStringLiteral("LC_MESSAGES"), QStringLiteral("C"));
env.remove(QStringLiteral("COLUMNS"));
env.insert(QStringLiteral("COLUMNS"), QStringLiteral("132"));
return env;
}
/*
* Retrieves Proxy_Settings config from "/root/.config/octopi/octopi.conf"
*/
QString OctopiHelper::getProxySettings()
{
QSettings settings(QSettings::UserScope, ctn_ORGANIZATION, ctn_APPLICATION);
return (settings.value(ctn_KEY_PROXY_SETTINGS, QLatin1String("")).toString());
}
/*
* Checks if Octopi/Octopi-notifier, cache-cleaner, etc is being executed
*/
bool OctopiHelper::isOctoToolRunning(const QString &octoToolName)
{
bool res=false;
QProcess proc;
proc.setProcessEnvironment(getProcessEnvironment());
QStringList sl;
sl << QStringLiteral("-C");
sl << octoToolName;
sl << QStringLiteral("-o");
sl << QStringLiteral("command");
proc.start(QStringLiteral("/usr/bin/ps"), sl);
proc.waitForFinished();
QString out = QString::fromUtf8(proc.readAll().trimmed());
if (out.contains(QLatin1String("|"))) return false;
out=out.remove(QStringLiteral("\n"));
out=out.remove(QStringLiteral("COMMAND"));
if (octoToolName==QLatin1String("octopi-cachecle"))
{
if (out == QLatin1String("/usr/bin/octopi-cachecleaner")) res=true;
}
else
{
QStringList options;
options << QStringLiteral("/usr/bin/octopi-notifier -d");
options << QStringLiteral("/usr/bin/octopi -d");
options << QStringLiteral("/usr/bin/octopi -sysupgrade");
options << QStringLiteral("/usr/bin/octopi -sysupgrade-noconfirm");
//QRegularExpression re(QStringLiteral("(/usr/bin/octopi-notifier -session )[a-fA-F0-9_]+"));
QRegularExpression re(QStringLiteral("(/usr/bin/octopi-notifier.*)"));
QRegularExpressionMatch match = re.match(out);
bool hasMatchInSession = match.capturedLength()==out.length();
re=QRegularExpression(QStringLiteral("(/usr/bin/octopi -style )\\S+"));
match = re.match(out);
bool hasMatchInStyle = match.capturedLength()==out.length();
if (out == QLatin1String("/usr/bin/") + octoToolName ||
(options.indexOf(out)!=-1) ||
(hasMatchInSession) ||
(hasMatchInStyle)) res=true;
}
return res;
}
/*
* Executes all commands inside Octopi's SharedMemory - "octopi-helper -ts"
*/
int OctopiHelper::executePkgTransactionWithSharedMem()
{
bool isOctopiRunning=isOctoToolRunning(QStringLiteral("octopi"));
bool isNotifierRunning=isOctoToolRunning(QStringLiteral("octopi-notifier"));
bool isCacheCleanerRunning=isOctoToolRunning(QStringLiteral("octopi-cachecle"));
if(!isOctopiRunning &&
!isNotifierRunning &&
!isCacheCleanerRunning)
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Suspicious execution method" << Qt::endl;
return ctn_SUSPICIOUS_EXECUTION_METHOD;
}
//Let's retrieve commands from sharedmem pool
QSharedMemory *sharedMem = new QSharedMemory(QStringLiteral("org.arnt.octopi"), this);
if (!sharedMem->attach(QSharedMemory::ReadOnly))
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Couldn't attach to memory" << Qt::endl;
return ctn_COULD_NOT_ATTACH_TO_MEM;
}
QByteArray sharedData(sharedMem->size(), '\0');
sharedMem->lock();
memcpy(sharedData.data(), sharedMem->data(), sharedMem->size());
sharedMem->unlock();
QString contents=QString::fromLatin1(sharedData);
sharedMem->detach();
delete sharedMem;
bool suspicious = false;
if (contents.isEmpty() || contents.contains(QRegularExpression(m_suspiciousChars)))
suspicious = true;
if (suspicious)
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Suspicious transaction detected -> \"" << contents << "\"" << Qt::endl;
return ctn_SUSPICIOUS_ACTIONS_FILE;
}
const QStringList lines = contents.split(QStringLiteral("\n"), Qt::SkipEmptyParts);
bool testCommandFromOctopi=false;
bool testCommandFromNotifier=false;
bool testCommandFromCacheCleaner=false;
for(auto line : lines)
{
line = line.trimmed();
if ((line == QLatin1String("killall pacman")) ||
(line == QLatin1String("rm ") + ctn_PACMAN_DATABASE_LOCK_FILE) ||
(line == QLatin1String("echo -e")) ||
(line == QLatin1String("echo \"Press any key to continue...\"")) ||
(line == QLatin1String("read -n 1 -p \"Press any key to continue...\"")) ||
(line == QLatin1String("pkgfile -u")) ||
(line == QLatin1String("paccache -r -k 0")) ||
(line == QLatin1String("paccache -r -k 1")) ||
(line == QLatin1String("paccache -r -k 2")) ||
(line == QLatin1String("paccache -r -k 3")) ||
(line == QLatin1String("pacman -Syu")) ||
(line == QLatin1String("pacman -Syu --noconfirm")) ||
(line.startsWith(QLatin1String("pacman -D --asexplicit "))) ||
(line.startsWith(QLatin1String("pacman -D --asdeps "))) ||
(line.startsWith(QLatin1String("pacman -S "))) ||
(line.startsWith(QLatin1String("pacman -R "))))
{
if (line.startsWith(QLatin1String("pacman -D --asexplicit ")) ||
line.startsWith(QLatin1String("pacman -D --asdeps ")) ||
line.startsWith(QLatin1String("pacman -S ")) ||
line.startsWith(QLatin1String("pacman -R ")))
{
testCommandFromOctopi=true;
}
else if (line.startsWith(QLatin1String("pacman -Syu")))
{
testCommandFromOctopi=true;
testCommandFromNotifier=true;
}
else if (line.startsWith(QLatin1String("paccache -r -k")))
{
testCommandFromCacheCleaner=true;
}
}
else
{
suspicious = true;
}
if (suspicious)
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Suspicious transaction detected -> \"" << line << "\"" << Qt::endl;
//log(QStringLiteral("Offending line: ") + line);
return ctn_SUSPICIOUS_ACTIONS_FILE;
}
}
//Using full path binaries
contents = contents.replace(QLatin1String("killall pacman"), QLatin1String("/usr/bin/killall pacman"));
contents = contents.replace(QLatin1String("rm ") + ctn_PACMAN_DATABASE_LOCK_FILE, QLatin1String("/usr/bin/rm ") + ctn_PACMAN_DATABASE_LOCK_FILE);
contents = contents.replace(QLatin1String("pkgfile -u"), QLatin1String("/usr/bin/pkgfile -u"));
contents = contents.replace(QLatin1String("paccache -r"), QLatin1String("/usr/bin/paccache -r"));
contents = contents.replace(QLatin1String("pacman -Syu"), QLatin1String("/usr/bin/pacman -Syu"));
contents = contents.replace(QLatin1String("pacman -D "), QLatin1String("/usr/bin/pacman -D "));
contents = contents.replace(QLatin1String("pacman -S "), QLatin1String("/usr/bin/pacman -S "));
contents = contents.replace(QLatin1String("pacman -R "), QLatin1String("/usr/bin/pacman -R "));
//If there is a "pacman" process executing elsewhere, let's abort octopi-helper!
if (contents != QLatin1String("/usr/bin/killall pacman\n/usr/bin/rm ") + ctn_PACMAN_DATABASE_LOCK_FILE +QLatin1Char('\n') && isAppRunning(QStringLiteral("pacman"), true))
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Pacman process already running" << Qt::endl;
return ctn_PACMAN_PROCESS_EXECUTING;
}
if (testCommandFromOctopi)
{
if (!isOctopiRunning && !testCommandFromNotifier)
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Suspicious execution method" << Qt::endl;
return ctn_SUSPICIOUS_EXECUTION_METHOD;
}
//Let's make a connection to Octopi server to ensure it sent this command.
QTcpSocket socket;
socket.connectToHost(QStringLiteral("127.0.0.1"), 12701);
if (!socket.waitForConnected(5000))
{
if (!testCommandFromNotifier)
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Timeout connecting to Octopi" << Qt::endl;
return ctn_TIMEOUT_CONNECTING;
}
else goto testNotifierConnection;
}
QDataStream in(&socket);
in.setVersion(QDataStream::Qt_5_10);
QString octopiResponse;
do
{
if (!socket.waitForReadyRead() && !testCommandFromNotifier)
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Timeout contacting Octopi" << Qt::endl;
return ctn_TIMEOUT_CONNECTING;
}
in.startTransaction();
in >> octopiResponse;
} while (!in.commitTransaction());
if (octopiResponse == QLatin1String("Octopi est occupatus"))
{
testCommandFromNotifier=false;
}
else if (octopiResponse != QLatin1String("Octopi est occupatus") && !testCommandFromNotifier)
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: No transaction being executed" << Qt::endl;
return ctn_NO_TRANSACTION_EXECUTING;
}
}
testNotifierConnection:
if (testCommandFromNotifier)
{
if (!isNotifierRunning)
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Suspicious execution method" << Qt::endl;
return ctn_SUSPICIOUS_EXECUTION_METHOD;
}
//Let's make a connection to Octopi-Notifier server to ensure it sent this command.
QTcpSocket socket;
socket.connectToHost(QStringLiteral("127.0.0.1"), 12702);
if (!socket.waitForConnected(5000))
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Timeout connecting to Octopi-Notifier" << Qt::endl;
return ctn_TIMEOUT_CONNECTING;
}
QDataStream in(&socket);
in.setVersion(QDataStream::Qt_5_10);
QString octopiResponse;
do
{
if (!socket.waitForReadyRead())
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Timeout contacting Octopi-Notifier" << Qt::endl;
return ctn_TIMEOUT_CONNECTING;
}
in.startTransaction();
in >> octopiResponse;
} while (!in.commitTransaction());
if (octopiResponse != QLatin1String("Octopi est occupatus"))
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: No transaction being executed" << Qt::endl;
return ctn_NO_TRANSACTION_EXECUTING;
}
}
if (testCommandFromCacheCleaner)
{
if (!isCacheCleanerRunning)
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Suspicious execution method" << Qt::endl;
return ctn_SUSPICIOUS_EXECUTION_METHOD;
}
//Let's make a connection to Octopi-Notifier server to ensure it sent this command.
QTcpSocket socket;
socket.connectToHost(QStringLiteral("127.0.0.1"), 12703);
if (!socket.waitForConnected(5000))
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Timeout connecting to Octopi-CacheCleaner" << Qt::endl;
return ctn_TIMEOUT_CONNECTING;
}
QDataStream in(&socket);
in.setVersion(QDataStream::Qt_5_10);
QString octopiResponse;
do
{
if (!socket.waitForReadyRead())
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: Timeout contacting Octopi-CacheCleaner" << Qt::endl;
return ctn_TIMEOUT_CONNECTING;
}
in.startTransaction();
in >> octopiResponse;
} while (!in.commitTransaction());
if (octopiResponse != QLatin1String("Octopi est occupatus"))
{
QTextStream qout(stdout);
qout << Qt::endl << "octopi-helper[aborted]: No transaction being executed" << Qt::endl;
return ctn_NO_TRANSACTION_EXECUTING;
}
}
//Let's construct the root owned execution file
QFile *ftemp = generateTemporaryFile();
QTextStream out(ftemp);
QString proxySettings = getProxySettings();
if (!proxySettings.isEmpty())
{
if (proxySettings.contains(QLatin1String("ftp://")))
out << QLatin1String("export ftp_proxy=") + proxySettings + QLatin1Char('\n');
else if (proxySettings.contains(QLatin1String("http://")))
out << QLatin1String("export http_proxy=") + proxySettings + QLatin1Char('\n');
else if (proxySettings.contains(QLatin1String("https://")))
out << QLatin1String("export https_proxy=") + proxySettings + QLatin1Char('\n');
}
out << QLatin1String("unalias -a\n") << contents;
out.flush();
ftemp->close();
m_process->setProcessEnvironment(getProcessEnvironment());
m_process->start(getShell(), QStringList() << m_temporaryFile->fileName());
m_process->waitForStarted(-1);
m_process->waitForFinished(-1);
return m_process->exitCode();
}

64
helper/octopihelper.h Normal file
View File

@@ -0,0 +1,64 @@
/*
* This file is part of Octopi, an open-source GUI for pacman.
* Copyright (C) 2019 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 OCTOPIHELPER_H
#define OCTOPIHELPER_H
#include "../src/constants.h"
#include <QString>
#include <QProcess>
#include <QObject>
#include <QFile>
#include <QRandomGenerator>
class OctopiHelper: QObject
{
Q_OBJECT
private:
int m_exitCode;
QProcess *m_process;
QProcessEnvironment getProcessEnvironment();
QString m_suspiciousChars;
static QFile *m_temporaryFile;
static QString getProxySettings();
static QFile* generateTemporaryFile(){
quint32 gen = QRandomGenerator::global()->generate();
m_temporaryFile = new QFile(ctn_TEMP_ACTIONS_FILE + QString::number(gen));
m_temporaryFile->open(QIODevice::ReadWrite|QIODevice::Text);
m_temporaryFile->setPermissions(QFile::Permissions(QFile::ExeOwner|QFile::ReadOwner));
return m_temporaryFile;
}
public:
OctopiHelper();
virtual ~OctopiHelper();
void log(const QString &str);
int executePkgTransactionWithSharedMem();
inline int getExitCode() { return m_exitCode; }
bool isOctoToolRunning(const QString &octoToolName);
};
#endif // OCTOPIHELPER_H

74
notifier/CMakeLists.txt Normal file
View File

@@ -0,0 +1,74 @@
find_package(Qt5 REQUIRED COMPONENTS Core Xml Gui Widgets Network)
find_package(qtermwidget5 REQUIRED)
find_package(alpm_octopi_utils REQUIRED)
find_package(KF5Notifications QUIET)
if(NOT KF5Notifications_FOUND)
message(WARNING "KNotifications not found. Skipping")
endif()
set(CMAKE_AUTOMOC ON)
set(src
main.cpp
mainwindow.cpp
outputdialog.cpp
../src/terminal.cpp
../src/unixcommand.cpp
../src/package.cpp
../src/wmhelper.cpp
../src/strconstants.cpp
../src/settingsmanager.cpp
../src/utils.cpp
../src/transactiondialog.cpp
../src/argumentlist.cpp
../src/pacmanexec.cpp
../src/searchlineedit.cpp
../src/searchbar.cpp
../src/optionsdialog.cpp
../src/termwidget.cpp
../src/aurvote.cpp
../src/qaesencryption.cpp
../src/alpmbackend.cpp)
set(header
mainwindow.h
outputdialog.h
../src/uihelper.h
../src/terminal.h
../src/unixcommand.h
../src/wmhelper.h
../src/strconstants.h
../src/package.h
../src/utils.h
../src/transactiondialog.h
../src/argumentlist.h
../src/pacmanexec.h
../src/searchlineedit.h
../src/searchbar.h
../src/optionsdialog.h
../src/termwidget.h
../src/aurvote.h
../src/qaesencryption.h
../src/alpmbackend.h)
set(ui ../ui/transactiondialog.ui ../ui/optionsdialog.ui)
set(qrc ../resources.qrc)
qt5_wrap_ui(src ${ui})
qt5_add_resources(src ${qrc})
add_executable(octopi-notifier ${src} ${header})
target_compile_definitions(octopi-notifier PRIVATE ALPM_BACKEND QT_USE_QSTRINGBUILDER QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_FROM_BYTEARRAY)
target_include_directories(octopi-notifier PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
target_link_libraries(octopi-notifier PRIVATE Qt5::Core Qt5::Xml Qt5::Gui Qt5::Widgets Qt5::Network qtermwidget5 alpm_octopi_utils)
if(KF5Notifications_FOUND)
target_compile_definitions(octopi-notifier PRIVATE KSTATUS)
find_package(Qt5 REQUIRED COMPONENTS DBus)
target_include_directories(octopi-notifier PRIVATE ${Qt5DBus_INCLUDE_DIRS})
target_link_libraries(octopi-notifier PRIVATE Qt5::DBus KF5::Notifications)
endif()
install(TARGETS octopi-notifier RUNTIME DESTINATION bin LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/octopi-notifier.desktop" DESTINATION share/applications)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/octopi-notifier.desktop" DESTINATION /etc/xdg/autostart)

114
notifier/main.cpp Normal file
View File

@@ -0,0 +1,114 @@
/*
* 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 "../src/unixcommand.h"
#include "../src/wmhelper.h"
#include "../src/strconstants.h"
#include "../src/argumentlist.h"
#include "mainwindow.h"
#include <QApplication>
#include <QtGui>
#include <QMessageBox>
#include <QDebug>
#define NO_GTK_STYLE
int main(int argc, char *argv[])
{
bool debugInfo = false;
ArgumentList *argList = new ArgumentList(argc, argv);
if (argList->getSwitch(QStringLiteral("-d")))
{
//If user chooses to switch debug info on...
debugInfo = true;
}
if (debugInfo)
qDebug() << QString(QLatin1String("Octopi Notifier - ") + StrConstants::getApplicationVersion() +
QLatin1String(" (") + StrConstants::getQtVersion() + QLatin1String(")"));
if (UnixCommand::isAppRunning(QStringLiteral("octopi-notifier")))
{
qDebug() << "Aborting notifier as another instance is already running!";
return (-1);
}
if (!QFile::exists(ctn_CHECKUPDATES_BINARY))
{
qDebug() << "Aborting notifier as 'checkupdates' binary could not be found! [" << ctn_CHECKUPDATES_BINARY << "]";
return (-2);
}
if (!QFile::exists(ctn_OCTOPI_HELPER_PATH))
{
qDebug() << "Aborting notifier as 'octphelper' binary could not be found! [" << ctn_OCTOPI_HELPER_PATH << "]";
return (-3);
}
if (!QFile::exists(ctn_OCTOPISUDO))
{
qDebug() << "Aborting notifier as 'octopi-sudo' binary could not be found! [" << ctn_OCTOPISUDO << "]";
return (-4);
}
QApplication a(argc, argv);
QTranslator appTranslator;
appTranslator.load(QLatin1String(":/resources/translations/octopi_") +
QLocale::system().name());
a.installTranslator(&appTranslator);
a.setQuitOnLastWindowClosed(false);
if (!UnixCommand::isOctoToolRunning(QStringLiteral("octopi-notifier")))
{
QMessageBox::critical(nullptr, StrConstants::getApplicationName(), StrConstants::getErrorRunOctopiNotifierAsUsrBin());
return (-6);
}
if (UnixCommand::isRootRunning()){
QMessageBox::critical(nullptr, StrConstants::getApplicationName(), StrConstants::getErrorRunningWithRoot());
return (-5);
}
unsetenv("TMPDIR");
setenv("COLORTERM", "truecolor", 1);
setenv("TERM", "xterm-256color", 1);
QString buildDir=SettingsManager::getAURBuildDir();
if (!buildDir.isEmpty())
{
setenv("BUILDDIR", buildDir.toLatin1().data(), 1);
}
MainWindow w;
if (w.startServer())
{
QResource::registerResource(QStringLiteral("./resources.qrc"));
QGuiApplication::setDesktopFileName(QStringLiteral("octopi-notifier"));
if (debugInfo)
w.turnDebugInfoOn();
return a.exec();
}
}

1327
notifier/mainwindow.cpp Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -21,8 +21,8 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "../../src/unixcommand.h"
#include "../../src/pacmanexec.h"
#include "../src/unixcommand.h"
#include "../src/pacmanexec.h"
#include <QDialog>
#include <QProcess>
@@ -34,8 +34,12 @@ class QIcon;
class QMenu;
class QAction;
class QFileSystemWatcher;
class PacmanHelperClient;
class SetupDialog;
class OptionsDialog;
class TransactionDialog;
class QTcpServer;
class OutputDialog;
enum CheckUpdate { ectn_AUTO_CHECK, ectn_USER_CHECK};
#ifdef KSTATUS
class KStatusNotifierItem;
@@ -46,54 +50,73 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
explicit MainWindow(QWidget *parent = nullptr);
virtual ~MainWindow();
inline void turnDebugInfoOn() { m_debugInfo = true;}
bool startServer();
private slots:
void pacmanHelperTimerTimeout();
void afterPacmanHelperSyncDatabase();
void afterCheckUpdates(int exitCode, QProcess::ExitStatus);
void execSystemTrayActivated(QSystemTrayIcon::ActivationReason);
void execSystemTrayKF5();
void syncDatabase();
void checkUpdates(CheckUpdate check = ectn_USER_CHECK);
void refreshOutdatedPkgsTooltip();
void refreshAppIcon();
void runOctopi(ExecOpt execOptions = ectn_SYSUPGRADE_EXEC_OPT);
void runOctopiSysUpgrade();
void runOctopiCheckUpdates();
void runOctopiSysUpgrade();
void runOctopiAURUpgrade();
inline void startOctopi() { runOctopi(ectn_NORMAL_EXEC_OPT); }
void aboutOctopiNotifier();
void hideOctopi();
void showOctopi();
void exitNotifier();
void doSystemUpgrade();
void doSystemUpgradeFinished();
void doAURUpgrade();
void doSystemUpgradeFinished(int exitCode);
void toggleEnableInterface(bool state);
void showConfigDialog();
void showOptionsDialog();
void onSendInfoToOctopiHelper();
void onCallRefreshAppIcon();
private:
SetupDialog *m_setupDialog;
bool m_debugInfo;
int m_numberOfCheckUpdatesPackages;
int m_numberOfOutdatedPackages;
int m_numberOfOutdatedAURPackages;
bool m_systemUpgradeDialog;
bool isOctopiBusy();
bool canOctopiUpgrade();
CommandExecuting m_commandExecuting;
UnixCommand *m_unixCommand;
PacmanExec *m_pacmanExec;
TransactionDialog *m_transactionDialog;
OptionsDialog *m_optionsDialog;
QTcpServer *m_tcpServer;
QAction *m_actionOctopi;
QAction *m_actionSetInterval;
QAction *m_actionSyncDatabase;
QAction *m_actionOptions;
QAction *m_actionCheckUpdates;
QAction *m_actionSystemUpgrade;
QAction *m_actionAURUpgrade;
QAction *m_actionAbout;
QAction *m_actionExit;
QIcon m_icon;
QHash<QString, QString> *m_checkUpdatesNameNewVersion;
QStringList m_checkUpdatesStringList;
QStringList *m_outdatedStringList;
QStringList *m_outdatedAURStringList;
QTimer *m_pacmanHelperTimer;
bool m_debugInfo;
QTimer *m_callRefreshAppIcon;
QMenu *m_systemTrayIconMenu;
QFileSystemWatcher *m_pacmanDatabaseSystemWatcher;
OutputDialog *m_outputDialog;
#ifdef KSTATUS
KStatusNotifierItem * m_systemTrayIcon;
@@ -101,13 +124,11 @@ private:
QSystemTrayIcon *m_systemTrayIcon;
#endif
QMenu *m_systemTrayIconMenu;
QFileSystemWatcher *m_pacmanDatabaseSystemWatcher;
PacmanHelperClient *m_pacmanHelperClient;
bool _isSUAvailable();
bool isInternetAvailable();
void initActions();
void initSystemTrayIcon();
void sendNotification(const QString &msg);
void setUpgradingTooltip();
};
#endif // MAINWINDOW_H

View File

@@ -1,7 +1,7 @@
[Desktop Entry]
Name=Octopi Notifier
Icon=octopi
Exec=octopi-notifier
Exec=/usr/bin/octopi-notifier
Terminal=false
Type=Application
Categories=GNOME;GTK;System;

View File

@@ -0,0 +1,128 @@
#-------------------------------------------------
#
# Project created by QtCreator 2013-07-20T16:15:14
#
#-------------------------------------------------
QT += core xml gui network
# This controls whether octopi-notifier uses KStatusNotifier lib
# You SHOULD REALLY enable KSTATUS define in plasma 5 desktops!
DEFINES += ALPM_BACKEND #KSTATUS
# Disable automatic string conversions
DEFINES += QT_USE_QSTRINGBUILDER \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_TO_ASCII \
QT_NO_URL_CAST_FROM_STRING \
QT_NO_CAST_FROM_BYTEARRAY
CONFIG += qt warn_on debug link_pkgconfig ALPM_BACKEND
ALPM_BACKEND {
QMAKE_CXXFLAGS += -std=c++17
PKGCONFIG += glib-2.0 libalpm
LIBS += -lalpm_octopi_utils
} else {
QMAKE_CXXFLAGS += -std=c++17
}
LIBS += -lqtermwidget5
contains(DEFINES, KSTATUS){
QT += dbus KNotifications
}
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += qt console warn_on debug
QMAKE_CXXFLAGS += -std=c++11
TARGET = octopi-notifier
TEMPLATE = app
DESTDIR += ./bin
OBJECTS_DIR += ./build
MOC_DIR += ./build
UI_DIR += ./build
HEADERS += \
mainwindow.h \
outputdialog.h \
../src/uihelper.h \
../src/terminal.h \
../src/unixcommand.h \
../src/wmhelper.h \
../src/strconstants.h \
../src/package.h \
../src/utils.h \
../src/transactiondialog.h \
../src/argumentlist.h \
../src/pacmanexec.h \
../src/searchlineedit.h \
../src/searchbar.h \
../src/optionsdialog.h \
../src/termwidget.h \
../src/aurvote.h \
../src/qaesencryption.h
ALPM_BACKEND{
HEADERS += ../src/alpmbackend.h
}
SOURCES += main.cpp \
mainwindow.cpp \
outputdialog.cpp \
../src/terminal.cpp \
../src/unixcommand.cpp \
../src/package.cpp \
../src/wmhelper.cpp \
../src/strconstants.cpp \
../src/settingsmanager.cpp \
../src/utils.cpp \
../src/transactiondialog.cpp \
../src/argumentlist.cpp \
../src/pacmanexec.cpp \
../src/searchlineedit.cpp \
../src/searchbar.cpp \
../src/optionsdialog.cpp \
../src/termwidget.cpp \
../src/aurvote.cpp \
../src/qaesencryption.cpp
ALPM_BACKEND{
SOURCES += ../src/alpmbackend.cpp
}
FORMS += ../ui/transactiondialog.ui \
../ui/optionsdialog.ui
RESOURCES += \
../resources.qrc
# install
isEmpty(PREFIX) {
PREFIX = /usr
}
isEmpty(BINDIR) {
BINDIR = $$PREFIX/bin
}
isEmpty(DATADIR) {
DATADIR = $$PREFIX/share
}
isEmpty(ETCDIR) {
ETCDIR = /etc
}
target.path = $$BINDIR
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = .
autostart.path = $$ETCDIR/xdg/autostart
autostart.files += octopi-notifier.desktop
desktop.path = $$DATADIR/applications
desktop.files += octopi-notifier.desktop
INSTALLS += target autostart desktop

View File

@@ -1,95 +0,0 @@
/*
* 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 "../../src/unixcommand.h"
#include "../../src/wmhelper.h"
#include "../../src/strconstants.h"
#include "../../src/argumentlist.h"
#include "mainwindow.h"
#include <QApplication>
#include <QtGui>
#include <QDebug>
#define NO_GTK_STYLE
int main(int argc, char *argv[])
{
bool debugInfo = false;
ArgumentList *argList = new ArgumentList(argc, argv);
if (argList->getSwitch("-d"))
{
//If user chooses to switch debug info on...
debugInfo = true;
}
if (debugInfo)
qDebug() << QString("Octopi Notifier - " + StrConstants::getApplicationVersion() +
" (" + StrConstants::getQtVersion() + ")");
if (UnixCommand::isAppRunning("octopi-notifier"))
{
qDebug() << "Aborting notifier as another instance is already running!";
return (-1);
}
if (!QFile::exists(ctn_PACMANHELPER_BINARY))
{
qDebug() << "Aborting notifier as 'pacmanhelper' binary could not be found! [" << ctn_PACMANHELPER_BINARY << "]";
return (-2);
}
if (!QFile::exists(ctn_DBUS_PACMANHELPER_SERVICE))
{
qDebug() << "Aborting notifier as 'pacmanhelper' DBus service could not be found! [" << ctn_DBUS_PACMANHELPER_SERVICE << "]";
return (-3);
}
QApplication a(argc, argv);
#if QT_VERSION < 0x050000
#ifndef NO_GTK_STYLE
QApplication::setGraphicsSystem(QLatin1String("raster"));
if(!WMHelper::isKDERunning() && (!WMHelper::isLXQTRunning()) && (!WMHelper::isRazorQtRunning()))
{
qApp->setStyle(new QGtkStyle());
}
else
qApp->setStyle(new QCleanlooksStyle);
#endif
#endif
QTranslator appTranslator;
appTranslator.load(":/resources/translations/octopi_" +
QLocale::system().name());
a.installTranslator(&appTranslator);
a.setQuitOnLastWindowClosed(false);
MainWindow w;
QResource::registerResource("./resources.qrc");
if (debugInfo)
w.turnDebugInfoOn();
return a.exec();
}

View File

@@ -1,817 +0,0 @@
/*
* 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 "mainwindow.h"
#include "setupdialog.h"
#include "outputdialog.h"
#include "../pacmanhelper/pacmanhelperclient.h"
#include "../../src/strconstants.h"
#include "../../src/uihelper.h"
#include "../../src/package.h"
#include "../../src/transactiondialog.h"
#include <QTimer>
#include <QSystemTrayIcon>
#include <QAction>
#include <QMenu>
#include <QProcess>
#include <QMessageBox>
#include <QDebug>
#ifdef KSTATUS
#include <kstatusnotifieritem.h>
#endif
/*
* This is Octopi Notifier slim interface code :-)
*/
/*
* The obligatory constructor...
*/
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent)
{
m_debugInfo = false;
m_setupDialog = nullptr;
m_pacmanDatabaseSystemWatcher =
new QFileSystemWatcher(QStringList() << ctn_PACMAN_DATABASE_DIR, this);
connect(m_pacmanDatabaseSystemWatcher,
SIGNAL(directoryChanged(QString)), this, SLOT(refreshAppIcon()));
initSystemTrayIcon();
}
MainWindow::~MainWindow()
{
#ifdef KSTATUS
delete m_systemTrayIcon;
#endif
}
/*
* Let's initialize the system tray object...
*/
void MainWindow::initSystemTrayIcon()
{
if (m_debugInfo)
qDebug() << "At initSystemTrayIcon()...";
m_commandExecuting = ectn_NONE;
m_outdatedStringList = new QStringList();
#ifdef KSTATUS
m_systemTrayIcon = new KStatusNotifierItem(0);
#else
m_systemTrayIcon = new QSystemTrayIcon(this);
#endif
m_systemTrayIcon->setObjectName("systemTrayIcon");
#ifdef KSTATUS
m_systemTrayIcon->setIconByPixmap(m_icon);
m_systemTrayIcon->setToolTipIconByPixmap(m_icon);
m_systemTrayIcon->setTitle("Octopi Notifier");
#else
m_systemTrayIcon->setIcon(m_icon);
#endif
m_actionExit = new QAction(IconHelper::getIconExit(), tr("Exit"), this);
connect(m_actionExit, SIGNAL(triggered()), this, SLOT(exitNotifier()));
m_actionAbout = new QAction(StrConstants::getHelpAbout(), this);
m_actionAbout->setIconVisibleInMenu(true);
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_actionSetInterval = new QAction(this);
m_actionSetInterval->setText(StrConstants::getSetInterval());
connect(m_actionSetInterval, SIGNAL(triggered()), this, SLOT(showConfigDialog()));
m_actionSyncDatabase = new QAction(this);
m_actionSyncDatabase->setIconVisibleInMenu(true);
m_actionSyncDatabase->setText(StrConstants::getSyncDatabase());
m_actionSyncDatabase->setIcon(IconHelper::getIconSyncDatabase());
connect(m_actionSyncDatabase, SIGNAL(triggered()), this, SLOT(syncDatabase()));
m_actionSystemUpgrade = new QAction(this);
m_actionSystemUpgrade->setIconVisibleInMenu(true);
m_actionSystemUpgrade->setText(tr("System upgrade"));
m_actionSystemUpgrade->setIcon(IconHelper::getIconSystemUpgrade());
connect(m_actionSystemUpgrade, SIGNAL(triggered()), this, SLOT(runOctopiSysUpgrade()));
m_systemTrayIconMenu = new QMenu( this );
if (UnixCommand::hasTheExecutable("octopi"))
m_systemTrayIconMenu->addAction(m_actionOctopi);
m_systemTrayIconMenu->addAction(m_actionSetInterval);
m_systemTrayIconMenu->addAction(m_actionSyncDatabase);
m_systemTrayIconMenu->addAction(m_actionSystemUpgrade);
m_systemTrayIconMenu->addSeparator();
m_systemTrayIconMenu->addAction(m_actionAbout);
m_systemTrayIconMenu->addAction(m_actionExit);
m_systemTrayIcon->setContextMenu(m_systemTrayIconMenu);
// disable "standard" actions (restore & quit)
#ifdef KSTATUS
m_systemTrayIcon->setStandardActionsEnabled(false);
connect (m_systemTrayIcon, SIGNAL(activateRequested(bool,QPoint)),
this, SLOT(execSystemTrayKF5()) );
#else
connect ( m_systemTrayIcon , SIGNAL( activated( QSystemTrayIcon::ActivationReason ) ),
this, SLOT( execSystemTrayActivated ( QSystemTrayIcon::ActivationReason ) ) );
#endif
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(1000);
m_pacmanHelperTimer->start();
connect(m_pacmanHelperTimer, SIGNAL(timeout()), this, SLOT(pacmanHelperTimerTimeout()));
}
/*
* 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 (!UnixCommand::hasInternetConnection() || m_commandExecuting != ectn_NONE) return;
if (firstTime)
{
refreshAppIcon();
#ifdef KSTATUS
m_systemTrayIcon->setToolTipTitle("Octopi");
#else
m_systemTrayIcon->show();
#endif
//From now on, we verify if it's time to check for updates every 5 minutes
m_pacmanHelperTimer->setInterval(60000 * 5);
setWindowIcon(m_icon);
firstTime=false;
}
//Is it time to syncdb again?
QDateTime lastCheckTime = SettingsManager::getLastSyncDbTime();
int syncDbInterval = SettingsManager::getSyncDbInterval();
QDateTime now = QDateTime::currentDateTime();
bool syncTime = false;
int syncHour = SettingsManager::getSyncDbHour();
//User did not set the check interval, so we assume it's once a day
if (syncDbInterval == -1)
{
if (syncHour >= 0) //Once a day at a certain time?
{
if (m_debugInfo)
qDebug() << "SyncDb is scheduled once a day, at " << syncHour << " hours";
if (lastCheckTime.daysTo(now) >= 1 && now.time().hour() == syncHour)
{
syncTime = true;
}
}
else
{
if (m_debugInfo)
qDebug() << "SyncDb is scheduled once a day";
}
if ((syncHour == -1 && (
lastCheckTime.isNull() ||
lastCheckTime.daysTo(now) >= 1)) || (syncTime))
{
syncDatabase();
//Then we set new LastCheckTime...
SettingsManager::setLastSyncDbTime(now);
}
}
else
{
if (lastCheckTime.isNull() || now.addSecs(-(syncDbInterval * 60)) >= lastCheckTime)
{
syncDatabase();
//Then we set new LastCheckTime...
SettingsManager::setLastSyncDbTime(now);
}
else
{
if (m_debugInfo)
qDebug() << "SyncDb is scheduled once every " << syncDbInterval << " minutes.";
}
m_pacmanHelperTimer->stop();
m_pacmanHelperTimer->start();
}
}
/*
* Helper to a runOctopi with a call to SystemUpgrade
*/
void MainWindow::runOctopiSysUpgrade()
{
runOctopi(ectn_SYSUPGRADE_EXEC_OPT);
}
/*
* Shows Octopi About Dialog...
*/
void MainWindow::aboutOctopiNotifier()
{
QString aboutText = "<b>Octopi Notifier - " +
StrConstants::getApplicationVersion() + "</b>" + " (" + StrConstants::getQtVersion() + ")<br>";
aboutText += "<a href=\"http://octopiproject.wordpress.com/\">http://octopiproject.wordpress.com</a><br><br>";
aboutText += "&copy; Alexandre Albuquerque Arnt";
QMessageBox::about(this, StrConstants::getHelpAbout(), aboutText);
}
/*
* Hides Octopi
*/
void MainWindow::hideOctopi()
{
QProcess::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_outdatedStringList->count() == 0)
{
return;
}
else if (targets->count() == 0 && m_outdatedStringList->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 = Package::kbytesToSize(totalDownloadSize);
TransactionDialog question(this);
if(targets->count()==1)
question.setText(StrConstants::getRetrievePackage() +
"\n\n" + StrConstants::getTotalDownloadSize().arg(ds).remove(" KB"));
else
question.setText(StrConstants::getRetrievePackages(targets->count()) +
"\n\n" + StrConstants::getTotalDownloadSize().arg(ds).remove(" KB"));
question.setWindowTitle(StrConstants::getConfirmation());
question.setInformativeText(StrConstants::getConfirmationQuestion());
question.setDetailedText(list);
m_systemUpgradeDialog = true;
int result = question.exec();
if (result == QDialogButtonBox::Yes)
{
m_commandExecuting = ectn_SYSTEM_UPGRADE;
m_systemUpgradeDialog = false;
toggleEnableInterface(false);
m_actionSystemUpgrade->setEnabled(false);
OutputDialog *dlg = new OutputDialog(this);
if (m_debugInfo)
dlg->setDebugMode(true);
QObject::connect(dlg, SIGNAL( finished(int)),
this, SLOT( doSystemUpgradeFinished() ));
dlg->show();
}
else if(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() ));
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);
refreshAppIcon();
}
}
/*
* When system upgrade process is finished...
*/
void MainWindow::doSystemUpgradeFinished()
{
m_commandExecuting = ectn_NONE;
refreshAppIcon();
//Does it still need to upgrade another packages due to SyncFirst issues???
if ((m_commandExecuting == ectn_RUN_SYSTEM_UPGRADE_IN_TERMINAL)
&& m_outdatedStringList->count() > 0)
{
m_commandExecuting = ectn_NONE;
m_unixCommand->removeTemporaryFile();
doSystemUpgrade();
return;
}
m_unixCommand->removeTemporaryFile();
toggleEnableInterface(true);
}
/*
* Enables and Disables some UI elements of Octopi-notifier
*/
void MainWindow::toggleEnableInterface(bool state)
{
m_actionOctopi->setEnabled(state);
m_actionSyncDatabase->setEnabled(state);
m_actionSetInterval->setEnabled(state);
m_actionExit->setEnabled(state);
}
/*
* Called right after the PacmanHelper syncdb() method has finished!
*/
void MainWindow::afterPacmanHelperSyncDatabase()
{
if (m_debugInfo)
qDebug() << "At afterPacmanHelperSyncDatabase()...";
toggleEnableInterface(true);
#ifndef KSTATUS
m_systemTrayIcon->setContextMenu(m_systemTrayIconMenu);
m_systemTrayIconMenu->close();
#endif
m_commandExecuting = ectn_NONE;
int numberOfOutdatedPackages = m_numberOfOutdatedPackages;
refreshAppIcon();
if (numberOfOutdatedPackages != m_numberOfOutdatedPackages)
{
if (m_numberOfOutdatedPackages > 0)
{
QString notification;
if (m_numberOfOutdatedPackages == 1)
{
notification = StrConstants::getOneNewUpdate();
#ifdef KSTATUS
m_systemTrayIcon->setToolTipSubTitle(notification);
m_systemTrayIcon->showMessage("Octopi",
notification, m_systemTrayIcon->iconName());
#else
m_systemTrayIcon->setToolTip(notification);
//if (!UnixCommand::isAppRunning("spun", true)) sendNotification(notification);
#endif
}
else if (m_numberOfOutdatedPackages > 1)
{
notification = StrConstants::getNewUpdates(m_numberOfOutdatedPackages);
#ifdef KSTATUS
m_systemTrayIcon->setToolTipSubTitle(notification);
m_systemTrayIcon->showMessage("Octopi",
notification, m_systemTrayIcon->iconName());
#else
m_systemTrayIcon->setToolTip(notification);
//if (!UnixCommand::isAppRunning("spun", true)) sendNotification(notification);
#endif
}
}
}
else
{
QString notification;
if (numberOfOutdatedPackages == 1)
{
notification = StrConstants::getOneNewUpdate();
#ifdef KSTATUS
m_systemTrayIcon->setToolTipSubTitle(notification);
m_systemTrayIcon->showMessage("Octopi",
notification, m_systemTrayIcon->iconName());
#else
m_systemTrayIcon->setToolTip(notification);
//if (!UnixCommand::isAppRunning("spun", true)) sendNotification(notification);
#endif
}
else if (numberOfOutdatedPackages > 1)
{
notification = StrConstants::getNewUpdates(numberOfOutdatedPackages);
#ifdef KSTATUS
m_systemTrayIcon->setToolTipSubTitle(notification);
m_systemTrayIcon->showMessage("Octopi",
notification, m_systemTrayIcon->iconName());
#else
m_systemTrayIcon->setToolTip(notification);
//if (!UnixCommand::isAppRunning("spun", true)) sendNotification(notification);
#endif
}
}
}
/*
* Called every time user selects "Sync databases..." menu option
*/
void MainWindow::syncDatabase()
{
disconnect(m_pacmanDatabaseSystemWatcher,
SIGNAL(directoryChanged(QString)), this, SLOT(refreshAppIcon()));
QTime now;
if (m_debugInfo)
qDebug() << now.currentTime().toString("HH:mm").toLatin1().data() << ": At syncDatabase()...";
toggleEnableInterface(false);
m_icon = IconHelper::getIconOctopiTransparent();
#ifdef KSTATUS
m_systemTrayIcon->setIconByPixmap(m_icon);
m_systemTrayIcon->setToolTipIconByPixmap(m_icon);
m_systemTrayIcon->setToolTipSubTitle(StrConstants::getSyncDatabases());
#else
m_systemTrayIcon->setIcon(m_icon);
m_systemTrayIcon->setToolTip(StrConstants::getSyncDatabases());
#endif
qApp->processEvents();
m_systemTrayIconMenu->close();
#ifndef KSTATUS
m_systemTrayIcon->setContextMenu(0);
#endif
m_commandExecuting = ectn_SYNC_DATABASE;
//Let's synchronize kcp database too...
if (UnixCommand::getLinuxDistro() == ectn_KAOS && UnixCommand::hasTheExecutable("kcp"))
{
if (m_debugInfo)
qDebug() << "Synchronizing kcp database...";
UnixCommand::execCommandAsNormalUser("kcp -u");
}
m_pacmanHelperClient->syncdb();
}
/*
* Uses notify-send to send a notification to the systray area
*/
void MainWindow::sendNotification(const QString &msg)
{
QString processToExec("notify-send");
if (UnixCommand::hasTheExecutable(processToExec))
{
processToExec += " -i /usr/share/icons/octopi_red.png -t 5000 \"" +
StrConstants::getApplicationName() + "\" \"" + msg + "\"";
QProcess::startDetached(processToExec);
}
}
/*
* If we have some outdated packages, let's put an angry red face icon in this app!
*/
void MainWindow::refreshAppIcon()
{
disconnect(m_pacmanDatabaseSystemWatcher,
SIGNAL(directoryChanged(QString)), this, SLOT(refreshAppIcon()));
if (m_debugInfo)
qDebug() << "At refreshAppIcon()...";
m_outdatedStringList = Package::getOutdatedStringList();
bool hasAURTool = UnixCommand::hasTheExecutable(StrConstants::getForeignRepositoryToolName());
if (hasAURTool)
{
m_outdatedAURStringList = Package::getOutdatedAURStringList();
}
else
{
m_outdatedAURStringList = new QStringList();
}
m_numberOfOutdatedPackages = m_outdatedStringList->count();
m_numberOfOutdatedAURPackages = m_outdatedAURStringList->count();
if (m_numberOfOutdatedPackages == 0 && m_numberOfOutdatedAURPackages == 0)
{
#ifdef KSTATUS
m_systemTrayIcon->setToolTipSubTitle("");
#else
m_systemTrayIcon->setToolTip("");
#endif
}
else if (m_numberOfOutdatedPackages > 0)
{
if (m_numberOfOutdatedPackages == 1)
{
#ifdef KSTATUS
m_systemTrayIcon->setToolTipSubTitle(StrConstants::getOneNewUpdate());
#else
m_systemTrayIcon->setToolTip(StrConstants::getOneNewUpdate());
#endif
}
else if (m_numberOfOutdatedPackages > 1)
{
#ifdef KSTATUS
m_systemTrayIcon->setToolTipSubTitle(
StrConstants::getNewUpdates(m_numberOfOutdatedPackages));
#else
m_systemTrayIcon->setToolTip(StrConstants::getNewUpdates(m_numberOfOutdatedPackages));
#endif
}
}
else if (m_numberOfOutdatedAURPackages > 0)
{
if (m_numberOfOutdatedAURPackages == 1)
{
#ifdef KSTATUS
m_systemTrayIcon->setToolTipSubTitle(StrConstants::getOneNewUpdate() +
" (" + StrConstants::getForeignRepositoryName() + ")");
#else
m_systemTrayIcon->setToolTip(StrConstants::getOneNewUpdate() +
" (" + StrConstants::getForeignRepositoryName() + ")");
#endif
}
else if (m_numberOfOutdatedAURPackages > 1)
{
#ifdef KSTATUS
m_systemTrayIcon->setToolTipSubTitle(
StrConstants::getNewUpdates(m_numberOfOutdatedAURPackages) +
" (" + StrConstants::getForeignRepositoryName() + ")");
#else
m_systemTrayIcon->setToolTip(StrConstants::getNewUpdates(m_numberOfOutdatedAURPackages) +
" (" + StrConstants::getForeignRepositoryName() + ")");
#endif
}
}
if(m_outdatedStringList->count() > 0) //RED ICON!
{
if(m_commandExecuting == ectn_NONE)
{
m_actionSystemUpgrade->setEnabled(true);
m_actionSystemUpgrade->setVisible(true);
}
if (m_debugInfo)
qDebug() << "Got a RED icon!";
m_icon = IconHelper::getIconOctopiRed();
#ifdef KSTATUS
m_systemTrayIcon->setAttentionIconByPixmap(m_icon);
m_systemTrayIcon->setStatus(KStatusNotifierItem::NeedsAttention);
#endif
}
else if(m_outdatedAURStringList->count() > 0) //YELLOW ICON!
{
m_actionSystemUpgrade->setVisible(false);
m_icon = IconHelper::getIconOctopiYellow();
if (m_debugInfo)
qDebug() << "Got a YELLOW icon!";
#ifdef KSTATUS
m_systemTrayIcon->setAttentionIconByPixmap(m_icon);
m_systemTrayIcon->setStatus(KStatusNotifierItem::NeedsAttention);
#endif
}
else //YEAHHH... GREEN ICON!
{
m_actionSystemUpgrade->setVisible(false);
m_icon = IconHelper::getIconOctopiGreen();
if (m_debugInfo)
qDebug() << "Got a GREEN icon!";
#ifdef KSTATUS
m_systemTrayIcon->setStatus(KStatusNotifierItem::Passive);
#endif
}
setWindowIcon(m_icon);
#ifdef KSTATUS
m_systemTrayIcon->setIconByPixmap(m_icon);
m_systemTrayIcon->setToolTipIconByPixmap(m_icon);
#else
m_systemTrayIcon->setIcon(m_icon);
#endif
connect(m_pacmanDatabaseSystemWatcher,
SIGNAL(directoryChanged(QString)), this, SLOT(refreshAppIcon()));
}
/*
* 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_outdatedStringList->count() > 0)
{
runOctopi(ectn_SYSUPGRADE_EXEC_OPT);
}
else
{
runOctopi(ectn_NORMAL_EXEC_OPT);
}
break;
}
case QSystemTrayIcon::Trigger:
{
if (UnixCommand::isAppRunning("octopi", true))
{
hideOctopi();
}
break;
}
default: break;
}
}
/*
* This slot is called only when we're using Knotifications from KF5
*/
void MainWindow::execSystemTrayKF5()
{
static bool hidingOctopi = true;
if (UnixCommand::isAppRunning("octopi", true))
{
if (!hidingOctopi)
runOctopi(ectn_NORMAL_EXEC_OPT);
else
hideOctopi();
hidingOctopi = !hidingOctopi;
}
}
/*
* When the users quit this notifier...
*/
void MainWindow::exitNotifier()
{
if (m_debugInfo)
qDebug() << "At exitNotifier()...";
qApp->quit();
}
/*
* Execs Octopi
*/
void MainWindow::runOctopi(ExecOpt execOptions)
{
if (execOptions == ectn_SYSUPGRADE_NOCONFIRM_EXEC_OPT)
{
if (!WMHelper::isKDERunning() && (!WMHelper::isRazorQtRunning()) && (!WMHelper::isLXQTRunning()))
{
QProcess::startDetached("octopi -sysupgrade-noconfirm -style gtk");
}
else
{
QProcess::startDetached("octopi -sysupgrade-noconfirm");
}
}
else if (execOptions == ectn_SYSUPGRADE_EXEC_OPT &&
!UnixCommand::isAppRunning("octopi", true) && m_outdatedStringList->count() > 0)
{
doSystemUpgrade();
}
else if (execOptions == ectn_SYSUPGRADE_EXEC_OPT &&
UnixCommand::isAppRunning("octopi", true) && m_outdatedStringList->count() > 0)
{
if (!WMHelper::isKDERunning() && (!WMHelper::isRazorQtRunning()) && (!WMHelper::isLXQTRunning()))
{
QProcess::startDetached("octopi -sysupgrade -style gtk");
}
else
{
QProcess::startDetached("octopi -sysupgrade");
}
}
else if (execOptions == ectn_NORMAL_EXEC_OPT)
{
if (!WMHelper::isKDERunning() && (!WMHelper::isRazorQtRunning()) && (!WMHelper::isLXQTRunning()))
{
QProcess::startDetached("octopi -style gtk");
}
else
{
QProcess::startDetached("octopi");
}
}
}
/*
* Calls the QDialog to set notifier interval
*/
void MainWindow::showConfigDialog()
{
if (m_setupDialog == nullptr)
{
m_setupDialog = new SetupDialog(this);
#if QT_VERSION >= 0x050000
utils::positionWindowAtScreenCenter(m_setupDialog);
#endif
m_setupDialog->exec();
delete m_setupDialog;
m_setupDialog = nullptr;
}
}

View File

@@ -1,67 +0,0 @@
#-------------------------------------------------
#
# Project created by QtCreator 2013-07-20T16:15:14
#
#-------------------------------------------------
QT += core xml gui network dbus
# This controls whether octopi-notifier uses KStatusNotifier lib
# You SHOULD REALLY enable the following define in plasma 5 desktops!
#DEFINES += KSTATUS
contains(DEFINES, KSTATUS){
QT += KNotifications
}
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += qt console warn_on debug
QMAKE_CXXFLAGS += -std=c++11
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 \
setupdialog.cpp \
outputdialog.cpp \
../../src/terminal.cpp \
../../src/unixcommand.cpp \
../../src/package.cpp \
../../src/wmhelper.cpp \
../../src/settingsmanager.cpp \
../pacmanhelper/pacmanhelperclient.cpp \
../../src/utils.cpp \
../../src/transactiondialog.cpp \
../../src/argumentlist.cpp \
../../src/pacmanexec.cpp \
../../src/searchlineedit.cpp \
../../src/searchbar.cpp
HEADERS += \
mainwindow.h \
setupdialog.h \
outputdialog.h \
../../src/uihelper.h \
../../src/terminal.h \
../../src/unixcommand.h \
../../src/wmhelper.h \
../../src/strconstants.h \
../../src/package.h \
../pacmanhelper/pacmanhelperclient.h \
../../src/utils.h \
../../src/transactiondialog.h \
../../src/argumentlist.h \
../../src/pacmanexec.h \
../../src/searchlineedit.h \
../../src/searchbar.h
FORMS += ../../ui/transactiondialog.ui \
ui/setupdialog.ui
RESOURCES += \
../../resources.qrc

View File

@@ -1,277 +0,0 @@
/*
* 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 "outputdialog.h"
#include "../../src/pacmanexec.h"
#include "../../src/searchbar.h"
#include "../../src/uihelper.h"
#include "../../src/strconstants.h"
#include <QTextBrowser>
#include <QVBoxLayout>
#include <QProgressBar>
#include <QCloseEvent>
#include <QMessageBox>
/*
* Class that displays pacman output for system upgrade
*/
/*
* The obligatory constructor...
*/
OutputDialog::OutputDialog(QWidget *parent): QDialog(parent)
{
init();
m_upgradeRunning = false;
m_debugInfo = false;
}
/*
* Sets if pacmanExec will be called in debugMode or not
*/
void OutputDialog::setDebugMode(bool newValue)
{
m_debugInfo = newValue;
}
/*
* Let's build the main widgets...
*/
void OutputDialog::init()
{
this->resize(650, 500);
setWindowTitle(QCoreApplication::translate("MainWindow", "System upgrade"));
setWindowIcon(IconHelper::getIconSystemUpgrade());
m_mainLayout = new QVBoxLayout(this);
m_textBrowser = new QTextBrowser(this);
m_progressBar = new QProgressBar(this);
m_textBrowser->setGeometry(QRect(0, 0, 650, 500));
m_mainLayout->addWidget(m_textBrowser);
m_searchBar = new SearchBar(this);
connect(m_searchBar, SIGNAL(textChanged(QString)), this, SLOT(onSearchBarTextChanged(QString)));
connect(m_searchBar, SIGNAL(closed()), this, SLOT(onSearchBarClosed()));
connect(m_searchBar, SIGNAL(findNext()), this, SLOT(onSearchBarFindNext()));
connect(m_searchBar, SIGNAL(findPrevious()), this, SLOT(onSearchBarFindPrevious()));
m_mainLayout->addWidget(m_progressBar);
m_mainLayout->addWidget(m_searchBar);
m_mainLayout->setSpacing(0);
m_mainLayout->setSizeConstraint(QLayout::SetMinimumSize);
m_mainLayout->setContentsMargins(2, 2, 2, 2);
m_progressBar->setMinimum(0);
m_progressBar->setMaximum(100);
m_progressBar->setValue(0);
m_progressBar->close();
m_searchBar->show();
}
/*
* Calls PacmanExec to begin system upgrade
*/
void OutputDialog::doSystemUpgrade()
{
m_pacmanExec = new PacmanExec();
if (m_debugInfo)
m_pacmanExec->setDebugMode(true);
QObject::connect(m_pacmanExec, SIGNAL( finished ( int, QProcess::ExitStatus )),
this, SLOT( pacmanProcessFinished(int, QProcess::ExitStatus) ));
QObject::connect(m_pacmanExec, SIGNAL(percentage(int)), this, SLOT(onPencertange(int)));
QObject::connect(m_pacmanExec, SIGNAL(textToPrintExt(QString)), this, SLOT(onWriteOutput(QString)));
m_upgradeRunning = true;
m_pacmanExec->doSystemUpgrade();
//m_pacmanExec->doInstall("octopi"); //TEST CODE!
}
/*
* Centers the dialog in the screen
*/
void OutputDialog::show()
{
#if QT_VERSION >= 0x050000
utils::positionWindowAtScreenCenter(this);
#endif
QDialog::show();
doSystemUpgrade();
}
/*
* Whenever the user presses the ESC key
*/
void OutputDialog::reject()
{
if (!m_upgradeRunning)
{
QDialog::reject();
}
}
/*
* Slot called whenever PacmanExec emits a new percentage change
*/
void OutputDialog::onPencertange(int percentage)
{
if (percentage > 0 && !m_progressBar->isVisible()) m_progressBar->show();
m_progressBar->setValue(percentage);
}
/*
* Helper method to position the text cursor always in the end of doc
*/
void OutputDialog::positionTextEditCursorAtEnd()
{
QTextCursor tc = m_textBrowser->textCursor();
tc.clearSelection();
tc.movePosition(QTextCursor::End);
m_textBrowser->setTextCursor(tc);
}
/*
* A helper method which writes the given string to the textbrowser
*/
void OutputDialog::writeToTabOutput(const QString &msg, TreatURLLinks treatURLLinks)
{
utils::writeToTextBrowser(m_textBrowser, msg, treatURLLinks);
}
/*
* Slot called whenever PacmanExec emits a new output
*/
void OutputDialog::onWriteOutput(const QString &output)
{
utils::positionTextEditCursorAtEnd(m_textBrowser);
m_textBrowser->insertHtml(output);
m_textBrowser->ensureCursorVisible();
}
/*
* Helper method to find the given "findText" in a TextEdit
*/
bool OutputDialog::textInTabOutput(const QString& findText)
{
return (utils::strInQTextEdit(m_textBrowser, findText));
}
/*
* Slot called whenever PacmanExec finishes its job
*/
void OutputDialog::pacmanProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
m_progressBar->close();
if ((exitCode == 0) && exitStatus == QProcess::NormalExit)
{
writeToTabOutput("<br><b>" + StrConstants::getCommandFinishedOK() + "</b><br>");
}
else
{
writeToTabOutput("<br><b>" + StrConstants::getCommandFinishedWithErrors() + "</b><br>");
}
if (exitCode != 0 && (textInTabOutput("conflict"))) //|| _textInTabOutput("could not satisfy dependencies")))
{
int res = QMessageBox::question(this, StrConstants::getThereHasBeenATransactionError(),
StrConstants::getConfirmExecuteTransactionInTerminal(),
QMessageBox::Yes|QMessageBox::No, QMessageBox::No);
if (res == QMessageBox::Yes)
{
m_pacmanExec->runLastestCommandInTerminal();
return;
}
}
delete m_pacmanExec;
m_upgradeRunning = false;
}
/*
* User changed text to search in the line edit
*/
void OutputDialog::onSearchBarTextChanged(QString strToSearch)
{
utils::searchBarTextChangedInTextBrowser(m_textBrowser, m_searchBar, strToSearch);
}
/*
* User closed the search bar
*/
void OutputDialog::onSearchBarClosed()
{
utils::searchBarClosedInTextBrowser(m_textBrowser, m_searchBar);
}
/*
* User requested next found string
*/
void OutputDialog::onSearchBarFindNext()
{
utils::searchBarFindNextInTextBrowser(m_textBrowser, m_searchBar);
}
/*
* User requested previous found string
*/
void OutputDialog::onSearchBarFindPrevious()
{
utils::searchBarFindPreviousInTextBrowser(m_textBrowser, m_searchBar);
}
/*
* Let's not exit the dialog if a system upgrade is running
*/
void OutputDialog::closeEvent(QCloseEvent *event)
{
//We cannot quit while there is a running transaction!
if(m_upgradeRunning)
{
event->ignore();
}
else
{
emit finished(0);
event->accept();
}
}
/*
* Whenever user presses Ctrl+F, we show the searchbar again
*/
void OutputDialog::keyPressEvent(QKeyEvent *ke)
{
if(ke->key() == Qt::Key_F && ke->modifiers() == Qt::ControlModifier)
{
m_searchBar->show();
}
else if(ke->key() == Qt::Key_Escape)
{
reject();
}
else ke->accept();
}

Some files were not shown because too many files have changed in this diff Show More