Commit fff02024 authored by Ravi Sharan's avatar Ravi Sharan

Polish package files for GSoC submission

parent e118df33
......@@ -3,9 +3,9 @@
import argparse
import sys
import subprocess
from PyQt5.QtWidgets import QApplication, QDialog
from PyQt5.QtWidgets import QApplication, QDialog, QFrame
from pybombsurl import PybombsUrl
from pybombsurl.pybombsurl import PybombsUrl
from pybombsurl.qt.pybombsurl_qtgen import Ui_PybombsUrlDialog
from pybombsurl.qt.pb_threadpool import AWorkerThread
......@@ -14,19 +14,24 @@ class PybombsDialog(QDialog, Ui_PybombsUrlDialog):
super(PybombsDialog, self).__init__()
self.ui = Ui_PybombsUrlDialog()
self.ui.setupUi(self)
self.ui.textEdit.setFrameStyle(QFrame.NoFrame)
self.ui.textEdit.setContentsMargins(0, 0, 0, 0)
self.ui.widget.hide()
self.ui.pushButton.hide()
self.final_packages = []
self.threadPool = []
parser = argparse.ArgumentParser()
parser.add_argument('packageurl', help='pybombsurl packages')
args = parser.parse_args()
pu = pybombsurl.PybombsUrl(args.packageurl)
parsed_pkgs = pu.pkg_deps()
self.final_packages = [parsed_packages.keys()]
pu = PybombsUrl(args.packageurl)
parsed_packages = pu.pkg_deps()
self.final_packages = ', '.join(list(parsed_packages.keys()))
self.ui.textEdit.append('<html><b>To Install : </b</html> {}'.
format(self.final_packages))
self.ui.pushButton_3.clicked.connect(self.close_dialog)
self.ui.pushButton_2.clicked.connect(self.apply_changes)
self.ui.pushButton.clicked.connect(self.quit_dialog)
def close_dialog(self):
......
......@@ -58,7 +58,7 @@ class PybombsUrl(object):
return self.packages
def desktop_notify(self, notif_msg, status=False):
if status = True:
if status == True:
notification = ['notify-send', 'PybombsUrl', notif_msg,
'--icon=dialog-information']
else:
......
__all__ = ["pb_threadpool", "pybombsurl_qtgen"]
......@@ -17,8 +17,8 @@ class AWorkerThread(QtCore.QThread):
instaman = install_manager.InstallManager()
for package in self.package_list:
pkg_index = install_list.index(package)+1
self.progress_tick.emit(pkg_index, len(install_list), 'install')
pkg_index = self.package_list.index(package)+1
self.progress_tick.emit(pkg_index, len(self.package_list), 'install')
if instaman.install([package], 'install'):
self.info_tick.emit("PybombsUrl Update", "Installed {} successfully".format(package))
else:
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<width>480</width>
<height>320</height>
</rect>
</property>
......@@ -22,6 +22,9 @@
<height>141</height>
</rect>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QWidget" name="widget" native="true">
<property name="geometry">
......@@ -35,9 +38,9 @@
<widget class="QProgressBar" name="progressBar">
<property name="geometry">
<rect>
<x>10</x>
<x>15</x>
<y>80</y>
<width>481</width>
<width>455</width>
<height>23</height>
</rect>
</property>
......@@ -62,7 +65,7 @@
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>-2</x>
<x>-8</x>
<y>-10</y>
<width>500</width>
<height>125</height>
......
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'pybombsurl-qt.ui'
# Form implementation generated from reading ui file 'pybombsurl/qt/pybombsurl-qt.ui'
#
# Created by: PyQt5 UI code generator 5.7
#
......@@ -11,15 +11,16 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_PybombsUrlDialog(object):
def setupUi(self, PybombsUrlDialog):
PybombsUrlDialog.setObjectName("PybombsUrlDialog")
PybombsUrlDialog.resize(500, 320)
PybombsUrlDialog.resize(480, 320)
self.textEdit = QtWidgets.QTextEdit(PybombsUrlDialog)
self.textEdit.setGeometry(QtCore.QRect(0, 110, 501, 141))
self.textEdit.setReadOnly(True)
self.textEdit.setObjectName("textEdit")
self.widget = QtWidgets.QWidget(PybombsUrlDialog)
self.widget.setGeometry(QtCore.QRect(0, 110, 501, 141))
self.widget.setObjectName("widget")
self.progressBar = QtWidgets.QProgressBar(self.widget)
self.progressBar.setGeometry(QtCore.QRect(10, 80, 481, 23))
self.progressBar.setGeometry(QtCore.QRect(15, 80, 455, 23))
self.progressBar.setProperty("value", 24)
self.progressBar.setObjectName("progressBar")
self.label_2 = QtWidgets.QLabel(self.widget)
......@@ -27,7 +28,7 @@ class Ui_PybombsUrlDialog(object):
self.label_2.setText("")
self.label_2.setObjectName("label_2")
self.label = QtWidgets.QLabel(PybombsUrlDialog)
self.label.setGeometry(QtCore.QRect(-2, -10, 500, 125))
self.label.setGeometry(QtCore.QRect(-8, -10, 500, 125))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap(":/noprefix/assets/dialog_banner.png"))
self.label.setObjectName("label")
......
......@@ -18,9 +18,8 @@ setup(name='PybombsUrl',
maintainer_email="bhagavathula.ravisharan@gmail.com",
license="GPLv3",
packages=['pybombsurl',
'pybombsurl',
'pybombsurl.qt'],
scripts=['pybombsurl-term','pybombsurl-qt'],
scripts=['pybombsurl.sh','pybombsurl-term','pybombsurl-qt'],
data_files=[('share/pybombsurl/',
["pybombsurl/qt/pybombsurl-qt.ui"]),
('bin/',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment