mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 05:50:10 +00:00
Allocate with GSlice:
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
This commit is contained in:
parent
d905a906a4
commit
da4da16baf
10
ChangeLog
10
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>
|
2008-07-04 Michael Natterer <mitch@imendio.com>
|
||||||
|
|
||||||
* gtk/gtkcombobox.c: allocate ComboCellInfo with GSlice.
|
* gtk/gtkcombobox.c: allocate ComboCellInfo with GSlice.
|
||||||
|
@ -892,7 +892,7 @@ remove_page (GtkAssistant *assistant,
|
|||||||
g_object_unref (page_info->sidebar_image);
|
g_object_unref (page_info->sidebar_image);
|
||||||
|
|
||||||
gtk_widget_destroy (page_info->title);
|
gtk_widget_destroy (page_info->title);
|
||||||
g_free (page_info);
|
g_slice_free (GtkAssistantPage, page_info);
|
||||||
g_list_free_1 (element);
|
g_list_free_1 (element);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1650,7 +1650,7 @@ gtk_assistant_insert_page (GtkAssistant *assistant,
|
|||||||
|
|
||||||
priv = assistant->priv;
|
priv = assistant->priv;
|
||||||
|
|
||||||
page_info = g_new0 (GtkAssistantPage, 1);
|
page_info = g_slice_new0 (GtkAssistantPage);
|
||||||
page_info->page = page;
|
page_info->page = page;
|
||||||
page_info->title = gtk_label_new (NULL);
|
page_info->title = gtk_label_new (NULL);
|
||||||
|
|
||||||
|
@ -589,7 +589,7 @@ gtk_cell_view_cell_layout_pack_start (GtkCellLayout *layout,
|
|||||||
|
|
||||||
g_object_ref_sink (renderer);
|
g_object_ref_sink (renderer);
|
||||||
|
|
||||||
info = g_new0 (GtkCellViewCellInfo, 1);
|
info = g_slice_new0 (GtkCellViewCellInfo);
|
||||||
info->cell = renderer;
|
info->cell = renderer;
|
||||||
info->expand = expand ? TRUE : FALSE;
|
info->expand = expand ? TRUE : FALSE;
|
||||||
info->pack = GTK_PACK_START;
|
info->pack = GTK_PACK_START;
|
||||||
@ -609,7 +609,7 @@ gtk_cell_view_cell_layout_pack_end (GtkCellLayout *layout,
|
|||||||
|
|
||||||
g_object_ref_sink (renderer);
|
g_object_ref_sink (renderer);
|
||||||
|
|
||||||
info = g_new0 (GtkCellViewCellInfo, 1);
|
info = g_slice_new0 (GtkCellViewCellInfo);
|
||||||
info->cell = renderer;
|
info->cell = renderer;
|
||||||
info->expand = expand ? TRUE : FALSE;
|
info->expand = expand ? TRUE : FALSE;
|
||||||
info->pack = GTK_PACK_END;
|
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);
|
gtk_cell_view_cell_layout_clear_attributes (layout, info->cell);
|
||||||
g_object_unref (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 = g_list_delete_link (cellview->priv->cell_list,
|
||||||
cellview->priv->cell_list);
|
cellview->priv->cell_list);
|
||||||
}
|
}
|
||||||
|
@ -2500,7 +2500,7 @@ gtk_entry_password_hint_free (GtkEntryPasswordHint *password_hint)
|
|||||||
if (password_hint->password_hint_timeout_id)
|
if (password_hint->password_hint_timeout_id)
|
||||||
g_source_remove (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
|
/* Default signal handlers
|
||||||
@ -2598,7 +2598,7 @@ gtk_entry_real_insert_text (GtkEditable *editable,
|
|||||||
|
|
||||||
if (!password_hint)
|
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,
|
g_object_set_qdata_full (G_OBJECT (entry), quark_password_hint,
|
||||||
password_hint,
|
password_hint,
|
||||||
(GDestroyNotify) gtk_entry_password_hint_free);
|
(GDestroyNotify) gtk_entry_password_hint_free);
|
||||||
@ -5420,14 +5420,14 @@ popup_targets_received (GtkClipboard *clipboard,
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_object_unref (entry);
|
g_object_unref (entry);
|
||||||
g_free (info);
|
g_slice_free (PopupInfo, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_entry_do_popup (GtkEntry *entry,
|
gtk_entry_do_popup (GtkEntry *entry,
|
||||||
GdkEventButton *event)
|
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
|
/* In order to know what entries we should make sensitive, we
|
||||||
* ask for the current targets of the clipboard, and when
|
* ask for the current targets of the clipboard, and when
|
||||||
|
@ -113,7 +113,7 @@ filter_rule_free (FilterRule *rule)
|
|||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (rule);
|
g_slice_free (FilterRule, rule);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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 (GTK_IS_FILE_FILTER (filter));
|
||||||
g_return_if_fail (mime_type != NULL);
|
g_return_if_fail (mime_type != NULL);
|
||||||
|
|
||||||
rule = g_new (FilterRule, 1);
|
rule = g_slice_new (FilterRule);
|
||||||
rule->type = FILTER_RULE_MIME_TYPE;
|
rule->type = FILTER_RULE_MIME_TYPE;
|
||||||
rule->needed = GTK_FILE_FILTER_MIME_TYPE;
|
rule->needed = GTK_FILE_FILTER_MIME_TYPE;
|
||||||
rule->u.mime_type = g_strdup (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 (GTK_IS_FILE_FILTER (filter));
|
||||||
g_return_if_fail (pattern != NULL);
|
g_return_if_fail (pattern != NULL);
|
||||||
|
|
||||||
rule = g_new (FilterRule, 1);
|
rule = g_slice_new (FilterRule);
|
||||||
rule->type = FILTER_RULE_PATTERN;
|
rule->type = FILTER_RULE_PATTERN;
|
||||||
rule->needed = GTK_FILE_FILTER_DISPLAY_NAME;
|
rule->needed = GTK_FILE_FILTER_DISPLAY_NAME;
|
||||||
rule->u.pattern = g_strdup (pattern);
|
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));
|
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->type = FILTER_RULE_PIXBUF_FORMATS;
|
||||||
rule->needed = GTK_FILE_FILTER_MIME_TYPE;
|
rule->needed = GTK_FILE_FILTER_MIME_TYPE;
|
||||||
rule->u.pixbuf_formats = gdk_pixbuf_get_formats ();
|
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 (GTK_IS_FILE_FILTER (filter));
|
||||||
g_return_if_fail (func != NULL);
|
g_return_if_fail (func != NULL);
|
||||||
|
|
||||||
rule = g_new (FilterRule, 1);
|
rule = g_slice_new (FilterRule);
|
||||||
rule->type = FILTER_RULE_CUSTOM;
|
rule->type = FILTER_RULE_CUSTOM;
|
||||||
rule->needed = needed;
|
rule->needed = needed;
|
||||||
rule->u.custom.func = func;
|
rule->u.custom.func = func;
|
||||||
|
@ -4044,7 +4044,7 @@ gtk_notebook_real_insert_page (GtkNotebook *notebook,
|
|||||||
|
|
||||||
gtk_widget_freeze_child_notify (child);
|
gtk_widget_freeze_child_notify (child);
|
||||||
|
|
||||||
page = g_new0 (GtkNotebookPage, 1);
|
page = g_slice_new0 (GtkNotebookPage);
|
||||||
page->child = child;
|
page->child = child;
|
||||||
|
|
||||||
nchildren = g_list_length (notebook->children);
|
nchildren = g_list_length (notebook->children);
|
||||||
@ -4387,7 +4387,7 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
|
|||||||
page->last_focus_child = NULL;
|
page->last_focus_child = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (page);
|
g_slice_free (GtkNotebookPage, page);
|
||||||
|
|
||||||
gtk_notebook_update_labels (notebook);
|
gtk_notebook_update_labels (notebook);
|
||||||
if (need_resize)
|
if (need_resize)
|
||||||
|
Loading…
Reference in New Issue
Block a user