[gtk/wip/otte/css: 10/30] csssection: Redo constructors
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/css: 10/30] csssection: Redo constructors
- Date: Fri, 12 Apr 2019 03:16:54 +0000 (UTC)
commit aae6df027d24674ca82e2d77886fe5d0e457734f
Author: Benjamin Otte <otte redhat com>
Date: Wed Apr 10 03:51:40 2019 +0200
csssection: Redo constructors
Remove the unused one and rename the old one to new_from_parser().
gtk/gtkcssprovider.c | 6 +++---
gtk/gtkcsssection.c | 23 +++--------------------
gtk/gtkcsssectionprivate.h | 4 +---
3 files changed, 7 insertions(+), 26 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 8f99c79579..37e8338531 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -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);
diff --git a/gtk/gtkcsssection.c b/gtk/gtkcsssection.c
index aab2e4f140..bb5a711625 100644
--- a/gtk/gtkcsssection.c
+++ b/gtk/gtkcsssection.c
@@ -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)
{
diff --git a/gtk/gtkcsssectionprivate.h b/gtk/gtkcsssectionprivate.h
index d59188e8db..a028f20ecd 100644
--- a/gtk/gtkcsssectionprivate.h
+++ b/gtk/gtkcsssectionprivate.h
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]