]> Pileus Git - ~andy/gtk/commitdiff
No need to allocate a guint; just stuff the ID into the pointer directly.
authorChristian Persch <chpe@gnome.org>
Tue, 1 May 2007 22:22:49 +0000 (22:22 +0000)
committerChristian Persch <chpe@src.gnome.org>
Tue, 1 May 2007 22:22:49 +0000 (22:22 +0000)
2007-05-02  Christian Persch  <chpe@gnome.org>

* gtk/gtkstatusbar.c: (gtk_statusbar_get_context_id),
(gtk_statusbar_expose_event): No need to allocate a guint; just stuff
the ID into the pointer directly. Bug #434865.

svn path=/trunk/; revision=17758

ChangeLog
gtk/gtkstatusbar.c

index 93905d2fcc2e316bc06928a70769d00b82092024..c5fa07ecee3953d96cf80b0d25b7769e05934547 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-05-02  Christian Persch  <chpe@gnome.org>
+
+       * gtk/gtkstatusbar.c: (gtk_statusbar_get_context_id),
+       (gtk_statusbar_expose_event): No need to allocate a guint; just stuff
+       the ID into the pointer directly. Bug #434865.
+
 2007-05-01  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkfilechooserdefault.c (struct UpdateCurrentFolderData),
index 7410e55848f99067697c6eaeed1790716b933d8d..69c6787a5645ff8a50485b0a4756e5b0f5f83cae 100644 (file)
@@ -276,18 +276,17 @@ gtk_statusbar_get_context_id (GtkStatusbar *statusbar,
   /* we need to preserve namespaces on object datas */
   string = g_strconcat ("gtk-status-bar-context:", context_description, NULL);
 
-  id = g_object_get_data (G_OBJECT (statusbar), string);
-  if (!id)
+  id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (statusbar), string));
+  if (id == 0)
     {
-      id = g_new (guint, 1);
-      *id = statusbar->seq_context_id++;
-      g_object_set_data_full (G_OBJECT (statusbar), string, id, g_free);
+      id = statusbar->seq_context_id++;
+      g_object_set_data_full (G_OBJECT (statusbar), string, GUINT_TO_POINTER (id), NULL);
       statusbar->keys = g_slist_prepend (statusbar->keys, string);
     }
   else
     g_free (string);
 
-  return *id;
+  return id;
 }
 
 /**
@@ -787,7 +786,7 @@ gtk_statusbar_expose_event (GtkWidget      *widget,
       gtk_paint_resize_grip (widget->style,
                              widget->window,
                              GTK_WIDGET_STATE (widget),
-                             NULL,
+                             &event->area,
                              widget,
                              "statusbar",
                              edge,