558 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
ewilly
78604ed1f6 Merge pull request #5 from aarnt/master
Merge
2018-06-04 23:07:05 +02:00
ewilly
ab5866427e Merge pull request #4 from aarnt/master
- BugFix in Qt 5.11 compile.
2018-05-30 06:27:50 +02: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
ewilly
f9063cf252 Pikaur : Fix color & search in aur 2018-05-04 16:23:35 +02: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
ewilly
c053cf21a6 Added Pikaur (AUR tool) support 2018-04-03 22:08:27 +02:00
466 changed files with 62746 additions and 32527 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

158
CHANGELOG
View File

@@ -1,4 +1,104 @@
0.9.0
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.
@@ -54,7 +154,7 @@
BugFix: Disable alien icon while in transaction.
BugFix: Do not ask twice for password if a pacman lck file exists.
0.8.1
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.
@@ -77,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).
@@ -108,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.
@@ -138,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.
@@ -166,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
@@ -192,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).
@@ -227,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).
@@ -281,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.
@@ -296,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.
@@ -307,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.
@@ -354,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.
@@ -375,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.
@@ -401,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.
@@ -416,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.
@@ -428,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.

View File

@@ -1,71 +1,52 @@
pkgname=octopi
pkgver=0.9.0
pkgver=0.11.0
pkgrel=1
pkgdesc="This is Octopi, a powerful Pacman frontend using Qt libs"
url="https://octopiproject.wordpress.com/"
url="https://tintaescura.com/projects/octopi/"
arch=('i686' 'x86_64')
license=('GPL2')
depends=('pacman' 'pacman-contrib' 'pkgfile' 'knotifications' 'alpm_octopi_utils' 'xterm' 'qtermwidget')
optdepends=('kdesu: for KDE'
'gksu: for XFCE, Gnome, LXDE, Cinnamon'
'gnome-keyring: for password management'
'yaourt: for AUR support')
depends=('alpm_octopi_utils' 'pkgfile' 'qtermwidget' 'sudo')
makedepends=('git')
groups=('system')
install=octopi.install
source=("https://github.com/aarnt/octopi/archive/v${pkgver}.tar.gz")
#md5sums=('')
source=("git+https://github.com/aarnt/octopi.git")
md5sums=('SKIP')
prepare() {
cd ${pkgname}-${pkgver}
cd "${pkgname}"
# 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/octopi-notifier.pro
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}-${pkgver}
qmake-qt5 octopi.pro
make
cd notifier/pacmanhelper
qmake-qt5 QMAKE_CFLAGS_RELEASE="${CFLAGS}" QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" QMAKE_LFLAGS_RELEASE="${LDFLAGS}" pacmanhelper.pro
make
cd ../..
cd notifier/octopi-notifier
qmake-qt5 QMAKE_CFLAGS_RELEASE="${CFLAGS}" QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" QMAKE_LFLAGS_RELEASE="${LDFLAGS}" octopi-notifier.pro
make
cd ../..
cd repoeditor
qmake-qt5 QMAKE_CFLAGS_RELEASE="${CFLAGS}" QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" QMAKE_LFLAGS_RELEASE="${LDFLAGS}" octopi-repoeditor.pro
make
cd ..
cd cachecleaner
qmake-qt5 QMAKE_CFLAGS_RELEASE="${CFLAGS}" QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" QMAKE_LFLAGS_RELEASE="${LDFLAGS}" octopi-cachecleaner.pro
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() {
cd ${pkgname}-${pkgver}
make INSTALL_ROOT=${pkgdir} install
cd notifier/pacmanhelper
make INSTALL_ROOT=${pkgdir} install
cd ../..
cd notifier/octopi-notifier
make INSTALL_ROOT=${pkgdir} install
cd ../..
cd repoeditor
make INSTALL_ROOT=${pkgdir} install
cd ..
cd cachecleaner
make INSTALL_ROOT=${pkgdir} install
cd "${pkgname}"
make INSTALL_ROOT="${pkgdir}" install
_subdirs="cachecleaner helper notifier repoeditor sudo"
for _subdir in $_subdirs; do
pushd $_subdir
make INSTALL_ROOT="${pkgdir}" install
popd
done
}

125
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)
Currently, 9 Linux distros are compatible with it
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://archbang.org/)
* [Arch](https://www.archlinux.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/)
* [mooOS](http://mooos.sourceforge.net/)
* [Netrunner (rolling)](http://www.netrunner.com/netrunner-rolling-release/)
* [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:
* [Alpm_octopi_utils](https://github.com/aarnt/alpm_octopi_utils/) library
* A privilege escalation tool to use it. Octopi supports gksu, kdesu and lxqt-sudo for that
* qtermwidget >= 0.8 in order to build Octopi with embedded terminal support
* 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
### Simple steps to build Octopi code
### To install Octopi using pacman
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
# 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 AUR support (that "alien" icon at toolbar)
### Steps to build Octopi source code (CMake)
To enable AUR support, you'll need to install [yaourt](https://archlinux.fr/yaourt-en),
[pacaur](https://github.com/rmarquis/pacaur) or [trizen](https://github.com/trizen/trizen) in your system.
In Chakra, [chaser](https://github.com/ccr-tools/chaser) 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/
* 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

@@ -23,6 +23,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "../src/strconstants.h"
#include <QKeyEvent>
#include <QTcpServer>
#include <QTcpSocket>
#include <QMessageBox>
/*
* CacheCleaner window constructor
@@ -40,20 +43,22 @@ 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->cleanUninstalledButton);
m_tcpServer = new QTcpServer(this);
connect(m_tcpServer, &QTcpServer::newConnection, this, &CacheCleaner::onSendInfoToOctopiHelper);
restoreGeometry(SettingsManager::getCacheCleanerWindowSize());
}
@@ -67,6 +72,69 @@ 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
*/

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;
}
@@ -40,10 +42,15 @@ 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 *);

View File

@@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "cachecleaner.h"
#include "../../src/strconstants.h"
#include "../src/strconstants.h"
#include "../src/QtSolutions/qtsingleapplication.h"
#include <QApplication>
@@ -31,37 +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 );
return (-2);
}
if (!UnixCommand::hasTheExecutable("paccache"))
if (!UnixCommand::hasTheExecutable(QStringLiteral("paccache")))
{
QMessageBox::critical( 0, StrConstants::getApplicationName(), StrConstants::getExecutableCouldNotBeFound().arg("\"paccache\""));
return ( -3 );
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();
QResource::registerResource("./resources.qrc");
if (w.startServer())
{
app.setActivationWindow(&w);
w.show();
QResource::registerResource(QStringLiteral("./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 \
@@ -33,6 +42,7 @@ SOURCES += main.cpp \
cachecleaner.cpp \
packagegroupmodel.cpp \
../src/strconstants.cpp \
../src/qaesencryption.cpp \
../src/unixcommand.cpp \
../src/wmhelper.cpp \
../src/terminal.cpp \
@@ -94,8 +104,9 @@ 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) {

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() ) );
@@ -67,6 +70,7 @@ PackageGroupModel::PackageGroupModel(QString optionsString,
*/
PackageGroupModel::~PackageGroupModel()
{
UnixCommand::removeSharedMemFiles();
delete m_acc;
delete m_cmd;
}
@@ -96,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());
}
/*
@@ -119,7 +123,12 @@ 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;
}
@@ -137,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
@@ -149,7 +158,7 @@ bool PackageGroupModel::isSUAvailable()
*/
void PackageGroupModel::cleanCache()
{
if (isExecutingCommand) return;
if (isExecutingCommand || UnixCommand::isPacmanDbLocked()) return;
if (!isSUAvailable())
return;
@@ -164,9 +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);
}
/*
@@ -185,7 +195,7 @@ void PackageGroupModel::finishedDryrun(int exitCode, QProcess::ExitStatus)
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)
{
@@ -229,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(QRegularExpression("\\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"));
@@ -250,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,11 +82,12 @@ class PackageGroupModel : public QObject
private:
bool isSUAvailable();
bool isExecutingCommand;
QSharedMemory *m_sharedMemory;
public:
PackageGroupModel(QString, QListWidget *, QSpinBox *, QPushButton *, QPushButton *);
~PackageGroupModel();
bool isExecutingCommand;
protected:
QString m_optionsString;

View File

@@ -41,6 +41,7 @@
<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>
@@ -48,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>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

@@ -4,7 +4,7 @@
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation> - Octopi</translation>
<translation> - </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> , ि </translation>
<translation> </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="102"/>
@@ -40,12 +40,12 @@
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
<source>Clean</source>
<translation></translation>
<translation></translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
<source>Clean %1</source>
<translation>%1 </translation>
<translation>%1 </translation>
</message>
</context>
</TS>

View File

@@ -4,7 +4,7 @@
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="14"/>
<source>Cache Cleaner - Octopi</source>
<translation> - Octopi</translation>
<translation> - </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="49"/>
@@ -21,13 +21,13 @@
<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"/>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="183"/>
<source>Refresh</source>
<translation>ि </translation>
<translation> ि </translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/ui/cachecleaner.ui" line="127"/>
@@ -40,12 +40,12 @@
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="199"/>
<source>Clean</source>
<translation> </translation>
<translation></translation>
</message>
<message>
<location filename="Projects/octopi/cachecleaner/packagegroupmodel.cpp" line="222"/>
<source>Clean %1</source>
<translation>%1 </translation>
<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,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="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>

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,9 +34,12 @@ class QIcon;
class QMenu;
class QAction;
class QFileSystemWatcher;
class PacmanHelperClient;
class OptionsDialog;
class TransactionDialog;
class QTcpServer;
class OutputDialog;
enum CheckUpdate { ectn_AUTO_CHECK, ectn_USER_CHECK};
#ifdef KSTATUS
class KStatusNotifierItem;
@@ -47,23 +50,25 @@ 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); }
@@ -73,35 +78,45 @@ private slots:
void exitNotifier();
void doSystemUpgrade();
void doAURUpgrade();
void doSystemUpgradeFinished();
void doSystemUpgradeFinished(int exitCode);
void toggleEnableInterface(bool state);
void showOptionsDialog();
void onSendInfoToOctopiHelper();
void onCallRefreshAppIcon();
private:
TransactionDialog *m_transactionDialog;
OptionsDialog *m_optionsDialog;
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_actionOptions;
QAction *m_actionSyncDatabase;
QAction *m_actionCheckUpdates;
QAction *m_actionSystemUpgrade;
QAction *m_actionAURUpgrade;
QAction *m_actionAbout;
QAction *m_actionExit;
PacmanExec *m_pacmanExec;
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;
@@ -109,15 +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,81 +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);
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();
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,126 +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 KSTATUS define in plasma 5 desktops!
DEFINES += ALPM_BACKEND QTERMWIDGET #KSTATUS
CONFIG += qt warn_on debug link_pkgconfig ALPM_BACKEND QTERMWIDGET
ALPM_BACKEND {
QMAKE_CXXFLAGS += -std=c++11
PKGCONFIG += glib-2.0 libalpm
LIBS += -lalpm_octopi_utils
} else {
QMAKE_CXXFLAGS += -std=c++11
}
QTERMWIDGET {
LIBS += -lqtermwidget5
}
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
HEADERS += \
mainwindow.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 \
../../src/optionsdialog.h
QTERMWIDGET{
HEADERS += ../../src/termwidget.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 \
../pacmanhelper/pacmanhelperclient.cpp \
../../src/utils.cpp \
../../src/transactiondialog.cpp \
../../src/argumentlist.cpp \
../../src/pacmanexec.cpp \
../../src/searchlineedit.cpp \
../../src/searchbar.cpp \
../../src/optionsdialog.cpp
QTERMWIDGET{
SOURCES += ../../src/termwidget.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

@@ -19,14 +19,11 @@
*/
#include "outputdialog.h"
#include "../../src/pacmanexec.h"
#include "../../src/searchbar.h"
#include "../../src/uihelper.h"
#include "../../src/strconstants.h"
#ifdef QTERMWIDGET
#include "../../src/termwidget.h"
#endif
#include "../src/pacmanexec.h"
#include "../src/searchbar.h"
#include "../src/uihelper.h"
#include "../src/strconstants.h"
#include "../src/termwidget.h"
#include <QTextBrowser>
#include <QVBoxLayout>
@@ -45,8 +42,11 @@
*/
OutputDialog::OutputDialog(QWidget *parent): QDialog(parent)
{
m_exitCode = 0;
m_upgradeRunning = false;
m_debugInfo = false;
m_AURUpgradeExecuting = false;
m_sharedMemory = new QSharedMemory(QStringLiteral("org.arnt.octopi"), this);
}
/*
@@ -68,9 +68,9 @@ void OutputDialog::setListOfAURPackagesToUpgrade(const QString &list)
/*
* Controls if this dialog was called for Pacman or AUR upgrade
*/
void OutputDialog::setPacmanSystemUpgrade(bool value)
void OutputDialog::setViewAsTextBrowser(bool value)
{
m_pacmanSystemUpgrade = value;
m_viewAsTextBrowser = value;
}
/*
@@ -79,7 +79,6 @@ void OutputDialog::setPacmanSystemUpgrade(bool value)
void OutputDialog::initAsTextBrowser()
{
this->resize(650, 500);
setWindowTitle(QCoreApplication::translate("MainWindow", "System upgrade"));
setWindowIcon(IconHelper::getIconSystemUpgrade());
@@ -122,11 +121,8 @@ void OutputDialog::initAsTextBrowser()
m_progressBar->setMaximum(100);
m_progressBar->setValue(0);
m_progressBar->close();
//m_searchBar->show();
}
#ifdef QTERMWIDGET
/*
* Let's build the main widgets for AUR Upgrade...
*/
@@ -138,12 +134,29 @@ void OutputDialog::initAsTermWidget()
m_mainLayout = new QVBoxLayout(this);
m_console = new TermWidget(this);
//connect(m_console, SIGNAL(finished()), this, SLOT(initAsTermWidget()));
m_mainLayout->addWidget(m_console);
m_mainLayout->setSpacing(0);
m_mainLayout->setSizeConstraint(QLayout::SetMinimumSize);
m_mainLayout->setContentsMargins(2, 2, 2, 2);
m_console->setFocus();
m_console->setFocus();
//m_console->toggleShowSearchBar();
m_console->installEventFilter(this);
}
/*
* When user wants to upgrade system using a terminal
*/
void OutputDialog::doSystemUpgradeInTerminal()
{
m_pacmanExec = new PacmanExec(this);
m_pacmanExec->setSharedMemory(m_sharedMemory);
QObject::connect(m_pacmanExec, SIGNAL(commandToExecInQTermWidget(QString)), this,
SLOT(onExecCommandInTabTerminal(QString)));
m_upgradeRunning = true;
m_pacmanExec->doSystemUpgradeInTerminal();
}
/*
@@ -151,7 +164,9 @@ void OutputDialog::initAsTermWidget()
*/
void OutputDialog::doAURUpgrade()
{
m_pacmanExec = new PacmanExec();
m_AURUpgradeExecuting=true;
m_pacmanExec = new PacmanExec(this);
m_pacmanExec->setSharedMemory(m_sharedMemory);
QObject::connect(m_pacmanExec, SIGNAL(commandToExecInQTermWidget(QString)), this,
SLOT(onExecCommandInTabTerminal(QString)));
m_upgradeRunning = true;
@@ -165,11 +180,11 @@ void OutputDialog::onExecCommandInTabTerminal(QString command)
{
disconnect(m_console, SIGNAL(onPressAnyKeyToContinue()), this, SLOT(onPressAnyKeyToContinue()));
disconnect(m_console, SIGNAL(onCancelControlKey()), this, SLOT(onCancelControlKey()));
disconnect(m_console, SIGNAL(onKeyQuit()), this, SLOT(reject()));
connect(m_console, SIGNAL(onPressAnyKeyToContinue()), this, SLOT(onPressAnyKeyToContinue()));
connect(m_console, SIGNAL(onCancelControlKey()), this, SLOT(onCancelControlKey()));
connect(m_console, SIGNAL(onKeyQuit()), this, SLOT(reject()));
m_console->enter();
m_console->execute("clear");
m_console->execute(command);
m_console->setFocus();
}
@@ -179,16 +194,14 @@ void OutputDialog::onExecCommandInTabTerminal(QString command)
*/
void OutputDialog::onPressAnyKeyToContinue()
{
m_console->enter();
m_console->execute("clear");
m_console->setFocus();
if (!m_upgradeRunning) return;
if (m_pacmanExec == nullptr)
if (m_pacmanExec != nullptr)
delete m_pacmanExec;
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
m_upgradeRunning = false;
reject();
}
/*
@@ -198,23 +211,25 @@ void OutputDialog::onCancelControlKey()
{
if (m_upgradeRunning)
{
if (m_pacmanExec == nullptr)
if (m_pacmanExec != nullptr)
delete m_pacmanExec;
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
m_pacmanExec = nullptr;
m_upgradeRunning = false;
reject();
}
}
#endif
/*
* Calls PacmanExec to begin system upgrade
*/
void OutputDialog::doSystemUpgrade()
{
m_pacmanExec = new PacmanExec();
//Is pacman being executed?
if (UnixCommand::isPacmanDbLocked()) return;
m_pacmanExec = new PacmanExec(this);
m_pacmanExec->setSharedMemory(m_sharedMemory);
if (m_debugInfo)
m_pacmanExec->setDebugMode(true);
@@ -230,27 +245,29 @@ void OutputDialog::doSystemUpgrade()
m_pacmanExec->doSystemUpgrade();
}
/*
* Make the shared memory available again
*/
void OutputDialog::detachSharedMemory()
{
m_sharedMemory->detach();
}
/*
* Centers the dialog in the screen
*/
void OutputDialog::show()
{
//If we are asking for a Pacman system upgrade...
if (m_pacmanSystemUpgrade) initAsTextBrowser();
#ifdef QTERMWIDGET
else initAsTermWidget();
#endif
if (m_viewAsTextBrowser)
initAsTextBrowser();
else
initAsTermWidget();
//utils::positionWindowAtScreenCenter(this);
//Let's restore the dialog size saved...
restoreGeometry(SettingsManager::getOutputDialogWindowSize());
QDialog::show();
if (m_pacmanSystemUpgrade) doSystemUpgrade();
#ifdef QTERMWIDGET
else doAURUpgrade();
#endif
}
/*
@@ -263,6 +280,8 @@ void OutputDialog::reject()
//Let's save the dialog size value before closing it.
QByteArray windowSize=saveGeometry();
SettingsManager::setOutputDialogWindowSize(windowSize);
emit finished(m_exitCode);
QDialog::reject();
}
}
@@ -323,19 +342,35 @@ bool OutputDialog::textInTabOutput(const QString& findText)
*/
void OutputDialog::pacmanProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
{
m_exitCode = exitCode;
m_progressBar->close();
if (SettingsManager::getShowStopTransaction()) m_toolButtonStopTransaction->close();
if ((exitCode == 0) && exitStatus == QProcess::NormalExit)
{
writeToTabOutput("<br><b>" + StrConstants::getCommandFinishedOK() + "</b><br>");
//If there are .pacnew files to print...
QStringList dotPacnewFiles = m_pacmanExec->getDotPacnewFileList();
if (dotPacnewFiles.count() > 0)
{
writeToTabOutput(QStringLiteral("<br>"));
foreach(QString dotPacnewFile, dotPacnewFiles)
{
if (!dotPacnewFile.contains(QLatin1String("<br>")))
writeToTabOutput( QLatin1String("<br>") + dotPacnewFile, ectn_DONT_TREAT_URL_LINK);
else
writeToTabOutput(dotPacnewFile, ectn_DONT_TREAT_URL_LINK);
}
}
writeToTabOutput(QLatin1String("<br><b>") + StrConstants::getCommandFinishedOK() + QLatin1String("</b><br>"));
}
else
{
writeToTabOutput("<br><b>" + StrConstants::getCommandFinishedWithErrors() + "</b><br>");
writeToTabOutput(QLatin1String("<br><b>") + StrConstants::getCommandFinishedWithErrors() + QLatin1String("</b><br>"));
}
if (exitCode != 0 && (textInTabOutput("conflict"))) //|| _textInTabOutput("could not satisfy dependencies")))
if (exitCode != 0 && (textInTabOutput(QStringLiteral("conflict")))) //|| _textInTabOutput("could not satisfy dependencies")))
{
int res = QMessageBox::question(this, StrConstants::getThereHasBeenATransactionError(),
StrConstants::getConfirmExecuteTransactionInTerminal(),
@@ -343,12 +378,13 @@ void OutputDialog::pacmanProcessFinished(int exitCode, QProcess::ExitStatus exit
if (res == QMessageBox::Yes)
{
m_pacmanExec->runLastestCommandInTerminal();
m_pacmanExec->runLatestCommandInTerminal();
return;
}
}
delete m_pacmanExec;
if (m_pacmanExec != nullptr) delete m_pacmanExec;
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
m_upgradeRunning = false;
}
@@ -363,10 +399,24 @@ void OutputDialog::onCanStopTransaction(bool yesNo)
/*
* Kills all pacman processes
*
* Returns octopi-sudo exit code
*/
void OutputDialog::stopTransaction()
int OutputDialog::stopTransaction()
{
m_pacmanExec->cancelProcess();
int res=0;
if (!m_AURUpgradeExecuting)
{
res=m_pacmanExec->cancelProcess();
}
if (res != 1)
{
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
}
return res;
}
/*
@@ -409,12 +459,36 @@ void OutputDialog::closeEvent(QCloseEvent *event)
//We cannot quit while there is a running transaction!
if(m_upgradeRunning)
{
event->ignore();
int res = QMessageBox::question(this, StrConstants::getConfirmation(),
StrConstants::getThereIsARunningTransaction() + QLatin1Char('\n') +
StrConstants::getDoYouReallyWantToQuit(),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::No);
if (res == QMessageBox::Yes)
{
if (m_viewAsTextBrowser)
{
int ret=stopTransaction();
if (ret == 1)
{
event->ignore();
return;
}
}
if (m_sharedMemory->isAttached()) m_sharedMemory->detach();
m_upgradeRunning = false;
reject();
}
else
{
event->ignore();
}
}
else
{
emit finished(m_exitCode);
event->accept();
emit finished(0);
}
}
@@ -429,7 +503,78 @@ void OutputDialog::keyPressEvent(QKeyEvent *ke)
}
else if(ke->key() == Qt::Key_Escape)
{
reject();
if (m_upgradeRunning)
{
int res = QMessageBox::question(this, StrConstants::getConfirmation(),
StrConstants::getThereIsARunningTransaction() + QLatin1Char('\n') +
StrConstants::getDoYouReallyWantToQuit(),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::No);
if (res == QMessageBox::Yes)
{
if (m_viewAsTextBrowser)
{
int ret=stopTransaction();
if (ret == 1)
{
ke->ignore();
return;
}
}
m_upgradeRunning = false;
reject();
}
else
{
ke->ignore();
}
}
else reject();
}
else ke->accept();
}
/*
* Filters keypressevents from Console
*/
bool OutputDialog::eventFilter(QObject *, QEvent *event)
{
if(event->type() == QKeyEvent::KeyRelease)
{
QKeyEvent *ke = static_cast<QKeyEvent*>(event);
if (ke->key() == Qt::Key_Escape)
{
if (m_upgradeRunning)
{
int res = QMessageBox::question(this, StrConstants::getConfirmation(),
StrConstants::getThereIsARunningTransaction() + QLatin1Char('\n') +
StrConstants::getDoYouReallyWantToQuit(),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::No);
if (res == QMessageBox::Yes)
{
m_upgradeRunning = false;
reject();
return true;
}
else
{
ke->ignore();
return true;
}
}
else
{
reject();
return true;
}
}
else if(ke->key() == Qt::Key_F && ke->modifiers() == Qt::ControlModifier)
{
m_console->toggleShowSearchBar();
}
}
return false;
}

View File

@@ -21,7 +21,7 @@
#ifndef OUTPUTDIALOG_H
#define OUTPUTDIALOG_H
#include "../../src/constants.h"
#include "../src/constants.h"
#include <QDialog>
#include <QProcess>
@@ -39,6 +39,7 @@ class QCloseEvent;
class QKeyEvent;
class QToolButton;
class TermWidget;
class QSharedMemory;
class OutputDialog : public QDialog
{
@@ -53,35 +54,29 @@ private:
SearchBar *m_searchBar;
TermWidget *m_console;
QString m_listOfAURPackagesToUpgrade;
int m_exitCode;
bool m_upgradeRunning;
bool m_debugInfo;
bool m_pacmanSystemUpgrade;
bool m_viewAsTextBrowser;
bool m_AURUpgradeExecuting;
QAction *m_actionStopTransaction;
QToolButton *m_toolButtonStopTransaction;
QSharedMemory *m_sharedMemory;
void initAsTextBrowser();
void doSystemUpgrade();
void positionTextEditCursorAtEnd();
bool textInTabOutput(const QString& findText);
void writeToTabOutput(const QString &msg, TreatURLLinks treatURLLinks = ectn_TREAT_URL_LINK);
private slots:
#ifdef QTERMWIDGET
void initAsTermWidget();
void doAURUpgrade();
void onExecCommandInTabTerminal(QString command);
void onPressAnyKeyToContinue();
void onCancelControlKey();
#endif
void onPencertange(int percentage);
void onWriteOutput(const QString &output);
void pacmanProcessFinished(int exitCode, QProcess::ExitStatus exitStatus);
void onCanStopTransaction(bool yesNo);
void stopTransaction();
int stopTransaction();
//SearchBar slots
void onSearchBarTextChanged(QString strToSearch);
@@ -92,16 +87,27 @@ private slots:
protected:
virtual void closeEvent(QCloseEvent * event);
virtual void keyPressEvent(QKeyEvent * ke);
virtual bool eventFilter(QObject *, QEvent *);
public:
explicit OutputDialog(QWidget *parent = 0);
explicit OutputDialog(QWidget *parent = nullptr);
void setDebugMode(bool newValue);
void setListOfAURPackagesToUpgrade(const QString& list);
void setPacmanSystemUpgrade(bool value);
void setViewAsTextBrowser(bool value);
void doSystemUpgrade();
void detachSharedMemory();
public slots:
void show();
void reject();
void initAsTermWidget();
void doSystemUpgradeInTerminal();
void doAURUpgrade();
void onExecCommandInTabTerminal(QString command);
void onPressAnyKeyToContinue();
void onCancelControlKey();
};
#endif // OUTPUTDIALOG_H

View File

@@ -1,11 +0,0 @@
Command used to generate the PacmanHelperAdaptor:
qdbusxml2cpp -c PacmanHelperAdaptor
-a pacmanhelperadaptor.h:pacmanhelperadaptor.cpp
polkit/org.octopi.pacmanhelper.xml
Command used to generate the PacmanHelperClient:
qdbusxml2cpp -v -c PacmanHelperClient
-p pacmanhelperclient.h:pacmanhelperclient.cpp
polkit/org.octopi.pacmanhelper.xml

View File

@@ -1,11 +0,0 @@
#include "pacmanhelper.h"
#include <QCoreApplication>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
PacmanHelper pacmanHelper;
return a.exec();
}

View File

@@ -1,52 +0,0 @@
#include "pacmanhelper.h"
#include "pacmanhelperadaptor.h"
#include <QCoreApplication>
#include <QDBusConnection>
#include <QProcess>
#include <QDebug>
#include <QFile>
PacmanHelper::PacmanHelper(QObject *parent) :
QObject(parent)
{
(void) new PacmanHelperAdaptor(this);
if (!QDBusConnection::systemBus().registerService("org.octopi.pacmanhelper")) {
qDebug() << "Another helper is already running!";
QCoreApplication::instance()->quit();
}
if (!QDBusConnection::systemBus().registerObject("/", this)) {
qDebug() << "Unable to register service interface to dbus!";
QCoreApplication::instance()->quit();
}
}
void PacmanHelper::syncdb()
{
QProcess pacman;
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert("LANG", "us_EN");
pacman.setProcessEnvironment(env);
QStringList params;
params << "-Sy"; //-Syy or -Sy - eternal doubt!
QString command = "/usr/bin/pacman";
/*int code = */pacman.execute(command, params);
/*QString out;
out += "Return code of pacman command: " + QString::number(code) + "\n";
out += "Return of pacman command (stdout): " + pacman.readAllStandardOutput() + "\n";
out += "Return of pacman command (stderr): " + pacman.readAllStandardError() + "\n\n";
QString filename = QDir::homePath() + QDir::separator() + "output_pacmanhelper.txt";
QFile file( filename );
if ( file.open(QIODevice::ReadWrite) )
{
QTextStream stream( &file );
stream << out << endl;
}*/
emit syncdbcompleted();
}

View File

@@ -1,21 +0,0 @@
#ifndef PACMANHELPER_H
#define PACMANHELPER_H
#include <QObject>
#include <QtDBus/QDBusContext>
class PacmanHelper : public QObject, protected QDBusContext
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.octopi.pacmanhelper")
public:
explicit PacmanHelper(QObject *parent = 0);
public slots:
void syncdb();
signals:
void syncdbcompleted();
};
#endif // PACMANHELPER_H

View File

@@ -1,38 +0,0 @@
#-------------------------------------------------
#
# Project created by QtCreator 2013-06-01T15:00:00
#
#-------------------------------------------------
QT += core dbus
CONFIG += qt console warn_on
TEMPLATE = app
DESTDIR += ../bin
OBJECTS_DIR += ../build
MOC_DIR += ../build
UI_DIR += ../build
HEADERS += pacmanhelper.h \
pacmanhelperadaptor.h
SOURCES += main.cpp \
pacmanhelper.cpp \
pacmanhelperadaptor.cpp
# install
isEmpty(PREFIX) {
PREFIX = /usr
}
isEmpty(LIBDIR) {
LIBDIR = $$PREFIX/lib
}
target.path = $$LIBDIR/octopi
sources.files = $$SOURCES $$HEADERS *.pro
sources.path = .
INSTALLS += target

View File

@@ -1,216 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.1.0, 2016-09-25T11:28:08. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{dfbd4275-dad0-467b-b22e-ce4c855454cc}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{319f7b06-0ff3-4bf0-8a17-29f64ac46087}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/arnt/Projects/octopi/notifier/build</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">pacmanhelper</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/arnt/Projects/octopi/notifier/pacmanhelper/pacmanhelper.pro</value>
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">pacmanhelper.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/home/arnt/Projects/octopi/notifier/bin</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">18</value>
</data>
<data>
<variable>Version</variable>
<value type="int">18</value>
</data>
</qtcreator>

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