csssection: Redo constructors

Remove the unused one and rename the old one to new_from_parser().
This commit is contained in:
Benjamin Otte 2019-04-10 03:51:40 +02:00
parent 35f60dc918
commit 207c0b32b4
3 changed files with 7 additions and 26 deletions

View File

@ -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);

View File

@ -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)
{

View File

@ -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);