Skip to content
Snippets Groups Projects
Commit 8444921f authored by Vincent Texier's avatar Vincent Texier
Browse files

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

parent d400d0bd
No related branches found
No related tags found
1 merge request!778Release 0.51.0
...@@ -91,16 +91,15 @@ class TransferController(QObject): ...@@ -91,16 +91,15 @@ class TransferController(QObject):
controller = cls.create(parent, app) controller = cls.create(parent, app)
controller.view.combo_connections.setCurrentText(connection.title()) controller.view.combo_connections.setCurrentText(connection.title())
controller.view.radio_pubkey.toggle() controller.view.radio_pubkey.toggle()
controller.view.label_connections.hide() controller.view.widget_connections.hide()
controller.view.combo_connections.hide() controller.view.widget_source.hide()
controller.view.label_total.hide() controller.view.label_total.hide()
return controller return controller
@classmethod @classmethod
def open_transfer_with_pubkey(cls, parent, app, connection, pubkey, source): def open_transfer_with_pubkey(cls, parent, app, connection, pubkey, source):
controller = cls.create(parent, app) controller = cls.create(parent, app)
controller.view.label_connections.show() controller.view.widget_connections.show()
controller.view.combo_connections.show()
if connection: if connection:
controller.view.combo_connections.setCurrentText(connection.title()) controller.view.combo_connections.setCurrentText(connection.title())
if pubkey: if pubkey:
...@@ -120,6 +119,8 @@ class TransferController(QObject): ...@@ -120,6 +119,8 @@ class TransferController(QObject):
controller.view.spinbox_amount.setDisabled(True) controller.view.spinbox_amount.setDisabled(True)
controller.view.spinbox_relative.setDisabled(True) controller.view.spinbox_relative.setDisabled(True)
controller.view.button_source_check.setEnabled(True) controller.view.button_source_check.setEnabled(True)
else:
controller.view.widget_source.hide()
controller.refresh() controller.refresh()
return controller return controller
...@@ -165,8 +166,7 @@ class TransferController(QObject): ...@@ -165,8 +166,7 @@ class TransferController(QObject):
) )
dialog.setLayout(QVBoxLayout(dialog)) dialog.setLayout(QVBoxLayout(dialog))
controller = cls.create(parent, app) controller = cls.create(parent, app)
controller.view.label_connections.show() controller.view.widget_connections.show()
controller.view.combo_connections.show()
controller.view.label_total.show() controller.view.label_total.show()
controller.view.combo_connections.setCurrentText(connection.title()) controller.view.combo_connections.setCurrentText(connection.title())
controller.view.edit_pubkey.setText(resent_transfer.receivers[0]) controller.view.edit_pubkey.setText(resent_transfer.receivers[0])
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>800</width>
<height>513</height> <height>518</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
...@@ -15,83 +15,87 @@ ...@@ -15,83 +15,87 @@
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<layout class="QHBoxLayout" name="layout_connections"> <widget class="QWidget" name="widget_connections" native="true">
<property name="sizeConstraint"> <layout class="QHBoxLayout" name="layout_connections">
<enum>QLayout::SetDefaultConstraint</enum> <property name="sizeConstraint">
</property> <enum>QLayout::SetDefaultConstraint</enum>
<item> </property>
<widget class="QLabel" name="label_connections"> <item>
<property name="font"> <widget class="QLabel" name="label_connections">
<font> <property name="font">
<weight>75</weight> <font>
<bold>true</bold> <weight>75</weight>
</font> <bold>true</bold>
</property> </font>
<property name="text"> </property>
<string>Select account</string> <property name="text">
</property> <string>Select account</string>
</widget> </property>
</item> </widget>
<item> </item>
<widget class="QComboBox" name="combo_connections"> <item>
<property name="sizePolicy"> <widget class="QComboBox" name="combo_connections">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <property name="sizePolicy">
<horstretch>0</horstretch> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<verstretch>0</verstretch> <horstretch>0</horstretch>
</sizepolicy> <verstretch>0</verstretch>
</property> </sizepolicy>
</widget> </property>
</item> </widget>
</layout> </item>
</layout>
</widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <widget class="QWidget" name="widget_source" native="true">
<property name="spacing"> <layout class="QHBoxLayout" name="source_layout">
<number>6</number> <property name="spacing">
</property> <number>6</number>
<item> </property>
<widget class="QLabel" name="label_source"> <item>
<property name="sizePolicy"> <widget class="QLabel" name="label_source">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <property name="sizePolicy">
<horstretch>0</horstretch> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<verstretch>0</verstretch> <horstretch>0</horstretch>
</sizepolicy> <verstretch>0</verstretch>
</property> </sizepolicy>
<property name="font"> </property>
<font> <property name="font">
<weight>75</weight> <font>
<bold>true</bold> <weight>75</weight>
</font> <bold>true</bold>
</property> </font>
<property name="text"> </property>
<string>Source</string> <property name="text">
</property> <string>Source</string>
</widget> </property>
</item> </widget>
<item> </item>
<widget class="QLabel" name="label_source_identifier"> <item>
<property name="sizePolicy"> <widget class="QLabel" name="label_source_identifier">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <property name="sizePolicy">
<horstretch>0</horstretch> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<verstretch>0</verstretch> <horstretch>0</horstretch>
</sizepolicy> <verstretch>0</verstretch>
</property> </sizepolicy>
<property name="text"> </property>
<string>Automatic</string> <property name="text">
</property> <string>Automatic</string>
</widget> </property>
</item> </widget>
<item> </item>
<widget class="QPushButton" name="button_source_check"> <item>
<property name="enabled"> <widget class="QPushButton" name="button_source_check">
<bool>false</bool> <property name="enabled">
</property> <bool>false</bool>
<property name="text"> </property>
<string>Check</string> <property name="text">
</property> <string>Check</string>
</widget> </property>
</item> </widget>
</layout> </item>
</layout>
</widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="group_box_recipient"> <widget class="QGroupBox" name="group_box_recipient">
...@@ -377,9 +381,18 @@ ...@@ -377,9 +381,18 @@
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
<item> <item>
<widget class="QLineEdit" name="edit_message"> <widget class="QLineEdit" name="edit_message">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="inputMask"> <property name="inputMask">
<string/> <string/>
</property> </property>
<property name="text">
<string/>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment