added a spinner to indicate transmission process.. still ugly but that is fixable
This commit is contained in:
parent
0e04ba1a6f
commit
eac95090b9
@ -148,29 +148,39 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<signal name="button-press-event" handler="add_files" swapped="no"/>
|
<signal name="button-press-event" handler="add_files" swapped="no"/>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox" id="dragActionContainer">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="margin_left">16</property>
|
<property name="margin_left">16</property>
|
||||||
<property name="margin_right">16</property>
|
<property name="margin_right">16</property>
|
||||||
|
<property name="margin_start">16</property>
|
||||||
|
<property name="margin_end">16</property>
|
||||||
<property name="margin_top">16</property>
|
<property name="margin_top">16</property>
|
||||||
<property name="margin_bottom">16</property>
|
<property name="margin_bottom">16</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="homogeneous">True</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="dropLabel">
|
<object class="GtkLabel" id="dropLabel">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
<property name="label" translatable="yes">Drag a file to send</property>
|
<property name="label" translatable="yes">Drag a file to send</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">True</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<object class="GtkSpinner" id="dropSpinner">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<style>
|
<style>
|
||||||
<class name="drop"/>
|
<class name="drop"/>
|
||||||
|
@ -92,6 +92,7 @@ class DropShip:
|
|||||||
)
|
)
|
||||||
self.drop_box.connect("drag-data-received", self.on_drop)
|
self.drop_box.connect("drag-data-received", self.on_drop)
|
||||||
self.drop_label = self.builder.get_object('dropLabel')
|
self.drop_label = self.builder.get_object('dropLabel')
|
||||||
|
self.drop_spinner = self.builder.get_object('dropSpinner')
|
||||||
|
|
||||||
# File chooser
|
# File chooser
|
||||||
self.file_chooser = self.builder.get_object('filePicker')
|
self.file_chooser = self.builder.get_object('filePicker')
|
||||||
@ -114,6 +115,8 @@ class DropShip:
|
|||||||
print(fpath, type(fpath))
|
print(fpath, type(fpath))
|
||||||
self.schedule(self.wormhole_send(self, fpath))
|
self.schedule(self.wormhole_send(self, fpath))
|
||||||
self.drop_label.set_text("Sending..")
|
self.drop_label.set_text("Sending..")
|
||||||
|
self.drop_spinner.start()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
log.info("Multiple file sending coming soon ™")
|
log.info("Multiple file sending coming soon ™")
|
||||||
|
|
||||||
@ -166,6 +169,7 @@ class DropShip:
|
|||||||
|
|
||||||
self.drop_label.set_selectable(True)
|
self.drop_label.set_selectable(True)
|
||||||
self.drop_label.set_text(code)
|
self.drop_label.set_text(code)
|
||||||
|
self.drop_spinner.stop()
|
||||||
|
|
||||||
self.clipboard.set_text(code, AUTO_CLIP_COPY_SIZE)
|
self.clipboard.set_text(code, AUTO_CLIP_COPY_SIZE)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user