+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
+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
+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
+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
+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
+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
+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
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 */
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);
}
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 *);
+ text = gtk_entry_get_text (GTK_ENTRY (combo->entry));
if (combo->case_sensitive)
- string_compare = strcmp;
+ compare_text = (gchar *)text;
else
- string_compare = g_strcasecmp;
-
- text = gtk_entry_get_text (GTK_ENTRY (combo->entry));
+ 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 *
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;
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)
return set;
}
-
+#endif
static GtkIconSet *
sized_with_fallback_icon_set_from_inline (const guchar *fallback_data,
return set;
}
+#if 0
static void
add_sized (GtkIconFactory *factory,
const guchar *inline_data,
gtk_icon_set_unref (set);
}
+#endif
static void
add_sized_with_fallback (GtkIconFactory *factory,
get_default_icons (GtkIconFactory *factory)
{
/* KEEP IN SYNC with gtkstock.c */
-
- 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);
-
- /* 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);
+
+ /* 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);
+
+ /* Have dnd size */
+ add_unsized (factory, stock_dnd_32, GTK_STOCK_DND);
+ add_unsized (factory, stock_dnd_multiple_32, GTK_STOCK_DND_MULTIPLE);
+
+ /* 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,