Feature: Duplicate panel button in preferences dialog

Summary

Add a "Duplicate Panel" button to the Panel Preferences dialog that copies the currently selected panel — including all properties, plugins, and file-based plugin configs — into a new panel with a unique ID.

Use case

This has been a frequently requested feature in forums and discussions for years. Setting up multiple similar panels is tedious, and until now the only workaround was manually editing xfconf properties or XML files — not something most users would attempt.

Common scenarios:

  • Set up a panel on one monitor, duplicate it for a second monitor
  • Create a variation of an existing panel without starting from scratch
  • Quickly prototype panel layouts without rebuilding from nothing each time

Implementation

The implementation follows the existing conventions in the panel codebase — the duplication logic mirrors how panel_application_new_window() and panel_application_remove_window() work, and the UI placement matches the existing Add/Remove button pattern.

  • New button (edit-copy icon) in the panel selector row, next to the existing Add (+) and Remove (-) buttons
  • Copies all xfconf panel properties (size, mode, background, opacity, etc.)
  • Copies each plugin with a fresh unique ID: type name, all xfconf sub-properties, and file-based config directories (e.g., launcher desktop files)
  • Offsets the duplicate panel away from the source panel's snapped edge so it doesn't stack on top of the original
  • Cleans up orphaned xfconf properties if window creation fails
  • Button sensitivity respects panel locking

Files changed

  • panel/panel-application.c — core duplication logic
  • panel/panel-application.h — public declaration
  • panel/panel-preferences-dialog.c — button callback and wiring
  • common/resources/panel-preferences-dialog.glade — UI button

Merge request incoming.