Commit 8444921f authored by Vincent Texier's avatar Vincent Texier

[enh] #798 hide source widget when not needed in transfer window

parent d400d0bd
......@@ -91,16 +91,15 @@ class TransferController(QObject):
controller = cls.create(parent, app)
controller.view.combo_connections.setCurrentText(connection.title())
controller.view.radio_pubkey.toggle()
controller.view.label_connections.hide()
controller.view.combo_connections.hide()
controller.view.widget_connections.hide()
controller.view.widget_source.hide()
controller.view.label_total.hide()
return controller
@classmethod
def open_transfer_with_pubkey(cls, parent, app, connection, pubkey, source):
controller = cls.create(parent, app)
controller.view.label_connections.show()
controller.view.combo_connections.show()
controller.view.widget_connections.show()
if connection:
controller.view.combo_connections.setCurrentText(connection.title())
if pubkey:
......@@ -120,6 +119,8 @@ class TransferController(QObject):
controller.view.spinbox_amount.setDisabled(True)
controller.view.spinbox_relative.setDisabled(True)
controller.view.button_source_check.setEnabled(True)
else:
controller.view.widget_source.hide()
controller.refresh()
return controller
......@@ -165,8 +166,7 @@ class TransferController(QObject):
)
dialog.setLayout(QVBoxLayout(dialog))
controller = cls.create(parent, app)
controller.view.label_connections.show()
controller.view.combo_connections.show()
controller.view.widget_connections.show()
controller.view.label_total.show()
controller.view.combo_connections.setCurrentText(connection.title())
controller.view.edit_pubkey.setText(resent_transfer.receivers[0])
......
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>513</height>
<height>518</height>
</rect>
</property>
<property name="windowTitle">
......@@ -15,83 +15,87 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="layout_connections">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="label_connections">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Select account</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="combo_connections">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
<widget class="QWidget" name="widget_connections" native="true">
<layout class="QHBoxLayout" name="layout_connections">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QLabel" name="label_connections">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Select account</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="combo_connections">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_source">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Source</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_source_identifier">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Automatic</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="button_source_check">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Check</string>
</property>
</widget>
</item>
</layout>
<widget class="QWidget" name="widget_source" native="true">
<layout class="QHBoxLayout" name="source_layout">
<property name="spacing">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="label_source">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Source</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_source_identifier">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Automatic</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="button_source_check">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Check</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="group_box_recipient">
......@@ -377,9 +381,18 @@
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QLineEdit" name="edit_message">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="inputMask">
<string/>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
......
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