mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2026-02-07 23:30:28 +01:00
impl local removing for picons
This commit is contained in:
@@ -667,6 +667,7 @@ Author: Dmitriy Yefremov
|
||||
<property name="tooltip_column">1</property>
|
||||
<property name="activate_on_single_click">True</property>
|
||||
<signal name="button-press-event" handler="on_popup_menu" object="picons_src_view_popup_menu" swapped="no"/>
|
||||
<signal name="cursor-changed" handler="on_picon_activated" swapped="no"/>
|
||||
<signal name="drag-data-get" handler="on_picons_view_drag_data_get" swapped="no"/>
|
||||
<signal name="drag-data-received" handler="on_picons_src_view_drag_data_received" swapped="no"/>
|
||||
<signal name="drag-drop" handler="on_picons_src_view_drag_drop" swapped="no"/>
|
||||
|
||||
@@ -394,7 +394,16 @@ class PiconsDialog:
|
||||
self.on_remove(files_filter={path.name})
|
||||
|
||||
def on_local_remove(self, view):
|
||||
pass
|
||||
model, paths = view.get_selection().get_selected_rows()
|
||||
if paths and show_dialog(DialogType.QUESTION, self._dialog) == Gtk.ResponseType.OK:
|
||||
itr = model.get_iter(paths.pop())
|
||||
p_path = Path(model.get_value(itr, 2)).resolve()
|
||||
if p_path.is_file():
|
||||
p_path.unlink()
|
||||
base_model = get_base_model(model)
|
||||
filter_model = model.get_model()
|
||||
itr = filter_model.convert_iter_to_child_iter(model.convert_iter_to_child_iter(itr))
|
||||
base_model.remove(itr)
|
||||
|
||||
def on_send(self, item=None, files_filter=None, path=None):
|
||||
dest_path = path or self.check_dest_path()
|
||||
|
||||
Reference in New Issue
Block a user