]> Pileus Git - ~andy/gtk/commitdiff
Allocate with GSlice:
authorMichael Natterer <mitch@imendio.com>
Fri, 4 Jul 2008 14:27:40 +0000 (14:27 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Fri, 4 Jul 2008 14:27:40 +0000 (14:27 +0000)
2008-07-04  Michael Natterer  <mitch@imendio.com>

Allocate with GSlice:

* gtk/gtkassistant.c: GtkAssistantPage
* gtk/gtkcellview.c: GtkCellViewCellInfo
* gtk/gtkentry.c: GtkEntryPasswordHint, PopupInfo
* gtk/gtkfilefilter.c: FilterRule
* gtk/gtknotebook.c: GtkNotebookPage

svn path=/trunk/; revision=20761

ChangeLog
gtk/gtkassistant.c
gtk/gtkcellview.c
gtk/gtkentry.c
gtk/gtkfilefilter.c
gtk/gtknotebook.c

index 855d7ebd60842ede63dbef94c2d40334b33aafee..9212ca0eae30a5d3c29858f8a752116de4ddb9fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-07-04  Michael Natterer  <mitch@imendio.com>
+
+       Allocate with GSlice:
+
+       * gtk/gtkassistant.c: GtkAssistantPage
+       * gtk/gtkcellview.c: GtkCellViewCellInfo
+       * gtk/gtkentry.c: GtkEntryPasswordHint, PopupInfo
+       * gtk/gtkfilefilter.c: FilterRule
+       * gtk/gtknotebook.c: GtkNotebookPage
+
 2008-07-04  Michael Natterer  <mitch@imendio.com>
 
        * gtk/gtkcombobox.c: allocate ComboCellInfo with GSlice.
index 289718df43d9735bc481a7f0531bf8136f43afb2..141013286160172c553fd9b9c8eb535c5299cec2 100644 (file)
@@ -892,7 +892,7 @@ remove_page (GtkAssistant *assistant,
     g_object_unref (page_info->sidebar_image);
 
   gtk_widget_destroy (page_info->title);
-  g_free (page_info);
+  g_slice_free (GtkAssistantPage, page_info);
   g_list_free_1 (element);
 }
 
@@ -1650,7 +1650,7 @@ gtk_assistant_insert_page (GtkAssistant *assistant,
 
   priv = assistant->priv;
 
-  page_info = g_new0 (GtkAssistantPage, 1);
+  page_info = g_slice_new0 (GtkAssistantPage);
   page_info->page  = page;
   page_info->title = gtk_label_new (NULL);
 
index 4c1e83ae6e9a2ebdfd64806e849edeba8b03cff9..dab19cb8d0f67f917cda1b743f81799f9d475cc2 100644 (file)
@@ -589,7 +589,7 @@ gtk_cell_view_cell_layout_pack_start (GtkCellLayout   *layout,
 
   g_object_ref_sink (renderer);
 
-  info = g_new0 (GtkCellViewCellInfo, 1);
+  info = g_slice_new0 (GtkCellViewCellInfo);
   info->cell = renderer;
   info->expand = expand ? TRUE : FALSE;
   info->pack = GTK_PACK_START;
@@ -609,7 +609,7 @@ gtk_cell_view_cell_layout_pack_end (GtkCellLayout   *layout,
 
   g_object_ref_sink (renderer);
 
-  info = g_new0 (GtkCellViewCellInfo, 1);
+  info = g_slice_new0 (GtkCellViewCellInfo);
   info->cell = renderer;
   info->expand = expand ? TRUE : FALSE;
   info->pack = GTK_PACK_END;
@@ -646,7 +646,7 @@ gtk_cell_view_cell_layout_clear (GtkCellLayout *layout)
 
       gtk_cell_view_cell_layout_clear_attributes (layout, info->cell);
       g_object_unref (info->cell);
-      g_free (info);
+      g_slice_free (GtkCellViewCellInfo, info);
       cellview->priv->cell_list = g_list_delete_link (cellview->priv->cell_list, 
                                                      cellview->priv->cell_list);
     }
index 0abd6803ac17f1b7d1e6b69c87410f043d536ecb..59b1ca4c16f97497dd98d231910971360412968d 100644 (file)
@@ -2500,7 +2500,7 @@ gtk_entry_password_hint_free (GtkEntryPasswordHint *password_hint)
   if (password_hint->password_hint_timeout_id)
     g_source_remove (password_hint->password_hint_timeout_id);
 
-  g_free (password_hint);
+  g_slice_free (GtkEntryPasswordHint, password_hint);
 }
 
 /* Default signal handlers
@@ -2598,7 +2598,7 @@ gtk_entry_real_insert_text (GtkEditable *editable,
 
           if (!password_hint)
             {
-              password_hint = g_new0 (GtkEntryPasswordHint, 1);
+              password_hint = g_slice_new0 (GtkEntryPasswordHint);
               g_object_set_qdata_full (G_OBJECT (entry), quark_password_hint,
                                        password_hint,
                                        (GDestroyNotify) gtk_entry_password_hint_free);
@@ -5420,14 +5420,14 @@ popup_targets_received (GtkClipboard     *clipboard,
     }
 
   g_object_unref (entry);
-  g_free (info);
+  g_slice_free (PopupInfo, info);
 }
                        
 static void
 gtk_entry_do_popup (GtkEntry       *entry,
                     GdkEventButton *event)
 {
-  PopupInfo *info = g_new (PopupInfo, 1);
+  PopupInfo *info = g_slice_new (PopupInfo);
 
   /* In order to know what entries we should make sensitive, we
    * ask for the current targets of the clipboard, and when
index 6738fc3fbe8b7d458f66d0af9316870faa6ced24..bb37078bc41ff4b778b2d3d7e0244aacca8b312f 100644 (file)
@@ -113,7 +113,7 @@ filter_rule_free (FilterRule *rule)
       g_assert_not_reached ();
     }
 
-  g_free (rule);
+  g_slice_free (FilterRule, rule);
 }
 
 static void
@@ -222,7 +222,7 @@ gtk_file_filter_add_mime_type (GtkFileFilter *filter,
   g_return_if_fail (GTK_IS_FILE_FILTER (filter));
   g_return_if_fail (mime_type != NULL);
 
-  rule = g_new (FilterRule, 1);
+  rule = g_slice_new (FilterRule);
   rule->type = FILTER_RULE_MIME_TYPE;
   rule->needed = GTK_FILE_FILTER_MIME_TYPE;
   rule->u.mime_type = g_strdup (mime_type);
@@ -248,7 +248,7 @@ gtk_file_filter_add_pattern (GtkFileFilter *filter,
   g_return_if_fail (GTK_IS_FILE_FILTER (filter));
   g_return_if_fail (pattern != NULL);
 
-  rule = g_new (FilterRule, 1);
+  rule = g_slice_new (FilterRule);
   rule->type = FILTER_RULE_PATTERN;
   rule->needed = GTK_FILE_FILTER_DISPLAY_NAME;
   rule->u.pattern = g_strdup (pattern);
@@ -272,7 +272,7 @@ gtk_file_filter_add_pixbuf_formats (GtkFileFilter *filter)
   
   g_return_if_fail (GTK_IS_FILE_FILTER (filter));
 
-  rule = g_new (FilterRule, 1);
+  rule = g_slice_new (FilterRule);
   rule->type = FILTER_RULE_PIXBUF_FORMATS;
   rule->needed = GTK_FILE_FILTER_MIME_TYPE;
   rule->u.pixbuf_formats = gdk_pixbuf_get_formats ();
@@ -310,7 +310,7 @@ gtk_file_filter_add_custom (GtkFileFilter         *filter,
   g_return_if_fail (GTK_IS_FILE_FILTER (filter));
   g_return_if_fail (func != NULL);
 
-  rule = g_new (FilterRule, 1);
+  rule = g_slice_new (FilterRule);
   rule->type = FILTER_RULE_CUSTOM;
   rule->needed = needed;
   rule->u.custom.func = func;
index d0f034cebeda34ab109193cf3bd5d11b2f5eaacf..be072c18d7302860e96dac042b2acf076a44a7b5 100644 (file)
@@ -4044,7 +4044,7 @@ gtk_notebook_real_insert_page (GtkNotebook *notebook,
 
   gtk_widget_freeze_child_notify (child);
 
-  page = g_new0 (GtkNotebookPage, 1);
+  page = g_slice_new0 (GtkNotebookPage);
   page->child = child;
 
   nchildren = g_list_length (notebook->children);
@@ -4387,7 +4387,7 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
       page->last_focus_child = NULL;
     }
   
-  g_free (page);
+  g_slice_free (GtkNotebookPage, page);
 
   gtk_notebook_update_labels (notebook);
   if (need_resize)