mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
csssection: Redo constructors
Remove the unused one and rename the old one to new_from_parser().
This commit is contained in:
parent
35f60dc918
commit
207c0b32b4
@ -396,9 +396,9 @@ gtk_css_scanner_push_section (GtkCssScanner *scanner,
|
||||
{
|
||||
GtkCssSection *section;
|
||||
|
||||
section = _gtk_css_section_new (scanner->section,
|
||||
section_type,
|
||||
scanner->parser);
|
||||
section = gtk_css_section_new_for_parser (scanner->section,
|
||||
section_type,
|
||||
scanner->parser);
|
||||
|
||||
if (scanner->section)
|
||||
gtk_css_section_unref (scanner->section);
|
||||
|
@ -36,9 +36,9 @@ struct _GtkCssSection
|
||||
G_DEFINE_BOXED_TYPE (GtkCssSection, gtk_css_section, gtk_css_section_ref, gtk_css_section_unref)
|
||||
|
||||
GtkCssSection *
|
||||
_gtk_css_section_new (GtkCssSection *parent,
|
||||
GtkCssSectionType type,
|
||||
GtkCssParser *parser)
|
||||
gtk_css_section_new_for_parser (GtkCssSection *parent,
|
||||
GtkCssSectionType type,
|
||||
GtkCssParser *parser)
|
||||
{
|
||||
GtkCssSection *section;
|
||||
|
||||
@ -59,23 +59,6 @@ _gtk_css_section_new (GtkCssSection *parent,
|
||||
return section;
|
||||
}
|
||||
|
||||
GtkCssSection *
|
||||
_gtk_css_section_new_for_file (GtkCssSectionType type,
|
||||
GFile *file)
|
||||
{
|
||||
GtkCssSection *section;
|
||||
|
||||
gtk_internal_return_val_if_fail (G_IS_FILE (file), NULL);
|
||||
|
||||
section = g_slice_new0 (GtkCssSection);
|
||||
|
||||
section->ref_count = 1;
|
||||
section->section_type = type;
|
||||
section->file = g_object_ref (file);
|
||||
|
||||
return section;
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_css_section_end (GtkCssSection *section)
|
||||
{
|
||||
|
@ -24,11 +24,9 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GtkCssSection * _gtk_css_section_new (GtkCssSection *parent,
|
||||
GtkCssSection * gtk_css_section_new_for_parser (GtkCssSection *parent,
|
||||
GtkCssSectionType type,
|
||||
GtkCssParser *parser);
|
||||
GtkCssSection * _gtk_css_section_new_for_file (GtkCssSectionType type,
|
||||
GFile *file);
|
||||
|
||||
void _gtk_css_section_end (GtkCssSection *section);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user