Move fct_ret_{workspace,window,tray,program,web,profile}_menu out of
bin/shutter. One-line wrappers with the original names pass the former
file-scoped globals explicitly; globals the menus assign to
($current_monitor_active, $is_hidden, $current_profile_indx) are passed
as scalar refs. Callbacks still dispatch to Shutter::App::evt_*/fct_*.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extract plugin discovery into Shutter::App::PluginRegistry
Move fct_check_installed_plugins, fct_plugin_get_info,
fct_check_installed_upload_plugins and fct_upload_plugin_get_info into a
new module. bin/shutter keeps one-line wrappers that pass $sc, $d, $lp,
$shf, $window, $shutter_root, $pathclass, \%plugins / \%accounts and
\&fct_update_gui explicitly. Adds t/Shutter/App/13_plugins.t.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extract filename helpers into Shutter::App::Filename
Move fct_validate_filename, fct_parse_filename_wildcards and
fct_get_next_filename into a functional module (EXPORT_OK). The original
names remain as one-line wrappers in bin/shutter that pass the globals
explicitly ($d; $sc, $combobox_settings_profiles; $sc, $d, $sd, $shf).
Adds t/Shutter/App/12_filename.t covering $w/$h/$profile/$name/$nb_name,
%N numbering, $R hashes and the reserved-character key handler.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extract session lookups into Shutter::App::Session
Move fct_is_uri_in_session, fct_screenshot_exists, fct_get_key_by_*,
fct_get_file_by_index, fct_get_total_size_of_session, fct_get_current_file
and fct_get_latest_tab_key into an OO Shutter::App::Session class. A
file-scoped $session holds a reference to %session_screens (so subs still
using the hash directly see the same data) plus getter coderefs for
$notebook and $d; the original fct_* names remain as one-line wrappers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extract environment helpers into Shutter::App::Environment
Move fct_control_wm_settings, fct_init_unsaved_files and
fct_init_debug_output into the new module as control_wm_settings,
init_unsaved_files and init_debug_output. bin/shutter keeps one-line
wrappers that pass $sc, a callback to fct_get_key_by_filename, and
SHUTTER_VERSION/SHUTTER_REV explicitly. Adds t/Shutter/App/18_environment.t.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extract upload error and profile name dialogs into Shutter::App::Dialogs
Move dlg_upload_error_message_gnome_vfs, dlg_upload_error_message and
dlg_profile_name into plain functions in Shutter::App::Dialogs. bin/shutter
keeps one-line wrappers with the original names that pass $d, $shf, $sd,
$window and the unescape_string/fct_validate_filename helpers (as coderefs)
explicitly. Shutter::App::Dialogs is used instead of UploadDialogs because
dlg_profile_name is not upload-related.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extract view menu actions into Shutter::App::View
Move fct_zoom_in/out/100/best, fct_fullscreen and fct_navigation_toolbar
into a functional module. bin/shutter keeps one-line wrappers with the
original names that pass \%session_screens + \&fct_get_current_file,
$window or $nav_toolbar explicitly. Adds t/Shutter/App/14_view.t.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extract VFS escape helpers into Shutter::App::Escape
Moved escape_string, unescape_string, unescape_string_for_display and
escape_path_string verbatim into an Exporter module. They use no globals,
so no wrappers: bin/shutter requires the module after Shutter::Upload::FTP
(the lib path is unknown at their old spot) and imports all four names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extract mime type helpers into Shutter::App::Mime
Move fct_get_mime_type and fct_check_valid_mime_type verbatim into a new
functional module. Neither reads file-scoped globals, so no wrappers are
needed: bin/shutter requires the module in place of the old bodies and
imports both names into Shutter::App at runtime, so call sites are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Import Shutter source from upstream shutter-project/shutter@cb78390f (part 2)