[qcineoob] cosmetics
This commit is contained in:
parent
1432ce1ce0
commit
7245db30cd
2 changed files with 86 additions and 24 deletions
|
|
@ -52,7 +52,7 @@ class MainWindow(QtMainWindow):
|
||||||
|
|
||||||
self.history = {'last_action':None,'action_list':[]}
|
self.history = {'last_action':None,'action_list':[]}
|
||||||
self.connect(self.ui.backButton, SIGNAL("clicked()"), self.doBack)
|
self.connect(self.ui.backButton, SIGNAL("clicked()"), self.doBack)
|
||||||
self.ui.backButton.setDisabled(True)
|
self.ui.backButton.hide()
|
||||||
|
|
||||||
self.connect(self.ui.searchEdit, SIGNAL("returnPressed()"), self.search)
|
self.connect(self.ui.searchEdit, SIGNAL("returnPressed()"), self.search)
|
||||||
self.connect(self.ui.typeCombo, SIGNAL("returnPressed()"), self.search)
|
self.connect(self.ui.typeCombo, SIGNAL("returnPressed()"), self.search)
|
||||||
|
|
@ -70,6 +70,7 @@ class MainWindow(QtMainWindow):
|
||||||
for lang in langs:
|
for lang in langs:
|
||||||
self.ui.langCombo.addItem(lang)
|
self.ui.langCombo.addItem(lang)
|
||||||
self.ui.langCombo.hide()
|
self.ui.langCombo.hide()
|
||||||
|
self.ui.langLabel.hide()
|
||||||
|
|
||||||
def backendsConfig(self):
|
def backendsConfig(self):
|
||||||
bckndcfg = BackendCfg(self.weboob, (ICapCinema,ICapTorrent,ICapSubtitle,), self)
|
bckndcfg = BackendCfg(self.weboob, (ICapCinema,ICapTorrent,ICapSubtitle,), self)
|
||||||
|
|
@ -93,15 +94,17 @@ class MainWindow(QtMainWindow):
|
||||||
def typeComboChanged(self,value):
|
def typeComboChanged(self,value):
|
||||||
if unicode(value) == 'subtitle':
|
if unicode(value) == 'subtitle':
|
||||||
self.ui.langCombo.show()
|
self.ui.langCombo.show()
|
||||||
|
self.ui.langLabel.show()
|
||||||
else:
|
else:
|
||||||
self.ui.langCombo.hide()
|
self.ui.langCombo.hide()
|
||||||
|
self.ui.langLabel.hide()
|
||||||
|
|
||||||
def doAction(self, description, fun, args):
|
def doAction(self, description, fun, args):
|
||||||
self.ui.currentActionLabel.setText(description)
|
self.ui.currentActionLabel.setText(description)
|
||||||
if self.history['last_action'] != None:
|
if self.history['last_action'] != None:
|
||||||
self.history['action_list'].append(self.history['last_action'])
|
self.history['action_list'].append(self.history['last_action'])
|
||||||
self.ui.backButton.setToolTip(self.history['last_action']['description'])
|
self.ui.backButton.setToolTip(self.history['last_action']['description'])
|
||||||
self.ui.backButton.setDisabled(False)
|
self.ui.backButton.show()
|
||||||
self.history['last_action'] = {'function':fun,'args':args,'description':description}
|
self.history['last_action'] = {'function':fun,'args':args,'description':description}
|
||||||
return fun(*args)
|
return fun(*args)
|
||||||
|
|
||||||
|
|
@ -111,7 +114,7 @@ class MainWindow(QtMainWindow):
|
||||||
self.ui.currentActionLabel.setText(todo['description'])
|
self.ui.currentActionLabel.setText(todo['description'])
|
||||||
self.history['last_action'] = todo
|
self.history['last_action'] = todo
|
||||||
if len(self.history['action_list']) == 0:
|
if len(self.history['action_list']) == 0:
|
||||||
self.ui.backButton.setDisabled(True)
|
self.ui.backButton.hide()
|
||||||
else:
|
else:
|
||||||
self.ui.backButton.setToolTip(self.history['action_list'][-1]['description'])
|
self.ui.backButton.setToolTip(self.history['action_list'][-1]['description'])
|
||||||
return todo['function'](*todo['args'])
|
return todo['function'](*todo['args'])
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,9 @@
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame_2">
|
<widget class="QFrame" name="frame_2">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
|
|
@ -64,42 +67,98 @@
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="langLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>language</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="langCombo"/>
|
<widget class="QComboBox" name="langCombo"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="backendEdit"/>
|
<widget class="QComboBox" name="backendEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="backButton">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>back</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="currentActionLabel">
|
<widget class="QFrame" name="frame">
|
||||||
<property name="font">
|
<property name="frameShape">
|
||||||
<font>
|
<enum>QFrame::NoFrame</enum>
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="frameShadow">
|
||||||
<string/>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="backButton">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><<back</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="currentActionLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|
@ -117,7 +176,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>708</width>
|
<width>708</width>
|
||||||
<height>293</height>
|
<height>292</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2"/>
|
<layout class="QVBoxLayout" name="verticalLayout_2"/>
|
||||||
|
|
@ -138,7 +197,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>78</width>
|
<width>63</width>
|
||||||
<height>18</height>
|
<height>18</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue