SF.net SVN: geany:[5616] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Tue Mar 22 17:26:48 UTC 2011


Revision: 5616
          http://geany.svn.sourceforge.net/geany/?rev=5616&view=rev
Author:   ntrel
Date:     2011-03-22 17:26:47 +0000 (Tue, 22 Mar 2011)

Log Message:
-----------
Allow multiple file filters to be separated by a space for
consistency with Find in Files file patterns. ';' is still
allowed also.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/plugins/filebrowser.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2011-03-22 17:09:48 UTC (rev 5615)
+++ trunk/ChangeLog	2011-03-22 17:26:47 UTC (rev 5616)
@@ -2,6 +2,10 @@
 
  * src/main.c:
    Make --ft-names list filetypes alphabetically.
+ * plugins/filebrowser.c:
+   Allow multiple file filters to be separated by a space for
+   consistency with Find in Files file patterns. ';' is still
+   allowed also.
 
 
 2011-03-20  Colomban Wendling  <colomban(at)geany(dot)org>

Modified: trunk/plugins/filebrowser.c
===================================================================
--- trunk/plugins/filebrowser.c	2011-03-22 17:09:48 UTC (rev 5615)
+++ trunk/plugins/filebrowser.c	2011-03-22 17:26:47 UTC (rev 5616)
@@ -160,10 +160,10 @@
 {
 	gchar **filter_item;
 	guint len;
-	
+
 	if (filter == NULL)
 		return FALSE;
-	
+
 	len = g_strv_length(filter);
 	foreach_c_array(filter_item, filter, len)
 	{
@@ -795,7 +795,9 @@
 
 static void on_filter_activate(GtkEntry *entry, gpointer user_data)
 {
-	filter = g_strsplit(gtk_entry_get_text(entry), ";", -1);
+	/* We use spaces for consistency with Find in Files file patterns
+	 * ';' also supported like original patch. */
+	filter = g_strsplit_set(gtk_entry_get_text(entry), "; ", -1);
 	if (filter == NULL || g_strv_length(filter) == 0)
 	{
 		clear_filter();
@@ -911,7 +913,7 @@
 		g_signal_connect(filter_entry, "icon-release", G_CALLBACK(on_filter_clear), NULL);
 	}
 	ui_widget_set_tooltip_text(filter_entry,
-		_("Filter your files with usual wildcards, separate multiple filters with \";\""));
+		_("Filter your files with the usual wildcards. Separate multiple patterns with a space."));
 	g_signal_connect(filter_entry, "activate", G_CALLBACK(on_filter_activate), NULL);
 
 	gtk_box_pack_start(GTK_BOX(filterbar), label, FALSE, FALSE, 0);
@@ -1095,7 +1097,7 @@
 	GtkWidget *scrollwin, *toolbar, *filterbar;
 
 	filter = NULL;
-	
+
 	file_view_vbox = gtk_vbox_new(FALSE, 0);
 	toolbar = make_toolbar();
 	gtk_box_pack_start(GTK_BOX(file_view_vbox), toolbar, FALSE, FALSE, 0);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list