mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
Register all stock icons "unscaled" so that we don't have icons only
Wed Feb 27 12:34:21 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkiconfactory.c: Register all stock icons "unscaled" so that we don't have icons only available at some sizes. (#68896) Wed Feb 27 11:59:05 2002 Owen Taylor <otaylor@redhat.com> Some ASCII vs. locale fixes from Darin Adler (#55837) * gtk/gtkcombo.c (gtk_combo_find): Implement real case-insensitive comparison using g_utf8_casefold(). * gtk/gtkaccellabel.c (gtk_accel_label_refetch): Fix assignment of gunichar to char by replacing g_unichar_totitle with g_ascii_toupper ... the contents would only be ascii here anyways. * gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale) * gtk/gtkfontsel.c (gtk_font_selection_show_available_fonts): Replace a calls to g_strcasecmp() with g_ascii_strcasecmp().
This commit is contained in:
parent
bc94033dd3
commit
e6f466c12e
22
ChangeLog
22
ChangeLog
@ -1,3 +1,25 @@
|
||||
Wed Feb 27 12:34:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c: Register all stock icons
|
||||
"unscaled" so that we don't have icons only available
|
||||
at some sizes. (#68896)
|
||||
|
||||
Wed Feb 27 11:59:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Some ASCII vs. locale fixes from Darin Adler (#55837)
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): Implement real
|
||||
case-insensitive comparison using g_utf8_casefold().
|
||||
|
||||
* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Fix
|
||||
assignment of gunichar to char by replacing g_unichar_totitle
|
||||
with g_ascii_toupper ... the contents would only be ascii
|
||||
here anyways.
|
||||
|
||||
* gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale)
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_fonts):
|
||||
Replace a calls to g_strcasecmp() with g_ascii_strcasecmp().
|
||||
|
||||
2002-02-27 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* demos/gtk-demo/makefile.msc.in : new file
|
||||
|
@ -1,3 +1,25 @@
|
||||
Wed Feb 27 12:34:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c: Register all stock icons
|
||||
"unscaled" so that we don't have icons only available
|
||||
at some sizes. (#68896)
|
||||
|
||||
Wed Feb 27 11:59:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Some ASCII vs. locale fixes from Darin Adler (#55837)
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): Implement real
|
||||
case-insensitive comparison using g_utf8_casefold().
|
||||
|
||||
* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Fix
|
||||
assignment of gunichar to char by replacing g_unichar_totitle
|
||||
with g_ascii_toupper ... the contents would only be ascii
|
||||
here anyways.
|
||||
|
||||
* gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale)
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_fonts):
|
||||
Replace a calls to g_strcasecmp() with g_ascii_strcasecmp().
|
||||
|
||||
2002-02-27 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* demos/gtk-demo/makefile.msc.in : new file
|
||||
|
@ -1,3 +1,25 @@
|
||||
Wed Feb 27 12:34:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c: Register all stock icons
|
||||
"unscaled" so that we don't have icons only available
|
||||
at some sizes. (#68896)
|
||||
|
||||
Wed Feb 27 11:59:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Some ASCII vs. locale fixes from Darin Adler (#55837)
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): Implement real
|
||||
case-insensitive comparison using g_utf8_casefold().
|
||||
|
||||
* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Fix
|
||||
assignment of gunichar to char by replacing g_unichar_totitle
|
||||
with g_ascii_toupper ... the contents would only be ascii
|
||||
here anyways.
|
||||
|
||||
* gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale)
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_fonts):
|
||||
Replace a calls to g_strcasecmp() with g_ascii_strcasecmp().
|
||||
|
||||
2002-02-27 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* demos/gtk-demo/makefile.msc.in : new file
|
||||
|
@ -1,3 +1,25 @@
|
||||
Wed Feb 27 12:34:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c: Register all stock icons
|
||||
"unscaled" so that we don't have icons only available
|
||||
at some sizes. (#68896)
|
||||
|
||||
Wed Feb 27 11:59:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Some ASCII vs. locale fixes from Darin Adler (#55837)
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): Implement real
|
||||
case-insensitive comparison using g_utf8_casefold().
|
||||
|
||||
* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Fix
|
||||
assignment of gunichar to char by replacing g_unichar_totitle
|
||||
with g_ascii_toupper ... the contents would only be ascii
|
||||
here anyways.
|
||||
|
||||
* gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale)
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_fonts):
|
||||
Replace a calls to g_strcasecmp() with g_ascii_strcasecmp().
|
||||
|
||||
2002-02-27 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* demos/gtk-demo/makefile.msc.in : new file
|
||||
|
@ -1,3 +1,25 @@
|
||||
Wed Feb 27 12:34:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c: Register all stock icons
|
||||
"unscaled" so that we don't have icons only available
|
||||
at some sizes. (#68896)
|
||||
|
||||
Wed Feb 27 11:59:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Some ASCII vs. locale fixes from Darin Adler (#55837)
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): Implement real
|
||||
case-insensitive comparison using g_utf8_casefold().
|
||||
|
||||
* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Fix
|
||||
assignment of gunichar to char by replacing g_unichar_totitle
|
||||
with g_ascii_toupper ... the contents would only be ascii
|
||||
here anyways.
|
||||
|
||||
* gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale)
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_fonts):
|
||||
Replace a calls to g_strcasecmp() with g_ascii_strcasecmp().
|
||||
|
||||
2002-02-27 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* demos/gtk-demo/makefile.msc.in : new file
|
||||
|
@ -1,3 +1,25 @@
|
||||
Wed Feb 27 12:34:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c: Register all stock icons
|
||||
"unscaled" so that we don't have icons only available
|
||||
at some sizes. (#68896)
|
||||
|
||||
Wed Feb 27 11:59:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Some ASCII vs. locale fixes from Darin Adler (#55837)
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): Implement real
|
||||
case-insensitive comparison using g_utf8_casefold().
|
||||
|
||||
* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Fix
|
||||
assignment of gunichar to char by replacing g_unichar_totitle
|
||||
with g_ascii_toupper ... the contents would only be ascii
|
||||
here anyways.
|
||||
|
||||
* gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale)
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_fonts):
|
||||
Replace a calls to g_strcasecmp() with g_ascii_strcasecmp().
|
||||
|
||||
2002-02-27 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* demos/gtk-demo/makefile.msc.in : new file
|
||||
|
@ -1,3 +1,25 @@
|
||||
Wed Feb 27 12:34:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c: Register all stock icons
|
||||
"unscaled" so that we don't have icons only available
|
||||
at some sizes. (#68896)
|
||||
|
||||
Wed Feb 27 11:59:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Some ASCII vs. locale fixes from Darin Adler (#55837)
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): Implement real
|
||||
case-insensitive comparison using g_utf8_casefold().
|
||||
|
||||
* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Fix
|
||||
assignment of gunichar to char by replacing g_unichar_totitle
|
||||
with g_ascii_toupper ... the contents would only be ascii
|
||||
here anyways.
|
||||
|
||||
* gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale)
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_fonts):
|
||||
Replace a calls to g_strcasecmp() with g_ascii_strcasecmp().
|
||||
|
||||
2002-02-27 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* demos/gtk-demo/makefile.msc.in : new file
|
||||
|
@ -84,7 +84,7 @@ _gdk_x11_initialize_locale (void)
|
||||
result == 0x765)
|
||||
{
|
||||
if ((strlen (current_locale) < 4) ||
|
||||
g_strcasecmp (current_locale + strlen(current_locale) - 4, "utf8"))
|
||||
g_ascii_strcasecmp (current_locale + strlen(current_locale) - 4, "utf8"))
|
||||
gdk_use_mb = FALSE;
|
||||
}
|
||||
#endif /* X_LOCALE */
|
||||
|
@ -542,7 +542,7 @@ gtk_accel_label_refetch (GtkAccelLabel *accel_label)
|
||||
|
||||
tmp = gtk_accelerator_name (key->accel_key, 0);
|
||||
if (tmp[0] != 0 && tmp[1] == 0)
|
||||
tmp[0] = g_unichar_totitle (tmp[0]);
|
||||
tmp[0] = g_ascii_toupper (tmp[0]);
|
||||
g_string_append (gstring, tmp);
|
||||
g_free (tmp);
|
||||
}
|
||||
|
@ -308,29 +308,41 @@ static GtkListItem *
|
||||
gtk_combo_find (GtkCombo * combo)
|
||||
{
|
||||
const gchar *text;
|
||||
GtkListItem *found = NULL;
|
||||
gchar *ltext;
|
||||
gchar *compare_text;
|
||||
GList *clist;
|
||||
int (*string_compare) (const char *, const char *);
|
||||
|
||||
if (combo->case_sensitive)
|
||||
string_compare = strcmp;
|
||||
else
|
||||
string_compare = g_strcasecmp;
|
||||
|
||||
text = gtk_entry_get_text (GTK_ENTRY (combo->entry));
|
||||
if (combo->case_sensitive)
|
||||
compare_text = (gchar *)text;
|
||||
else
|
||||
compare_text = g_utf8_casefold (text, -1);
|
||||
|
||||
clist = GTK_LIST (combo->list)->children;
|
||||
|
||||
while (clist && clist->data)
|
||||
while (!found && clist && clist->data)
|
||||
{
|
||||
ltext = gtk_combo_func (GTK_LIST_ITEM (clist->data));
|
||||
if (!ltext)
|
||||
continue;
|
||||
if (!(*string_compare) (ltext, text))
|
||||
return (GtkListItem *) clist->data;
|
||||
|
||||
if (!combo->case_sensitive)
|
||||
ltext = g_utf8_casefold (ltext, -1);
|
||||
|
||||
if (strcmp (ltext, compare_text) == 0)
|
||||
found = clist->data;
|
||||
|
||||
if (!combo->case_sensitive)
|
||||
g_free (ltext);
|
||||
|
||||
clist = clist->next;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
if (!combo->case_sensitive)
|
||||
g_free (compare_text);
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
@ -635,7 +635,7 @@ gtk_font_selection_show_available_fonts (GtkFontSelection *fontsel)
|
||||
FAMILY_NAME_COLUMN, name,
|
||||
-1);
|
||||
|
||||
if (i == 0 || !g_strcasecmp (name, "sans"))
|
||||
if (i == 0 || !g_ascii_strcasecmp (name, "sans"))
|
||||
{
|
||||
match_family = families[i];
|
||||
match_row = iter;
|
||||
|
@ -318,6 +318,7 @@ gtk_icon_factory_lookup_default (const gchar *stock_id)
|
||||
return gtk_icon_factory_lookup (gtk_default_icons, stock_id);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static GtkIconSet *
|
||||
sized_icon_set_from_inline (const guchar *inline_data,
|
||||
GtkIconSize size)
|
||||
@ -341,7 +342,7 @@ sized_icon_set_from_inline (const guchar *inline_data,
|
||||
|
||||
return set;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static GtkIconSet *
|
||||
sized_with_fallback_icon_set_from_inline (const guchar *fallback_data,
|
||||
@ -400,6 +401,7 @@ unsized_icon_set_from_inline (const guchar *inline_data)
|
||||
return set;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
add_sized (GtkIconFactory *factory,
|
||||
const guchar *inline_data,
|
||||
@ -414,6 +416,7 @@ add_sized (GtkIconFactory *factory,
|
||||
|
||||
gtk_icon_set_unref (set);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
add_sized_with_fallback (GtkIconFactory *factory,
|
||||
@ -449,22 +452,27 @@ static void
|
||||
get_default_icons (GtkIconFactory *factory)
|
||||
{
|
||||
/* KEEP IN SYNC with gtkstock.c */
|
||||
|
||||
/* We add all stock icons unsized, since it's confusing if icons only
|
||||
* can be loaded at certain sizes.
|
||||
*/
|
||||
|
||||
/* Have dialog size */
|
||||
add_unsized (factory, stock_dialog_error_48, GTK_STOCK_DIALOG_ERROR);
|
||||
add_unsized (factory, stock_dialog_info_48, GTK_STOCK_DIALOG_INFO);
|
||||
add_unsized (factory, stock_dialog_question_48, GTK_STOCK_DIALOG_QUESTION);
|
||||
add_unsized (factory, stock_dialog_warning_48,GTK_STOCK_DIALOG_WARNING);
|
||||
|
||||
add_sized (factory, stock_dialog_error_48, GTK_ICON_SIZE_DIALOG, GTK_STOCK_DIALOG_ERROR);
|
||||
add_sized (factory, stock_dialog_info_48, GTK_ICON_SIZE_DIALOG, GTK_STOCK_DIALOG_INFO);
|
||||
add_sized (factory, stock_dialog_question_48, GTK_ICON_SIZE_DIALOG, GTK_STOCK_DIALOG_QUESTION);
|
||||
add_sized (factory, stock_dialog_warning_48, GTK_ICON_SIZE_DIALOG, GTK_STOCK_DIALOG_WARNING);
|
||||
/* Have dnd size */
|
||||
add_unsized (factory, stock_dnd_32, GTK_STOCK_DND);
|
||||
add_unsized (factory, stock_dnd_multiple_32, GTK_STOCK_DND_MULTIPLE);
|
||||
|
||||
/* dnd size only */
|
||||
add_sized (factory, stock_dnd_32, GTK_ICON_SIZE_DND, GTK_STOCK_DND);
|
||||
add_sized (factory, stock_dnd_multiple_32, GTK_ICON_SIZE_DND, GTK_STOCK_DND_MULTIPLE);
|
||||
|
||||
/* Only have button sizes */
|
||||
add_sized (factory, stock_apply_20, GTK_ICON_SIZE_BUTTON, GTK_STOCK_APPLY);
|
||||
add_sized (factory, stock_cancel_20, GTK_ICON_SIZE_BUTTON, GTK_STOCK_CANCEL);
|
||||
add_sized (factory, stock_no_20, GTK_ICON_SIZE_BUTTON, GTK_STOCK_NO);
|
||||
add_sized (factory, stock_ok_20, GTK_ICON_SIZE_BUTTON, GTK_STOCK_OK);
|
||||
add_sized (factory, stock_yes_20, GTK_ICON_SIZE_BUTTON, GTK_STOCK_YES);
|
||||
/* Have button sizes */
|
||||
add_unsized (factory, stock_apply_20, GTK_STOCK_APPLY);
|
||||
add_unsized (factory, stock_cancel_20, GTK_STOCK_CANCEL);
|
||||
add_unsized (factory, stock_no_20, GTK_STOCK_NO);
|
||||
add_unsized (factory, stock_ok_20, GTK_STOCK_OK);
|
||||
add_unsized (factory, stock_yes_20, GTK_STOCK_YES);
|
||||
|
||||
/* Generic + button sizes */
|
||||
add_sized_with_fallback (factory,
|
||||
|
Loading…
Reference in New Issue
Block a user