MCPcopy
hub / github.com/pdfarranger/pdfarranger / iv_selection_changed

Method iv_selection_changed

pdfarranger/pdfarranger.py:2553–2582  ·  view source on GitHub ↗
(self, move_cursor_event=False)

Source from the content-addressed store, hash-verified

2551 return Gdk.EVENT_PROPAGATE
2552
2553 def iv_selection_changed(self, move_cursor_event=False):
2554 selection = self.iconview.get_selected_items()
2555 ne = len(selection) > 0
2556 contiguous_min2 = self.reverse_order_available(selection)
2557 for a, e in [
2558 ("reverse-order", contiguous_min2),
2559 ("swap-odd-even", contiguous_min2),
2560 ("delete", ne),
2561 ("duplicate", ne),
2562 ("page-size", ne),
2563 ("crop", ne),
2564 ("hide", ne),
2565 ("rotate", ne),
2566 ("export-selection", ne),
2567 ("cut", ne),
2568 ("copy", ne),
2569 ("extract", len(selection) == 1),
2570 ("explode-images", ne),
2571 ("split", ne),
2572 ("merge", ne),
2573 ("select-same-file", ne),
2574 ("select-same-format", ne),
2575 ("crop-white-borders", ne),
2576 ("generate-booklet", ne),
2577 ("split-booklet", ne),
2578 ]:
2579 self.window.lookup_action(a).set_enabled(e)
2580 self.update_statusbar()
2581 if selection and not move_cursor_event:
2582 self.iv_cursor.cursor_is_visible = False
2583
2584 def window_focus_in_out_event(self, _widget=None, _event=None):
2585 """Keyboard focus enter or leave window."""

Callers 15

__create_actionsMethod · 0.95
split_bookletMethod · 0.95
set_export_stateMethod · 0.95
clear_selectedMethod · 0.95
on_action_pasteMethod · 0.95
on_action_selectMethod · 0.95
iv_dnd_received_dataMethod · 0.95
iv_dnd_data_deleteMethod · 0.95
iv_auto_scrollMethod · 0.95
iv_motionMethod · 0.95
iv_key_press_eventMethod · 0.95

Calls 2

update_statusbarMethod · 0.95

Tested by

no test coverage detected