---
name: "Padre::Wx::Dialog::Patch"
section: "3pm"
platform: "linux"
package: "padre"
version: "1.00+dfsg-3"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/Padre::Wx::Dialog::Patch"
---

# Padre::Wx::Dialog::Patch(3pm)

The Padre Patch dialog

## NAME

Padre::Wx::Dialog::Patch - The Padre Patch dialog

## DESCRIPTION

You will find more infomation in our wiki \<http://padre.perlide.org/trac/wiki/Features/EditPatch/\> pages.

A very simplistic tool, only works on open saved files, in the Padre editor.

Patch a single file, in the editor with a patch/diff file that is also open.

Diff between two open files, the resulting patch file will be in Unified form.

Diff a single file to svn, only display files that are part of an SVN already, the resulting patch file will be in Unified form.

All results will be a new Tab.

## METHODS

### new

Constructor. Should be called with `$main` by `"Patch::load_dialog_main()"`.

### run

`"run"` configures the dialogue for your environment

### set\_up

`"set_up"` configures the dialogue for your environment

### on\_action

Event handler for action, adjust dialogue accordingly

### on\_against

Event handler for against, adjust dialogue accordingly

### process\_clicked

Event handler for process\_clicked, perform your chosen action, all results go into a new tab in editor.

### current\_files

extracts file info from Padre about all open files in editor

### apply\_patch

A convenience method to apply patch to chosen file.

uses Text::Patch

### make\_patch\_diff

A convenience method to generate a patch/diff file from two selected files.

uses Text::Diff

### test\_svn

test for a local copy of svn in Path and version greater than 1.6.2.

### make\_patch\_svn

A convenience method to generate a patch/diff file from a selected file and svn if applicable, ie file has been checked out.

### file2\_list\_type

composed method

### filename\_url

composed method

### set\_selection\_file1

composed method

### set\_selection\_file2

composed method

### file1\_list\_svn

composed method

### file2\_list\_patch

composed method

### file\_lists\_saved

composed method

## BUGS AND LIMITATIONS

List Order is that of load order, if you move your Tabs the List Order will not follow suite.

If you have multiple files open with same name but with different paths only the first will get matched.

## AUTHORS

BOWTIE \<kevin.dawson@btclick.com\>

Adam Kennedy \<adamk@cpan.org\>

## LICENSE AND COPYRIGHT

Copyright 2008-2013 The Padre development team as listed in Padre.pm.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.

The full text of the license can be found in the LICENSE file included with this module.
