Skip to content

Commit

Permalink
removed filesystem dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mijorus committed Jan 14, 2024
1 parent f3ef290 commit 7f75f42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
1 change: 0 additions & 1 deletion it.mijorus.collector.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"sdk": "org.gnome.Sdk",
"command": "collector",
"finish-args": [
"--filesystem=home",
"--share=network",
"--share=ipc",
"--socket=fallback-x11",
Expand Down
22 changes: 8 additions & 14 deletions src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,22 +165,16 @@ def on_drag_prepare(self, source, x, y):
if not self.dropped_items:
return None

dropped_files = [f.dropped_item.gfile for f in self.dropped_items]
# path_list = '\n'.join([f.target_path for f in self.dropped_items])
# uri_list = '\n'.join([f'file://{f.target_path}' for f in self.dropped_items])

uri_list = '\n'.join([f'file://{f.dropped_item.target_path}' for f in self.dropped_items])
return Gdk.ContentProvider.new_union([
Gdk.ContentProvider.new_for_value(Gdk.FileList.new_from_array(dropped_files)),
# Gdk.ContentProvider.new_for_value(path_list),
# Gdk.ContentProvider.new_for_value(uri_list),
# Gdk.ContentProvider.new_for_bytes(
# 'text/uri-list',
# GLib.Bytes.new(uri_list.encode())
# )
Gdk.ContentProvider.new_for_bytes(
'text/uri-list',
GLib.Bytes.new(uri_list.encode())
)
])

def on_drag_cancel(self, source, drag, reason):
logging.debug('Drag operation canceled')
logging.debug('Drag operation canceled, reason: ', reason)
self.drag_aborted = True

def on_drag_end(self, source, drag, move_data):
Expand Down Expand Up @@ -307,8 +301,8 @@ def on_key_pressed(self, widget, keyval, keycode, state):
else:
self.close()
return True
elif keyval == Gdk.KEY_Alt_L:
if self.settings.get_boolean('keep-on-drag') == False:
elif keyval == Gdk.KEY_d:
if ctrl_key and self.settings.get_boolean('keep-on-drag') == False:
r = self.keep_items_indicator.get_reveal_child()
self.keep_items_indicator.set_reveal_child(not r)
elif keyval == Gdk.KEY_v:
Expand Down

0 comments on commit 7f75f42

Please sign in to comment.