Add SweeCrypt 1.1.0 feature
All checks were successful
Sanity check / Test Python file (push) Successful in 9s
All checks were successful
Sanity check / Test Python file (push) Successful in 9s
This commit is contained in:
parent
80e5b89a61
commit
4233c29d58
3 changed files with 38 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
Package: sweecrypt-gtk
|
Package: sweecrypt-gtk
|
||||||
Version: 1.1
|
Version: 1.2
|
||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -14,12 +14,13 @@ class GUI:
|
||||||
checkbox.set_property("label", "Encode" if checkbox.get_property("active") else "Decode")
|
checkbox.set_property("label", "Encode" if checkbox.get_property("active") else "Decode")
|
||||||
def start_clicked(self, start):
|
def start_clicked(self, start):
|
||||||
encode = self.builder.get_object('encode').get_property("active")
|
encode = self.builder.get_object('encode').get_property("active")
|
||||||
|
shift = int(self.builder.get_object('shift').get_property("value"))
|
||||||
inputted = self.builder.get_object('text').get_property("text")
|
inputted = self.builder.get_object('text').get_property("text")
|
||||||
if encode:
|
if encode:
|
||||||
self.builder.get_object('text').set_property("text", sc.encrypt(inputted))
|
self.builder.get_object('text').set_property("text", sc.encrypt(inputted, shift))
|
||||||
self.builder.get_object('encode').set_property("active", False)
|
self.builder.get_object('encode').set_property("active", False)
|
||||||
else:
|
else:
|
||||||
self.builder.get_object('text').set_property("text", sc.decrypt(inputted))
|
self.builder.get_object('text').set_property("text", sc.decrypt(inputted, shift))
|
||||||
self.builder.get_object('encode').set_property("active", True)
|
self.builder.get_object('encode').set_property("active", True)
|
||||||
def main():
|
def main():
|
||||||
app = GUI()
|
app = GUI()
|
||||||
|
|
|
@ -2,6 +2,12 @@
|
||||||
<!-- Generated with glade 3.40.0 -->
|
<!-- Generated with glade 3.40.0 -->
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.24"/>
|
<requires lib="gtk+" version="3.24"/>
|
||||||
|
<object class="GtkAdjustment" id="database-shift">
|
||||||
|
<property name="lower">-100</property>
|
||||||
|
<property name="upper">100</property>
|
||||||
|
<property name="step-increment">1</property>
|
||||||
|
<property name="page-increment">10</property>
|
||||||
|
</object>
|
||||||
<object class="GtkTextBuffer" id="text">
|
<object class="GtkTextBuffer" id="text">
|
||||||
<property name="text" translatable="yes">replace this text with anything
|
<property name="text" translatable="yes">replace this text with anything
|
||||||
you want to encode or decode.</property>
|
you want to encode or decode.</property>
|
||||||
|
@ -51,6 +57,18 @@ you want to encode or decode.</property>
|
||||||
<property name="active">True</property>
|
<property name="active">True</property>
|
||||||
<signal name="toggled" handler="toggle" swapped="no"/>
|
<signal name="toggled" handler="toggle" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Database shift: </property>
|
||||||
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
|
@ -72,6 +90,22 @@ you want to encode or decode.</property>
|
||||||
<property name="position">2</property>
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="shift">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can-focus">True</property>
|
||||||
|
<property name="caps-lock-warning">False</property>
|
||||||
|
<property name="primary-icon-tooltip-text" translatable="yes">Database shift</property>
|
||||||
|
<property name="adjustment">database-shift</property>
|
||||||
|
<property name="climb-rate">1</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
|
Loading…
Reference in a new issue