Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jul 2012 03:37:20 GMT
From:      Filipy Galiza Soares <65@filipy.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/169569: [patch] port editors/mousepad search tool only works once
Message-ID:  <201207010337.q613bKSV041652@red.freebsd.org>
Resent-Message-ID: <201207010340.q613e9lB023732@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         169569
>Category:       ports
>Synopsis:       [patch] port editors/mousepad search tool only works once
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 01 03:40:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Filipy Galiza Soares
>Release:        9.0
>Organization:
>Environment:
FreeBSD lain-desktop 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I've recently made a fresh install of the FreeBSD 9.0 Release, and together, the XFCE 4.10 desktop with the mousepad editor.

Using the mousepad editor to edit some code, I used the search tool once, found what I wanted for the moment... needed again, I tried use the tool, but now the search button looks inactive and the search function doesn't work.

Searching, I found this: https://bugs.archlinux.org/task/17017 that reports the same problem. And after here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549334
>How-To-Repeat:
You just need to have ports and system up to date (and mousepad installed).

Open 'mousepad'; use the search tool; close search tool; try use search tool again and the search button appears as inactive.
>Fix:
As suggested here (https://bugs.archlinux.org/task/17017), apply this patch (http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;filename=00_resensitize-find-button.patch;att=1;bug=549334) solves the problem.

I made a little modification to that patch works well with the editors/mousepad port.

You just need to make directory '/usr/ports/editors/mousepad/files'; copy the patch to there (;remove the ".txt" from the end of file) and recompile the port (again). Since 'mousepad' is already installed, I removed (make deinstall) and installed the new (compiled) version (I did 'make install clean').

Right now, everything working fine.



Patch attached with submission follows:

--- src/search.c.orig
+++ 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);


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207010337.q613bKSV041652>