Commit Graph
36 Commits
Author SHA1 Message Date
javier 516a658b91 build: improve OpenSSL find on Windows + disable mailio by default
- USE_MAILIO_IMAP=OFF by default (avoids broken thirdparty/boost)
- OpenSSL find with Windows-specific warning
- Native ImapSynchronizer works without mailio
- PrintSupport added for printing
2026-08-26 13:57:43 +02:00
javier eecfb5f90c build: disable mailio/Boost by default (USE_MAILIO_IMAP=OFF)
Avoids broken thirdparty/boost and missing OpenSSL on Windows.
Native ImapSynchronizer works without mailio.
Enable with -DUSE_MAILIO_IMAP=ON when Boost/OpenSSL are properly installed.
2026-08-26 13:56:15 +02:00
javier e0ce893d06 fix: responsive widths + email selection fix
- MailListView: setMinimumSectionSize(50) + setStretchLastSection(false) to allow header shrinking
- MainMainWindow: reduce folder tree min width 220->160, reader min width 350->280
- Allow splitter children to not be collapsible but shrink freely
- Fix onRowSelected slot signature to match currentRowChanged signal
2026-08-26 12:04:37 +02:00
javier 8767d66b2a fix: onRowSelected signal signature to match currentRowChanged
- Changed from (const QModelIndex&) to (const QModelIndex&, const QModelIndex&)
- Required for QItemSelectionModel::currentRowChanged signal connection
2026-08-26 12:01:01 +02:00
javier a75143628b fix: email selection in table view + responsive filter bar
- Connect currentRowChanged to onRowSelected so single-click in table shows email in reader
- Add responsive filter bar: hide groupBy/displayMode/pivot combos progressively as width decreases
- Set Fixed size policy on combos to prevent unwanted stretching
- Reduced filter layout spacing from 12 to 8px
2026-08-26 11:29:47 +02:00
javier 8b147013d8 fix: Parameter count mismatch in findByFolderIdPaginated and countByFolderId
- Move query.bindValue() calls AFTER query.prepare() in both methods
- Remove duplicate bindValue(':search') in findByFolderIdPaginated
- This fixes 'Parameter count mismatch' error when fetching paginated emails
2026-08-26 11:14:39 +02:00
javier 6f348b17f0 feat: Online search button
- MailListView: new '🌐 Online' button in search bar
- Clicking button emits onlineSearchRequested(query)
- If search box empty, shows QInputDialog for query entry
- MainMainWindow::onOnlineSearchRequested() handler:
  - Validates current folder selected
  - Gets account for folder
  - Shows status message
  - Shows info dialog with query/folder/account (placeholder for IMAP SEARCH)
- Signal: onlineSearchRequested(const QString& query)
- Button styled in blue (online theme)
2026-08-26 04:45:10 +02:00
javier 6d1feabfc5 feat: Drag & drop between folders
- MailListView: setDragEnabled, setAcceptDrops, setDropIndicatorShown, setDragDropMode(DragDrop)
- Custom MIME type: application/x-wino-mail-ids with QVector<int> mail IDs
- mousePressEvent + mouseMoveEvent for drag initiation (standard Qt drag distance)
- initDrag() creates QDrag with selected mail IDs
- dragEnterEvent, dragMoveEvent, dropEvent handlers
- dropEvent emits batchMoveRequested(mailIds, targetFolderId)
- Works in both tree view and compact list view
2026-08-26 04:05:56 +02:00
javier 3a3a7b0ff8 feat: Focused/Other pivot for Inbox
- MailListView: new m_pivotCombo (Principal/Otros) visible only for Inbox folders
- MailListView::setFolderType(folderType) called from MainMainWindow::onFolderSelected()
- Folder::type() returns 'inbox', 'sent', 'drafts', 'trash', 'custom'
- onPivotChanged() placeholder for future AI-based filtering (Focused vs Other)
- UI hidden for non-Inbox folders
2026-08-26 03:33:10 +02:00
javier 43b828fe87 feat: Multi-selection + action bar in MailListView
- MailListView: ExtendedSelection mode for both tree and list views
- Action bar (blue bar) appears when items selected
- Select all checkbox + counter label
- Batch actions: Flag, Mark unread, Move (TODO), Delete, Exit selection
- Signals: selectionChanged, batchFlagRequested, batchDeleteRequested, batchMarkUnreadRequested, batchMoveRequested
- enterMultiSelectMode()/exitMultiSelectMode() state management
- Works in both normal and compact views
2026-08-26 02:38:33 +02:00
javier 3846bd4e9d feat: Pinned emails support (flag/follow-up)
- EmailListModel: new m_pinnedOnly filter + setShowPinnedOnly()
- EmailListModel/EmailListModel.cpp: passes pinnedOnly to paginated queries
- MailItemDao: countAll, countByFolderId, findAllPaginated, findByFolderIdPaginated accept pinnedOnly
- MailListView: new 'Solo fijados' checkbox in filter bar
- CompactMailDelegate: orange pushpin indicator (top-right) for pinned emails
- Works in both tree view and compact card view
- Pinned indicator uses QPainterPath for pushpin shape (orange)
2026-08-26 00:04:20 +02:00
javier 68d237c873 feat: Pagination/virtualization (fetchMore) for EmailListModel
- EmailListModel: QAbstractListModel with canFetchMore/fetchMore
  * Batch loading (default 50 emails per fetch)
  * Total count query for scrollbar
  * TotalCountChanged signal
  * Paginated DB queries: findAllPaginated, findByFolderIdPaginated
  * Count queries: countAll, countByFolderId

- MailItemDao: new paginated methods
  * findAllPaginated(offset, limit, filters...)
  * findByFolderIdPaginated(folderId, offset, limit, filters...)
  * countAll(filters...), countByFolderId(folderId, filters...)

- MailListView: scroll-triggered fetchMore
  * Connects verticalScrollBar valueChanged on both TreeView and ListView
  * Triggers fetchMore at 90% scroll threshold
  * onRowsInserted updates EmailTreeModel when new emails arrive
  * Works in both normal (tree) and compact (list) views
2026-08-25 22:20:06 +02:00
javier 6e6fdf9c21 feat: EmailTreeModel grouping modes + MailListView integration
- EmailTreeModel: 4 grouping modes
  * NoGrouping - flat list
  * GroupByDate - chronological groups (Hoy, Ayer, Esta semana...)
  * GroupByThread - conversations with expandable threads (ThreadId from References/In-Reply-To/Message-ID)
  * GroupBySender - groups by sender email/name

- EmailTreeModel thread support:
  * ThreadItem type with expand/collapse
  * ThreadId extraction via ThreadUtils (References > In-Reply-To > Message-ID)
  * Double-click thread node toggles expansion
  * Threads sorted by newest email first, emails within thread oldest first

- EmailTreeModel sender grouping:
  * Groups by sender name/email
  * Senders sorted by newest email first
  * Emails within group newest first

- MailListView: Added 'Agrupar por remitente' to group-by combo
- MailListView: Double-click thread node toggles expansion (not open mail)
- ThreadUtils: parseReferencesHeader, extractThreadId, generateThreadId
2026-08-25 18:53:51 +02:00
javier fa699b5399 feat: Wino-style compact mail view with display modes + hover actions
- CompactMailDelegate: 3 display modes (Compact/Medium/Spacious) like WinUI original
  * Compact: 64px, minimal, no preview
  * Medium: 96px, with preview, detailed categories
  * Spacious: 120px, full padding, preview visible
- Hover actions: Reply (↩), Forward (↪), Mark unread (✎) on right side
- Unread dot indicator (top-right, blue) like WinUI
- User-configurable display mode via combo box in filter bar
- MainMainWindow handlers for reply/forward/mark-unread from compact view
- Signals: replyRequested, forwardRequested, markUnreadRequested
2026-08-25 13:41:43 +02:00
javier 4c4fec7a0a feat: responsive compact mail view + folder unread badges
- CompactMailDelegate: card-based view for narrow panels (<420px)
  * Avatar with hash-based color, sender + date (relative format)
  * Subject line with attachment icon
  * Action buttons: flag, delete, category, more (context menu)
  * Unread highlight with light blue background + bold sender
- MailListView: automatic switch between tree/table (wide) and list/cards (narrow)
  * QStackedWidget with QTreeView + QListView sharing same proxy model
  * resizeEvent threshold at 420px
  * Signals forwarded to MainMainWindow for actions
- FolderTreeDelegate: custom paint for folder tree
  * Unread count badge (blue pill) right-aligned on folder nodes
  * Account nodes bold, folder nodes normal weight
  * Proper indentation per depth level
- MailItemDao::countUnreadByFolderId() for real-time unread counts
- MainMainWindow handlers for compact actions (flag, delete, category, more menu)
2026-08-24 23:25:13 +02:00
javier 705fe32e66 fix: order date groups chronologically in EmailTreeModel
- Groups now sorted by representative date (newest first) instead of alphabetically
- 'Hoy', 'Ayer', 'Esta semana', 'Semana pasada', 'Hace dos semanas', 'Este mes', meses, años — en orden cronológico correcto
2026-08-24 21:04:29 +02:00
javier fdef311257 feat: complete settings view + signatures + signatures DAO + icons
- SettingsView: complete UI with tabs for Accounts, Categories, Rules, Templates, Signatures, General, Appearance
- Categories: QTreeWidget with hierarchical view, color picker, parent categories
- Rules: QListWidget with RuleEditorDialog integration, toggle enabled
- Templates: QListWidget with TemplateEditorDialog integration
- Signatures: QListWidget with SignatureEditorDialog integration
- SignatureDao: full CRUD with default signature support
- common_structs.h: QColor for Category, all structs centralized
- icons.qrc: updated with Linear/Outline/Bold icons from resources
- Category: QColor instead of QString for color
- EmailTreeModel/DateGroupProxyModel: email grouping by date
- MailListView: QTreeView with date grouping combo
- ReaderView: subject frame with shadow, avatar in header, body inside header
- MainWindow: frameless with rounded corners, 1px border, edge resize, no status bar
- icons.qrc: complete icon set from resources/icons/SVG
2026-08-24 10:29:13 +02:00
javier 2281b01f49 feat: email grouping by date + stability fixes
- EmailTreeModel: hierarchical model for grouped email view (QTreeView)
- DateGroupProxyModel: proxy model for date-based grouping logic
- MailListView: migrated from QTableView to QTreeView with grouping support
- ReaderView: subject frame with shadow, avatar moved to header, body inside header
- MainWindow: frameless with rounded corners, 1px border, edge resize, no status bar

- Stability fixes for grouping mode switch:
  * Proper tree cleanup (no double-delete of root)
  * Bounds checking on all array accesses
  * Null pointer checks in index/parent/data methods
  * Date validity checks before grouping
  * Index validation before accessing m_emails
2026-08-24 01:04:00 +02:00
javier e28ab35fa9 fix: frameless window - all corners rounded + resize fixed
- CentralWidget with bottom-left/bottom-right radius 8px
- Event filter on central widget to forward mouse events for resize
- Consolidated windowFlags (Qt::Window | Frameless | MinMax | Close)
- setMouseTracking(true) for cursor updates
- Removed WA_TranslucentBackground causing black corners
- Status bar fully removed (setStatusBar(nullptr))
2026-08-23 16:59:17 +02:00
javier 0bb8738607 feat: comprehensive Wino Mail updates
- ReaderView: complete rewrite with CSS styling, headers, attachments, zoom, find, dark mode, image blocking
- Categories: DAO + UI tree widget with colors, nested categories, assignment
- Rules engine: DAO + evaluation + actions (move, mark read, flag, delete, category, forward)
- Templates: DAO + editor + manager with variables support
- Signatures: DAO + manager + auto-per-account + manual selector in compose
- ComposeView: signature combo, template selector, auto-signature on new email
- MainWindow: frameless with rounded corners, 1px border, resize from edges, no status bar
- Database: new tables (Category, MailCategory, Rule, Template, Signature) with indexes
2026-08-23 14:49:58 +02:00
javier 5fcedfa129 fix: EmailListModel as QAbstractTableModel for proper MailListView display
- Changed EmailListModel from QAbstractListModel to QAbstractTableModel
- Added columnCount() returning 3 columns (Subject, Sender, Date)
- Added headerData() for column headers (Asunto, De, Fecha)
- Modified data() to handle Qt::DisplayRole per column index
- Updated MailListView::setModel() to use column indices instead of role-based column hiding
- Added proper column resize modes (Stretch for Subject/Sender, ResizeToContents for Date)
- Default sort by Date column descending
2026-08-19 09:43:03 +02:00
javier 2a7142be1e fix: IMAP FETCH timeout and tagged response detection
- sendCommandWaitBytes(): check for tagged response (OK/NO/BAD) BEFORE parsing literals
- Fixed detection of 'A0001 OK ...' responses that were being missed
- Added debug logging on failure for easier troubleshooting
- Increased FETCH timeout from 30s to 120s for large emails with attachments
- Applied same 120s timeout to single UID fallback fetches
2026-08-19 00:40:35 +02:00
javier 43ccd7bd26 feat: mailio-based POP3 synchronizer (option USE_MAILIO_IMAP)
- Added Pop3SynchronizerMailio using mailio library
- CMake option USE_MAILIO_IMAP controls both IMAP and POP3 mailio synchronizers
- Implements POP3: connect, auth (USER/PASS, XOAUTH2), LIST, RETR, DELE
- SyncFolder: fetches new messages by UID
- XOAUTH2 support for Gmail/Outlook OAuth2 tokens
- Falls back to original Pop3Synchronizer when USE_MAILIO_IMAP=OFF
- Ready to enable with: cmake -DUSE_MAILIO_IMAP=ON
2026-08-18 10:51:09 +02:00
javier f798f7ecc0 feat: mailio-based IMAP synchronizer (option USE_MAILIO_IMAP)
- Added ImapSynchronizerMailio using mailio library (C++17, Boost)
- CMake option USE_MAILIO_IMAP (OFF by default) to avoid Boost dependency
- Fetches Boost + mailio via FetchContent when enabled
- Implements full IMAP: connect, auth (LOGIN/XOAUTH2), LIST, SELECT, FETCH, STORE, APPEND, EXPUNGE
- SyncFolder: detects deletions, fetches new messages, updates flags in batches
- XOAUTH2 support for Gmail/Outlook OAuth2 tokens
- Falls back to original ImapSynchronizer when USE_MAILIO_IMAP=OFF
- Ready to enable with: cmake -DUSE_MAILIO_IMAP=ON
2026-08-18 02:30:23 +02:00
javier a004bdd60f feat: IMAP sync incremental + Account Setup Wizard + robust FETCH parser
- ImapSynchronizer::syncFolder(): detecta eliminados (UIDs locales no en servidor), fetch nuevos (sinceUid), actualiza flags (FLAGS batch)
- fetchAllUids(): SELECT + SEARCH ALL para lista completa UIDs servidor
- parseAndUpdateFlags(): FETCH FLAGS en lotes 100, update DB si cambió read/flagged
- AccountSetupDialog: integra ConnectionWizard para IMAP/POP3 con test de conexión real
- IMAP FETCH parser robusto: logging respuesta servidor + fallback UID-by-UID
- Fix: FETCH failed logging muestra first/last UID + respuesta truncada
2026-08-17 15:34:49 +02:00
javier 364624aada Fix IMAP FETCH parsing to correctly handle multi-line literal bodies, ensuring subject, sender, recipient, and date are populated from headers 2026-07-10 00:09:16 +02:00
javier 66d62d0635 Fix: Ensure ImapSynchronizer::initialize() is called before using synchronizer in MailService::fetchMails()
- Added missing initialization of IMAP synchronizer before fetching mail items
- Fixed missing semicolon in error message
- This ensures IMAP connection parameters (host, port, SSL, credentials) are properly set
- Fixes the issue where breakpoints in ImapSynchronizer::initialize() were never hit
- Enables both manual folder sync and automatic SyncScheduler to work correctly
2026-07-08 22:53:27 +02:00
javier f90ae7440d Fix Parameter count mismatch in AccountDao::insert by adding missing :signature placeholder 2026-07-08 11:49:29 +02:00
javier 0674fe4944 Replace simulated IMAP delay with real connection test using AccountService::testConnection 2026-07-06 16:25:43 +02:00
javier e81bb0d5fe Actualización de CMakeLists.txt y composeview (añadido getTableView, manejo de carpeta seleccionada, sync, delete, flag) 2026-07-05 23:20:35 +02:00
javier 933cce39b9 Backup before implementing tag editor for To/Cc/Bcc fields 2026-07-05 15:32:12 +02:00
javier 4569c174f0 Actualizaciones varias: mejoras en cuenta, sincronización, UI 2026-07-05 10:45:44 +02:00
javier 8799633447 fix: fetch emails when folder is selected in tree view 2026-06-25 18:10:49 +02:00
javier 967231db3b Base: fix compile errors in wino-mail-dtkqt (composeview UI, initializeComposition, startNewEmail, authenticator includes) 2026-06-23 01:34:13 +02:00
javier 2a3a1a0470 Baseline for wino-mail-dtkqt UI migration 2026-06-18 18:58:27 +02:00
javier 0e9f620fe0 Fix build: synchronize Request API, fix GmailSynchronizer, and migrate UI to Qt6 Widgets 2026-06-17 22:44:27 +02:00