[qcineoob] cosmetics
This commit is contained in:
parent
23dde42186
commit
5ce13703dd
4 changed files with 22 additions and 4 deletions
|
|
@ -18,7 +18,8 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from PyQt4.QtCore import SIGNAL
|
||||
from PyQt4.QtCore import SIGNAL, Qt
|
||||
from PyQt4.QtGui import QApplication
|
||||
|
||||
from weboob.capabilities.cinema import ICapCinema
|
||||
from weboob.capabilities.torrent import ICapTorrent
|
||||
|
|
@ -108,6 +109,7 @@ class MainWindow(QtMainWindow):
|
|||
|
||||
self.minis = []
|
||||
self.ui.searchEdit.setEnabled(False)
|
||||
QApplication.setOverrideCursor( Qt.WaitCursor )
|
||||
|
||||
backend_name = str(self.ui.backendEdit.itemData(self.ui.backendEdit.currentIndex()).toString())
|
||||
|
||||
|
|
@ -123,6 +125,7 @@ class MainWindow(QtMainWindow):
|
|||
|
||||
self.minis = []
|
||||
self.ui.searchEdit.setEnabled(False)
|
||||
QApplication.setOverrideCursor( Qt.WaitCursor )
|
||||
|
||||
backend_name = str(self.ui.backendEdit.itemData(self.ui.backendEdit.currentIndex()).toString())
|
||||
|
||||
|
|
@ -153,6 +156,7 @@ class MainWindow(QtMainWindow):
|
|||
|
||||
self.minis = []
|
||||
self.ui.searchEdit.setEnabled(False)
|
||||
QApplication.setOverrideCursor( Qt.WaitCursor )
|
||||
|
||||
backend_name = str(self.ui.backendEdit.itemData(self.ui.backendEdit.currentIndex()).toString())
|
||||
|
||||
|
|
@ -162,6 +166,7 @@ class MainWindow(QtMainWindow):
|
|||
def addMovie(self, backend, movie):
|
||||
if not backend:
|
||||
self.ui.searchEdit.setEnabled(True)
|
||||
QApplication.restoreOverrideCursor()
|
||||
self.process = None
|
||||
return
|
||||
minimovie = MiniMovie(self.weboob, backend, movie, self)
|
||||
|
|
@ -177,6 +182,7 @@ class MainWindow(QtMainWindow):
|
|||
wmovie = Movie(movie,self)
|
||||
self.ui.info_content.layout().addWidget(wmovie)
|
||||
self.current_info_widget = wmovie
|
||||
QApplication.restoreOverrideCursor()
|
||||
|
||||
def searchPerson(self):
|
||||
pattern = unicode(self.ui.searchEdit.text())
|
||||
|
|
@ -193,6 +199,7 @@ class MainWindow(QtMainWindow):
|
|||
|
||||
self.minis = []
|
||||
self.ui.searchEdit.setEnabled(False)
|
||||
QApplication.setOverrideCursor( Qt.WaitCursor )
|
||||
|
||||
backend_name = str(self.ui.backendEdit.itemData(self.ui.backendEdit.currentIndex()).toString())
|
||||
|
||||
|
|
@ -202,6 +209,7 @@ class MainWindow(QtMainWindow):
|
|||
def addPerson(self, backend, person):
|
||||
if not backend:
|
||||
self.ui.searchEdit.setEnabled(True)
|
||||
QApplication.restoreOverrideCursor()
|
||||
self.process = None
|
||||
return
|
||||
miniperson = MiniPerson(self.weboob, backend, person, self)
|
||||
|
|
@ -233,6 +241,7 @@ class MainWindow(QtMainWindow):
|
|||
|
||||
self.minis = []
|
||||
self.ui.searchEdit.setEnabled(False)
|
||||
QApplication.setOverrideCursor( Qt.WaitCursor )
|
||||
|
||||
backend_name = str(self.ui.backendEdit.itemData(self.ui.backendEdit.currentIndex()).toString())
|
||||
|
||||
|
|
@ -242,6 +251,7 @@ class MainWindow(QtMainWindow):
|
|||
def addTorrent(self, backend, torrent):
|
||||
if not backend:
|
||||
self.ui.searchEdit.setEnabled(True)
|
||||
QApplication.restoreOverrideCursor()
|
||||
self.process = None
|
||||
return
|
||||
minitorrent = MiniTorrent(self.weboob, backend, torrent, self)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@
|
|||
|
||||
import urllib
|
||||
|
||||
from PyQt4.QtGui import QFrame, QImage, QPixmap
|
||||
from PyQt4.QtGui import QFrame, QImage, QPixmap, QApplication
|
||||
from PyQt4.QtCore import Qt
|
||||
|
||||
from weboob.applications.qcineoob.ui.minimovie_ui import Ui_MiniMovie
|
||||
from weboob.capabilities.base import NotAvailable
|
||||
|
|
@ -55,6 +56,7 @@ class MiniMovie(QFrame):
|
|||
def mousePressEvent(self, event):
|
||||
QFrame.mousePressEvent(self, event)
|
||||
|
||||
QApplication.setOverrideCursor( Qt.WaitCursor )
|
||||
movie = self.backend.get_movie(self.movie.id)
|
||||
if movie:
|
||||
self.parent.doAction('Details of movie "%s"'%movie.original_title,self.parent.displayMovie,[movie])
|
||||
|
|
|
|||
|
|
@ -35,7 +35,13 @@ class MiniPerson(QFrame):
|
|||
self.backend = backend
|
||||
self.person = person
|
||||
self.ui.nameLabel.setText('%s'%person.name)
|
||||
self.ui.shortDescLabel.setText('%s'%person.short_description)
|
||||
if person.short_description != NotAvailable:
|
||||
if unicode(self.parent.ui.currentActionLabel.text()).startswith('Casting'):
|
||||
self.ui.shortDescTitleLabel.setText(u'Role')
|
||||
self.ui.shortDescLabel.setText('%s'%person.short_description)
|
||||
else:
|
||||
self.ui.shortDescTitleLabel.hide()
|
||||
self.ui.shortDescLabel.hide()
|
||||
self.ui.backendLabel.setText(backend.name)
|
||||
|
||||
def gotThumbnail(self, backend, person):
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<widget class="QLabel" name="shortDescTitleLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue