Commit 797c2e6a authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

New function to avoid pointless strdups when creating atoms from static

2005-09-11  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/gdkproperty.h:
	* gdk/x11/gdkproperty-x11.c (gdk_atom_intern_static_string):
	New function to avoid pointless strdups when creating atoms
	from static strings.

	* gdk/x11/gdkdisplay-x11.c:
	* gdk/x11/gdkdnd-x11.c:
	* gdk/x11/gdkevents-x11.c:
	* gdk/x11/gdkmain-x11.c:
	* gdk/x11/gdkproperty-x11.c:
	* gdk/x11/gdkselection-x11.c:
	* gdk/x11/gdkwindow-x11.c: Use gdk_atom_intern_static_string()
	where appropriate.
parent 07600fb1
2005-09-11 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
* gdk/gdkproperty.h:
* gdk/x11/gdkproperty-x11.c (gdk_atom_intern_static_string):
New function to avoid pointless strdups when creating atoms
from static strings.
* gdk/x11/gdkdisplay-x11.c:
* gdk/x11/gdkdnd-x11.c:
* gdk/x11/gdkevents-x11.c:
* gdk/x11/gdkmain-x11.c:
* gdk/x11/gdkproperty-x11.c:
* gdk/x11/gdkselection-x11.c:
* gdk/x11/gdkwindow-x11.c: Use gdk_atom_intern_static_string()
where appropriate.
2005-09-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcellrendererkeys.h:
......
2005-09-11 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
* gdk/gdkproperty.h:
* gdk/x11/gdkproperty-x11.c (gdk_atom_intern_static_string):
New function to avoid pointless strdups when creating atoms
from static strings.
* gdk/x11/gdkdisplay-x11.c:
* gdk/x11/gdkdnd-x11.c:
* gdk/x11/gdkevents-x11.c:
* gdk/x11/gdkmain-x11.c:
* gdk/x11/gdkproperty-x11.c:
* gdk/x11/gdkselection-x11.c:
* gdk/x11/gdkwindow-x11.c: Use gdk_atom_intern_static_string()
where appropriate.
2005-09-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcellrendererkeys.h:
......
2005-09-11 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk-sections.txt: Add gdk_intern_static_string.
2005-09-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-docs.sgml:
* gtk/gtk-sections.txt: Add a section for GtkCellRendererKeys
* gdk/tmpl/event_structs.sgml: Document GdkEventKey.is_modifier.
2005-09-06 Matthias Clasen <mclasen@redhat.com>
......
......@@ -825,6 +825,7 @@ gdk_utf8_to_string_target
gdk_utf8_to_compound_text
gdk_utf8_to_compound_text_for_display
gdk_atom_intern
gdk_atom_intern_static_string
gdk_atom_name
gdk_property_get
gdk_property_change
......
......@@ -170,6 +170,7 @@ gdk_utf8_to_compound_text
#if IN_HEADER(__GDK_PROPERTY_H__)
#if IN_FILE(__GDK_PROPERTY_X11_C__)
gdk_atom_intern
gdk_atom_intern_static_string
gdk_atom_name
gdk_property_change
gdk_property_delete
......
......@@ -925,7 +925,6 @@ convert_real_slow (GdkImage *image,
gboolean alpha)
{
int xx, yy;
int bpl;
guint8 *orow = pixels;
guint8 *o;
guint32 pixel;
......@@ -933,8 +932,7 @@ convert_real_slow (GdkImage *image,
guint8 component;
int i;
bpl = image->bpl;
v = gdk_colormap_get_visual(cmap);
v = gdk_colormap_get_visual (cmap);
if (image->depth != v->depth)
{
......@@ -954,7 +952,7 @@ convert_real_slow (GdkImage *image,
o = orow;
for (xx = x1; xx < x2; xx++)
{
pixel = gdk_image_get_pixel(image, xx, yy);
pixel = gdk_image_get_pixel (image, xx, yy);
switch (v->type)
{
/* I assume this is right for static & greyscale's too? */
......
......@@ -40,6 +40,7 @@ typedef enum
GdkAtom gdk_atom_intern (const gchar *atom_name,
gboolean only_if_exists);
GdkAtom gdk_atom_intern_static_string (const gchar *atom_name);
gchar* gdk_atom_name (GdkAtom atom);
gboolean gdk_property_get (GdkWindow *window,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment