diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-09-11 05:39:45 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-09-11 05:39:45 +0000 |
commit | 797c2e6a4597cf9f9b3b3785e5304845b2f217a7 (patch) | |
tree | 4de337cec62dd7f91b35cc367f88b08d5999f172 | |
parent | 07600fb107101c81ca15255a6f1932fabc735351 (diff) | |
download | gtk+-797c2e6a4597cf9f9b3b3785e5304845b2f217a7.tar.gz |
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.
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 17 | ||||
-rw-r--r-- | docs/reference/ChangeLog | 7 | ||||
-rw-r--r-- | docs/reference/gdk/gdk-sections.txt | 1 | ||||
-rw-r--r-- | gdk/gdk.symbols | 1 | ||||
-rw-r--r-- | gdk/gdkpixbuf-drawable.c | 6 | ||||
-rw-r--r-- | gdk/gdkproperty.h | 1 |
7 files changed, 46 insertions, 4 deletions
@@ -1,3 +1,20 @@ +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: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a3a1a96cb9..6186993907 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,20 @@ +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: diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 8fc51cd21b..7889b1a530 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,5 +1,12 @@ +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> diff --git a/docs/reference/gdk/gdk-sections.txt b/docs/reference/gdk/gdk-sections.txt index 85263d33d4..ebbc824ed8 100644 --- a/docs/reference/gdk/gdk-sections.txt +++ b/docs/reference/gdk/gdk-sections.txt @@ -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 diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols index 8b3f48b271..efcccc41d7 100644 --- a/gdk/gdk.symbols +++ b/gdk/gdk.symbols @@ -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 diff --git a/gdk/gdkpixbuf-drawable.c b/gdk/gdkpixbuf-drawable.c index c1f69ab0e2..c2f2a06c74 100644 --- a/gdk/gdkpixbuf-drawable.c +++ b/gdk/gdkpixbuf-drawable.c @@ -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? */ diff --git a/gdk/gdkproperty.h b/gdk/gdkproperty.h index 9d72eed92b..81b6c540b7 100644 --- a/gdk/gdkproperty.h +++ b/gdk/gdkproperty.h @@ -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, |