mirror of
https://github.com/aarnt/octopi.git
synced 2025-11-18 00:24:42 +01:00
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90e3796c9a | ||
|
|
02165991fe | ||
|
|
378b563dad | ||
|
|
11d37767c5 | ||
|
|
9af37e9401 | ||
|
|
891915ec82 | ||
|
|
ce61acacc1 | ||
|
|
a0bfee3f9e | ||
|
|
3658709051 | ||
|
|
e0c10b0fe5 | ||
|
|
798f587c4f | ||
|
|
8ad766b8a6 | ||
|
|
bcedb72249 | ||
|
|
0238c0234e | ||
|
|
1f983e495c | ||
|
|
9124d2f1e2 | ||
|
|
ef70d2aa24 | ||
|
|
4ed73e110b | ||
|
|
fe479d09fb | ||
|
|
b7ea5564cb | ||
|
|
2cc5ef39f8 | ||
|
|
e6441f7bf8 | ||
|
|
c4e0c492f1 | ||
|
|
c3c5aafac6 | ||
|
|
6524ea60ad | ||
|
|
628660c086 | ||
|
|
6ba7859027 | ||
|
|
bc61ca8672 | ||
|
|
62b8fda959 | ||
|
|
ee65991e8d | ||
|
|
0d6cccf8f0 | ||
|
|
096068ccc3 | ||
|
|
708b60e50e |
11
CHANGELOG
11
CHANGELOG
@@ -1,3 +1,14 @@
|
||||
0.3.1
|
||||
Added support for Qt5.
|
||||
Added chinese (Taiwan), malay, slovak and ukrainian translations.
|
||||
Added support to KaOS, a lean KDE centric Linux distro.
|
||||
Added support to installation of local packages with GUI feedback.
|
||||
Updated translations.
|
||||
Changed widget for package groups, from combobox to treeview.
|
||||
BugFix: When inserting an optional dependency package or removing a dep,
|
||||
first searches into transaction queue for them.
|
||||
BugFix: Prevent header resizing in File and Transaction tabs.
|
||||
|
||||
0.3
|
||||
Code cleanings.
|
||||
BugFix: No need to refresh package list after a cache clean.
|
||||
|
||||
2
PKGBUILD
2
PKGBUILD
@@ -1,5 +1,5 @@
|
||||
pkgname=('octopi' 'octopi-notifier')
|
||||
pkgver=0.3
|
||||
pkgver=0.3.1
|
||||
pkgrel=1
|
||||
pkgdesc="a powerful Pacman frontend using Qt libs"
|
||||
arch=('i686' 'x86_64')
|
||||
|
||||
1
THANKS
1
THANKS
@@ -2,6 +2,7 @@ A very special thanks goes to:
|
||||
|
||||
- All Octopi translators listed in TRANSLATIONS file!
|
||||
- Alex Fredrich, for testing, suggestions and icons
|
||||
- Anke Boersma (demm), for supporting Octopi in KaOS
|
||||
- Bernardo M. Savone (Bersil), for testing and spreading the word
|
||||
- Damián Nohales (eagleoneraptor), for pkgfile support
|
||||
- Edgar Aloísio Berger, for spreading the word by email
|
||||
|
||||
@@ -2,6 +2,7 @@ Arabic: karim (Karim Oulad Chalha)
|
||||
Brazilian Portuguese: arnt (Alexandre Albuquerque Arnt)
|
||||
Bulgarian: loot270 (Galin Iskrenov)
|
||||
Catalan: oriolfa (Oriol Fernandez)
|
||||
Chinese (Taiwan): s8321414 (冥王歐西里斯)
|
||||
Czech: fri
|
||||
Danish: Snubbi (Carl Andersen)
|
||||
Dutch: jsm (Jasper van der Marel)
|
||||
@@ -16,6 +17,7 @@ Hungarian: lajos (Lajos Pasztor)
|
||||
Indonesian: Se7enTime (Mohamad Hasan Al Banna)
|
||||
Italian: bersil (Bernardo Miguel Savone)
|
||||
Lithuanian: liudas (Liudas Ališauskas)
|
||||
Malay: Puretech
|
||||
Norwegian Bokmål: viking60
|
||||
Polish: poker98face (Kuba Kaczmarzyk)
|
||||
Portuguese: arcorreia (António Correia)
|
||||
@@ -23,9 +25,11 @@ Romanian: Ayceman (Alexandru Ianu)
|
||||
Russian: macbet (Daniil) and ualmasov (Umidjon Almasov)
|
||||
Serbian: milenkin (Milena Petrović)
|
||||
Serbian-latin: GameBoyT (GameBoy)
|
||||
Slovak: roslav
|
||||
Spanish: tufadorin
|
||||
Spanish - Latin America: CostGranda (Cost Granda)
|
||||
Swedish: riiga
|
||||
Turkish: yfdogan (Yusuf Faruk DOĞAN)
|
||||
Ukrainian: zubr139
|
||||
Uzbek: ualmasov (Umidjon Almasov)
|
||||
Vietnamese: ppanhh (Anh Phan)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "../../src/wmhelper.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QtGui>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@@ -10,15 +11,19 @@ int main(int argc, char *argv[])
|
||||
|
||||
QApplication a(argc, argv);
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#ifndef KAOS
|
||||
QApplication::setGraphicsSystem(QLatin1String("raster"));
|
||||
|
||||
if(UnixCommand::getLinuxDistro() == ectn_MANJAROLINUX &&
|
||||
!WMHelper::isKDERunning())
|
||||
!WMHelper::isKDERunning())
|
||||
{
|
||||
qApp->setStyle(new QGtkStyle());
|
||||
}
|
||||
else
|
||||
qApp->setStyle(new QCleanlooksStyle);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
QTranslator appTranslator;
|
||||
appTranslator.load(":/resources/translations/octopi_" +
|
||||
@@ -27,5 +32,6 @@ int main(int argc, char *argv[])
|
||||
a.setQuitOnLastWindowClosed(false);
|
||||
MainWindow w;
|
||||
QResource::registerResource("./resources.qrc");
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
{
|
||||
m_pacmanDatabaseSystemWatcher =
|
||||
new QFileSystemWatcher(QStringList() << ctn_PACMAN_DATABASE_DIR, this);
|
||||
|
||||
initSystemTrayIcon();
|
||||
}
|
||||
|
||||
@@ -30,10 +29,15 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
void MainWindow::initSystemTrayIcon()
|
||||
{
|
||||
m_commandExecuting = ectn_NONE;
|
||||
|
||||
m_outdatedPackageList = new QStringList();
|
||||
m_systemTrayIcon = new QSystemTrayIcon(this);
|
||||
m_systemTrayIcon->setObjectName("systemTrayIcon");
|
||||
|
||||
m_icon = IconHelper::getIconOctopiTransparent();
|
||||
m_systemTrayIcon->setIcon(m_icon);
|
||||
setWindowIcon(m_icon);
|
||||
m_systemTrayIcon->show();
|
||||
|
||||
m_actionExit = new QAction(IconHelper::getIconExit(), tr("Exit"), this);
|
||||
connect(m_actionExit, SIGNAL(triggered()), this, SLOT(exitNotifier()));
|
||||
|
||||
@@ -48,42 +52,6 @@ void MainWindow::initSystemTrayIcon()
|
||||
m_actionSystemUpgrade->setText(tr("System upgrade"));
|
||||
connect(m_actionSystemUpgrade, SIGNAL(triggered()), this, SLOT(runOctopi()));
|
||||
|
||||
refreshAppIcon();
|
||||
|
||||
if (m_numberOfOutdatedPackages == 0 && m_numberOfOutdatedYaourtPackages == 0)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip("");
|
||||
}
|
||||
else if (m_numberOfOutdatedPackages > 0)
|
||||
{
|
||||
QString notification;
|
||||
|
||||
if (m_numberOfOutdatedPackages == 1)
|
||||
{
|
||||
notification = StrConstants::getOneNewUpdate();
|
||||
m_systemTrayIcon->setToolTip(notification);
|
||||
}
|
||||
else if (m_numberOfOutdatedPackages > 1)
|
||||
{
|
||||
notification = StrConstants::getNewUpdates().arg(m_numberOfOutdatedPackages);
|
||||
m_systemTrayIcon->setToolTip(notification);
|
||||
}
|
||||
}
|
||||
else if (m_numberOfOutdatedYaourtPackages > 0)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip("");
|
||||
|
||||
if (m_numberOfOutdatedYaourtPackages == 1)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getOneNewUpdate());
|
||||
}
|
||||
else if (m_numberOfOutdatedYaourtPackages > 1)
|
||||
{
|
||||
m_systemTrayIcon->setToolTip(StrConstants::getNewUpdates().arg(m_numberOfOutdatedYaourtPackages));
|
||||
}
|
||||
}
|
||||
|
||||
m_systemTrayIcon->show();
|
||||
m_systemTrayIconMenu = new QMenu( this );
|
||||
m_systemTrayIconMenu->addAction(m_actionOctopi);
|
||||
m_systemTrayIconMenu->addAction(m_actionSystemUpgrade);
|
||||
@@ -267,9 +235,10 @@ void MainWindow::doSystemUpgrade()
|
||||
}
|
||||
}
|
||||
else if (result == QDialogButtonBox::No)
|
||||
{
|
||||
{
|
||||
m_systemUpgradeDialog = false;
|
||||
toggleEnableInterface(true);
|
||||
refreshAppIcon();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,6 +300,11 @@ void MainWindow::pacmanHelperTimerTimeout()
|
||||
m_actionSystemUpgrade->setVisible(false);
|
||||
}
|
||||
|
||||
m_icon = IconHelper::getIconOctopiTransparent();
|
||||
m_systemTrayIcon->setIcon(m_icon);
|
||||
m_systemTrayIconMenu->close();
|
||||
m_systemTrayIcon->setContextMenu(0);
|
||||
|
||||
m_commandExecuting = ectn_SYNC_DATABASE;
|
||||
m_pacmanHelperClient->syncdb();
|
||||
}
|
||||
@@ -341,6 +315,7 @@ void MainWindow::pacmanHelperTimerTimeout()
|
||||
void MainWindow::afterPacmanHelperSyncDatabase()
|
||||
{
|
||||
m_actionOctopi->setEnabled(true);
|
||||
m_systemTrayIcon->setContextMenu(m_systemTrayIconMenu);
|
||||
m_systemTrayIconMenu->close();
|
||||
m_commandExecuting = ectn_NONE;
|
||||
|
||||
@@ -416,7 +391,17 @@ void MainWindow::sendNotification(const QString &msg)
|
||||
void MainWindow::refreshAppIcon()
|
||||
{
|
||||
m_outdatedPackageList = Package::getOutdatedPackageList();
|
||||
m_outdatedYaourtPackageList = Package::getOutdatedYaourtPackageList();
|
||||
|
||||
bool hasYaourt = UnixCommand::hasTheExecutable("yaourt");
|
||||
if (hasYaourt)
|
||||
{
|
||||
m_outdatedYaourtPackageList = Package::getOutdatedYaourtPackageList();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_outdatedYaourtPackageList = new QStringList();
|
||||
}
|
||||
|
||||
m_numberOfOutdatedPackages = m_outdatedPackageList->count();
|
||||
m_numberOfOutdatedYaourtPackages = m_outdatedYaourtPackageList->count();
|
||||
|
||||
@@ -455,22 +440,21 @@ void MainWindow::refreshAppIcon()
|
||||
m_actionSystemUpgrade->setVisible(true);
|
||||
}
|
||||
|
||||
m_icon = (IconHelper::getIconOctopiRed());
|
||||
m_icon = IconHelper::getIconOctopiRed();
|
||||
}
|
||||
else if(m_outdatedYaourtPackageList->count() > 0) //YELLOW ICON!
|
||||
{
|
||||
m_actionSystemUpgrade->setVisible(false);
|
||||
m_icon = (IconHelper::getIconOctopiYellow());
|
||||
m_icon = IconHelper::getIconOctopiYellow();
|
||||
}
|
||||
else //YEAHHH... GREEN ICON!
|
||||
{
|
||||
m_actionSystemUpgrade->setVisible(false);
|
||||
m_icon = (IconHelper::getIconOctopiGreen());
|
||||
m_icon = IconHelper::getIconOctopiGreen();
|
||||
}
|
||||
|
||||
setWindowIcon(m_icon);
|
||||
m_systemTrayIcon->setIcon(m_icon);
|
||||
m_systemTrayIcon->show();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -28,7 +28,7 @@ void PacmanHelper::syncdb()
|
||||
env.insert("LANG", "us_EN");
|
||||
pacman.setProcessEnvironment(env);
|
||||
|
||||
QString command = "pacman -Syy";
|
||||
QString command = "pacman -Sy"; //-Syy or -Sy - eternal doubt!
|
||||
pacman.execute(command);
|
||||
|
||||
emit syncdbcompleted();
|
||||
|
||||
73
octopi.pro
73
octopi.pro
@@ -19,6 +19,10 @@ UI_DIR += build
|
||||
|
||||
HEADERS += src/QtSolutions/qtsingleapplication.h \
|
||||
src/QtSolutions/qtlocalpeer.h \
|
||||
src/QtSolutions/qtsinglecoreapplication.h \
|
||||
src/QtSolutions/QtSingleApplication \
|
||||
src/QtSolutions/qtlockedfile.h \
|
||||
src/QtSolutions/QtLockedFile \
|
||||
src/mainwindow.h \
|
||||
src/strconstants.h \
|
||||
src/searchlineedit.h \
|
||||
@@ -29,20 +33,20 @@ HEADERS += src/QtSolutions/qtsingleapplication.h \
|
||||
src/packagecontroller.h \
|
||||
src/unixcommand.h \
|
||||
src/wmhelper.h \
|
||||
src/QtSolutions/qtsinglecoreapplication.h \
|
||||
src/QtSolutions/QtSingleApplication \
|
||||
src/QtSolutions/qtlockedfile.h \
|
||||
src/QtSolutions/QtLockedFile \
|
||||
src/treeviewpackagesitemdelegate.h \
|
||||
src/searchbar.h \
|
||||
src/transactiondialog.h \
|
||||
src/pacmanhelperclient.h \
|
||||
src/globals.h \
|
||||
src/multiselectiondialog.h \
|
||||
src/utils/processwrapper.h
|
||||
src/treeviewpackagesitemdelegate.h \
|
||||
src/searchbar.h \
|
||||
src/transactiondialog.h \
|
||||
src/pacmanhelperclient.h \
|
||||
src/globals.h \
|
||||
src/multiselectiondialog.h \
|
||||
src/utils/processwrapper.h
|
||||
|
||||
SOURCES += src/QtSolutions/qtsingleapplication.cpp \
|
||||
src/QtSolutions/qtlocalpeer.cpp \
|
||||
src/QtSolutions/qtsinglecoreapplication.cpp \
|
||||
src/QtSolutions/qtlockedfile.cpp \
|
||||
src/QtSolutions/qtlockedfile_win.cpp \
|
||||
src/QtSolutions/qtlockedfile_unix.cpp \
|
||||
src/main.cpp\
|
||||
src/mainwindow.cpp \
|
||||
src/searchlineedit.cpp \
|
||||
@@ -52,31 +56,26 @@ SOURCES += src/QtSolutions/qtsingleapplication.cpp \
|
||||
src/packagecontroller.cpp \
|
||||
src/unixcommand.cpp \
|
||||
src/wmhelper.cpp \
|
||||
src/QtSolutions/qtsinglecoreapplication.cpp \
|
||||
src/QtSolutions/qtlockedfile.cpp \
|
||||
src/QtSolutions/qtlockedfile_win.cpp \
|
||||
src/QtSolutions/qtlockedfile_unix.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/pacmanhelperclient.cpp \
|
||||
src/globals.cpp \
|
||||
src/multiselectiondialog.cpp \
|
||||
src/utils/processwrapper.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/pacmanhelperclient.cpp \
|
||||
src/globals.cpp \
|
||||
src/multiselectiondialog.cpp \
|
||||
src/utils/processwrapper.cpp
|
||||
|
||||
FORMS += ui/mainwindow.ui \
|
||||
ui/transactiondialog.ui \
|
||||
ui/multiselectiondialog.ui
|
||||
FORMS += ui/mainwindow.ui \
|
||||
ui/transactiondialog.ui \
|
||||
ui/multiselectiondialog.ui
|
||||
|
||||
RESOURCES += \
|
||||
resources.qrc
|
||||
RESOURCES += resources.qrc
|
||||
|
||||
OTHER_FILES += \
|
||||
src/QtSolutions/qtsinglecoreapplication.pri \
|
||||
@@ -111,4 +110,8 @@ TRANSLATIONS += resources/translations/octopi_pt_BR.ts \
|
||||
resources/translations/octopi_en_GB.ts \
|
||||
resources/translations/octopi_pt_PT.ts \
|
||||
resources/translations/octopi_sv.ts \
|
||||
resources/translations/octopi_hu.ts
|
||||
resources/translations/octopi_hu.ts \
|
||||
resources/translations/octopi_zh_TW.ts \
|
||||
resources/translations/octopi_ms_MY.ts \
|
||||
resources/translations/octopi_uk.ts \
|
||||
resources/translations/octopi_sk.ts
|
||||
|
||||
@@ -7,8 +7,10 @@
|
||||
<file>resources/styles/branch-open_BW.png</file>
|
||||
<file>resources/styles/branch-open.png</file>
|
||||
<file>resources/styles/vline.png</file>
|
||||
<file>resources/images/octopi_transparent.png</file>
|
||||
<file>resources/images/octopi_red.png</file>
|
||||
<file>resources/images/octopi_yellow.png</file>
|
||||
<file>resources/images/octopi_green.png</file>
|
||||
<file>resources/images/esf-search.png</file>
|
||||
<file>resources/images/esf-clear-active.png</file>
|
||||
<file>resources/images/esf-clear-hover.png</file>
|
||||
@@ -37,9 +39,9 @@
|
||||
<file>resources/images/find.png</file>
|
||||
<file>resources/images/rss.png</file>
|
||||
<file>resources/images/newer.png</file>
|
||||
<file>resources/images/octopi_green.png</file>
|
||||
<file>resources/images/foreign_green.png</file>
|
||||
<file>resources/images/foreign_red.png</file>
|
||||
<file>resources/images/show_groups.png</file>
|
||||
<file>resources/translations/octopi_pt_BR.qm</file>
|
||||
<file>resources/translations/octopi_fr_FR.qm</file>
|
||||
<file>resources/translations/octopi_es_ES.qm</file>
|
||||
@@ -70,5 +72,9 @@
|
||||
<file>resources/translations/octopi_sv.qm</file>
|
||||
<file>resources/translations/octopi_sr_RS.qm</file>
|
||||
<file>resources/translations/octopi_hu.qm</file>
|
||||
<file>resources/translations/octopi_zh_TW.qm</file>
|
||||
<file>resources/translations/octopi_ms_MY.qm</file>
|
||||
<file>resources/translations/octopi_uk.qm</file>
|
||||
<file>resources/translations/octopi_sk.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
BIN
resources/images/octopi_transparent.png
Normal file
BIN
resources/images/octopi_transparent.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
resources/images/show_groups.png
Normal file
BIN
resources/images/show_groups.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 405 B |
BIN
resources/translations/octopi_ms_MY.qm
Normal file
BIN
resources/translations/octopi_ms_MY.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_ms_MY.ts
Normal file
1046
resources/translations/octopi_ms_MY.ts
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -642,7 +642,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="189"/>
|
||||
<source>Build Date</source>
|
||||
<translation>Data generării</translation>
|
||||
<translation>Data construirii</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="193"/>
|
||||
|
||||
BIN
resources/translations/octopi_sk.qm
Normal file
BIN
resources/translations/octopi_sk.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_sk.ts
Normal file
1046
resources/translations/octopi_sk.ts
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -25,7 +25,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="107"/>
|
||||
<source>Output</source>
|
||||
<translation>Çıktı</translation>
|
||||
<translation>Rapor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="129"/>
|
||||
@@ -35,7 +35,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="137"/>
|
||||
<source>View</source>
|
||||
<translation>Görünüm</translation>
|
||||
<translation>Göster</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="150"/>
|
||||
@@ -56,7 +56,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="208"/>
|
||||
<source>Non installed</source>
|
||||
<translation>Kurulmamış</translation>
|
||||
<translation>Kurulmamış Paketler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="211"/>
|
||||
@@ -66,7 +66,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="220"/>
|
||||
<source>Commit</source>
|
||||
<translation>İşlemek</translation>
|
||||
<translation>İşlemleri Uygula</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="223"/>
|
||||
@@ -76,7 +76,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="232"/>
|
||||
<source>Rollback</source>
|
||||
<translation>Geri Almak</translation>
|
||||
<translation>İşlemleri Geri Al</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="235"/>
|
||||
@@ -86,7 +86,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="244"/>
|
||||
<source>Sync database</source>
|
||||
<translation>Veritabanı Eşleştirme</translation>
|
||||
<translation>Veritabanını senkronize et</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="247"/>
|
||||
@@ -106,7 +106,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="264"/>
|
||||
<source>System upgrade</source>
|
||||
<translation>Sistem Yükseltme</translation>
|
||||
<translation>Sistemi Yükselt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="267"/>
|
||||
@@ -134,7 +134,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="305"/>
|
||||
<source>Get latest distro news</source>
|
||||
<translation>Dağıtımın son bilgilerini getir</translation>
|
||||
<translation>Dağıtımla ilgili son haberleri getir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="308"/>
|
||||
@@ -149,7 +149,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="326"/>
|
||||
<source>Install group</source>
|
||||
<translation>Grup kur</translation>
|
||||
<translation>Grubu yükle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="335"/>
|
||||
@@ -159,7 +159,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="344"/>
|
||||
<source>Expand item</source>
|
||||
<translation>Öe genişlet</translation>
|
||||
<translation>Öğe genişlet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="353"/>
|
||||
@@ -189,7 +189,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="398"/>
|
||||
<source>Open terminal here</source>
|
||||
<translation>Burada uçbirim aç</translation>
|
||||
<translation>Burada konsol aç</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="407"/>
|
||||
@@ -219,12 +219,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="456"/>
|
||||
<source>Open root terminal</source>
|
||||
<translation>Yetkili kullanıcı hakları ile terminal aç</translation>
|
||||
<translation>Yetkili olarak konsol aç</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="461"/>
|
||||
<source>Usage</source>
|
||||
<translation>Kullanılan</translation>
|
||||
<translation>Octopi Kılavuzu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="464"/>
|
||||
@@ -234,17 +234,17 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/mainwindow.ui" line="472"/>
|
||||
<source>Install local package...</source>
|
||||
<translation>Yerel pakaet yükle...</translation>
|
||||
<translation>Bilgisayarından paket yükle...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/mainwindow_help.cpp" line="55"/>
|
||||
<source>For more information, visit:</source>
|
||||
<translation>Daha fazla bilgi için ziyaret edin</translation>
|
||||
<translation>Daha fazla bilgi için, bakınız:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/mainwindow_help.cpp" line="58"/>
|
||||
<source>A Qt4-based Pacman frontend,</source>
|
||||
<translation>QT4 temelli Pacman arayüzü</translation>
|
||||
<translation>A QT4-tabanlı Pacman arayüzü,</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/mainwindow_help.cpp" line="59"/>
|
||||
@@ -254,12 +254,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/mainwindow_help.cpp" line="77"/>
|
||||
<source>Package classification:</source>
|
||||
<translation>Paket sınıflandırması</translation>
|
||||
<translation>Paket sınıflandırması:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/mainwindow_help.cpp" line="80"/>
|
||||
<source>An installed package</source>
|
||||
<translation>Kurulu paket yok</translation>
|
||||
<translation>Yüklenmiş bir paket</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/mainwindow_help.cpp" line="82"/>
|
||||
@@ -284,7 +284,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/mainwindow_help.cpp" line="94"/>
|
||||
<source>An outdated foreign package</source>
|
||||
<translation>Eski paket dışarda kaldı</translation>
|
||||
<translation>Eski paket çıkarıldı</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/mainwindow_help.cpp" line="97"/>
|
||||
@@ -419,7 +419,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/mainwindow_help.cpp" line="153"/>
|
||||
<source>Ctrl+Shift+Y to display Yaourt group</source>
|
||||
<translation>Ctrl+Shift+Y kısayolu ile Yaourt grubunu görebilirsiniz</translation>
|
||||
<translation>Ctrl+Shift+Y kısayolu ile Yaourt grubunu görüntüle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/mainwindow_help.cpp" line="156"/>
|
||||
@@ -434,7 +434,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/mainwindow_help.cpp" line="160"/>
|
||||
<source>F4 to open a Terminal whitin the selected directory at Files tab</source>
|
||||
<translation>F4 Seçili dizin veya bölümde uçbirim açar</translation>
|
||||
<translation>F4 Seçili dizin veya bölümde konsolu açar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/mainwindow_help.cpp" line="162"/>
|
||||
@@ -457,7 +457,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="43"/>
|
||||
<source>Octopi usage help:</source>
|
||||
<translation>Octopi yardım kullanımı</translation>
|
||||
<translation>Octopi kullanma kılavuzu:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="44"/>
|
||||
@@ -497,12 +497,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="69"/>
|
||||
<source>No news could be found! Press Ctrl+G to download the latest news.</source>
|
||||
<translation>Yeni haberler bulunamadı. Son haberleri almak için Ctrl+G </translation>
|
||||
<translation>Yeni haber yok. Son haberleri almak için Ctrl+G kısayolunu kullanabilirsiniz.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="73"/>
|
||||
<source>This Linux distro seems to be incompatible with Octopi!</source>
|
||||
<translation>Bu Linux dağıtımı Octopi ile uyumsuz görünüyor.</translation>
|
||||
<translation>Bu Linux dağıtımı Octopi ile uyumsuz görünüyor!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="77"/>
|
||||
@@ -517,7 +517,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="89"/>
|
||||
<source>Usage</source>
|
||||
<translation>Kullanılan</translation>
|
||||
<translation>Octopi Kılavuzu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="93"/>
|
||||
@@ -542,12 +542,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="109"/>
|
||||
<source>Available version</source>
|
||||
<translation>Erişilebilir sürüm</translation>
|
||||
<translation>Mevcut sürüm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="113"/>
|
||||
<source>No description available.</source>
|
||||
<translation>Bir açıklama yok</translation>
|
||||
<translation>Bir açıklama yok.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="117"/>
|
||||
@@ -587,7 +587,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="145"/>
|
||||
<source>Required By</source>
|
||||
<translation>Gereklidir</translation>
|
||||
<translation>Gerekli</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="149"/>
|
||||
@@ -607,7 +607,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="161"/>
|
||||
<source>Replaces</source>
|
||||
<translation>Yer değiştirecek</translation>
|
||||
<translation>Yerine yüklenecek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="165"/>
|
||||
@@ -682,12 +682,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="221"/>
|
||||
<source>Output</source>
|
||||
<translation>Çıktı</translation>
|
||||
<translation>Rapor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="225"/>
|
||||
<source>News</source>
|
||||
<translation>Yenilikler</translation>
|
||||
<translation>Haberler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="229"/>
|
||||
@@ -712,7 +712,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="245"/>
|
||||
<source> (newer installed version is %1)</source>
|
||||
<translation>(sürüm yeni yüklendi %1)</translation>
|
||||
<translation>(yeni sürüm yüklendi %1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="249"/>
|
||||
@@ -732,12 +732,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="261"/>
|
||||
<source>There are %1 outdated packages in your system:</source>
|
||||
<translation>Sisteminizde %1 güncel olmayan paket var</translation>
|
||||
<translation>Sisteminizde güncel olmayan paketlerin durumu %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="265"/>
|
||||
<source>(version %1 is available)</source>
|
||||
<translation>%1 sürümü kullanılabilir durumda</translation>
|
||||
<translation>%1 yeni sürümü kullanılabilir durumda</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="269"/>
|
||||
@@ -762,7 +762,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="285"/>
|
||||
<source>Cleaning package cache...</source>
|
||||
<translation>Paket belleği temizleniyor</translation>
|
||||
<translation>Paket önbelleği temizleniyor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="289"/>
|
||||
@@ -772,7 +772,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="293"/>
|
||||
<source>Syncing</source>
|
||||
<translation>Eşleştiriliyor</translation>
|
||||
<translation>Senkronize ediliyor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="297"/>
|
||||
@@ -782,7 +782,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="301"/>
|
||||
<source>Synchronizing databases...</source>
|
||||
<translation>Veritabanı eşleştiriliyor...</translation>
|
||||
<translation>Veritabanını senkronize et...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="305"/>
|
||||
@@ -792,7 +792,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="309"/>
|
||||
<source>Starting full system upgrade...</source>
|
||||
<translation>Tüm sistem güncellemesi başlatılıyor...</translation>
|
||||
<translation>Sistem yükseltmesi başlıyor...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="313"/>
|
||||
@@ -812,22 +812,22 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="325"/>
|
||||
<source>Running command in terminal...</source>
|
||||
<translation>Komut uçbirimden yürütülüyor...</translation>
|
||||
<translation>Kurulum konsoldan yürütülüyor...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="329"/>
|
||||
<source>Command finished OK!</source>
|
||||
<translation>Komut tamamlandı!</translation>
|
||||
<translation>İşlem tamamlandı!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="333"/>
|
||||
<source>Command finished with errors!</source>
|
||||
<translation>Komut hatasız tamamlandı!</translation>
|
||||
<translation>Kurulum hatasız tamamlandı!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="337"/>
|
||||
<source>Retrieving %1</source>
|
||||
<translation>%1 Kurtarılıyor</translation>
|
||||
<translation>%1 Geri alınıyor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="341"/>
|
||||
@@ -837,22 +837,22 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="345"/>
|
||||
<source>The following target needs to be retrieved</source>
|
||||
<translation>Sıradaki hedef kurtarılmalı</translation>
|
||||
<translation>Sıradaki hedef yükseltilmeli</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="349"/>
|
||||
<source>The following target will be removed</source>
|
||||
<translation>Sıradaki hedef kaldırılacak</translation>
|
||||
<translation>Sıradaki hedef paket kaldırılacak</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="353"/>
|
||||
<source>The following %1 targets need to be retrieved</source>
|
||||
<translation>Sıradaki %1 hedef kurtarılmalı</translation>
|
||||
<translation>Sıradaki %1 hedef paket yükseltilmeli</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="357"/>
|
||||
<source>The following %1 targets will be removed</source>
|
||||
<translation>Sıradaki %1 hedefler kaldırılacak</translation>
|
||||
<translation>Sıradaki %1 hedef paket kaldırılacak</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="361"/>
|
||||
@@ -862,12 +862,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="365"/>
|
||||
<source>There are no new updates available!</source>
|
||||
<translation>Yeni güncelleme yok</translation>
|
||||
<translation>Yeni güncelleme yok!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="369"/>
|
||||
<source>There is an update available!</source>
|
||||
<translation>Güncelleme var</translation>
|
||||
<translation>Güncelleme var!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="373"/>
|
||||
@@ -877,7 +877,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="377"/>
|
||||
<source>Confirm?</source>
|
||||
<translation>Doğrula?</translation>
|
||||
<translation>Kabul et?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="381"/>
|
||||
@@ -897,17 +897,17 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="393"/>
|
||||
<source>Do you want to execute this transaction in a Terminal?</source>
|
||||
<translation>Bu işlemi uçbirimde görüntülemek istiyor musunuz?</translation>
|
||||
<translation>Bu işlemi konsolda yapmak ister misiniz?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="397"/>
|
||||
<source>Do you really want to clean the package cache?</source>
|
||||
<translation>Paket cache belleğini temizlemek istiyor musunuz?</translation>
|
||||
<translation>Paket önbelleğini temizlemek istiyor musunuz?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="401"/>
|
||||
<source>Do you really want to remove Pacman's transaction lock file?</source>
|
||||
<translation>Gerçekten Pacman kilit dosyasını kaldırmak istiyor musunuz?</translation>
|
||||
<translation>Pacman kilit dosyasını gerçekten kaldırmak istiyor musunuz?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="405"/>
|
||||
@@ -927,12 +927,12 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="419"/>
|
||||
<source>You'll need to install a su frontend like gksu or kdesu.</source>
|
||||
<translation>Yetkili kullanıcı için gtksu veya kdesu gibi bir arayüz yüklemen,z gerekiyor.</translation>
|
||||
<translation>Yetkili kullanıcı için gtksu veya kdesu gibi bir arayüzden yüklemeniz gerekiyor.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="423"/>
|
||||
<source>You can not run Octopi with administrator's credentials.</source>
|
||||
<translation>Octopi yi yetkili kullanıcı kimliği ile çalıştıramazsınız.</translation>
|
||||
<translation>Octopiyi yönetici yetkileri olmadan çalıştıramazsınız.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="427"/>
|
||||
@@ -952,7 +952,7 @@
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="439"/>
|
||||
<source>Run in terminal</source>
|
||||
<translation>Uçbirimde yürüt</translation>
|
||||
<translation>Konsolda çalıştır</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="443"/>
|
||||
@@ -1009,7 +1009,7 @@ Açmak istediğinizden emin misiniz?</translation>
|
||||
<message>
|
||||
<location filename="Projects/octopi/src/strconstants.h" line="484"/>
|
||||
<source>Press Ctrl+A to select/deselect all</source>
|
||||
<translation>Ctrl+A basarak tümünü seçin yada tümünü bırakın</translation>
|
||||
<translation>Ctrl+A basarak tümünü seçin yada bırakın</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -1040,7 +1040,7 @@ Açmak istediğinizden emin misiniz?</translation>
|
||||
<message>
|
||||
<location filename="Projects/octopi/ui/transactiondialog.ui" line="133"/>
|
||||
<source>Run in terminal</source>
|
||||
<translation>Uçbirimde yürüt</translation>
|
||||
<translation>Konsolda çalıştır</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
BIN
resources/translations/octopi_uk.qm
Normal file
BIN
resources/translations/octopi_uk.qm
Normal file
Binary file not shown.
1045
resources/translations/octopi_uk.ts
Normal file
1045
resources/translations/octopi_uk.ts
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/translations/octopi_zh_TW.qm
Normal file
BIN
resources/translations/octopi_zh_TW.qm
Normal file
Binary file not shown.
1046
resources/translations/octopi_zh_TW.ts
Normal file
1046
resources/translations/octopi_zh_TW.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -169,7 +169,7 @@ QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char *
|
||||
sysInit(appId);
|
||||
}
|
||||
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
/*!
|
||||
Creates a QtSingleApplication object. The application identifier
|
||||
will be QCoreApplication::applicationFilePath(). \a argc, \a
|
||||
@@ -180,7 +180,7 @@ QtSingleApplication::QtSingleApplication(int &argc, char **argv, Type type)
|
||||
{
|
||||
sysInit();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(Q_WS_X11)
|
||||
/*!
|
||||
|
||||
@@ -67,7 +67,11 @@ class QT_QTSINGLEAPPLICATION_EXPORT QtSingleApplication : public QApplication
|
||||
public:
|
||||
QtSingleApplication(int &argc, char **argv, bool GUIenabled = true);
|
||||
QtSingleApplication(const QString &id, int &argc, char **argv);
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
QtSingleApplication(int &argc, char **argv, Type type);
|
||||
#endif
|
||||
|
||||
#if defined(Q_WS_X11)
|
||||
QtSingleApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
|
||||
QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0);
|
||||
@@ -76,7 +80,6 @@ public:
|
||||
|
||||
bool isRunning();
|
||||
QString id() const;
|
||||
|
||||
void setActivationWindow(QWidget* aw, bool activateOnMessage = true);
|
||||
QWidget* activationWindow() const;
|
||||
|
||||
|
||||
@@ -24,7 +24,12 @@
|
||||
|
||||
#include <QStandardItem>
|
||||
#include <QFutureWatcher>
|
||||
#include <QtConcurrentRun>
|
||||
|
||||
#if QT_VERSION > 0x050000
|
||||
#include <QtConcurrent/QtConcurrentMap>
|
||||
#else
|
||||
#include <QtConcurrentMap>
|
||||
#endif
|
||||
|
||||
QFutureWatcher<QString> g_fwToolTip;
|
||||
QFutureWatcher<QList<PackageListData> *> g_fwPacman;
|
||||
@@ -45,6 +50,7 @@ QString showPackageInfo(QString pkgName)
|
||||
if (si == 0) return "";
|
||||
|
||||
QString description = si->text();
|
||||
|
||||
if (description.trimmed().isEmpty()) return "";
|
||||
|
||||
int space = description.indexOf(" ");
|
||||
|
||||
@@ -22,10 +22,8 @@
|
||||
#define MAINWINDOW_GLOBALS_H
|
||||
|
||||
#include "strconstants.h"
|
||||
|
||||
#include <QStandardItem>
|
||||
#include <QFutureWatcher>
|
||||
#include <QtConcurrentRun>
|
||||
|
||||
struct YaourtOutdatedPackages
|
||||
{
|
||||
|
||||
20
src/main.cpp
20
src/main.cpp
@@ -24,20 +24,26 @@
|
||||
#include "unixcommand.h"
|
||||
#include "wmhelper.h"
|
||||
#include <iostream>
|
||||
|
||||
#include "QtSolutions/qtsingleapplication.h"
|
||||
#include <QtGui>
|
||||
#include <QMessageBox>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
ArgumentList *argList = new ArgumentList(argc, argv);
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
QApplication::setGraphicsSystem(QLatin1String("raster"));
|
||||
#endif
|
||||
|
||||
QString packagesToInstall;
|
||||
QString arg;
|
||||
|
||||
for (int c=1; c<argc; c++)
|
||||
{
|
||||
arg = argv[c];
|
||||
if (arg.contains("pkg.tar.xz"))
|
||||
if (arg.contains("pkg.tar*"))
|
||||
{
|
||||
packagesToInstall += arg + ",";
|
||||
}
|
||||
@@ -71,7 +77,7 @@ int main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
//This sends a message just to awake the socket-based QtSinleApplication engine
|
||||
//This sends a message just to awake the socket-based QtSingleApplication engine
|
||||
app.sendMessage("RAISE");
|
||||
|
||||
QTranslator appTranslator;
|
||||
@@ -80,12 +86,12 @@ int main(int argc, char *argv[])
|
||||
app.installTranslator(&appTranslator);
|
||||
|
||||
if (argList->getSwitch("-help")){
|
||||
std::cout << StrConstants::getApplicationCliHelp().toAscii().data() << std::endl;
|
||||
std::cout << StrConstants::getApplicationCliHelp().toLatin1().data() << std::endl;
|
||||
return(0);
|
||||
}
|
||||
else if (argList->getSwitch("-version")){
|
||||
std::cout << "\n" << StrConstants::getApplicationName().toAscii().data() <<
|
||||
" " << StrConstants::getApplicationVersion().toAscii().data() << "\n" << std::endl;
|
||||
std::cout << "\n" << StrConstants::getApplicationName().toLatin1().data() <<
|
||||
" " << StrConstants::getApplicationVersion().toLatin1().data() << "\n" << std::endl;
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -98,6 +104,8 @@ int main(int argc, char *argv[])
|
||||
app.setActivationWindow(&w);
|
||||
app.setQuitOnLastWindowClosed(false);
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
#ifndef KAOS
|
||||
if (!argList->getSwitch("-style"))
|
||||
{
|
||||
if (UnixCommand::getLinuxDistro() == ectn_MANJAROLINUX &&
|
||||
@@ -110,6 +118,8 @@ int main(int argc, char *argv[])
|
||||
app.setStyle(new QCleanlooksStyle());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (argList->getSwitch("-sysupgrade"))
|
||||
{
|
||||
|
||||
@@ -45,9 +45,6 @@
|
||||
#include <QFileDialog>
|
||||
#include <QHash>
|
||||
#include <QFutureWatcher>
|
||||
#include <QtConcurrentRun>
|
||||
|
||||
using namespace QtConcurrent;
|
||||
|
||||
/*
|
||||
* MainWindow's constructor: basic UI init
|
||||
@@ -59,7 +56,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
m_indFoundFilesInPkgFileList = 0;
|
||||
m_callSystemUpgrade = false;
|
||||
m_initializationCompleted=false;
|
||||
m_cbGroups = 0;
|
||||
m_listOfPackages = 0;
|
||||
m_listOfPackagesFromGroup = 0;
|
||||
m_systemUpgradeDialog = false;
|
||||
@@ -96,7 +92,7 @@ void MainWindow::show()
|
||||
m_leFilterPackage = new SearchLineEdit(this);
|
||||
|
||||
setWindowTitle(StrConstants::getApplicationName());
|
||||
setMinimumSize(QSize(850, 600));
|
||||
setMinimumSize(QSize(820, 520));
|
||||
|
||||
initTabOutput();
|
||||
initTabInfo();
|
||||
@@ -107,8 +103,6 @@ void MainWindow::show()
|
||||
initLineEditFilterPackages();
|
||||
initPackageTreeView();
|
||||
|
||||
qApp->setStyleSheet(StrConstants::getMenuCSS());
|
||||
|
||||
loadPanelSettings();
|
||||
initActions();
|
||||
initStatusBar();
|
||||
@@ -118,8 +112,7 @@ void MainWindow::show()
|
||||
initToolBar();
|
||||
initTabWidgetPropertiesIndex();
|
||||
refreshDistroNews(false);
|
||||
|
||||
refreshComboBoxGroups();
|
||||
refreshGroupsWidget();
|
||||
QMainWindow::show();
|
||||
metaBuildPackageList();
|
||||
}
|
||||
@@ -179,7 +172,9 @@ void MainWindow::outputTextBrowserAnchorClicked(const QUrl &link)
|
||||
void MainWindow::outputOutdatedPackageList()
|
||||
{
|
||||
//We cannot output any list if there is a running transaction!
|
||||
if (m_commandExecuting != ectn_NONE) return;
|
||||
if (m_commandExecuting != ectn_NONE ||
|
||||
isYaourtGroupSelected())
|
||||
return;
|
||||
|
||||
m_numberOfOutdatedPackages = m_outdatedPackageList->count();
|
||||
|
||||
@@ -345,6 +340,36 @@ QString MainWindow::getInstalledPackageVersionByName(const QString &pkgName)
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* Retrieves the selected package group from the treeWidget
|
||||
*/
|
||||
QString MainWindow::getSelectedGroup()
|
||||
{
|
||||
return ui->twGroups->currentItem()->text(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper to analyse if <Display All Groups> is selected
|
||||
*/
|
||||
bool MainWindow::isAllGroupsSelected()
|
||||
{
|
||||
QModelIndex index = ui->twGroups->currentIndex();
|
||||
QString group = ui->twGroups->model()->data(index).toString();
|
||||
|
||||
return (group == "<" + StrConstants::getDisplayAllGroups() + ">");
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper to analyse if < Yaourt > is selected
|
||||
*/
|
||||
bool MainWindow::isYaourtGroupSelected()
|
||||
{
|
||||
QModelIndex index = ui->twGroups->currentIndex();
|
||||
QString group = ui->twGroups->model()->data(index).toString();
|
||||
|
||||
return (group == StrConstants::getYaourtGroup());
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the QStandardItem available in the row that pkgName is found
|
||||
*/
|
||||
@@ -352,7 +377,7 @@ QStandardItem *MainWindow::getAvailablePackage(const QString &pkgName, const int
|
||||
{
|
||||
QStandardItemModel *sim;
|
||||
|
||||
if (m_cbGroups->currentText() == StrConstants::getYaourtGroup()
|
||||
if (isYaourtGroupSelected()
|
||||
&& m_modelPackages &&
|
||||
m_modelPackages->rowCount() > 0)
|
||||
{
|
||||
@@ -462,7 +487,7 @@ void MainWindow::changePackageListModel()
|
||||
|
||||
if (ui->actionNonInstalledPackages->isChecked())
|
||||
{
|
||||
if(m_cbGroups->currentIndex() == 0 || m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
if(isAllGroupsSelected() || isYaourtGroupSelected())
|
||||
{
|
||||
m_modelPackages->setHorizontalHeaderLabels(
|
||||
sl << "" << StrConstants::getName() << StrConstants::getVersion() << StrConstants::getRepository());
|
||||
@@ -477,7 +502,7 @@ void MainWindow::changePackageListModel()
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_cbGroups->currentIndex() == 0 || m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
if(isAllGroupsSelected() || isYaourtGroupSelected())
|
||||
{
|
||||
m_modelInstalledPackages->setHorizontalHeaderLabels(
|
||||
sl << "" << StrConstants::getName() << StrConstants::getVersion() << StrConstants::getRepository());
|
||||
@@ -526,14 +551,14 @@ QStandardItemModel *MainWindow::_getCurrentSelectedModel()
|
||||
|
||||
if(ui->actionNonInstalledPackages->isChecked())
|
||||
{
|
||||
if(m_cbGroups->currentIndex() == 0 || m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
if(isAllGroupsSelected() || isYaourtGroupSelected())
|
||||
sim = m_modelPackages;
|
||||
else
|
||||
sim = m_modelPackagesFromGroup;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_cbGroups->currentIndex() == 0 || m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
if(isAllGroupsSelected() || isYaourtGroupSelected())
|
||||
sim = m_modelInstalledPackages;
|
||||
else
|
||||
sim = m_modelInstalledPackagesFromGroup;
|
||||
@@ -622,7 +647,7 @@ void MainWindow::execContextMenuPackages(QPoint point)
|
||||
{
|
||||
menu->addAction(ui->actionInstall);
|
||||
|
||||
if (m_cbGroups->currentIndex() != 0 && m_cbGroups->currentText() != StrConstants::getYaourtGroup())
|
||||
if (!isAllGroupsSelected() && !isYaourtGroupSelected())
|
||||
{
|
||||
menu->addAction(ui->actionInstallGroup);
|
||||
}
|
||||
@@ -636,7 +661,7 @@ void MainWindow::execContextMenuPackages(QPoint point)
|
||||
{
|
||||
menu->addAction(ui->actionRemove);
|
||||
|
||||
if (m_cbGroups->currentIndex() != 0 && m_cbGroups->currentText() != StrConstants::getYaourtGroup())
|
||||
if (!isAllGroupsSelected() && !isYaourtGroupSelected())
|
||||
{
|
||||
//Is this group already installed?
|
||||
if (m_modelInstalledPackagesFromGroup->rowCount() == m_modelPackagesFromGroup->rowCount())
|
||||
@@ -752,7 +777,6 @@ void MainWindow::execContextMenuPkgFileList(QPoint point)
|
||||
|
||||
QModelIndex mi = tvPkgFileList->currentIndex();
|
||||
QString selectedPath = PackageController::showFullPathOfItem(mi);
|
||||
|
||||
QMenu menu(this);
|
||||
QStandardItemModel *sim = qobject_cast<QStandardItemModel*>(tvPkgFileList->model());
|
||||
QStandardItem *si = sim->itemFromIndex(mi);
|
||||
@@ -953,6 +977,40 @@ void MainWindow::invalidateTabs()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Shows or hides the group's widget
|
||||
*/
|
||||
void MainWindow::hideGroupsWidget(bool pSaveSettings)
|
||||
{
|
||||
//QList<int> savedSizes;
|
||||
//savedSizes << 200 << 235;
|
||||
|
||||
static int tvPackagesWidth = ui->tvPackages->width();
|
||||
|
||||
QList<int> l, rl;
|
||||
rl = ui->splitterVertical->sizes();
|
||||
|
||||
if ( rl[1] != 0 )
|
||||
{
|
||||
ui->splitterVertical->setSizes( l << tvPackagesWidth << 0);
|
||||
if(!ui->twGroups->hasFocus())
|
||||
ui->twGroups->setFocus();
|
||||
|
||||
if(pSaveSettings)
|
||||
saveSettings(ectn_GROUPS);
|
||||
}
|
||||
else
|
||||
{
|
||||
//ui->splitterVertical->setSizes(savedSizes);
|
||||
//ui->tvPackages->scrollTo(ui->tvPackages->currentIndex());
|
||||
ui->splitterVertical->setSizes( l << tvPackagesWidth << ui->twGroups->maximumWidth() );
|
||||
ui->tvPackages->setFocus();
|
||||
|
||||
if(pSaveSettings)
|
||||
saveSettings(ectn_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Maximizes/de-maximizes the upper pane (tvPackages)
|
||||
*/
|
||||
@@ -1155,8 +1213,10 @@ void MainWindow::openRootTerminal()
|
||||
void MainWindow::installLocalPackage()
|
||||
{
|
||||
m_packagesToInstallList =
|
||||
QFileDialog::getOpenFileNames(this, StrConstants::getFileChooserTitle(),
|
||||
QDir::homePath(), "*pkg.tar.xz");
|
||||
QFileDialog::getOpenFileNames(this,
|
||||
StrConstants::getFileChooserTitle(),
|
||||
QDir::homePath(),
|
||||
StrConstants::getPackages() + " (*.pkg.tar*)");
|
||||
|
||||
if (m_packagesToInstallList.count() > 0)
|
||||
doInstallLocalPackages();
|
||||
|
||||
@@ -46,6 +46,7 @@ class QTextBrowser;
|
||||
class QMenu;
|
||||
class SearchLineEdit;
|
||||
class QAction;
|
||||
class QTreeWidgetItem;
|
||||
|
||||
//Column indices for Package's treeview
|
||||
const int ctn_PACKAGE_ICON_COLUMN(0);
|
||||
@@ -149,9 +150,6 @@ private:
|
||||
//This member holds the last command string executed by Octopi
|
||||
QStringList m_lastCommandList;
|
||||
|
||||
QComboBox *m_cbGroups;
|
||||
QListView *m_lvGroups;
|
||||
|
||||
int m_PackageListOrderedCol;
|
||||
Qt::SortOrder m_PackageListSortOrder;
|
||||
|
||||
@@ -173,6 +171,9 @@ private:
|
||||
|
||||
QByteArray m_horizontalSplit;
|
||||
|
||||
QTreeWidgetItem *m_AllGroupsItem;
|
||||
QTreeWidgetItem *m_YaourtItem;
|
||||
|
||||
int m_numberOfInstalledPackages;
|
||||
int m_numberOfAvailablePackages;
|
||||
int m_numberOfOutdatedPackages;
|
||||
@@ -183,8 +184,8 @@ private:
|
||||
|
||||
void initAppIcon();
|
||||
void refreshAppIcon();
|
||||
void initComboBoxGroups();
|
||||
void refreshComboBoxGroups();
|
||||
void initPackageGroups();
|
||||
void refreshGroupsWidget();
|
||||
void initToolBar();
|
||||
void initStatusBar();
|
||||
void initLineEditFilterPackages();
|
||||
@@ -192,6 +193,10 @@ private:
|
||||
QString getOutdatedPackageVersionByName(const QString &pkgName);
|
||||
QString getInstalledPackageVersionByName(const QString &pkgName);
|
||||
|
||||
QString getSelectedGroup();
|
||||
bool isAllGroupsSelected();
|
||||
bool isYaourtGroupSelected();
|
||||
|
||||
QStandardItemModel *_getCurrentSelectedModel();
|
||||
bool isPackageInstalled(const QString &pkgName);
|
||||
bool _isPackageTreeViewVisible();
|
||||
@@ -218,6 +223,10 @@ private:
|
||||
void _tvTransactionRowsChanged(const QModelIndex& parent);
|
||||
QStandardItem * getRemoveTransactionParentItem();
|
||||
QStandardItem * getInstallTransactionParentItem();
|
||||
|
||||
bool isPackageInInstallTransaction(const QString &pkgName);
|
||||
bool isPackageInRemoveTransaction(const QString &pkgName);
|
||||
|
||||
void insertRemovePackageIntoTransaction(const QString &pkgName);
|
||||
void insertInstallPackageIntoTransaction(const QString &pkgName);
|
||||
void removePackagesFromRemoveTransaction();
|
||||
@@ -265,7 +274,6 @@ private slots:
|
||||
void editFile();
|
||||
void openTerminal();
|
||||
void openDirectory();
|
||||
|
||||
void openRootTerminal();
|
||||
void installLocalPackage();
|
||||
|
||||
@@ -284,7 +292,7 @@ private slots:
|
||||
void buildPackagesFromGroupList();
|
||||
void buildPackageList(bool nonBlocking=true);
|
||||
void metaBuildPackageList();
|
||||
void onComboGroupsChanged();
|
||||
void onPackageGroupChanged();
|
||||
|
||||
void _cloneModelPackages();
|
||||
void preBuildPackageList();
|
||||
@@ -343,6 +351,8 @@ private slots:
|
||||
void insertGroupIntoRemovePackage();
|
||||
void insertGroupIntoInstallPackage();
|
||||
|
||||
void hideGroupsWidget(bool pSaveSettings = true);
|
||||
|
||||
void maximizePackagesTreeView(bool pSaveSettings = true);
|
||||
void maximizePropertiesTabWidget(bool pSaveSettings = true);
|
||||
void outputOutdatedPackageList();
|
||||
|
||||
@@ -39,9 +39,16 @@
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QTextBrowser>
|
||||
#include <QFutureWatcher>
|
||||
#include <QtConcurrentRun>
|
||||
|
||||
using namespace QtConcurrent;
|
||||
#if QT_VERSION > 0x050000
|
||||
#include <QtConcurrent/QtConcurrentRun>
|
||||
#else
|
||||
#include <QtConcurrentRun>
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
using namespace QtConcurrent;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Before we close the application, let's confirm if there is a pending transaction...
|
||||
@@ -91,12 +98,12 @@ void MainWindow::keyPressEvent(QKeyEvent* ke)
|
||||
{
|
||||
if (ke->key() == Qt::Key_Return)
|
||||
{
|
||||
if (m_cbGroups->currentText() == StrConstants::getYaourtGroup() && m_leFilterPackage->hasFocus() && m_cic == 0)
|
||||
if (isYaourtGroupSelected() && m_leFilterPackage->hasFocus() && m_cic == 0)
|
||||
{
|
||||
QFuture<QList<PackageListData> *> f;
|
||||
disconnect(&g_fwYaourt, SIGNAL(finished()), this, SLOT(preBuildYaourtPackageList()));
|
||||
m_cic = new CPUIntensiveComputing();
|
||||
f = run(searchYaourtPackages, m_leFilterPackage->text());
|
||||
f = QtConcurrent::run(searchYaourtPackages, m_leFilterPackage->text());
|
||||
g_fwYaourt.setFuture(f);
|
||||
connect(&g_fwYaourt, SIGNAL(finished()), this, SLOT(preBuildYaourtPackageList()));
|
||||
}
|
||||
@@ -205,18 +212,18 @@ void MainWindow::keyPressEvent(QKeyEvent* ke)
|
||||
else if(ke->key() == Qt::Key_G && ke->modifiers() == (Qt::ShiftModifier|Qt::ControlModifier))
|
||||
{
|
||||
//The user wants to go to "Display All groups"
|
||||
if (m_cbGroups->currentIndex() != 0)
|
||||
if (!isAllGroupsSelected())
|
||||
{
|
||||
m_cbGroups->setCurrentIndex(0);
|
||||
ui->twGroups->setCurrentItem(m_AllGroupsItem);
|
||||
}
|
||||
}
|
||||
else if(ke->key() == Qt::Key_Y && ke->modifiers() == (Qt::ShiftModifier|Qt::ControlModifier)
|
||||
&& m_hasYaourt)
|
||||
{
|
||||
//The user wants to go to fake "Yaourt" group
|
||||
if (m_cbGroups->currentText() != StrConstants::getYaourtGroup())
|
||||
if (!isYaourtGroupSelected())
|
||||
{
|
||||
m_cbGroups->setCurrentIndex(1);
|
||||
ui->twGroups->setCurrentItem(m_YaourtItem);
|
||||
//...and let us focus the search edit!
|
||||
m_leFilterPackage->setFocus();
|
||||
}
|
||||
@@ -277,7 +284,6 @@ void MainWindow::keyReleaseEvent(QKeyEvent *ke)
|
||||
ui->tvPackages->setCurrentIndex(mi);
|
||||
|
||||
if ((i <= fi.count()-1)) i++;
|
||||
|
||||
if (i == fi.count()) i = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,27 +147,38 @@ void MainWindow::execSystemTrayActivated(QSystemTrayIcon::ActivationReason ar)
|
||||
/*
|
||||
* Inits the Groups combobox, so it can be added in app's toolBar
|
||||
*/
|
||||
void MainWindow::initComboBoxGroups()
|
||||
void MainWindow::initPackageGroups()
|
||||
{
|
||||
m_cbGroups = new QComboBox(this);
|
||||
m_lvGroups = new QListView(m_cbGroups);
|
||||
m_cbGroups->setMinimumWidth(200);
|
||||
m_cbGroups->setAutoCompletion(true);
|
||||
m_cbGroups->setIconSize(QSize(0, 0));
|
||||
m_cbGroups->setView(m_lvGroups);
|
||||
m_cbGroups->setMaxVisibleItems(15);
|
||||
m_cbGroups->setStyleSheet(StrConstants::getMenuCSS());
|
||||
//This is the twGroups init code
|
||||
ui->twGroups->setColumnCount(1);
|
||||
ui->twGroups->setHeaderLabel(StrConstants::getGroups());
|
||||
ui->twGroups->header()->setSortIndicatorShown(false);
|
||||
|
||||
connect(m_cbGroups, SIGNAL(currentIndexChanged(QString)), this, SLOT(onComboGroupsChanged()));
|
||||
connect(m_cbGroups, SIGNAL(currentIndexChanged(QString)), this, SLOT(metaBuildPackageList()));
|
||||
#if QT_VERSION < 0x050000
|
||||
ui->twGroups->header()->setClickable(false);
|
||||
ui->twGroups->header()->setMovable(false);
|
||||
ui->twGroups->header()->setResizeMode(QHeaderView::Fixed);
|
||||
#else
|
||||
ui->twGroups->header()->setSectionsClickable(false);
|
||||
ui->twGroups->header()->setSectionsMovable(false);
|
||||
ui->twGroups->header()->setSectionResizeMode(QHeaderView::Fixed);
|
||||
#endif
|
||||
|
||||
ui->twGroups->setFrameShape(QFrame::NoFrame);
|
||||
ui->twGroups->setFrameShadow(QFrame::Plain);
|
||||
ui->twGroups->setStyleSheet(StrConstants::getTreeViewCSS());
|
||||
ui->twGroups->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
|
||||
connect(ui->twGroups, SIGNAL(itemSelectionChanged()), this, SLOT(onPackageGroupChanged()));
|
||||
//connect(ui->twGroups, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(metaBuildPackageList()));
|
||||
}
|
||||
|
||||
/*
|
||||
* Whenever user changes the Groups combobox, this method will be triggered...
|
||||
*/
|
||||
void MainWindow::onComboGroupsChanged()
|
||||
void MainWindow::onPackageGroupChanged()
|
||||
{
|
||||
if (m_cbGroups->currentIndex() == 0)
|
||||
if (isAllGroupsSelected())
|
||||
{
|
||||
ui->actionSearchByName->setChecked(true);
|
||||
tvPackagesSearchColumnChanged(ui->actionSearchByName);
|
||||
@@ -179,20 +190,21 @@ void MainWindow::onComboGroupsChanged()
|
||||
*/
|
||||
void MainWindow::initToolBar()
|
||||
{
|
||||
initComboBoxGroups();
|
||||
initPackageGroups();
|
||||
|
||||
ui->mainToolBar->addAction(ui->actionSyncPackages);
|
||||
ui->mainToolBar->addAction(ui->actionCommit);
|
||||
ui->mainToolBar->addAction(ui->actionRollback);
|
||||
m_leFilterPackage->setMinimumHeight(24);
|
||||
ui->mainToolBar->addWidget(m_leFilterPackage);
|
||||
ui->mainToolBar->addWidget(m_cbGroups);
|
||||
|
||||
QWidget * hSpacer = new QWidget(this);
|
||||
hSpacer->setMinimumHeight(22);
|
||||
hSpacer->setMinimumWidth(6);
|
||||
hSpacer->setMinimumWidth(3);
|
||||
hSpacer->setVisible(true);
|
||||
ui->mainToolBar->addWidget(hSpacer);
|
||||
ui->mainToolBar->addAction(ui->actionShowGroups);
|
||||
|
||||
ui->mainToolBar->toggleViewAction()->setEnabled(false);
|
||||
ui->mainToolBar->toggleViewAction()->setVisible(false);
|
||||
}
|
||||
@@ -231,6 +243,7 @@ void MainWindow::initToolButtonPacman()
|
||||
m_menuToolButtonPacman->addAction(m_actionInstallPacmanUpdates);
|
||||
m_toolButtonPacman->setPopupMode(QToolButton::MenuButtonPopup);
|
||||
m_toolButtonPacman->setMenu(m_menuToolButtonPacman);
|
||||
|
||||
connect(m_toolButtonPacman, SIGNAL(clicked()), this, SLOT(outputOutdatedPackageList()));
|
||||
}
|
||||
|
||||
@@ -310,8 +323,17 @@ void MainWindow::initTabTransaction()
|
||||
tvTransaction->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
tvTransaction->setItemDelegate(new TreeViewPackagesItemDelegate(tvTransaction));
|
||||
tvTransaction->header()->setSortIndicatorShown(false);
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
tvTransaction->header()->setClickable(false);
|
||||
tvTransaction->header()->setMovable(false);
|
||||
tvTransaction->header()->setResizeMode(QHeaderView::Fixed);
|
||||
#else
|
||||
tvTransaction->header()->setSectionsClickable(false);
|
||||
tvTransaction->header()->setSectionsMovable(false);
|
||||
tvTransaction->header()->setSectionResizeMode(QHeaderView::Fixed);
|
||||
#endif
|
||||
|
||||
tvTransaction->setFrameShape(QFrame::NoFrame);
|
||||
tvTransaction->setFrameShadow(QFrame::Plain);
|
||||
tvTransaction->setStyleSheet(StrConstants::getTreeViewCSS());
|
||||
@@ -337,8 +359,14 @@ void MainWindow::initTabTransaction()
|
||||
|
||||
QString aux(StrConstants::getTabTransactionName());
|
||||
ui->twProperties->removeTab(ctn_TABINDEX_TRANSACTION);
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
ui->twProperties->insertTab(ctn_TABINDEX_TRANSACTION, tabTransaction, QApplication::translate (
|
||||
"MainWindow", aux.toUtf8(), 0, QApplication::UnicodeUTF8 ));
|
||||
#else
|
||||
ui->twProperties->insertTab(ctn_TABINDEX_TRANSACTION, tabTransaction, QApplication::translate (
|
||||
"MainWindow", aux.toUtf8(), 0/*, QApplication::UnicodeUTF8*/ ));
|
||||
#endif
|
||||
|
||||
connect(tvTransaction, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(execContextMenuTransaction(QPoint)));
|
||||
connect(tvTransaction->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
||||
@@ -371,12 +399,7 @@ void MainWindow::initPackageTreeView()
|
||||
m_proxyModelPackages->setSourceModel(m_modelPackages);
|
||||
m_proxyModelPackages->setFilterKeyColumn(ctn_PACKAGE_NAME_COLUMN);
|
||||
|
||||
//if (UnixCommand::getLinuxDistro() == ectn_MANJAROLINUX &&
|
||||
// (!WMHelper::isKDERunning() && (!WMHelper::isRazorQtRunning())))
|
||||
//{
|
||||
ui->tvPackages->setAlternatingRowColors(true);
|
||||
//}
|
||||
|
||||
ui->tvPackages->setAlternatingRowColors(true);
|
||||
ui->tvPackages->setItemDelegate(new TreeViewPackagesItemDelegate(ui->tvPackages));
|
||||
ui->tvPackages->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
ui->tvPackages->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
@@ -388,10 +411,18 @@ void MainWindow::initPackageTreeView()
|
||||
ui->tvPackages->sortByColumn(ctn_PACKAGE_NAME_COLUMN, Qt::AscendingOrder);
|
||||
ui->tvPackages->setIndentation( 0 );
|
||||
ui->tvPackages->header()->setSortIndicatorShown(true);
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
ui->tvPackages->header()->setClickable(true);
|
||||
ui->tvPackages->header()->setMovable(false);
|
||||
ui->tvPackages->header()->setDefaultAlignment( Qt::AlignLeft );
|
||||
ui->tvPackages->header()->setResizeMode( QHeaderView::Fixed );
|
||||
#else
|
||||
ui->tvPackages->header()->setSectionsClickable(true);
|
||||
ui->tvPackages->header()->setSectionsMovable(false);
|
||||
ui->tvPackages->header()->setSectionResizeMode(QHeaderView::Fixed);
|
||||
#endif
|
||||
|
||||
ui->tvPackages->header()->setDefaultAlignment( Qt::AlignLeft );
|
||||
ui->tvPackages->setStyleSheet(
|
||||
StrConstants::getTreeViewCSS());
|
||||
|
||||
@@ -425,8 +456,14 @@ void MainWindow::initTabInfo(){
|
||||
|
||||
QString tabName(StrConstants::getTabInfoName());
|
||||
ui->twProperties->removeTab(ctn_TABINDEX_INFORMATION);
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
ui->twProperties->insertTab(ctn_TABINDEX_INFORMATION, tabInfo, QApplication::translate (
|
||||
"MainWindow", tabName.toUtf8(), 0, QApplication::UnicodeUTF8 ) );
|
||||
#else
|
||||
ui->twProperties->insertTab(ctn_TABINDEX_INFORMATION, tabInfo, QApplication::translate (
|
||||
"MainWindow", tabName.toUtf8(), 0/*, QApplication::UnicodeUTF8*/ ) );
|
||||
#endif
|
||||
|
||||
ui->twProperties->setUsesScrollButtons(false);
|
||||
ui->twProperties->setCurrentIndex(ctn_TABINDEX_INFORMATION);
|
||||
@@ -449,8 +486,17 @@ void MainWindow::initTabFiles()
|
||||
tvPkgFileList->setDropIndicatorShown(false);
|
||||
tvPkgFileList->setAcceptDrops(false);
|
||||
tvPkgFileList->header()->setSortIndicatorShown(false);
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
tvPkgFileList->header()->setClickable(false);
|
||||
tvPkgFileList->header()->setMovable(false);
|
||||
tvPkgFileList->header()->setResizeMode(QHeaderView::Fixed);
|
||||
#else
|
||||
tvPkgFileList->header()->setSectionsClickable(false);
|
||||
tvPkgFileList->header()->setSectionsMovable(false);
|
||||
tvPkgFileList->header()->setSectionResizeMode(QHeaderView::Fixed);
|
||||
#endif
|
||||
|
||||
tvPkgFileList->setFrameShape(QFrame::NoFrame);
|
||||
tvPkgFileList->setFrameShadow(QFrame::Plain);
|
||||
tvPkgFileList->setObjectName("tvPkgFileList");
|
||||
@@ -463,8 +509,14 @@ void MainWindow::initTabFiles()
|
||||
|
||||
QString aux(StrConstants::getTabFilesName());
|
||||
ui->twProperties->removeTab(ctn_TABINDEX_FILES);
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
ui->twProperties->insertTab(ctn_TABINDEX_FILES, tabPkgFileList, QApplication::translate (
|
||||
"MainWindow", aux.toUtf8(), 0, QApplication::UnicodeUTF8 ) );
|
||||
#else
|
||||
ui->twProperties->insertTab(ctn_TABINDEX_FILES, tabPkgFileList, QApplication::translate (
|
||||
"MainWindow", aux.toUtf8(), 0/*, QApplication::UnicodeUTF8*/ ) );
|
||||
#endif
|
||||
|
||||
tvPkgFileList->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
|
||||
@@ -506,8 +558,14 @@ void MainWindow::initTabOutput()
|
||||
|
||||
QString aux(StrConstants::getTabOutputName());
|
||||
ui->twProperties->removeTab(ctn_TABINDEX_OUTPUT);
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
ui->twProperties->insertTab(ctn_TABINDEX_OUTPUT, tabOutput, QApplication::translate (
|
||||
"MainWindow", aux.toUtf8(), 0, QApplication::UnicodeUTF8 ) );
|
||||
#else
|
||||
ui->twProperties->insertTab(ctn_TABINDEX_OUTPUT, tabOutput, QApplication::translate (
|
||||
"MainWindow", aux.toUtf8(), 0/*, QApplication::UnicodeUTF8*/ ) );
|
||||
#endif
|
||||
|
||||
ui->twProperties->setCurrentIndex(ctn_TABINDEX_OUTPUT);
|
||||
text->show();
|
||||
@@ -533,6 +591,11 @@ void MainWindow::initActions()
|
||||
|
||||
toggleTransactionActions(true);
|
||||
|
||||
ui->actionShowGroups->setText(StrConstants::getGroups());
|
||||
ui->actionShowGroups->setCheckable(true);
|
||||
ui->actionShowGroups->setChecked(true);
|
||||
connect(ui->actionShowGroups, SIGNAL(triggered()), this, SLOT(hideGroupsWidget()));
|
||||
|
||||
QActionGroup *actionGroup = new QActionGroup(this);
|
||||
actionGroup->addAction(ui->actionSearchByDescription);
|
||||
actionGroup->addAction(ui->actionSearchByName);
|
||||
@@ -542,7 +605,6 @@ void MainWindow::initActions()
|
||||
connect(actionGroup, SIGNAL(triggered(QAction*)), this, SLOT(tvPackagesSearchColumnChanged(QAction*)));
|
||||
|
||||
ui->actionInstallLocalPackage->setIcon(IconHelper::getIconFolder());
|
||||
|
||||
ui->actionOpenDirectory->setIcon(IconHelper::getIconFolder());
|
||||
|
||||
connect(ui->tvPackages->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
||||
|
||||
@@ -33,9 +33,16 @@
|
||||
|
||||
#include <QTextBrowser>
|
||||
#include <QFutureWatcher>
|
||||
#include <QtConcurrentRun>
|
||||
|
||||
using namespace QtConcurrent;
|
||||
#if QT_VERSION > 0x050000
|
||||
#include <QtConcurrent/QtConcurrentRun>
|
||||
#else
|
||||
#include <QtConcurrentRun>
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
using namespace QtConcurrent;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is the high level method that orquestrates the Distro RSS News printing in tabNews
|
||||
@@ -69,6 +76,11 @@ void MainWindow::refreshDistroNews(bool searchForLatestNews, bool gotoNewsTab)
|
||||
writeToTabOutputExt("<b>" +
|
||||
StrConstants::getSearchingForDistroNews().arg("Chakra") + "</b>");
|
||||
}
|
||||
else if (gotoNewsTab && distro == ectn_KAOS)
|
||||
{
|
||||
writeToTabOutputExt("<b>" +
|
||||
StrConstants::getSearchingForDistroNews().arg("KaOS") + "</b>");
|
||||
}
|
||||
else if (gotoNewsTab && distro == ectn_MANJAROLINUX)
|
||||
{
|
||||
writeToTabOutputExt("<b>" +
|
||||
@@ -85,7 +97,7 @@ void MainWindow::refreshDistroNews(bool searchForLatestNews, bool gotoNewsTab)
|
||||
else
|
||||
{
|
||||
QFuture<QString> f;
|
||||
f = run(getLatestDistroNews);
|
||||
f = QtConcurrent::run(getLatestDistroNews);
|
||||
g_fwDistroNews.setFuture(f);
|
||||
connect(&g_fwDistroNews, SIGNAL(finished()), this, SLOT(postRefreshDistroNews()));
|
||||
}
|
||||
@@ -201,10 +213,17 @@ void MainWindow::initTabNews()
|
||||
gridLayoutX->addWidget(text, 0, 0, 1, 1);
|
||||
text->show();
|
||||
|
||||
#if QT_VERSION > 0x050000
|
||||
int tindex = ui->twProperties->insertTab(ctn_TABINDEX_NEWS, tabNews, QApplication::translate (
|
||||
"MainWindow", aux.toUtf8(), 0/*, QApplication::UnicodeUTF8*/ ) );
|
||||
ui->twProperties->setTabText(ui->twProperties->indexOf(tabNews), QApplication::translate(
|
||||
"MainWindow", aux.toUtf8(), 0/*, QApplication::UnicodeUTF8*/));
|
||||
#else
|
||||
int tindex = ui->twProperties->insertTab(ctn_TABINDEX_NEWS, tabNews, QApplication::translate (
|
||||
"MainWindow", aux.toUtf8(), 0, QApplication::UnicodeUTF8 ) );
|
||||
ui->twProperties->setTabText(ui->twProperties->indexOf(tabNews), QApplication::translate(
|
||||
"MainWindow", aux.toUtf8(), 0, QApplication::UnicodeUTF8));
|
||||
#endif
|
||||
|
||||
SearchBar *searchBar = new SearchBar(this);
|
||||
MyHighlighter *highlighter = new MyHighlighter(text, "");
|
||||
@@ -220,6 +239,7 @@ void MainWindow::initTabNews()
|
||||
connect(text, SIGNAL(sourceChanged(QUrl)), this, SLOT(onTabNewsSourceChanged(QUrl)));
|
||||
|
||||
text->show();
|
||||
|
||||
ui->twProperties->setCurrentIndex(tindex);
|
||||
text->setFocus();
|
||||
}
|
||||
|
||||
@@ -38,9 +38,16 @@
|
||||
#include <QStandardItem>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QFutureWatcher>
|
||||
#include <QtConcurrentRun>
|
||||
|
||||
using namespace QtConcurrent;
|
||||
#if QT_VERSION > 0x050000
|
||||
#include <QtConcurrent/QtConcurrentRun>
|
||||
#else
|
||||
#include <QtConcurrentRun>
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
using namespace QtConcurrent;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If we have some outdated packages, let's put an angry red face icon in this app!
|
||||
@@ -64,22 +71,39 @@ void MainWindow::refreshAppIcon()
|
||||
/*
|
||||
* Inserts the group names into the Groups comboBox
|
||||
*/
|
||||
void MainWindow::refreshComboBoxGroups()
|
||||
void MainWindow::refreshGroupsWidget()
|
||||
{
|
||||
disconnect(m_cbGroups, SIGNAL(currentIndexChanged(QString)), this, SLOT(metaBuildPackageList()));
|
||||
//static bool firstRun = true;
|
||||
disconnect(ui->twGroups, SIGNAL(itemSelectionChanged()), this, SLOT(metaBuildPackageList()));
|
||||
|
||||
m_cbGroups->clear();
|
||||
m_cbGroups->addItem("<" + StrConstants::getAll() + ">");
|
||||
QList<QTreeWidgetItem *> items;
|
||||
|
||||
ui->twGroups->clear();
|
||||
m_hasYaourt = UnixCommand::hasTheExecutable("yaourt");
|
||||
|
||||
items.append(new QTreeWidgetItem((QTreeWidget*)0, QStringList("<" + StrConstants::getDisplayAllGroups() + ">")));
|
||||
m_AllGroupsItem = items.at(0);
|
||||
|
||||
if (m_hasYaourt)
|
||||
{
|
||||
m_cbGroups->addItem(StrConstants::getYaourtGroup());
|
||||
items.append(new QTreeWidgetItem((QTreeWidget*)0, QStringList(StrConstants::getYaourtGroup())));
|
||||
m_YaourtItem = items.at(1);
|
||||
}
|
||||
|
||||
m_cbGroups->addItems(*Package::getPackageGroups());
|
||||
foreach(QString group, *Package::getPackageGroups())
|
||||
{
|
||||
items.append(new QTreeWidgetItem((QTreeWidget*)0, QStringList(group)));
|
||||
}
|
||||
|
||||
connect(m_cbGroups, SIGNAL(currentIndexChanged(QString)), this, SLOT(metaBuildPackageList()));
|
||||
ui->twGroups->insertTopLevelItems(0, items);
|
||||
|
||||
//if(firstRun)
|
||||
{
|
||||
ui->twGroups->setCurrentItem(items.at(0));
|
||||
//firstRun=false;
|
||||
}
|
||||
|
||||
connect(ui->twGroups, SIGNAL(itemSelectionChanged()), this, SLOT(metaBuildPackageList()));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -88,9 +112,8 @@ void MainWindow::refreshComboBoxGroups()
|
||||
void MainWindow::buildPackagesFromGroupList()
|
||||
{
|
||||
CPUIntensiveComputing cic;
|
||||
m_progressWidget->show();
|
||||
|
||||
if (m_cbGroups->currentIndex() == 0)
|
||||
if (isAllGroupsSelected())
|
||||
{
|
||||
QStringList sl;
|
||||
m_modelPackagesFromGroup->setHorizontalHeaderLabels(
|
||||
@@ -138,6 +161,7 @@ void MainWindow::buildPackagesFromGroupList()
|
||||
|
||||
m_progressWidget->setRange(0, list->count());
|
||||
m_progressWidget->setValue(0);
|
||||
m_progressWidget->show();
|
||||
|
||||
int counter=0;
|
||||
while(it != list->end())
|
||||
@@ -185,7 +209,7 @@ void MainWindow::buildPackagesFromGroupList()
|
||||
parentItemInstalledPackagesFromGroup->insertColumn(ctn_PACKAGE_DESCRIPTION_COLUMN, lDescriptions2);
|
||||
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_ICON_COLUMN, 24);
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_NAME_COLUMN, 500);
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_NAME_COLUMN, 400);
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_VERSION_COLUMN, 160);
|
||||
ui->tvPackages->header()->setSectionHidden(ctn_PACKAGE_DESCRIPTION_COLUMN, true);
|
||||
|
||||
@@ -219,15 +243,11 @@ void MainWindow::buildPackagesFromGroupList()
|
||||
ui->tvPackages->scrollTo(maux, QAbstractItemView::PositionAtCenter);
|
||||
ui->tvPackages->selectionModel()->setCurrentIndex(maux, QItemSelectionModel::Select);
|
||||
|
||||
//m_progressWidget->setValue(list->count());
|
||||
list->clear();
|
||||
refreshTabInfo();
|
||||
refreshTabFiles();
|
||||
ui->tvPackages->setFocus();
|
||||
|
||||
//connect(m_pacmanDatabaseSystemWatcher,
|
||||
// SIGNAL(directoryChanged(QString)), this, SLOT(metaBuildPackageList()));
|
||||
|
||||
m_progressWidget->close();
|
||||
refreshStatusBarToolButtons();
|
||||
}
|
||||
@@ -303,22 +323,24 @@ void MainWindow::preBuildPackagesFromGroupList()
|
||||
}
|
||||
|
||||
/*
|
||||
* Decides which SLOT to call: buildPackageList or buildPackagesFromGroupList
|
||||
* Decides which SLOT to call: buildPackageList, buildYaourtPackageList or buildPackagesFromGroupList
|
||||
*/
|
||||
void MainWindow::metaBuildPackageList()
|
||||
{
|
||||
if (m_cbGroups->count() == 0 || m_cbGroups->currentIndex() == 0)
|
||||
ui->twGroups->setEnabled(false);
|
||||
|
||||
if (ui->twGroups->topLevelItemCount() == 0 || isAllGroupsSelected())
|
||||
{
|
||||
toggleSystemActions(true);
|
||||
connect(m_leFilterPackage, SIGNAL(textChanged(QString)), this, SLOT(reapplyPackageFilter()));
|
||||
reapplyPackageFilter();
|
||||
disconnect(&g_fwPacman, SIGNAL(finished()), this, SLOT(preBuildPackageList()));
|
||||
QFuture<QList<PackageListData> *> f;
|
||||
f = run(searchPacmanPackages);
|
||||
f = QtConcurrent::run(searchPacmanPackages);
|
||||
g_fwPacman.setFuture(f);
|
||||
connect(&g_fwPacman, SIGNAL(finished()), this, SLOT(preBuildPackageList()));
|
||||
}
|
||||
else if (m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
else if (isYaourtGroupSelected())
|
||||
{
|
||||
toggleSystemActions(false);
|
||||
disconnect(m_leFilterPackage, SIGNAL(textChanged(QString)), this, SLOT(reapplyPackageFilter()));
|
||||
@@ -327,7 +349,7 @@ void MainWindow::metaBuildPackageList()
|
||||
m_cic = new CPUIntensiveComputing();
|
||||
disconnect(&g_fwYaourtMeta, SIGNAL(finished()), this, SLOT(preBuildYaourtPackageListMeta()));
|
||||
QFuture<QList<PackageListData> *> f;
|
||||
f = run(searchYaourtPackages, m_leFilterPackage->text());
|
||||
f = QtConcurrent::run(searchYaourtPackages, m_leFilterPackage->text());
|
||||
g_fwYaourtMeta.setFuture(f);
|
||||
connect(&g_fwYaourtMeta, SIGNAL(finished()), this, SLOT(preBuildYaourtPackageListMeta()));
|
||||
}
|
||||
@@ -338,7 +360,7 @@ void MainWindow::metaBuildPackageList()
|
||||
reapplyPackageFilter();
|
||||
disconnect(&g_fwPacmanGroup, SIGNAL(finished()), this, SLOT(preBuildPackagesFromGroupList()));
|
||||
QFuture<QList<QString> *> f;
|
||||
f = run(searchPacmanPackagesFromGroup, m_cbGroups->currentText());
|
||||
f = QtConcurrent::run(searchPacmanPackagesFromGroup, getSelectedGroup());
|
||||
g_fwPacmanGroup.setFuture(f);
|
||||
connect(&g_fwPacmanGroup, SIGNAL(finished()), this, SLOT(preBuildPackagesFromGroupList()));
|
||||
}
|
||||
@@ -357,7 +379,7 @@ void MainWindow::buildPackageList(bool nonBlocking)
|
||||
static bool firstTime = true;
|
||||
|
||||
//Refresh the list of Group names
|
||||
if (!firstTime) refreshComboBoxGroups();
|
||||
//if (!firstTime) refreshComboBoxGroups();
|
||||
|
||||
_deleteStandardItemModel(m_modelPackages);
|
||||
_deleteStandardItemModel(m_modelPackagesFromGroup);
|
||||
@@ -456,7 +478,7 @@ void MainWindow::buildPackageList(bool nonBlocking)
|
||||
break;
|
||||
case ectn_OUTDATED:
|
||||
{
|
||||
if (Package::rpmvercmp(pld.outatedVersion.toAscii().data(), pld.version.toAscii().data()) == 1)
|
||||
if (Package::rpmvercmp(pld.outatedVersion.toLatin1().data(), pld.version.toLatin1().data()) == 1)
|
||||
{
|
||||
lIcons << new QStandardItem(IconHelper::getIconNewer(), "_Newer^"+pld.outatedVersion);
|
||||
}
|
||||
@@ -489,7 +511,7 @@ void MainWindow::buildPackageList(bool nonBlocking)
|
||||
|
||||
//Let's put package description in UTF-8 format
|
||||
QString pkgDescription = pld.description;
|
||||
pkgDescription = pkgDescription.fromUtf8(pkgDescription.toAscii().data());
|
||||
pkgDescription = pkgDescription.fromUtf8(pkgDescription.toLatin1().data());
|
||||
|
||||
lDescriptions << new QStandardItem(pkgDescription);
|
||||
|
||||
@@ -529,7 +551,7 @@ void MainWindow::buildPackageList(bool nonBlocking)
|
||||
parentItemInstalledPackages->insertColumn(ctn_PACKAGE_DESCRIPTION_COLUMN, lDescriptions2);
|
||||
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_ICON_COLUMN, 24);
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_NAME_COLUMN, 500);
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_NAME_COLUMN, 400); //500
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_VERSION_COLUMN, 160);
|
||||
ui->tvPackages->header()->setSectionHidden(ctn_PACKAGE_DESCRIPTION_COLUMN, true);
|
||||
ui->tvPackages->sortByColumn(m_PackageListOrderedCol, m_PackageListSortOrder);
|
||||
@@ -602,12 +624,16 @@ void MainWindow::buildPackageList(bool nonBlocking)
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper method for buildPackageFromGroupList>: rebuilds all packages to refresh their state
|
||||
* Helper method for buildPackageFromGroupList: rebuilds all packages to refresh their state
|
||||
*/
|
||||
void MainWindow::_rebuildPackageList()
|
||||
{
|
||||
bool hasYaourt = UnixCommand::hasTheExecutable("yaourt");
|
||||
|
||||
//Let's get outdatedPackages list again!
|
||||
m_outdatedPackageList = Package::getOutdatedPackageList();
|
||||
m_numberOfOutdatedPackages = m_outdatedPackageList->count();
|
||||
|
||||
_deleteStandardItemModel(m_modelPackages);
|
||||
_deleteStandardItemModel(m_modelPackagesFromGroup);
|
||||
_deleteStandardItemModel(m_modelInstalledPackages);
|
||||
@@ -685,7 +711,7 @@ void MainWindow::_rebuildPackageList()
|
||||
break;
|
||||
case ectn_OUTDATED:
|
||||
{
|
||||
if (Package::rpmvercmp(pld.outatedVersion.toAscii().data(), pld.version.toAscii().data()) == 1)
|
||||
if (Package::rpmvercmp(pld.outatedVersion.toLatin1().data(), pld.version.toLatin1().data()) == 1)
|
||||
{
|
||||
lIcons << new QStandardItem(IconHelper::getIconNewer(), "_Newer^"+pld.outatedVersion);
|
||||
}
|
||||
@@ -718,7 +744,7 @@ void MainWindow::_rebuildPackageList()
|
||||
|
||||
//Let's put package description in UTF-8 format
|
||||
QString pkgDescription = pld.description;
|
||||
pkgDescription = pkgDescription.fromUtf8(pkgDescription.toAscii().data());
|
||||
pkgDescription = pkgDescription.fromUtf8(pkgDescription.toLatin1().data());
|
||||
|
||||
lDescriptions << new QStandardItem(pkgDescription);
|
||||
|
||||
@@ -758,7 +784,7 @@ void MainWindow::_rebuildPackageList()
|
||||
parentItemInstalledPackages->insertColumn(ctn_PACKAGE_DESCRIPTION_COLUMN, lDescriptions2);
|
||||
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_ICON_COLUMN, 24);
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_NAME_COLUMN, 500);
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_NAME_COLUMN, 400);
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_VERSION_COLUMN, 160);
|
||||
ui->tvPackages->header()->setSectionHidden(ctn_PACKAGE_DESCRIPTION_COLUMN, true);
|
||||
ui->tvPackages->sortByColumn(m_PackageListOrderedCol, m_PackageListSortOrder);
|
||||
@@ -860,7 +886,7 @@ void MainWindow::buildYaourtPackageList()
|
||||
{
|
||||
case ectn_OUTDATED:
|
||||
{
|
||||
if (Package::rpmvercmp(pld.outatedVersion.toAscii().data(), pld.version.toAscii().data()) == 1)
|
||||
if (Package::rpmvercmp(pld.outatedVersion.toLatin1().data(), pld.version.toLatin1().data()) == 1)
|
||||
{
|
||||
lIcons << new QStandardItem(IconHelper::getIconNewer(), "_Newer^"+pld.outatedVersion);
|
||||
}
|
||||
@@ -892,7 +918,7 @@ void MainWindow::buildYaourtPackageList()
|
||||
|
||||
//Let's put package description in UTF-8 format
|
||||
QString pkgDescription = pld.description;
|
||||
pkgDescription = pkgDescription.fromUtf8(pkgDescription.toAscii().data());
|
||||
pkgDescription = pkgDescription.fromUtf8(pkgDescription.toLatin1().data());
|
||||
|
||||
lDescriptions << new QStandardItem(pkgDescription);
|
||||
|
||||
@@ -931,7 +957,7 @@ void MainWindow::buildYaourtPackageList()
|
||||
parentItemInstalledPackages->insertColumn(ctn_PACKAGE_DESCRIPTION_COLUMN, lDescriptions2);
|
||||
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_ICON_COLUMN, 24);
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_NAME_COLUMN, 500);
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_NAME_COLUMN, 400);
|
||||
ui->tvPackages->setColumnWidth(ctn_PACKAGE_VERSION_COLUMN, 160);
|
||||
ui->tvPackages->header()->setSectionHidden(ctn_PACKAGE_DESCRIPTION_COLUMN, true);
|
||||
ui->tvPackages->sortByColumn(m_PackageListOrderedCol, m_PackageListSortOrder);
|
||||
@@ -1020,9 +1046,11 @@ void MainWindow::showToolButtonYaourt()
|
||||
void MainWindow::refreshStatusBarToolButtons()
|
||||
{
|
||||
QFuture<YaourtOutdatedPackages *> f;
|
||||
f = run(getOutdatedYaourtPackages);
|
||||
f = QtConcurrent::run(getOutdatedYaourtPackages);
|
||||
g_fwOutdatedYaourtPackages.setFuture(f);
|
||||
connect(&g_fwOutdatedYaourtPackages, SIGNAL(finished()), this, SLOT(showToolButtonYaourt()));
|
||||
|
||||
ui->twGroups->setEnabled(true);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1112,7 +1140,7 @@ void MainWindow::refreshTabInfo(bool clearContents, bool neverQuit)
|
||||
|
||||
if (ui->actionNonInstalledPackages->isChecked())
|
||||
{
|
||||
if (m_cbGroups->currentIndex() == 0 || m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
if (isAllGroupsSelected() || isYaourtGroupSelected())
|
||||
{
|
||||
siIcon = m_modelPackages->item( mi.row(), ctn_PACKAGE_ICON_COLUMN);
|
||||
siName = m_modelPackages->item( mi.row(), ctn_PACKAGE_NAME_COLUMN);
|
||||
@@ -1129,7 +1157,7 @@ void MainWindow::refreshTabInfo(bool clearContents, bool neverQuit)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_cbGroups->currentIndex() == 0 || m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
if (isAllGroupsSelected() || isYaourtGroupSelected())
|
||||
{
|
||||
siIcon = m_modelInstalledPackages->item( mi.row(), ctn_PACKAGE_ICON_COLUMN);
|
||||
siName = m_modelInstalledPackages->item( mi.row(), ctn_PACKAGE_NAME_COLUMN);
|
||||
@@ -1160,8 +1188,7 @@ void MainWindow::refreshTabInfo(bool clearContents, bool neverQuit)
|
||||
/* Appends all info from the selected package! */
|
||||
QString pkgName=siName->text();
|
||||
|
||||
if (m_cbGroups->currentText() == StrConstants::getYaourtGroup()
|
||||
&& siIcon->icon().pixmap(QSize(22,22)).toImage() ==
|
||||
if (isYaourtGroupSelected() && siIcon->icon().pixmap(QSize(22,22)).toImage() ==
|
||||
IconHelper::getIconNonInstalled().pixmap(QSize(22,22)).toImage())
|
||||
{
|
||||
siDescription = getAvailablePackage(pkgName, ctn_PACKAGE_DESCRIPTION_COLUMN);
|
||||
@@ -1231,7 +1258,7 @@ void MainWindow::refreshTabInfo(bool clearContents, bool neverQuit)
|
||||
|
||||
//Let's put package description in UTF-8 format
|
||||
QString pkgDescription = pid.description;
|
||||
pkgDescription = pkgDescription.fromUtf8(pkgDescription.toAscii().data());
|
||||
pkgDescription = pkgDescription.fromUtf8(pkgDescription.toLatin1().data());
|
||||
QString version = StrConstants::getVersion();
|
||||
QString url = StrConstants::getURL();
|
||||
QString licenses = StrConstants::getLicenses();
|
||||
@@ -1287,20 +1314,6 @@ void MainWindow::refreshTabInfo(bool clearContents, bool neverQuit)
|
||||
+ StrConstants::getOutdatedInstalledVersion().arg(outdatedVersion) +
|
||||
"</b></font></td></tr>";
|
||||
}
|
||||
/*else
|
||||
{
|
||||
if (m_outdatedYaourtPackagesNameVersion->count() > 0)
|
||||
{
|
||||
QString outdatedVersion = m_outdatedYaourtPackagesNameVersion->value(pkgName);
|
||||
html += "<tr><td>" + version + "</td><td>" + siVersion->text() + " <b><font color=\"#E55451\">"
|
||||
+ StrConstants::getOutdatedInstalledVersion().arg(outdatedVersion) +
|
||||
"</b></font></td></tr>";
|
||||
}
|
||||
else
|
||||
{
|
||||
html += "<tr><td>" + version + "</td><td>" + siVersion->text() + "</td></tr>";
|
||||
}
|
||||
}*/
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1338,7 +1351,7 @@ void MainWindow::refreshTabInfo(bool clearContents, bool neverQuit)
|
||||
QString packagerName = pid.packager;
|
||||
packagerName = packagerName.replace("<", "<");
|
||||
packagerName = packagerName.replace(">", ">");
|
||||
packagerName = packagerName.fromUtf8(packagerName.toAscii().data());
|
||||
packagerName = packagerName.fromUtf8(packagerName.toLatin1().data());
|
||||
|
||||
QString strConflictsWith = pid.conflictsWith;
|
||||
strConflictsWith = strConflictsWith.replace("<", "<");
|
||||
@@ -1431,7 +1444,7 @@ void MainWindow::refreshTabFiles(bool clearContents, bool neverQuit)
|
||||
|
||||
if (ui->actionNonInstalledPackages->isChecked())
|
||||
{
|
||||
if (m_cbGroups->currentIndex() == 0 || m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
if (isAllGroupsSelected() || isYaourtGroupSelected())
|
||||
{
|
||||
siName = m_modelPackages->item(mi.row(), ctn_PACKAGE_NAME_COLUMN);
|
||||
siRepository = m_modelPackages->item(mi.row(), ctn_PACKAGE_REPOSITORY_COLUMN);
|
||||
@@ -1446,7 +1459,7 @@ void MainWindow::refreshTabFiles(bool clearContents, bool neverQuit)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_cbGroups->currentIndex() == 0 || m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
if (isAllGroupsSelected() || isYaourtGroupSelected())
|
||||
{
|
||||
siName = m_modelInstalledPackages->item(mi.row(), ctn_PACKAGE_NAME_COLUMN);
|
||||
siRepository = m_modelInstalledPackages->item(mi.row(), ctn_PACKAGE_REPOSITORY_COLUMN);
|
||||
@@ -1480,15 +1493,15 @@ void MainWindow::refreshTabFiles(bool clearContents, bool neverQuit)
|
||||
|
||||
//Maybe this is a non-installed package...
|
||||
bool nonInstalled = ((ui->actionNonInstalledPackages->isChecked() &&
|
||||
(m_cbGroups->currentIndex() == 0 ||
|
||||
m_cbGroups->currentText() == StrConstants::getYaourtGroup()) &&
|
||||
(isAllGroupsSelected() ||
|
||||
isYaourtGroupSelected()) &&
|
||||
(m_modelPackages->item(mi.row(), ctn_PACKAGE_ICON_COLUMN)->text() == "_NonInstalled")));
|
||||
|
||||
if (!nonInstalled && m_cbGroups->currentText() != StrConstants::getYaourtGroup())
|
||||
if (!nonInstalled && !isYaourtGroupSelected())
|
||||
{
|
||||
//Let's try another test...
|
||||
nonInstalled = ((ui->actionNonInstalledPackages->isChecked() &&
|
||||
m_cbGroups->currentIndex() != 0) &&
|
||||
!isAllGroupsSelected()) &&
|
||||
(m_modelPackagesFromGroup->item(
|
||||
mi.row(), ctn_PACKAGE_ICON_COLUMN)->text() == "_NonInstalled"));
|
||||
}
|
||||
@@ -1500,7 +1513,6 @@ void MainWindow::refreshTabFiles(bool clearContents, bool neverQuit)
|
||||
{
|
||||
QString pkgName = siName->text();
|
||||
QStringList fileList;
|
||||
|
||||
QStandardItemModel *fakeModelPkgFileList = new QStandardItemModel(this);
|
||||
QStandardItemModel *modelPkgFileList = qobject_cast<QStandardItemModel*>(tvPkgFileList->model());
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@ void MainWindow::insertRemovePackageIntoTransaction(const QString &pkgName)
|
||||
{
|
||||
QTreeView *tvTransaction =
|
||||
ui->twProperties->widget(ctn_TABINDEX_TRANSACTION)->findChild<QTreeView*>("tvTransaction");
|
||||
|
||||
QStandardItem * siRemoveParent = getRemoveTransactionParentItem();
|
||||
QStandardItem * siInstallParent = getInstallTransactionParentItem();
|
||||
QStandardItem * siPackageToRemove = new QStandardItem(IconHelper::getIconRemoveItem(), pkgName);
|
||||
@@ -245,18 +246,18 @@ void MainWindow::insertIntoRemovePackage()
|
||||
bool checkDependencies=false;
|
||||
QStringList dependencies;
|
||||
|
||||
if (m_cbGroups->currentText() != StrConstants::getYaourtGroup())
|
||||
if (!isYaourtGroupSelected())
|
||||
{
|
||||
_ensureTabVisible(ctn_TABINDEX_TRANSACTION);
|
||||
QStandardItemModel *sim=_getCurrentSelectedModel();
|
||||
|
||||
//First, let's see if we are dealing with a package group
|
||||
if(m_cbGroups->currentIndex() != 0)
|
||||
if(!isAllGroupsSelected())
|
||||
{
|
||||
//If we are trying to remove all the group's packages, why not remove the entire group?
|
||||
if(ui->tvPackages->selectionModel()->selectedRows().count() == sim->rowCount())
|
||||
{
|
||||
insertRemovePackageIntoTransaction(m_cbGroups->currentText());
|
||||
insertRemovePackageIntoTransaction(getSelectedGroup());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -315,7 +316,7 @@ void MainWindow::insertIntoRemovePackage()
|
||||
void MainWindow::insertGroupIntoRemovePackage()
|
||||
{
|
||||
_ensureTabVisible(ctn_TABINDEX_TRANSACTION);
|
||||
insertRemovePackageIntoTransaction(m_cbGroups->currentText());
|
||||
insertRemovePackageIntoTransaction(getSelectedGroup());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -326,19 +327,19 @@ void MainWindow::insertIntoInstallPackage()
|
||||
{
|
||||
qApp->processEvents();
|
||||
|
||||
if (m_cbGroups->currentText() != StrConstants::getYaourtGroup())
|
||||
if (!isYaourtGroupSelected())
|
||||
{
|
||||
_ensureTabVisible(ctn_TABINDEX_TRANSACTION);
|
||||
|
||||
QStandardItemModel *sim=_getCurrentSelectedModel();
|
||||
|
||||
//First, let's see if we are dealing with a package group
|
||||
if(m_cbGroups->currentIndex() != 0)
|
||||
if(!isAllGroupsSelected())
|
||||
{
|
||||
//If we are trying to insert all the group's packages, why not insert the entire group?
|
||||
if(ui->tvPackages->selectionModel()->selectedRows().count() == sim->rowCount())
|
||||
{
|
||||
insertInstallPackageIntoTransaction(m_cbGroups->currentText());
|
||||
insertInstallPackageIntoTransaction(getSelectedGroup());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -360,6 +361,35 @@ void MainWindow::insertIntoInstallPackage()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Searches in Install Transaction queue for the given package
|
||||
*/
|
||||
bool MainWindow::isPackageInInstallTransaction(const QString &pkgName)
|
||||
{
|
||||
QStandardItem * siInstallParent = getInstallTransactionParentItem();
|
||||
QStandardItemModel *sim = qobject_cast<QStandardItemModel *>(siInstallParent->model());
|
||||
QStandardItem *repository = getAvailablePackage(pkgName, ctn_PACKAGE_REPOSITORY_COLUMN);
|
||||
QString repo;
|
||||
if (repository) repo = repository->text();
|
||||
|
||||
QList<QStandardItem *> foundItems = sim->findItems(repo + "/" + pkgName, Qt::MatchRecursive | Qt::MatchExactly);
|
||||
|
||||
return (foundItems.size() > 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Searches in Remove Transaction queue for the given package
|
||||
*/
|
||||
bool MainWindow::isPackageInRemoveTransaction(const QString &pkgName)
|
||||
{
|
||||
QStandardItem * siRemoveParent = getRemoveTransactionParentItem();
|
||||
QStandardItemModel *sim = qobject_cast<QStandardItemModel *>(siRemoveParent->model());
|
||||
|
||||
QList<QStandardItem *> foundItems = sim->findItems(pkgName, Qt::MatchRecursive | Qt::MatchExactly);
|
||||
|
||||
return (foundItems.size() > 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Inserts all optional deps of the current select package into the Transaction Treeview
|
||||
*/
|
||||
@@ -378,7 +408,8 @@ void MainWindow::insertIntoInstallPackageOptDeps(const QString &packageName)
|
||||
candidate = candidate.mid(0, points).trimmed();
|
||||
|
||||
QStandardItem *name = getAvailablePackage(candidate, ctn_PACKAGE_NAME_COLUMN);
|
||||
if(!isPackageInstalled(candidate) && name != 0)
|
||||
if(!isPackageInInstallTransaction(candidate) &&
|
||||
!isPackageInstalled(candidate) && name != 0)
|
||||
{
|
||||
optionalPackages.append(candidate);
|
||||
}
|
||||
@@ -431,7 +462,7 @@ bool MainWindow::insertIntoRemovePackageDeps(const QStringList &dependencies)
|
||||
foreach(QString dep, dependencies)
|
||||
{
|
||||
QStandardItem *name = getAvailablePackage(dep, ctn_PACKAGE_NAME_COLUMN);
|
||||
if(isPackageInstalled(dep) && name != 0)
|
||||
if(!isPackageInRemoveTransaction(dep) && isPackageInstalled(dep) && name != 0)
|
||||
{
|
||||
newDeps.append(dep);
|
||||
}
|
||||
@@ -483,7 +514,7 @@ bool MainWindow::insertIntoRemovePackageDeps(const QStringList &dependencies)
|
||||
void MainWindow::insertGroupIntoInstallPackage()
|
||||
{
|
||||
_ensureTabVisible(ctn_TABINDEX_TRANSACTION);
|
||||
insertInstallPackageIntoTransaction(m_cbGroups->currentText());
|
||||
insertInstallPackageIntoTransaction(getSelectedGroup());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -630,8 +661,10 @@ bool MainWindow::_isSUAvailable()
|
||||
*/
|
||||
void MainWindow::doSyncDatabase()
|
||||
{
|
||||
doRemovePacmanLockFile();
|
||||
|
||||
//If there are no means to run the actions, we must warn!
|
||||
if (!_isSUAvailable()) return;
|
||||
//if (!_isSUAvailable()) return;
|
||||
|
||||
m_commandExecuting = ectn_SYNC_DATABASE;
|
||||
disableTransactionActions();
|
||||
@@ -688,7 +721,7 @@ void MainWindow::doYaourtUpgrade()
|
||||
*/
|
||||
void MainWindow::doSystemUpgrade(bool syncDatabase)
|
||||
{
|
||||
if (m_systemUpgradeDialog) return;
|
||||
if (isYaourtGroupSelected() || m_systemUpgradeDialog) return;
|
||||
|
||||
if(m_callSystemUpgrade && m_numberOfOutdatedPackages == 0)
|
||||
{
|
||||
@@ -737,7 +770,6 @@ void MainWindow::doSystemUpgrade(bool syncDatabase)
|
||||
QString ds = QString::number(totalDownloadSize, 'f', 2);
|
||||
|
||||
TransactionDialog question(this);
|
||||
|
||||
//question.removeYesButton(); //This is a more prudent behaviour!
|
||||
|
||||
if(targets->count()==1)
|
||||
@@ -758,8 +790,9 @@ void MainWindow::doSystemUpgrade(bool syncDatabase)
|
||||
{
|
||||
m_systemUpgradeDialog = false;
|
||||
|
||||
doRemovePacmanLockFile();
|
||||
//If there are no means to run the actions, we must warn!
|
||||
if (!_isSUAvailable()) return;
|
||||
//if (!_isSUAvailable()) return;
|
||||
|
||||
m_lastCommandList.clear();
|
||||
m_lastCommandList.append("pacman -Su;");
|
||||
@@ -816,23 +849,12 @@ void MainWindow::doRemoveAndInstall()
|
||||
TransactionDialog question(this);
|
||||
QString dialogText;
|
||||
|
||||
/*foreach(QString removeTarget, *removeTargets)
|
||||
{
|
||||
removeList = removeList + StrConstants::getRemove() + " " + removeTarget + "\n";
|
||||
}*/
|
||||
|
||||
QStringList removeTargets = listOfRemoveTargets.split(" ", QString::SkipEmptyParts);
|
||||
foreach(QString target, removeTargets)
|
||||
{
|
||||
removeList = removeList + StrConstants::getRemove() + " " + target + "\n";
|
||||
}
|
||||
|
||||
/*if (removeList.count() == 0)
|
||||
{
|
||||
removeTargets->append(listOfRemoveTargets);
|
||||
removeList.append(StrConstants::getRemove() + " " + listOfRemoveTargets);
|
||||
}*/
|
||||
|
||||
QString listOfInstallTargets = getTobeInstalledPackages();
|
||||
QList<PackageListData> *installTargets = Package::getTargetUpgradeList(listOfInstallTargets);
|
||||
QString installList;
|
||||
@@ -903,8 +925,9 @@ void MainWindow::doRemoveAndInstall()
|
||||
|
||||
if(result == QDialogButtonBox::Yes || result == QDialogButtonBox::AcceptRole)
|
||||
{
|
||||
doRemovePacmanLockFile();
|
||||
//If there are no means to run the actions, we must warn!
|
||||
if (!_isSUAvailable()) return;
|
||||
//if (!_isSUAvailable()) return;
|
||||
|
||||
QString command;
|
||||
command = "pacman -R --noconfirm " + listOfRemoveTargets +
|
||||
@@ -948,27 +971,14 @@ void MainWindow::doRemove()
|
||||
{
|
||||
QString listOfTargets = getTobeRemovedPackages();
|
||||
m_targets = Package::getTargetRemovalList(listOfTargets, m_removeCommand);
|
||||
//m_targets = new QStringList();
|
||||
QString list;
|
||||
|
||||
/*foreach(QString target, *m_targets)
|
||||
{
|
||||
list = list + target + "\n";
|
||||
}
|
||||
list.remove(list.size()-1, 1);*/
|
||||
|
||||
QStringList targets = listOfTargets.split(" ", QString::SkipEmptyParts);
|
||||
foreach(QString target, targets)
|
||||
{
|
||||
list = list + target + "\n";
|
||||
}
|
||||
|
||||
/*if (list.count() == 0)
|
||||
{
|
||||
m_targets->append(listOfTargets);
|
||||
list.append(listOfTargets);
|
||||
}*/
|
||||
|
||||
TransactionDialog question(this);
|
||||
|
||||
//Shows a dialog indicating the targets which will be removed and asks for the user's permission.
|
||||
@@ -996,8 +1006,9 @@ void MainWindow::doRemove()
|
||||
|
||||
if(result == QDialogButtonBox::Yes || result == QDialogButtonBox::AcceptRole)
|
||||
{
|
||||
doRemovePacmanLockFile();
|
||||
//If there are no means to run the actions, we must warn!
|
||||
if (!_isSUAvailable()) return;
|
||||
//if (!_isSUAvailable()) return;
|
||||
|
||||
QString command;
|
||||
command = "pacman -R --noconfirm " + listOfTargets;
|
||||
@@ -1069,7 +1080,7 @@ void MainWindow::doInstallYaourtPackage()
|
||||
{
|
||||
QString listOfTargets;
|
||||
|
||||
if (m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
if (isYaourtGroupSelected())
|
||||
{
|
||||
for (int c=0; c<ui->tvPackages->selectionModel()->selectedRows().count(); c++)
|
||||
{
|
||||
@@ -1191,8 +1202,9 @@ void MainWindow::doInstall()
|
||||
|
||||
if(result == QDialogButtonBox::Yes || result == QDialogButtonBox::AcceptRole)
|
||||
{
|
||||
doRemovePacmanLockFile();
|
||||
//If there are no means to run the actions, we must warn!
|
||||
if (!_isSUAvailable()) return;
|
||||
//if (!_isSUAvailable()) return;
|
||||
|
||||
QString command;
|
||||
command = "pacman -S --noconfirm " + listOfTargets;
|
||||
@@ -1231,34 +1243,77 @@ void MainWindow::doInstall()
|
||||
*/
|
||||
void MainWindow::doInstallLocalPackages()
|
||||
{
|
||||
//If there are no means to run the actions, we must warn!
|
||||
if (!_isSUAvailable()) return;
|
||||
|
||||
QString listOfTargets;
|
||||
QString list;
|
||||
QFileInfo fi;
|
||||
|
||||
foreach(QString target, m_packagesToInstallList)
|
||||
{
|
||||
fi.setFile(target);
|
||||
list = list + fi.fileName() + "\n";
|
||||
}
|
||||
|
||||
foreach(QString pkgToInstall, m_packagesToInstallList)
|
||||
{
|
||||
listOfTargets += pkgToInstall + " ";
|
||||
}
|
||||
|
||||
m_lastCommandList.clear();
|
||||
m_lastCommandList.append("pacman -U " + listOfTargets + ";");
|
||||
m_lastCommandList.append("echo -e;");
|
||||
m_lastCommandList.append("read -n1 -p \"" + StrConstants::getPressAnyKey() + "\"");
|
||||
TransactionDialog question(this);
|
||||
question.setWindowTitle(StrConstants::getConfirmation());
|
||||
question.setInformativeText(StrConstants::getConfirmationQuestion());
|
||||
question.setDetailedText(list);
|
||||
|
||||
disableTransactionActions();
|
||||
m_unixCommand = new UnixCommand(this);
|
||||
if(m_packagesToInstallList.count()==1)
|
||||
{
|
||||
if (m_packagesToInstallList.at(0).indexOf("HoldPkg was found in") != -1)
|
||||
{
|
||||
QMessageBox::warning(
|
||||
this, StrConstants::getAttention(), StrConstants::getWarnHoldPkgFound(), QMessageBox::Ok);
|
||||
return;
|
||||
}
|
||||
else question.setText(StrConstants::getRetrieveTarget());
|
||||
}
|
||||
else
|
||||
question.setText(StrConstants::getRetrieveTargets().arg(m_packagesToInstallList.count()));
|
||||
|
||||
QObject::connect(m_unixCommand, SIGNAL( started() ), this, SLOT( actionsProcessStarted()));
|
||||
QObject::connect(m_unixCommand, SIGNAL( readyReadStandardOutput()),
|
||||
this, SLOT( actionsProcessReadOutput() ));
|
||||
QObject::connect(m_unixCommand, SIGNAL( finished ( int, QProcess::ExitStatus )),
|
||||
this, SLOT( actionsProcessFinished(int, QProcess::ExitStatus) ));
|
||||
QObject::connect(m_unixCommand, SIGNAL( readyReadStandardError() ),
|
||||
this, SLOT( actionsProcessRaisedError() ));
|
||||
int result = question.exec();
|
||||
|
||||
m_commandExecuting = ectn_RUN_IN_TERMINAL;
|
||||
m_unixCommand->runCommandInTerminal(m_lastCommandList);
|
||||
if(result == QDialogButtonBox::Yes || result == QDialogButtonBox::AcceptRole)
|
||||
{
|
||||
doRemovePacmanLockFile();
|
||||
//If there are no means to run the actions, we must warn!
|
||||
//if (!_isSUAvailable()) return;
|
||||
QString command;
|
||||
command = "pacman -U --noconfirm " + listOfTargets;
|
||||
|
||||
m_lastCommandList.clear();
|
||||
m_lastCommandList.append("pacman -U " + listOfTargets + ";");
|
||||
m_lastCommandList.append("echo -e;");
|
||||
m_lastCommandList.append("read -n1 -p \"" + StrConstants::getPressAnyKey() + "\"");
|
||||
|
||||
m_commandExecuting = ectn_INSTALL;
|
||||
disableTransactionActions();
|
||||
m_unixCommand = new UnixCommand(this);
|
||||
|
||||
QObject::connect(m_unixCommand, SIGNAL( started() ), this, SLOT( actionsProcessStarted()));
|
||||
QObject::connect(m_unixCommand, SIGNAL( readyReadStandardOutput()),
|
||||
this, SLOT( actionsProcessReadOutput() ));
|
||||
QObject::connect(m_unixCommand, SIGNAL( finished ( int, QProcess::ExitStatus )),
|
||||
this, SLOT( actionsProcessFinished(int, QProcess::ExitStatus) ));
|
||||
QObject::connect(m_unixCommand, SIGNAL( readyReadStandardError() ),
|
||||
this, SLOT( actionsProcessRaisedError() ));
|
||||
|
||||
if (result == QDialogButtonBox::Yes)
|
||||
{
|
||||
m_commandExecuting = ectn_INSTALL;
|
||||
m_unixCommand->executeCommand(command);
|
||||
}
|
||||
else if (result == QDialogButtonBox::AcceptRole)
|
||||
{
|
||||
m_commandExecuting = ectn_RUN_IN_TERMINAL;
|
||||
m_unixCommand->runCommandInTerminal(m_lastCommandList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1266,8 +1321,9 @@ void MainWindow::doInstallLocalPackages()
|
||||
*/
|
||||
void MainWindow::doCleanCache()
|
||||
{
|
||||
doRemovePacmanLockFile();
|
||||
//If there are no means to run the actions, we must warn!
|
||||
if (!_isSUAvailable()) return;
|
||||
//if (!_isSUAvailable()) return;
|
||||
|
||||
int res = QMessageBox::question(this, StrConstants::getConfirmation(),
|
||||
StrConstants::getCleanCacheConfirmation(),
|
||||
@@ -1287,7 +1343,6 @@ void MainWindow::doCleanCache()
|
||||
if (res)
|
||||
{
|
||||
writeToTabOutputExt("<b>" + StrConstants::getCommandFinishedOK() + "</b>");
|
||||
//metaBuildPackageList();
|
||||
}
|
||||
else
|
||||
writeToTabOutputExt("<b>" + StrConstants::getCommandFinishedWithErrors() + "</b>");
|
||||
@@ -1342,7 +1397,7 @@ void MainWindow::toggleTransactionActions(const bool value)
|
||||
ui->actionInstallLocalPackage->setEnabled(value);
|
||||
|
||||
//We have to toggle the combobox groups as well
|
||||
if (m_initializationCompleted) m_cbGroups->setEnabled(value);
|
||||
if (m_initializationCompleted) ui->twGroups->setEnabled(value);
|
||||
}
|
||||
|
||||
void MainWindow::toggleSystemActions(const bool value)
|
||||
@@ -1442,6 +1497,8 @@ void MainWindow::actionsProcessStarted()
|
||||
*/
|
||||
void MainWindow::actionsProcessFinished(int exitCode, QProcess::ExitStatus)
|
||||
{
|
||||
bool bRefreshGroups = true;
|
||||
|
||||
m_progressWidget->close();
|
||||
|
||||
ui->twProperties->setTabText(ctn_TABINDEX_OUTPUT, StrConstants::getTabOutputName());
|
||||
@@ -1461,11 +1518,9 @@ void MainWindow::actionsProcessFinished(int exitCode, QProcess::ExitStatus)
|
||||
//Did it synchronize any repo? If so, let's refresh some things...
|
||||
if (_textInTabOutput(StrConstants::getSyncing()))
|
||||
{
|
||||
int oldIndex = m_cbGroups->currentIndex();
|
||||
m_cbGroups->setCurrentIndex(0);
|
||||
refreshComboBoxGroups();
|
||||
bool firstGroup = isAllGroupsSelected();
|
||||
|
||||
if (oldIndex == 0)
|
||||
if (firstGroup)
|
||||
{
|
||||
metaBuildPackageList();
|
||||
}
|
||||
@@ -1488,11 +1543,9 @@ void MainWindow::actionsProcessFinished(int exitCode, QProcess::ExitStatus)
|
||||
if (UnixCommand::isAppRunning("octopi-notifier", true) ||
|
||||
_textInTabOutput(StrConstants::getSyncing()))
|
||||
{
|
||||
int oldIndex = m_cbGroups->currentIndex();
|
||||
m_cbGroups->setCurrentIndex(0);
|
||||
refreshComboBoxGroups();
|
||||
bool firstGroup = isAllGroupsSelected();
|
||||
|
||||
if (oldIndex == 0)
|
||||
if (firstGroup)
|
||||
{
|
||||
metaBuildPackageList();
|
||||
}
|
||||
@@ -1506,12 +1559,17 @@ void MainWindow::actionsProcessFinished(int exitCode, QProcess::ExitStatus)
|
||||
else
|
||||
{
|
||||
//If we are in a package group, maybe we have installed/removed something, so...
|
||||
if (m_cbGroups->currentIndex() > 1)
|
||||
if (!isYaourtGroupSelected())
|
||||
{
|
||||
_rebuildPackageList();
|
||||
}
|
||||
buildPackageList(false);
|
||||
|
||||
metaBuildPackageList();
|
||||
//_rebuildPackageList();
|
||||
}
|
||||
else
|
||||
{
|
||||
bRefreshGroups = false;
|
||||
metaBuildPackageList();
|
||||
}
|
||||
}
|
||||
|
||||
//connect(m_pacmanDatabaseSystemWatcher, SIGNAL(directoryChanged(QString)), this, SLOT(metaBuildPackageList()));
|
||||
@@ -1529,8 +1587,6 @@ void MainWindow::actionsProcessFinished(int exitCode, QProcess::ExitStatus)
|
||||
return;
|
||||
}
|
||||
}
|
||||
//else
|
||||
// connect(m_pacmanDatabaseSystemWatcher, SIGNAL(directoryChanged(QString)), this, SLOT(metaBuildPackageList()));
|
||||
}
|
||||
|
||||
if (exitCode != 0 && (_textInTabOutput("conflict"))) //|| _textInTabOutput("could not satisfy dependencies")))
|
||||
@@ -1547,12 +1603,16 @@ void MainWindow::actionsProcessFinished(int exitCode, QProcess::ExitStatus)
|
||||
}
|
||||
|
||||
enableTransactionActions();
|
||||
if (m_cbGroups->currentText() == StrConstants::getYaourtGroup())
|
||||
if (isYaourtGroupSelected())
|
||||
{
|
||||
toggleSystemActions(false);
|
||||
}
|
||||
|
||||
m_commandExecuting = ectn_NONE;
|
||||
|
||||
if (bRefreshGroups)
|
||||
refreshGroupsWidget();
|
||||
|
||||
m_unixCommand->removeTemporaryActionFile();
|
||||
}
|
||||
|
||||
@@ -1609,7 +1669,13 @@ void MainWindow::_treatProcessOutput(const QString &pMsg)
|
||||
QString progressRun;
|
||||
QString progressEnd;
|
||||
msg.remove(QRegExp(".+\\[Y/n\\].+"));
|
||||
msg.remove(QRegExp("warning:\\S{0}"));
|
||||
//msg.remove(QRegExp("warning:\\S{0}"));
|
||||
|
||||
msg.remove("\033[0;1m");
|
||||
msg.remove("\033[0m");
|
||||
msg.remove("[1;33m");
|
||||
msg.remove("\033[1;34m"); //strings starting with ::
|
||||
msg.remove("\033[0;1m");
|
||||
|
||||
//std::cout << "_treat: " << msg.toAscii().data() << std::endl;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ MultiSelectionDialog::MultiSelectionDialog(QWidget *parent) :
|
||||
|
||||
ui->twDepPackages->setColumnWidth(0, 150); //Package name
|
||||
ui->twDepPackages->setColumnWidth(1, 385); //Package description
|
||||
ui->twDepPackages->horizontalHeader()->setResizeMode( QHeaderView::Fixed );
|
||||
//ui->twDepPackages->horizontalHeader()->setResizeMode( QHeaderView::Fixed );
|
||||
ui->twDepPackages->setColumnWidth(2, 0); //Package repository
|
||||
ui->twDepPackages->horizontalHeader()->setDefaultAlignment( Qt::AlignLeft );
|
||||
ui->twDepPackages->setToolTip(StrConstants::getPressCtrlAToSelectAll());
|
||||
|
||||
@@ -62,7 +62,8 @@ QString Package::makeURLClickable( const QString &s )
|
||||
QString sb = s;
|
||||
QRegExp rx("((ht|f)tp(s?))://(\\S)+[^\"|)|(|.|\\s|\\n]");
|
||||
QRegExp rx1("^|[\\s]+(www\\.)(\\S)+[^\"|)|(|.|\\s|\\n]");
|
||||
rx.setCaseSensitivity( Qt::CaseInsensitive );
|
||||
|
||||
rx.setCaseSensitivity( Qt::CaseInsensitive );
|
||||
rx1.setCaseSensitivity( Qt::CaseInsensitive );
|
||||
|
||||
int search = 0;
|
||||
@@ -105,7 +106,6 @@ QString Package::makeURLClickable( const QString &s )
|
||||
search = ini + (2*s1.length()) + 15;
|
||||
}
|
||||
|
||||
//sb.replace(QRegExp("\n"), "<br>");
|
||||
return sb;
|
||||
}
|
||||
|
||||
@@ -208,7 +208,6 @@ QStringList *Package::getOutdatedPackageList()
|
||||
QStringList packageTuples = outPkgList.split(QRegExp("\\n"), QString::SkipEmptyParts);
|
||||
QStringList * res = new QStringList();
|
||||
QStringList ignorePkgList = UnixCommand::getIgnorePkg();
|
||||
//bool hasYaourt = UnixCommand::hasTheExecutable("yaourt");
|
||||
|
||||
foreach(QString packageTuple, packageTuples)
|
||||
{
|
||||
@@ -1000,7 +999,8 @@ QStringList Package::getContents(const QString& pkgName, bool isInstalled)
|
||||
result = UnixCommand::getPackageContentsUsingPacman(pkgName);
|
||||
}
|
||||
else if (UnixCommand::getLinuxDistro() == ectn_ARCHBANGLINUX ||
|
||||
UnixCommand::getLinuxDistro() == ectn_ARCHLINUX)
|
||||
UnixCommand::getLinuxDistro() == ectn_ARCHLINUX ||
|
||||
UnixCommand::getLinuxDistro() == ectn_KAOS)
|
||||
{
|
||||
result = UnixCommand::getPackageContentsUsingPkgfile(pkgName);
|
||||
}
|
||||
|
||||
@@ -98,10 +98,10 @@ QString PackageController::retrieveDistroNews(bool searchForLatestNews)
|
||||
{
|
||||
const QString ctn_ARCH_LINUX_RSS = "https://www.archlinux.org/feeds/news/";
|
||||
const QString ctn_CHAKRA_RSS = "http://chakra-project.org/news/index.php?/feeds/index.rss2";
|
||||
const QString ctn_KAOS_RSS = "http://kaosx.us/feed/";
|
||||
const QString ctn_MANJARO_LINUX_RSS = "http://manjaro.org/feed/";
|
||||
|
||||
LinuxDistro distro = UnixCommand::getLinuxDistro();
|
||||
|
||||
QString res;
|
||||
QString tmpRssPath = QDir::homePath() + QDir::separator() + ".config/octopi/.tmp_distro_rss.xml";
|
||||
QString rssPath = QDir::homePath() + QDir::separator() + ".config/octopi/distro_rss.xml";
|
||||
@@ -128,6 +128,10 @@ QString PackageController::retrieveDistroNews(bool searchForLatestNews)
|
||||
{
|
||||
curlCommand = curlCommand.arg(ctn_CHAKRA_RSS).arg(tmpRssPath);
|
||||
}
|
||||
else if (distro == ectn_KAOS)
|
||||
{
|
||||
curlCommand = curlCommand.arg(ctn_KAOS_RSS).arg(tmpRssPath);
|
||||
}
|
||||
else if (distro == ectn_MANJAROLINUX)
|
||||
{
|
||||
curlCommand = curlCommand.arg(ctn_MANJARO_LINUX_RSS).arg(tmpRssPath);
|
||||
@@ -162,8 +166,8 @@ QString PackageController::retrieveDistroNews(bool searchForLatestNews)
|
||||
contentsTmpRss = in.readAll();
|
||||
fileTmpRss.close();
|
||||
|
||||
tmpRssSHA1 = QCryptographicHash::hash(contentsTmpRss.toAscii(), QCryptographicHash::Sha1);
|
||||
rssSHA1 = QCryptographicHash::hash(contentsRss.toAscii(), QCryptographicHash::Sha1);
|
||||
tmpRssSHA1 = QCryptographicHash::hash(contentsTmpRss.toLatin1(), QCryptographicHash::Sha1);
|
||||
rssSHA1 = QCryptographicHash::hash(contentsRss.toLatin1(), QCryptographicHash::Sha1);
|
||||
|
||||
if (tmpRssSHA1 != rssSHA1){
|
||||
fileRss.remove();
|
||||
@@ -224,6 +228,10 @@ QString PackageController::parseDistroNews()
|
||||
{
|
||||
html = "<p align=\"center\"><h2>" + StrConstants::getChakraNews() + "</h2></p><ul>";
|
||||
}
|
||||
else if (distro == ectn_KAOS)
|
||||
{
|
||||
html = "<p align=\"center\"><h2>" + StrConstants::getKaOSNews() + "</h2></p><ul>";
|
||||
}
|
||||
else if (distro == ectn_MANJAROLINUX)
|
||||
{
|
||||
html = "<p align=\"center\"><h2>" + StrConstants::getManjaroLinuxNews() + "</h2></p><ul>";
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <QWidget>
|
||||
#include <QSyntaxHighlighter>
|
||||
#include <QApplication>
|
||||
#include <QTextEdit>
|
||||
|
||||
class SearchBar : public QWidget
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ const QString ctn_KEY_USE_PKGTOOLS("Use_PkgTools");
|
||||
const QString ctn_KEY_USE_SILENT_ACTION_OUTPUT("Use_Silent_Action_Output");
|
||||
const QString ctn_KEY_PRIVILEGE_ESCALATION_TOOL("Privilege_Escalation_Tool");
|
||||
|
||||
enum PanelOrganizing { ectn_NORMAL=30, ectn_MAXIMIZE_PACKAGES=40, ectn_MAXIMIZE_PROPERTIES=50 };
|
||||
enum PanelOrganizing { ectn_NORMAL=30, ectn_MAXIMIZE_PACKAGES=40, ectn_MAXIMIZE_PROPERTIES=50, ectn_GROUPS=5 };
|
||||
|
||||
enum SaveSettingsReason { ectn_FourPanelOrganizing, ectn_PackageList, ectn_InstalledPackageList,
|
||||
ectn_ToolBar, ectn_DefaultDirectory, ectn_IconifyOnStart, ectn_CurrentTabIndex,
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "wmhelper.h"
|
||||
#include "unixcommand.h"
|
||||
|
||||
#include <QGtkStyle>
|
||||
#include <QApplication>
|
||||
|
||||
class StrConstants{
|
||||
@@ -35,7 +34,7 @@ public:
|
||||
}
|
||||
|
||||
static QString getApplicationVersion(){
|
||||
return "0.3";
|
||||
return "0.3.1";
|
||||
}
|
||||
|
||||
static QString getApplicationCliHelp(){
|
||||
@@ -50,7 +49,14 @@ public:
|
||||
}
|
||||
|
||||
static QString getForeignRepositoryName(){
|
||||
return "AUR";
|
||||
if (UnixCommand::getLinuxDistro() == ectn_KAOS)
|
||||
{
|
||||
return "non-repo";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "AUR";
|
||||
}
|
||||
}
|
||||
|
||||
static QString getArchLinuxNews(){
|
||||
@@ -61,6 +67,10 @@ public:
|
||||
return QObject::tr("Chakra news");
|
||||
}
|
||||
|
||||
static QString getKaOSNews(){
|
||||
return QObject::tr("KaOS news");
|
||||
}
|
||||
|
||||
static QString getManjaroLinuxNews(){
|
||||
return QObject::tr("Manjaro Linux news");
|
||||
}
|
||||
@@ -77,12 +87,12 @@ public:
|
||||
return QObject::tr("Internet seems unavailable!");
|
||||
}
|
||||
|
||||
static QString getAll(){
|
||||
static QString getDisplayAllGroups(){
|
||||
return QObject::tr("Display all groups");
|
||||
}
|
||||
|
||||
static QString getYaourtGroup(){
|
||||
return "< Yaourt >";
|
||||
return "<Yaourt>";
|
||||
}
|
||||
|
||||
static QString getHelpUsage(){
|
||||
@@ -524,16 +534,8 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
static QString getMenuCSS(){
|
||||
return "";
|
||||
}
|
||||
|
||||
static QString getTreeViewCSS(){
|
||||
QString res;
|
||||
|
||||
//if (qApp->style()->inherits("QGtkStyle") && UnixCommand::getLinuxDistro() == ectn_MANJAROLINUX && !WMHelper::isKDERunning())
|
||||
//{
|
||||
res = "QTreeView::branch:has-siblings:!adjoins-item {"
|
||||
return QString("QTreeView::branch:has-siblings:!adjoins-item {"
|
||||
" border-image: url(:/resources/styles/vline.png) 0;}"
|
||||
"QTreeView::branch:has-siblings:adjoins-item {"
|
||||
" border-image: url(:/resources/styles/branch-more.png) 0;}"
|
||||
@@ -546,51 +548,7 @@ public:
|
||||
"QTreeView::branch:open:has-children:!has-siblings,"
|
||||
"QTreeView::branch:open:has-children:has-siblings {"
|
||||
" border-image: none;"
|
||||
" image: url(:/resources/styles/branch-open_BW.png);}";
|
||||
/*}
|
||||
else
|
||||
{
|
||||
res = "QTreeView::branch:has-siblings:!adjoins-item {"
|
||||
" border-image: url(:/resources/styles/vline.png) 0;}"
|
||||
"QTreeView::branch:has-siblings:adjoins-item {"
|
||||
" border-image: url(:/resources/styles/branch-more.png) 0;}"
|
||||
"QTreeView::branch:!has-children:!has-siblings:adjoins-item {"
|
||||
" border-image: url(:/resources/styles/branch-end.png) 0;}"
|
||||
"QTreeView::branch:has-children:!has-siblings:closed,"
|
||||
"QTreeView::branch:closed:has-children:has-siblings {"
|
||||
" border-image: none;"
|
||||
" image: url(:/resources/styles/branch-closed_BW.png);}"
|
||||
"QTreeView::branch:open:has-children:!has-siblings,"
|
||||
"QTreeView::branch:open:has-children:has-siblings {"
|
||||
" border-image: none;"
|
||||
" image: url(:/resources/styles/branch-open_BW.png);}"
|
||||
|
||||
"QTreeView {"
|
||||
"selection-background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc);"
|
||||
"show-decoration-selected: 1;"
|
||||
"}"
|
||||
"QTreeView::item {"
|
||||
"border: 1px solid #d9d9d9;"
|
||||
"border-top-color: transparent;"
|
||||
"border-bottom-color: transparent;"
|
||||
"}"
|
||||
"QTreeView::item:hover {"
|
||||
"background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #e7effd, stop: 1 #cbdaf1);"
|
||||
"border: 1px solid #bfcde4;"
|
||||
"color: #000000;"
|
||||
"}"
|
||||
"QTreeView::item:selected {"
|
||||
"border: 1px solid #567dbc;"
|
||||
"}"
|
||||
"QTreeView::item:selected:active{"
|
||||
"background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6ea1f1, stop: 1 #567dbc)"
|
||||
"}"
|
||||
"QTreeView::item:selected:!active {"
|
||||
" background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6b9be8, stop: 1 #577fbf)"
|
||||
"}";
|
||||
}*/
|
||||
|
||||
return res;
|
||||
" image: url(:/resources/styles/branch-open_BW.png);}");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -27,10 +27,20 @@
|
||||
#include <QtGui>
|
||||
#include <QFutureWatcher>
|
||||
#include <QTreeWidget>
|
||||
#include <QToolTip>
|
||||
#include <iostream>
|
||||
|
||||
#if QT_VERSION > 0x050000
|
||||
#include <QtConcurrent/QtConcurrentRun>
|
||||
#else
|
||||
#include <QtConcurrentRun>
|
||||
#endif
|
||||
|
||||
QPoint gPoint;
|
||||
using namespace QtConcurrent;
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
using namespace QtConcurrent;
|
||||
#endif
|
||||
|
||||
TreeViewPackagesItemDelegate::TreeViewPackagesItemDelegate(QObject *parent):
|
||||
QStyledItemDelegate(parent)
|
||||
@@ -67,7 +77,7 @@ bool TreeViewPackagesItemDelegate::helpEvent ( QHelpEvent *event, QAbstractItemV
|
||||
gPoint = tvPackages->mapToGlobal(event->pos());
|
||||
QFuture<QString> f;
|
||||
disconnect(&g_fwToolTip, SIGNAL(finished()), this, SLOT(execToolTip()));
|
||||
f = run(showPackageInfo, si->text());
|
||||
f = QtConcurrent::run(showPackageInfo, si->text());
|
||||
g_fwToolTip.setFuture(f);
|
||||
connect(&g_fwToolTip, SIGNAL(finished()), this, SLOT(execToolTip()));
|
||||
}
|
||||
@@ -111,7 +121,7 @@ bool TreeViewPackagesItemDelegate::helpEvent ( QHelpEvent *event, QAbstractItemV
|
||||
gPoint = tvTransaction->mapToGlobal(event->pos());
|
||||
QFuture<QString> f;
|
||||
disconnect(&g_fwToolTip, SIGNAL(finished()), this, SLOT(execToolTip()));
|
||||
f = run(showPackageInfo, siFound->text());
|
||||
f = QtConcurrent::run(showPackageInfo, siFound->text());
|
||||
g_fwToolTip.setFuture(f);
|
||||
connect(&g_fwToolTip, SIGNAL(finished()), this, SLOT(execToolTip()));
|
||||
}
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
//IconHelper provides some very used icons to the interface
|
||||
class IconHelper{
|
||||
public:
|
||||
static QIcon getIconOctopiTransparent(){ return QIcon(":/resources/images/octopi_transparent.png"); }
|
||||
static QIcon getIconOctopiRed(){ return QIcon(":/resources/images/octopi_red.png"); }
|
||||
static QIcon getIconOctopiYellow(){ return QIcon(":/resources/images/octopi_yellow.png"); }
|
||||
static QIcon getIconOctopiGreen(){ return QIcon(":/resources/images/octopi_green.png"); }
|
||||
static QIcon getIconInternalError(){ return QIcon(":/resources/images/internalerror.png"); }
|
||||
|
||||
static QIcon getIconFolder()
|
||||
{
|
||||
|
||||
@@ -987,6 +987,10 @@ LinuxDistro UnixCommand::getLinuxDistro()
|
||||
{
|
||||
ret = ectn_CHAKRA;
|
||||
}
|
||||
else if (contents.contains(QRegExp("KaOS")))
|
||||
{
|
||||
ret = ectn_KAOS;
|
||||
}
|
||||
else if (contents.contains(QRegExp("Manjaro")))
|
||||
{
|
||||
ret = ectn_MANJAROLINUX;
|
||||
|
||||
@@ -37,7 +37,7 @@ enum CommandExecuting { ectn_NONE, ectn_SYNC_DATABASE, ectn_SYSTEM_UPGRADE,
|
||||
ectn_INSTALL, ectn_REMOVE, ectn_REMOVE_INSTALL,
|
||||
ectn_RUN_SYSTEM_UPGRADE_IN_TERMINAL, ectn_RUN_IN_TERMINAL };
|
||||
|
||||
enum LinuxDistro { ectn_ARCHBANGLINUX, ectn_ARCHLINUX, ectn_MANJAROLINUX, ectn_CHAKRA, ectn_UNKNOWN };
|
||||
enum LinuxDistro { ectn_ARCHBANGLINUX, ectn_ARCHLINUX, ectn_MANJAROLINUX, ectn_CHAKRA, ectn_KAOS, ectn_UNKNOWN };
|
||||
|
||||
//Forward class declarations.
|
||||
class QString;
|
||||
|
||||
@@ -231,6 +231,7 @@ QString WMHelper::getXFCEEditor(){
|
||||
*/
|
||||
QString WMHelper::getKDESUCommand(){
|
||||
QString result = ctn_KDESU;
|
||||
|
||||
result += " -d ";
|
||||
result += " -t ";
|
||||
result += " --noignorebutton ";
|
||||
@@ -352,6 +353,10 @@ void WMHelper::openFile(const QString& fileName){
|
||||
s << "file:" + fileToOpen;
|
||||
p->startDetached( ctn_KDE_FILE_MANAGER, s );
|
||||
}
|
||||
else if (isKDERunning() && UnixCommand::hasTheExecutable(ctn_KDE4_FILE_MANAGER)){
|
||||
s << fileToOpen;
|
||||
p->startDetached( ctn_KDE4_OPEN, s );
|
||||
}
|
||||
else if (isTDERunning() && UnixCommand::hasTheExecutable(ctn_TDE_FILE_MANAGER)){
|
||||
s << "exec";
|
||||
s << "file:" + fileToOpen;
|
||||
@@ -400,6 +405,11 @@ void WMHelper::editFile( const QString& fileName ){
|
||||
p += ctn_KDE_EDITOR + " " + fileName;
|
||||
process->startDetached(getSUCommand() + p);
|
||||
}
|
||||
else if (isKDERunning() && UnixCommand::hasTheExecutable(ctn_KDE4_EDITOR)){
|
||||
QString p = " -d -t --noignorebutton -c ";
|
||||
p += ctn_KDE4_EDITOR + " " + fileName;
|
||||
process->startDetached(getSUCommand() + p);
|
||||
}
|
||||
else if (isTDERunning() && UnixCommand::hasTheExecutable(ctn_TDE_EDITOR)){
|
||||
QString p = " -d -t --noignorebutton ";
|
||||
p += ctn_TDE_EDITOR + " " + fileName;
|
||||
|
||||
@@ -30,7 +30,9 @@ const QString ctn_KDE_DESKTOP("kwin");
|
||||
const QString ctn_KDE_EDITOR("kwrite");
|
||||
const QString ctn_KDE_FILE_MANAGER("kfmclient");
|
||||
const QString ctn_KDE_TERMINAL("konsole");
|
||||
const QString ctn_KDE4_OPEN("kde-open");
|
||||
const QString ctn_KDE4_FILE_MANAGER("dolphin");
|
||||
const QString ctn_KDE4_EDITOR("kate");
|
||||
|
||||
const QString ctn_TDESU("tdesu");
|
||||
const QString ctn_TDE_DESKTOP("twin");
|
||||
|
||||
@@ -33,43 +33,47 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
<widget class="QSplitter" name="splitterVertical">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QTreeView" name="tvPackages">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTreeView" name="tvPackages">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="indentation">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="indentation">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTreeWidget" name="twGroups">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>235</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QTabWidget" name="twProperties">
|
||||
<property name="sizePolicy">
|
||||
@@ -118,7 +122,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>552</width>
|
||||
<height>20</height>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
@@ -481,6 +485,18 @@
|
||||
<string>Install</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShowGroups">
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/resources/images/show_groups.png</normaloff>:/resources/images/show_groups.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Groups</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F9</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<tabstops>
|
||||
|
||||
Reference in New Issue
Block a user