set the count label in italic.

2005-07-06  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpbrowser.c: set the count label in italic.

	* plug-ins/dbbrowser/gimpprocbrowser.c
	* plug-ins/dbbrowser/plugin-browser.c: try to make it more obvious
	that the list is the result of a query by explicitely mentioning
	this in the summary below the list.
This commit is contained in:
Sven Neumann 2005-07-06 01:51:17 +00:00 committed by Sven Neumann
parent fb88e8676b
commit 2f3c343219
6 changed files with 104 additions and 28 deletions

View File

@ -1,8 +1,20 @@
2005-07-06 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpbrowser.c: set the count label in italic.
* plug-ins/dbbrowser/gimpprocbrowser.c
* plug-ins/dbbrowser/plugin-browser.c: try to make it more obvious
that the list is the result of a query by explicitely mentioning
this in the summary below the list.
2005-07-06 Sven Neumann <sven@gimp.org>
* app/plug-in/plug-ins-query.c (match_strings): reverted previous
change, it was bogus.
* app/pdb/procedural-db-query.c: case-insensitive search for
procedures.
2005-07-06 Sven Neumann <sven@gimp.org>
* app/plug-in/plug-ins-query.c (match_strings): match

View File

@ -325,21 +325,20 @@ browser_search (GimpBrowser *gimp_browser,
if (search_type == SEARCH_TYPE_NAME)
{
GString *query;
GString *query = g_string_new ("");
const gchar *q = query_text;
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
_("Searching by name - please wait"));
query = g_string_new ("");
while (*query_text)
while (*q)
{
if ((*query_text == '_') || (*query_text == '-'))
if ((*q == '_') || (*q == '-'))
g_string_append (query, "[-_]");
else
g_string_append_c (query, *query_text);
g_string_append_c (query, *q);
query_text++;
q++;
}
gimp_procedural_db_query (query->str, ".*", ".*", ".*", ".*", ".*", ".*",
@ -404,10 +403,26 @@ browser_search (GimpBrowser *gimp_browser,
&num_procs, &proc_list);
}
if (num_procs == 1)
str = g_strdup (_("1 Procedure"));
if (! query_text || strlen (query_text) == 0)
{
str = g_strdup_printf (_("%d Procedures"), num_procs);
}
else
str = g_strdup_printf (_("%d Procedures"), num_procs);
{
switch (num_procs)
{
case 0:
str = g_strdup (_("No matches for your query"));
break;
case 1:
str = g_strdup (_("1 procedure matches your query"));
break;
default:
str = g_strdup_printf (_("%d procedures match your query"),
num_procs);
break;
}
}
gtk_label_set_text (GTK_LABEL (gimp_browser->count_label), str);
g_free (str);

View File

@ -28,8 +28,7 @@
#include "gimpwidgetstypes.h"
#include "gimpbrowser.h"
#include "gimpintcombobox.h"
#include "gimpwidgets.h"
#include "gimpwidgetsmarshal.h"
#include "libgimp/libgimp-intl.h"
@ -145,6 +144,9 @@ gimp_browser_init (GimpBrowser *browser)
browser->count_label = gtk_label_new ("0 Matches");
gtk_misc_set_alignment (GTK_MISC (browser->count_label), 0.0, 0.5);
gimp_label_set_attributes (GTK_LABEL (browser->count_label),
PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
-1);
gtk_box_pack_end (GTK_BOX (browser->left_vbox), browser->count_label,
FALSE, FALSE, 0);
gtk_widget_show (browser->count_label);

View File

@ -397,10 +397,26 @@ browser_search (GimpBrowser *gimp_browser,
else
num_plugins = 0;
if (num_plugins == 1)
str = g_strdup (_("1 Plug-In Interface"));
if (! search_text || strlen (search_text) == 0)
{
str = g_strdup_printf (_("%d Plug-ins"), num_plugins);
}
else
str = g_strdup_printf (_("%d Plug-In Interfaces"), num_plugins);
{
switch (num_plugins)
{
case 0:
str = g_strdup (_("No matches for your query"));
break;
case 1:
str = g_strdup (_("1 plug-in matches your query"));
break;
default:
str = g_strdup_printf (_("%d plug-ins match your query"),
num_plugins);
break;
}
}
gtk_label_set_text (GTK_LABEL (gimp_browser->count_label), str);
g_free (str);

View File

@ -325,21 +325,20 @@ browser_search (GimpBrowser *gimp_browser,
if (search_type == SEARCH_TYPE_NAME)
{
GString *query;
GString *query = g_string_new ("");
const gchar *q = query_text;
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
_("Searching by name - please wait"));
query = g_string_new ("");
while (*query_text)
while (*q)
{
if ((*query_text == '_') || (*query_text == '-'))
if ((*q == '_') || (*q == '-'))
g_string_append (query, "[-_]");
else
g_string_append_c (query, *query_text);
g_string_append_c (query, *q);
query_text++;
q++;
}
gimp_procedural_db_query (query->str, ".*", ".*", ".*", ".*", ".*", ".*",
@ -404,10 +403,26 @@ browser_search (GimpBrowser *gimp_browser,
&num_procs, &proc_list);
}
if (num_procs == 1)
str = g_strdup (_("1 Procedure"));
if (! query_text || strlen (query_text) == 0)
{
str = g_strdup_printf (_("%d Procedures"), num_procs);
}
else
str = g_strdup_printf (_("%d Procedures"), num_procs);
{
switch (num_procs)
{
case 0:
str = g_strdup (_("No matches for your query"));
break;
case 1:
str = g_strdup (_("1 procedure matches your query"));
break;
default:
str = g_strdup_printf (_("%d procedures match your query"),
num_procs);
break;
}
}
gtk_label_set_text (GTK_LABEL (gimp_browser->count_label), str);
g_free (str);

View File

@ -397,10 +397,26 @@ browser_search (GimpBrowser *gimp_browser,
else
num_plugins = 0;
if (num_plugins == 1)
str = g_strdup (_("1 Plug-In Interface"));
if (! search_text || strlen (search_text) == 0)
{
str = g_strdup_printf (_("%d Plug-ins"), num_plugins);
}
else
str = g_strdup_printf (_("%d Plug-In Interfaces"), num_plugins);
{
switch (num_plugins)
{
case 0:
str = g_strdup (_("No matches for your query"));
break;
case 1:
str = g_strdup (_("1 plug-in matches your query"));
break;
default:
str = g_strdup_printf (_("%d plug-ins match your query"),
num_plugins);
break;
}
}
gtk_label_set_text (GTK_LABEL (gimp_browser->count_label), str);
g_free (str);