mirror of https://github.com/GNOME/gimp.git
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:
parent
fb88e8676b
commit
2f3c343219
12
ChangeLog
12
ChangeLog
|
@ -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>
|
2005-07-06 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/plug-in/plug-ins-query.c (match_strings): reverted previous
|
* app/plug-in/plug-ins-query.c (match_strings): reverted previous
|
||||||
change, it was bogus.
|
change, it was bogus.
|
||||||
|
|
||||||
|
* app/pdb/procedural-db-query.c: case-insensitive search for
|
||||||
|
procedures.
|
||||||
|
|
||||||
2005-07-06 Sven Neumann <sven@gimp.org>
|
2005-07-06 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/plug-in/plug-ins-query.c (match_strings): match
|
* app/plug-in/plug-ins-query.c (match_strings): match
|
||||||
|
|
|
@ -325,21 +325,20 @@ browser_search (GimpBrowser *gimp_browser,
|
||||||
|
|
||||||
if (search_type == SEARCH_TYPE_NAME)
|
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),
|
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
|
||||||
_("Searching by name - please wait"));
|
_("Searching by name - please wait"));
|
||||||
|
|
||||||
query = g_string_new ("");
|
while (*q)
|
||||||
|
|
||||||
while (*query_text)
|
|
||||||
{
|
{
|
||||||
if ((*query_text == '_') || (*query_text == '-'))
|
if ((*q == '_') || (*q == '-'))
|
||||||
g_string_append (query, "[-_]");
|
g_string_append (query, "[-_]");
|
||||||
else
|
else
|
||||||
g_string_append_c (query, *query_text);
|
g_string_append_c (query, *q);
|
||||||
|
|
||||||
query_text++;
|
q++;
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_procedural_db_query (query->str, ".*", ".*", ".*", ".*", ".*", ".*",
|
gimp_procedural_db_query (query->str, ".*", ".*", ".*", ".*", ".*", ".*",
|
||||||
|
@ -404,10 +403,26 @@ browser_search (GimpBrowser *gimp_browser,
|
||||||
&num_procs, &proc_list);
|
&num_procs, &proc_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num_procs == 1)
|
if (! query_text || strlen (query_text) == 0)
|
||||||
str = g_strdup (_("1 Procedure"));
|
{
|
||||||
else
|
|
||||||
str = g_strdup_printf (_("%d Procedures"), num_procs);
|
str = g_strdup_printf (_("%d Procedures"), num_procs);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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);
|
gtk_label_set_text (GTK_LABEL (gimp_browser->count_label), str);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
|
|
|
@ -28,8 +28,7 @@
|
||||||
|
|
||||||
#include "gimpwidgetstypes.h"
|
#include "gimpwidgetstypes.h"
|
||||||
|
|
||||||
#include "gimpbrowser.h"
|
#include "gimpwidgets.h"
|
||||||
#include "gimpintcombobox.h"
|
|
||||||
#include "gimpwidgetsmarshal.h"
|
#include "gimpwidgetsmarshal.h"
|
||||||
|
|
||||||
#include "libgimp/libgimp-intl.h"
|
#include "libgimp/libgimp-intl.h"
|
||||||
|
@ -145,6 +144,9 @@ gimp_browser_init (GimpBrowser *browser)
|
||||||
|
|
||||||
browser->count_label = gtk_label_new ("0 Matches");
|
browser->count_label = gtk_label_new ("0 Matches");
|
||||||
gtk_misc_set_alignment (GTK_MISC (browser->count_label), 0.0, 0.5);
|
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,
|
gtk_box_pack_end (GTK_BOX (browser->left_vbox), browser->count_label,
|
||||||
FALSE, FALSE, 0);
|
FALSE, FALSE, 0);
|
||||||
gtk_widget_show (browser->count_label);
|
gtk_widget_show (browser->count_label);
|
||||||
|
|
|
@ -397,10 +397,26 @@ browser_search (GimpBrowser *gimp_browser,
|
||||||
else
|
else
|
||||||
num_plugins = 0;
|
num_plugins = 0;
|
||||||
|
|
||||||
if (num_plugins == 1)
|
if (! search_text || strlen (search_text) == 0)
|
||||||
str = g_strdup (_("1 Plug-In Interface"));
|
{
|
||||||
|
str = g_strdup_printf (_("%d Plug-ins"), num_plugins);
|
||||||
|
}
|
||||||
else
|
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);
|
gtk_label_set_text (GTK_LABEL (gimp_browser->count_label), str);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
|
|
|
@ -325,21 +325,20 @@ browser_search (GimpBrowser *gimp_browser,
|
||||||
|
|
||||||
if (search_type == SEARCH_TYPE_NAME)
|
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),
|
gimp_browser_show_message (GIMP_BROWSER (browser->browser),
|
||||||
_("Searching by name - please wait"));
|
_("Searching by name - please wait"));
|
||||||
|
|
||||||
query = g_string_new ("");
|
while (*q)
|
||||||
|
|
||||||
while (*query_text)
|
|
||||||
{
|
{
|
||||||
if ((*query_text == '_') || (*query_text == '-'))
|
if ((*q == '_') || (*q == '-'))
|
||||||
g_string_append (query, "[-_]");
|
g_string_append (query, "[-_]");
|
||||||
else
|
else
|
||||||
g_string_append_c (query, *query_text);
|
g_string_append_c (query, *q);
|
||||||
|
|
||||||
query_text++;
|
q++;
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_procedural_db_query (query->str, ".*", ".*", ".*", ".*", ".*", ".*",
|
gimp_procedural_db_query (query->str, ".*", ".*", ".*", ".*", ".*", ".*",
|
||||||
|
@ -404,10 +403,26 @@ browser_search (GimpBrowser *gimp_browser,
|
||||||
&num_procs, &proc_list);
|
&num_procs, &proc_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num_procs == 1)
|
if (! query_text || strlen (query_text) == 0)
|
||||||
str = g_strdup (_("1 Procedure"));
|
{
|
||||||
else
|
|
||||||
str = g_strdup_printf (_("%d Procedures"), num_procs);
|
str = g_strdup_printf (_("%d Procedures"), num_procs);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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);
|
gtk_label_set_text (GTK_LABEL (gimp_browser->count_label), str);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
|
|
|
@ -397,10 +397,26 @@ browser_search (GimpBrowser *gimp_browser,
|
||||||
else
|
else
|
||||||
num_plugins = 0;
|
num_plugins = 0;
|
||||||
|
|
||||||
if (num_plugins == 1)
|
if (! search_text || strlen (search_text) == 0)
|
||||||
str = g_strdup (_("1 Plug-In Interface"));
|
{
|
||||||
|
str = g_strdup_printf (_("%d Plug-ins"), num_plugins);
|
||||||
|
}
|
||||||
else
|
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);
|
gtk_label_set_text (GTK_LABEL (gimp_browser->count_label), str);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
|
|
Loading…
Reference in New Issue