forked from AuroraMiddleware/gtk
g_warning() if setting the local fails, like gdk_set_locale() did.
Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkmain.c (gtk_init_check): g_warning() if setting the local fails, like gdk_set_locale() did. * gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list): Don't free local_list if local_count == 0. (#71241, reported by Kevin Vandersloot.) * gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list): Clean up list == NULL handling and failure.
This commit is contained in:
parent
294e8eb7bb
commit
6b838a22d1
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (gtk_init_check): g_warning() if setting
|
||||
the local fails, like gdk_set_locale() did.
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
|
||||
Don't free local_list if local_count == 0. (#71241, reported
|
||||
by Kevin Vandersloot.)
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
|
||||
Clean up list == NULL handling and failure.
|
||||
|
||||
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (typesystem_recurse): Cast GType
|
||||
|
@ -1,3 +1,15 @@
|
||||
Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (gtk_init_check): g_warning() if setting
|
||||
the local fails, like gdk_set_locale() did.
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
|
||||
Don't free local_list if local_count == 0. (#71241, reported
|
||||
by Kevin Vandersloot.)
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
|
||||
Clean up list == NULL handling and failure.
|
||||
|
||||
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (typesystem_recurse): Cast GType
|
||||
|
@ -1,3 +1,15 @@
|
||||
Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (gtk_init_check): g_warning() if setting
|
||||
the local fails, like gdk_set_locale() did.
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
|
||||
Don't free local_list if local_count == 0. (#71241, reported
|
||||
by Kevin Vandersloot.)
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
|
||||
Clean up list == NULL handling and failure.
|
||||
|
||||
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (typesystem_recurse): Cast GType
|
||||
|
@ -1,3 +1,15 @@
|
||||
Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (gtk_init_check): g_warning() if setting
|
||||
the local fails, like gdk_set_locale() did.
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
|
||||
Don't free local_list if local_count == 0. (#71241, reported
|
||||
by Kevin Vandersloot.)
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
|
||||
Clean up list == NULL handling and failure.
|
||||
|
||||
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (typesystem_recurse): Cast GType
|
||||
|
@ -1,3 +1,15 @@
|
||||
Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (gtk_init_check): g_warning() if setting
|
||||
the local fails, like gdk_set_locale() did.
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
|
||||
Don't free local_list if local_count == 0. (#71241, reported
|
||||
by Kevin Vandersloot.)
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
|
||||
Clean up list == NULL handling and failure.
|
||||
|
||||
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (typesystem_recurse): Cast GType
|
||||
|
@ -1,3 +1,15 @@
|
||||
Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (gtk_init_check): g_warning() if setting
|
||||
the local fails, like gdk_set_locale() did.
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
|
||||
Don't free local_list if local_count == 0. (#71241, reported
|
||||
by Kevin Vandersloot.)
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
|
||||
Clean up list == NULL handling and failure.
|
||||
|
||||
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (typesystem_recurse): Cast GType
|
||||
|
@ -1,3 +1,15 @@
|
||||
Wed Feb 13 12:41:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (gtk_init_check): g_warning() if setting
|
||||
the local fails, like gdk_set_locale() did.
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list):
|
||||
Don't free local_list if local_count == 0. (#71241, reported
|
||||
by Kevin Vandersloot.)
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_text_list):
|
||||
Clean up list == NULL handling and failure.
|
||||
|
||||
Wed Feb 13 11:27:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (typesystem_recurse): Cast GType
|
||||
|
@ -305,21 +305,30 @@ gdk_text_property_to_text_list (GdkAtom encoding,
|
||||
XTextProperty property;
|
||||
gint count = 0;
|
||||
gint res;
|
||||
|
||||
if (!list)
|
||||
return 0;
|
||||
gchar **local_list;
|
||||
|
||||
property.value = (guchar *)text;
|
||||
property.encoding = gdk_x11_atom_to_xatom (encoding);
|
||||
property.format = format;
|
||||
property.nitems = length;
|
||||
res = XmbTextPropertyToTextList (GDK_DISPLAY(), &property, list, &count);
|
||||
res = XmbTextPropertyToTextList (GDK_DISPLAY(), &property, &local_list, &count);
|
||||
|
||||
if (res == XNoMemory || res == XLocaleNotSupported ||
|
||||
res == XConverterNotFound)
|
||||
return 0;
|
||||
if (res == XNoMemory || res == XLocaleNotSupported || res == XConverterNotFound)
|
||||
{
|
||||
if (list)
|
||||
*list = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return count;
|
||||
{
|
||||
if (list)
|
||||
*list = local_list;
|
||||
else
|
||||
XFreeStringList (local_list);
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -482,8 +491,10 @@ gdk_text_property_to_utf8_list (GdkAtom encoding,
|
||||
(*list)[count++] = g_strdup (local_list[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (local_count)
|
||||
gdk_free_text_list (local_list);
|
||||
|
||||
gdk_free_text_list (local_list);
|
||||
(*list)[count] = NULL;
|
||||
|
||||
return count;
|
||||
|
@ -458,7 +458,10 @@ gtk_init_check (int *argc,
|
||||
#endif
|
||||
|
||||
if (do_setlocale)
|
||||
setlocale (LC_ALL, "");
|
||||
{
|
||||
if (!setlocale (LC_ALL, ""))
|
||||
g_warning ("Locale not supported by C library.\n\tUsing the fallback 'C' locale.");
|
||||
}
|
||||
|
||||
/* Initialize "gdk". We pass along the 'argc' and 'argv'
|
||||
* parameters as they contain information that GDK uses
|
||||
|
Loading…
Reference in New Issue
Block a user