M himitsu_gtk/ui/main.glade => himitsu_gtk/ui/main.glade +3 -1
@@ 89,6 89,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<signal name="row-activated" handler="on_keyrow_activated" swapped="no"/>
+ <signal name="touch-event" handler="on_touch_event" swapped="no"/>
</object>
</child>
</object>
@@ 224,7 225,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel">
+ <object class="GtkLabel" id="copyhelp">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
@@ 447,6 448,7 @@
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<signal name="clicked" handler="on_add_clicked" swapped="no"/>
+ <signal name="touch-event" handler="on_touch_event" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
M himitsu_gtk/window.py => himitsu_gtk/window.py +7 -0
@@ 42,6 42,7 @@ class KeyringWindow:
self.keyinfo = builder.get_object("keyinfo")
self.addkey = builder.get_object("addkey")
self.toastrevealer = builder.get_object("toastrevealer")
+ self.copyhelp = builder.get_object("copyhelp")
searchbox = builder.get_object('search')
searchbox.grab_focus()
@@ 50,6 51,7 @@ class KeyringWindow:
self.window.show()
self.key = None
+ self.touchscreen = False
try:
self.himitsu = Himitsu()
@@ 361,3 363,8 @@ class KeyringWindow:
def on_main_window_destroy(self, widget):
Gtk.main_quit()
+
+ def on_touch_event(self, *args):
+ if not self.touchscreen:
+ self.touchscreen = True
+ self.copyhelp.set_text("Hold a row to copy the value to the clipboard")