added debugging feature; fixed dnd problem, cleaning
This commit is contained in:
parent
33cde33e6f
commit
3a6f0f7478
@ -149,13 +149,17 @@ class WindowMixin(TabMixin):
|
||||
path_at_loc = None
|
||||
|
||||
try:
|
||||
path_at_loc = icons_grid.get_item_at_pos(x, y)[0]
|
||||
data = icons_grid.get_dest_item_at_pos(x, y)
|
||||
path_at_loc = data[0]
|
||||
drop_position = data[1]
|
||||
highlighted_item_path = icons_grid.get_drag_dest_item().path
|
||||
if path_at_loc and path_at_loc == highlighted_item_path:
|
||||
if path_at_loc and path_at_loc == highlighted_item_path and drop_position == Gtk.IconViewDropPosition.DROP_INTO:
|
||||
uri = self.format_to_uris(store, wid, tid, highlighted_item_path)[0].replace("file://", "")
|
||||
self.override_drop_dest = uri if isdir(uri) else None
|
||||
else:
|
||||
self.override_drop_dest = None
|
||||
except Exception as e:
|
||||
...
|
||||
self.override_drop_dest = None
|
||||
|
||||
if target not in current:
|
||||
self.fm_controller.set_wid_and_tid(wid, tid)
|
||||
|
@ -144,13 +144,17 @@ class WindowMixin(TabMixin):
|
||||
path_at_loc = None
|
||||
|
||||
try:
|
||||
path_at_loc = icons_grid.get_item_at_pos(x, y)[0]
|
||||
data = icons_grid.get_dest_item_at_pos(x, y)
|
||||
path_at_loc = data[0]
|
||||
drop_position = data[1]
|
||||
highlighted_item_path = icons_grid.get_drag_dest_item().path
|
||||
if path_at_loc and path_at_loc == highlighted_item_path:
|
||||
if path_at_loc and path_at_loc == highlighted_item_path and drop_position == Gtk.IconViewDropPosition.DROP_INTO:
|
||||
uri = self.format_to_uris(store, wid, tid, highlighted_item_path)[0].replace("file://", "")
|
||||
self.override_drop_dest = uri if isdir(uri) else None
|
||||
else:
|
||||
self.override_drop_dest = None
|
||||
except Exception as e:
|
||||
...
|
||||
self.override_drop_dest = None
|
||||
|
||||
if target not in current:
|
||||
self.fm_controller.set_wid_and_tid(wid, tid)
|
||||
|
@ -19,12 +19,29 @@ def debug_signal_handler(signal, frame):
|
||||
rpdb2.setbreak(depth=1)
|
||||
return
|
||||
except StandardError:
|
||||
pass
|
||||
...
|
||||
|
||||
try:
|
||||
from rfoo.utils import rconsole
|
||||
logger.debug("\n\nStarting embedded rconsole debugger...\n\n")
|
||||
rconsole.spawn_server()
|
||||
return
|
||||
except StandardError as ex:
|
||||
...
|
||||
|
||||
try:
|
||||
from pudb import set_trace
|
||||
logger.debug("\n\nStarting PuDB debugger...\n\n")
|
||||
set_trace(paused = True)
|
||||
return
|
||||
except StandardError as ex:
|
||||
...
|
||||
|
||||
try:
|
||||
import pdb
|
||||
logger.debug("\n\nStarting embedded PDB debugger...\n\n")
|
||||
pdb.Pdb(skip=['gi.*']).set_trace()
|
||||
return
|
||||
except StandardError as ex:
|
||||
...
|
||||
|
||||
|
@ -41,6 +41,7 @@ class StartCheckMixin:
|
||||
def _write_new_pid(self):
|
||||
pid = os.getpid()
|
||||
self._write_pid(pid)
|
||||
print(f"{app_name} PID: {pid}")
|
||||
|
||||
def _clean_pid(self):
|
||||
os.unlink(self._PID_FILE)
|
||||
|
Loading…
Reference in New Issue
Block a user