Skip to content

Commit

Permalink
Don't use python3.10 code (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmintfan authored May 30, 2024
1 parent 3a30b05 commit 8715a02
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions usr/lib/sticky/sticky.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,17 +762,16 @@ def do_dbus_unregister(self, connection, object_path):
Gio.Application.do_dbus_unregister(self, connection, object_path)

def dbus_method_callback(self, connection, sender, path, iface_name, method_name, params, invocation, user_data=None):
match method_name:
case 'ShowNotes':
self.activate_notes(0)
if method_name == 'ShowNotes':
self.activate_notes(0)

case 'NewNote':
x, y = self.find_note_location(40, 40)
elif method_name == 'NewNote':
x, y = self.find_note_location(40, 40)

self.add_note({'text': params.unpack()[0], 'x': x, 'y': y})
self.add_note({'text': params.unpack()[0], 'x': x, 'y': y})

case 'NewNoteBlank':
self.new_note()
elif method_name == 'NewNoteBlank':
self.new_note()

def first_run(self):
gnote_dir = os.path.join(GLib.get_user_data_dir(), 'gnote')
Expand Down

0 comments on commit 8715a02

Please sign in to comment.