--- mousepad-0.2.16.orig/debian/compat
+++ mousepad-0.2.16/debian/compat
@@ -0,0 +1 @@
+7
--- mousepad-0.2.16.orig/debian/copyright
+++ mousepad-0.2.16/debian/copyright
@@ -0,0 +1,35 @@
+This package was debianized by Yves-Alexis Perez <yaperez@corsac.net> on
+Sat, 23 Apr 2005 19:06:01 +0200.
+
+It was downloaded from http://erikharrison.net/.
+
+Upstream Author and copyright holders are:
+© 2005-2007 Erik Harrison <erikharrison@gmail.com>
+© 2006 Benedikt Meurer <benny@xfce.org>
+© 2004 Tarot Osuji <tarot@sdf.lonestar.org>
+
+src/gtksourceiter.(c|h) are:
+  © 2000, 2002 Paolo Maggi
+  © 2002, 2003 Jeroen Zwartepoorte
+
+translations are © 2005-2006 Erik Harrison, except:
+  gl.po: © 2006 Canonical Ltd, and Rosetta Contributors 2006
+  ko.po, uk.po: © 2002-2006 The Xfce development team.
+
+   This package is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 or later.
+
+   This package is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this package; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+   MA 02110-1301, USA.
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
--- mousepad-0.2.16.orig/debian/mousepad.xpm
+++ mousepad-0.2.16/debian/mousepad.xpm
@@ -0,0 +1,132 @@
+/* XPM */
+static char *leafpad[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 94 2",
+"   c #000000",
+".  c #070808",
+"X  c #090909",
+"o  c #171717",
+"O  c #121C11",
+"+  c #181818",
+"@  c #1E241D",
+"#  c #1C2A1A",
+"$  c #232322",
+"%  c #262E25",
+"&  c #2D2D2D",
+"*  c #223520",
+"=  c #223920",
+"-  c #2E352D",
+";  c #362E24",
+":  c #37342C",
+">  c #333332",
+",  c #393939",
+"<  c #2E412C",
+"1  c #31422E",
+"2  c #3A5937",
+"3  c #3D6536",
+"4  c #3E6738",
+"5  c #3F6E3A",
+"6  c #413B35",
+"7  c #403F3D",
+"8  c #584936",
+"9  c #454443",
+"0  c #4B4B4B",
+"q  c #504A43",
+"w  c #5D5041",
+"e  c #505050",
+"r  c #545853",
+"t  c #5A5A5A",
+"y  c #476A43",
+"u  c #486C44",
+"i  c #4C6F49",
+"p  c #477E41",
+"a  c #4C7049",
+"s  c #487F41",
+"d  c #586057",
+"f  c #5B615A",
+"g  c #5A7450",
+"h  c #635B47",
+"j  c #616843",
+"k  c #61615B",
+"l  c #626262",
+"z  c #6E6D6B",
+"x  c #717171",
+"c  c #50874B",
+"v  c #51894C",
+"b  c #5A844A",
+"n  c #856E52",
+"m  c #8E9B6A",
+"M  c #9C8B64",
+"N  c #A58C6D",
+"B  c #878685",
+"V  c #858985",
+"C  c #8C8C8B",
+"Z  c #91918F",
+"A  c #A4A5A5",
+"S  c #A8A7A2",
+"D  c #ACAAA5",
+"F  c #AFAEA8",
+"G  c #AFB0AF",
+"H  c #B0AFAA",
+"J  c #B4B2AD",
+"K  c #B6B6B3",
+"L  c #B8B7B7",
+"P  c #B8B7B8",
+"I  c #BBBAB5",
+"U  c #BCBBB9",
+"Y  c #C0BFBB",
+"T  c #C2C2C2",
+"R  c #C8C7C4",
+"E  c #C9C8C5",
+"W  c #CDCCCB",
+"Q  c #D1D0CE",
+"!  c #D6D6D5",
+"~  c #D7D8D7",
+"^  c #D9D8D7",
+"/  c #DCDCDC",
+"(  c #DFDFE0",
+")  c #E0E0DF",
+"_  c #E5E5E4",
+"`  c #E7E8E7",
+"'  c #E8E7E7",
+"]  c #E8E8E7",
+"[  c #EBEBEB",
+"{  c #F3F3F2",
+"}  c #F7F8F7",
+"|  c #F8F7F7",
+" . c #FCFCFC",
+".. c None",
+/* pixels */
+"................................................................",
+"........+ > & & & & & & & & & & & & & & & & & & & > , + ........",
+"........7 r l l l l l k t l l l l l t l l l l k t 0 r 0 ........",
+"........& A  . . . . . . . . . . . . . . .| | { [ 0 0 e ........",
+"........& A  . . .|  .| | | | { { { { { { { { { / 0 0 e ........",
+"........& A  .T J J J J J J J K [ { { { { { { { ) 0 0 e ........",
+"........> A  .{ ] [ [ ] ] ] ] ] { { { { { { [ { ( 0 0 e ........",
+"........& A  .[ ] [ ] ] ] ] ] ] ] _ _ _ ) ) ) [ / 0 0 e ........",
+"........& A  .Y H J J J J J J J H J H H H J H ^ ( 0 0 e ........",
+"........& A  .Q J K K K J K J J J J J J J J S Q ( 0 0 e ........",
+"........& A  .E I Y Y I U U I I Y I I I I I K ! / 0 0 e ........",
+"........: A  .R K I Y I I I I L I I K I I K K ! / 0 0 e ........",
+"........> A  .W J J J K J J J J H J J H J J S W ) 0 0 e ........",
+"........> A  .U J J J J J J K G H H F F H H D ! / 0 0 e ........",
+"........& A  .W I I I I Y J Z T ) ) ) / / / / _ / 0 0 e ........",
+"........& A  .! R R R R R J $ 8 C ^ [ [ [ ' ' ' ~ 0 0 0 ........",
+"........> A } { { { { { { [ x ; w 8 Z W [ ` ` ` ~ 0 0 e ........",
+"........& A } { [ { [ { [ { Y , n N h f W [ _ ` ~ 0 0 e ........",
+"........& A } [ { [ [ [ [ [ [ z 8 M m g d W ` _ ~ 0 0 e ........",
+"........& A  .[ [ [ [ [ [ [ [ T : j b v i d W _ ~ 0 0 e ........",
+"........& A } [ { [ [ [ [ ` ' ` C 1 4 s v a d W / 0 0 e ........",
+"........& A { [ [ [ [ [ [ [ ' ' ) C < 4 s v a d Y 0 0 e ........",
+"........& A { [ [ [ [ ' ' ' ` ` ' ) V 1 4 p v a r > 0 e ........",
+"........> A { [ [ ' [ ' ` ` _ _ _ _ ( V < 4 s v i @ 0 e ........",
+"........> A { ' [ _ [ ` _ ` _ _ _ _ _ ( V < 4 p v y - 9 ........",
+"........> A { [ [ ` _ _ _ _ _ _ _ ( ) ) / V - 4 p v y %   ......",
+"........> A { ` [ _ [ ` ` _ _ _ ( _ ) _ ) / V < 4 p v 2 .   ....",
+"........> B T P P P P P P P P P L L K K L L K f * 3 5 = X   ....",
+"........0 , & & & > & & & & > & & & - - & > & & @ # # O .   ....",
+"........0 t t t t t t t t t t t t t t t t t t t r > $ & ........",
+"........+ , , , , , , , , , , , , , , , , , , , , , > + ........",
+"................................................................"
+};
--- mousepad-0.2.16.orig/debian/mousepad.sgml
+++ mousepad-0.2.16/debian/mousepad.sgml
@@ -0,0 +1,118 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+<!-- Process this file with docbook-to-man to generate an nroff manual
+     page: `docbook-to-man manpage.sgml > manpage.1'.  You may view
+     the manual page with: `docbook-to-man manpage.sgml | nroff -man |
+     less'.  A typical entry in a Makefile or Makefile.am is:
+
+manpage.1: manpage.sgml
+	docbook-to-man $< > $@
+
+    
+	The docbook-to-man binary is found in the docbook-to-man package.
+	Please remember that if you create the nroff version in one of the
+	debian/rules file targets (such as build), you will need to include
+	docbook-to-man in your Build-Depends control field.
+
+  -->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Yves-Alexis</firstname>">
+  <!ENTITY dhsurname   "<surname>Perez</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>May 27, 2007</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>1</manvolnum>">
+  <!ENTITY dhemail     "<email>corsac@corsac.net</email>">
+  <!ENTITY dhusername  "Yves-Alexis Perez">
+  <!ENTITY dhucpackage "<refentrytitle>MOUSEPAD</refentrytitle>">
+  <!ENTITY dhpackage   "mousepad">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2007</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>simple text editor for Xfce</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>&nbsp;[files]
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> command.</para>
+
+    <para>
+    	<command>&dhpackage;</command> is a simple text
+	editor for the Xfce Desktop Environment.
+    </para>
+
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <para>xfprint4 (1).</para>
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &lt;&dhemail;&gt; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any 
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
+
+
--- mousepad-0.2.16.orig/debian/rules
+++ mousepad-0.2.16/debian/rules
@@ -0,0 +1,89 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+LDFLAGS+=-Wl,-z,defs -Wl,--as-needed
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+#include /usr/share/quilt/quilt.make
+
+config.status: configure
+	dh_testdir
+	dh_quilt_patch
+	# Add here commands to configure the package.
+	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc --enable-final
+
+
+build: build-stamp
+
+build-stamp:  config.status
+	dh_testdir
+
+	# Add here commands to compile the package.
+	$(MAKE)
+	docbook-to-man debian/mousepad.sgml > mousepad.1
+
+	touch build-stamp
+
+clean: 
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp mousepad.1
+
+	# Add here commands to clean up after the build process.
+	[ ! -f Makefile ] || $(MAKE) distclean
+
+	dh_quilt_unpatch
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+
+	# Add here commands to install the package into debian/mousepad.
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/mousepad
+	install -D -m 644 $(CURDIR)/debian/mousepad.xpm \
+		$(CURDIR)/debian/mousepad/usr/share/pixmaps/mousepad.xpm
+
+	chrpath -d -k $(CURDIR)/debian/mousepad/usr/bin/mousepad
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs ChangeLog
+	dh_installdocs
+	dh_installmenu
+	dh_installman mousepad.1
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
--- mousepad-0.2.16.orig/debian/changelog
+++ mousepad-0.2.16/debian/changelog
@@ -0,0 +1,148 @@
+mousepad (0.2.16-4) unstable; urgency=low
+
+  [ Lionel Le Folgoc ]
+  * debian/rules: fix dh_quilt_unpatch call in clean.
+
+  [ Stefan Ott ]
+  * debian/watch edited to track Xfce archive reorganisation.
+
+  [ Yves-Alexis Perez ]
+  * debian/control:
+    - bump standards version to 3.8.4.
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Thu, 22 Apr 2010 23:46:18 +0200
+
+mousepad (0.2.16-3) unstable; urgency=low
+
+  [ Lionel Le Folgoc ]
+  * debian/patches:
+    - 00_resensitize-find-button.patch: re-sensitize "Find/Replace" button
+      when the dialog is shown up again (LP: #443302, closes: #549334)
+    - 01_fix-first-replace.patch: really replace the first occurrence found
+      with the find/Replace dialog (Xfce #4526, closes: #460440)
+    - series: add these patches.
+  * debian/control:
+    - build-depends on quilt (>= 0.46-7)
+    - bump Standards-Version to 3.8.3.
+  * debian/rules: enable quilt.
+
+  [ Yves-Alexis Perez ]
+  * debian/rules:
+    - drop deprecated dh_desktop call.
+  * debian/README.source added as we use quilt.
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Fri, 09 Oct 2009 10:28:21 +0200
+
+mousepad (0.2.16-2) unstable; urgency=low
+
+  * Upload to unstable.
+  * debian/rules:
+    - -Wl,-z,defs -Wl,--as-needed added to LDFLAGS.
+    - stop messing with config.{sub,guess}
+    - replace dh_clean -k by dh_prep.
+  * debian/compat bumped to 7.
+  * debian/control:
+    - update standards version to 3.8.1.
+    - update debhelper build-dep to 7. 
+    - move to xfce section. 
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Sat, 04 Apr 2009 02:03:53 +0200
+
+mousepad (0.2.16-1) experimental; urgency=low
+
+  * New upstream release.
+  * debian/control:
+    - drop Rudy Godoy and Martin Loschwitz from Uploaders.
+    - bump build-deps for Xfce 4.6.
+    - update standards version to 3.8.0.
+    - add depends on ${misc:Depends}.
+    - drop quilt from build-deps.
+    - add build-dep on intltool.
+  * debian/patches:
+    - 01_fix-recent-items-sort dropped, merged upstream.
+  * debian/rules:
+    - drop quilt rules.
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Sat, 28 Feb 2009 15:13:16 +0100
+
+mousepad (0.2.13-2) unstable; urgency=low
+
+  * debian/control:
+    - add build-dep on quilt
+    - updated standard versions to 3.7.3.
+    - updated my email address.
+  * debian/rules: use quilt to patch sources at build time
+  * debian/patches: 01_fix-recent-items-sort added to correct recent items
+    menu.                                                       closes: #465546
+  * debian/copyright: use © character to make lintian happy…
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Wed, 13 Feb 2008 12:50:32 +0100
+
+mousepad (0.2.13-1) unstable; urgency=low
+
+  [ Yves-Alexis Perez ]
+  * New upstream release.
+
+  [ Simon Huggins ]
+  * Add Vcs-* headers to debian/control
+
+ -- Simon Huggins <huggie@earth.li>  Tue, 27 Nov 2007 16:39:17 +0000
+
+mousepad (0.2.12-2) unstable; urgency=low
+
+  [ Yves-Alexis Perez ]
+  * Corrected manpage mousepad(1) shipped with the package.     closes: #355254
+  * debian/menu: switch to new menu policy. 
+  
+  [ Emanuele Rocca ]
+  * debian/rules: do not ignore make clean errors in the clean target.
+
+ -- Yves-Alexis Perez <corsac@corsac.net>  Mon, 10 Sep 2007 21:30:22 +0200
+
+mousepad (0.2.12-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/control: updated build-deps to Xfce 4.4.
+  * debian/copyright: updated authors and copyright holders. 
+
+ -- Yves-Alexis Perez <corsac@corsac.net>  Sun, 15 Apr 2007 15:28:17 +0100
+
+mousepad (0.2.10-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/control: updated build-deps to Xfce 4.4rc2 (4.3.99.2).
+
+ -- Yves-Alexis Perez <corsac@corsac.net>  Thu, 16 Nov 2006 18:44:47 +0100
+
+mousepad (0.2.8-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Yves-Alexis Perez <corsac@corsac.net>  Sat, 30 Sep 2006 13:14:41 +0200
+
+mousepad (0.2.6-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/control: updated standards version to 3.7.2.
+
+ -- Yves-Alexis Perez <corsac@corsac.net>  Wed, 26 Jul 2006 17:41:56 +0100
+
+mousepad (0.2.4-1) unstable; urgency=low
+
+  * New upstream releaase
+  * Updated standards version and FSF address
+
+ -- Yves-Alexis Perez <corsac@corsac.net>  Wed, 03 May 2006 19:17:15 +0100
+
+mousepad (0.2.2-2) unstable; urgency=low
+
+  * Moving to unstable 
+
+ -- Emanuele Rocca <ema@debian.org>  Mon, 20 Jun 2005 22:20:51 +0200
+
+mousepad (0.2.2-1) experimental; urgency=low
+
+  * Initial Release (Closes: #308521).
+
+ -- Yves-Alexis Perez <corsac@corsac.net>  Sat, 23 Apr 2005 19:06:01 +0200
+
--- mousepad-0.2.16.orig/debian/menu
+++ mousepad-0.2.16/debian/menu
@@ -0,0 +1,6 @@
+?package(mousepad):\
+  needs="X11"\
+  section="Applications/Editors"\
+  title="MousePad"\
+  command="/usr/bin/mousepad"\
+  icon="/usr/share/pixmaps/mousepad.xpm"
--- mousepad-0.2.16.orig/debian/control
+++ mousepad-0.2.16/debian/control
@@ -0,0 +1,40 @@
+Source: mousepad
+Section: xfce
+Priority: optional
+Maintainer: Debian Xfce Maintainers <pkg-xfce-devel@lists.alioth.debian.org>
+Uploaders: Emanuele Rocca <ema@debian.org>, Simon Huggins <huggie@earth.li>, 
+ Yves-Alexis Perez <corsac@debian.org>
+Build-Depends: debhelper (>= 7), docbook-to-man, 
+ libxfcegui4-dev (>= 4.6.0), pkg-config, libxml-parser-perl, chrpath, intltool,
+ quilt (>= 0.46-7)
+Standards-Version: 3.8.4
+Vcs-Svn: svn://svn.debian.org/pkg-xfce/desktop/trunk/mousepad/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-xfce/desktop/trunk/mousepad/
+
+Package: mousepad
+Section: xfce
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: xfprint4
+Description: simple Xfce oriented text editor
+ Mousepad is a graphical text editor for Xfce based on Leafpad.
+ .
+ The initial reason for Mousepad was to provide printing support, which would
+ have been difficult for Leafpad for various reasons.
+ .
+ Although some features are under development, currently Mousepad has the
+ following features:
+   * Complete support for UTF-8 text
+   * Cut/Copy/Paste and Select All text
+   * Search and Replace
+   * Font selection
+   * Word Wrap
+   * Character coding selection
+   * Auto character coding detection (UTF-8 and some code-sets)
+   * Manual code-set setting
+   * Infinite Undo/Redo by word
+   * Auto Indent
+   * Multi-line Indent
+   * Display line numbers
+   * Drag and Drop
+   * Printing
--- mousepad-0.2.16.orig/debian/docs
+++ mousepad-0.2.16/debian/docs
@@ -0,0 +1,2 @@
+NEWS
+README
--- mousepad-0.2.16.orig/debian/watch
+++ mousepad-0.2.16/debian/watch
@@ -0,0 +1,3 @@
+version=3
+http://archive.xfce.org/src/apps/mousepad/([\d\.]+)/ \
+	mousepad-([\d\.]+)\.tar\.(?:gz|bz2)
--- mousepad-0.2.16.orig/debian/README.source
+++ mousepad-0.2.16/debian/README.source
@@ -0,0 +1,2 @@
+mousepad uses quilt patch system to apply patch at build-time. More information
+can be found in /usr/share/doc/quilt/README.source.
--- mousepad-0.2.16.orig/debian/patches/00_resensitize-find-button.patch
+++ mousepad-0.2.16/debian/patches/00_resensitize-find-button.patch
@@ -0,0 +1,28 @@
+--- mousepad-0.2.16.orig/src/search.c
++++ mousepad-0.2.16/src/search.c
+@@ -210,8 +210,11 @@
+ 		G_CALLBACK(toggle_sensitivity), NULL);
+ 	 g_signal_connect(G_OBJECT(entry_find), "delete-text",
+ 		G_CALLBACK(toggle_sensitivity), NULL);
+-	 if (sd->search.string_find) 
++	 if (sd->search.string_find) {
+ 		 gtk_entry_set_text(GTK_ENTRY(entry_find), sd->search.string_find);
++		 gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog),
++			GTK_RESPONSE_OK, TRUE);
++	 }
+ 
+ 	gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
+ 	gtk_entry_set_activates_default(GTK_ENTRY(entry_find), TRUE);
+@@ -275,8 +278,11 @@
+ 		G_CALLBACK(toggle_sensitivity), NULL);
+ 	 g_signal_connect(G_OBJECT(entry_find), "delete-text",
+ 		G_CALLBACK(toggle_sensitivity), NULL);
+-	 if (sd->search.string_find) 
++	 if (sd->search.string_find) {
+ 		 gtk_entry_set_text(GTK_ENTRY(entry_find), sd->search.string_find);
++		 gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog),
++			GTK_RESPONSE_OK, TRUE);
++	}
+ 	label_replace = gtk_label_new_with_mnemonic(_("Re_place with: "));
+ 	 gtk_misc_set_alignment(GTK_MISC(label_replace), 0, 0.5);
+ 	 gtk_table_attach_defaults(GTK_TABLE(table), label_replace, 0, 1, 1, 2);
--- mousepad-0.2.16.orig/debian/patches/series
+++ mousepad-0.2.16/debian/patches/series
@@ -0,0 +1,2 @@
+00_resensitize-find-button.patch
+01_fix-first-replace.patch
--- mousepad-0.2.16.orig/debian/patches/01_fix-first-replace.patch
+++ mousepad-0.2.16/debian/patches/01_fix-first-replace.patch
@@ -0,0 +1,36 @@
+diff -Naur mousepad-svn-r29637/src/search.c mousepad/src/search.c
+--- mousepad-svn-r29637/src/search.c	2007-11-16 05:20:21.000000000 +0500
++++ mousepad/src/search.c	2009-03-01 13:03:38.000000000 +0500
+@@ -78,7 +78,7 @@
+ static gint document_replace_real(StructData *sd)
+ {
+ 	GtkTextIter iter, match_start, match_end;
+-	GtkTextMark *mark_init = NULL;
++	GtkTextMark *mark_init = NULL, *mark_start, *mark_end;
+ 	gboolean res;
+ 	gint num = 0;
+ 	GtkWidget *q_dialog = NULL;
+@@ -113,6 +113,11 @@
+ 				if (num == 0 && q_dialog == NULL)
+ 					q_dialog = create_dialog_message_question(
+ 						gtk_widget_get_toplevel(sd->mainwin->textview), _("Replace?"));
++
++				gtk_text_buffer_get_selection_bounds(textbuffer, &match_start, &match_end);
++				mark_start = gtk_text_buffer_create_mark(textbuffer, NULL, &match_start, FALSE);
++				mark_end = gtk_text_buffer_create_mark(textbuffer, NULL, &match_end, FALSE);
++
+ 				switch (gtk_dialog_run(GTK_DIALOG(q_dialog))) {
+ 				case GTK_RESPONSE_CANCEL:
+ 					res = 0;
+@@ -122,6 +127,11 @@
+ 				case GTK_RESPONSE_NO:
+ 					continue;
+ 				}
++
++				gtk_text_buffer_get_iter_at_mark(textbuffer, &match_start, mark_start);
++				gtk_text_buffer_get_iter_at_mark(textbuffer, &match_end, mark_end);
++				gtk_text_buffer_move_mark_by_name(textbuffer, "selection_bound", &match_start);
++				gtk_text_buffer_move_mark_by_name(textbuffer, "insert", &match_end);
+ 			}
+ 			gtk_text_buffer_delete_selection(textbuffer, TRUE, TRUE);
+ 			undo_set_sequency(TRUE);
