From ac0f524722ebbd8279c5889874cd0a77b220d9c2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 27 Jan 2021 21:56:12 -0500 Subject: [PATCH 1/7] build: Redo the tools build Move the tools directory to be toplevel, and instead of recompiling sources twice, link them with the our new static libgtk.a. --- gtk/{tools => }/gdkpixbufutils.c | 0 gtk/{tools => }/gtkiconcachevalidator.c | 0 gtk/meson.build | 6 ++---- meson.build | 1 + {gtk/tools => tools}/encodesymbolic.c | 0 {gtk/tools => tools}/gtk-builder-tool-enumerate.c | 0 {gtk/tools => tools}/gtk-builder-tool-preview.c | 0 {gtk/tools => tools}/gtk-builder-tool-simplify.c | 0 {gtk/tools => tools}/gtk-builder-tool-validate.c | 0 {gtk/tools => tools}/gtk-builder-tool.c | 0 {gtk/tools => tools}/gtk-builder-tool.h | 0 {gtk/tools => tools}/gtk-launch.c | 0 {gtk/tools => tools}/gtk-query-settings.c | 0 {gtk/tools => tools}/gtk4builder.its | 0 {gtk/tools => tools}/gtk4builder.loc | 0 {gtk/tools => tools}/gtk4builder.rng | 0 {gtk/tools => tools}/meson.build | 12 +++++++----- {gtk/tools => tools}/updateiconcache.c | 0 18 files changed, 10 insertions(+), 9 deletions(-) rename gtk/{tools => }/gdkpixbufutils.c (100%) rename gtk/{tools => }/gtkiconcachevalidator.c (100%) rename {gtk/tools => tools}/encodesymbolic.c (100%) rename {gtk/tools => tools}/gtk-builder-tool-enumerate.c (100%) rename {gtk/tools => tools}/gtk-builder-tool-preview.c (100%) rename {gtk/tools => tools}/gtk-builder-tool-simplify.c (100%) rename {gtk/tools => tools}/gtk-builder-tool-validate.c (100%) rename {gtk/tools => tools}/gtk-builder-tool.c (100%) rename {gtk/tools => tools}/gtk-builder-tool.h (100%) rename {gtk/tools => tools}/gtk-launch.c (100%) rename {gtk/tools => tools}/gtk-query-settings.c (100%) rename {gtk/tools => tools}/gtk4builder.its (100%) rename {gtk/tools => tools}/gtk4builder.loc (100%) rename {gtk/tools => tools}/gtk4builder.rng (100%) rename {gtk/tools => tools}/meson.build (68%) rename {gtk/tools => tools}/updateiconcache.c (100%) diff --git a/gtk/tools/gdkpixbufutils.c b/gtk/gdkpixbufutils.c similarity index 100% rename from gtk/tools/gdkpixbufutils.c rename to gtk/gdkpixbufutils.c diff --git a/gtk/tools/gtkiconcachevalidator.c b/gtk/gtkiconcachevalidator.c similarity index 100% rename from gtk/tools/gtkiconcachevalidator.c rename to gtk/gtkiconcachevalidator.c diff --git a/gtk/meson.build b/gtk/meson.build index ad9e8be72d..74a0495189 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -15,7 +15,7 @@ gtk_cargs = [ # introspected gtk_private_sources = files([ 'fnmatch.c', - 'tools/gdkpixbufutils.c', + 'gdkpixbufutils.c', 'gsettings-mapping.c', 'gtkaccessibleattributeset.c', 'gtkaccessiblevalue.c', @@ -113,7 +113,7 @@ gtk_private_sources = files([ 'gtkgladecatalog.c', 'gtkhsla.c', 'gtkiconcache.c', - 'tools/gtkiconcachevalidator.c', + 'gtkiconcachevalidator.c', 'gtkiconhelper.c', 'gtkkineticscrolling.c', 'gtkmagnifier.c', @@ -1277,5 +1277,3 @@ libgtk_static_dep = declare_dependency(sources: gtk_dep_sources, link_with: [libgtk_static, libgtk_css, libgdk, libgsk ], link_args: common_ldflags, ) - -subdir('tools') diff --git a/meson.build b/meson.build index d899561a33..3c24e16835 100644 --- a/meson.build +++ b/meson.build @@ -689,6 +689,7 @@ subdir('gtk/css') subdir('gdk') subdir('gsk') subdir('gtk') +subdir('tools') subdir('modules') if get_option('demos') subdir('demos') diff --git a/gtk/tools/encodesymbolic.c b/tools/encodesymbolic.c similarity index 100% rename from gtk/tools/encodesymbolic.c rename to tools/encodesymbolic.c diff --git a/gtk/tools/gtk-builder-tool-enumerate.c b/tools/gtk-builder-tool-enumerate.c similarity index 100% rename from gtk/tools/gtk-builder-tool-enumerate.c rename to tools/gtk-builder-tool-enumerate.c diff --git a/gtk/tools/gtk-builder-tool-preview.c b/tools/gtk-builder-tool-preview.c similarity index 100% rename from gtk/tools/gtk-builder-tool-preview.c rename to tools/gtk-builder-tool-preview.c diff --git a/gtk/tools/gtk-builder-tool-simplify.c b/tools/gtk-builder-tool-simplify.c similarity index 100% rename from gtk/tools/gtk-builder-tool-simplify.c rename to tools/gtk-builder-tool-simplify.c diff --git a/gtk/tools/gtk-builder-tool-validate.c b/tools/gtk-builder-tool-validate.c similarity index 100% rename from gtk/tools/gtk-builder-tool-validate.c rename to tools/gtk-builder-tool-validate.c diff --git a/gtk/tools/gtk-builder-tool.c b/tools/gtk-builder-tool.c similarity index 100% rename from gtk/tools/gtk-builder-tool.c rename to tools/gtk-builder-tool.c diff --git a/gtk/tools/gtk-builder-tool.h b/tools/gtk-builder-tool.h similarity index 100% rename from gtk/tools/gtk-builder-tool.h rename to tools/gtk-builder-tool.h diff --git a/gtk/tools/gtk-launch.c b/tools/gtk-launch.c similarity index 100% rename from gtk/tools/gtk-launch.c rename to tools/gtk-launch.c diff --git a/gtk/tools/gtk-query-settings.c b/tools/gtk-query-settings.c similarity index 100% rename from gtk/tools/gtk-query-settings.c rename to tools/gtk-query-settings.c diff --git a/gtk/tools/gtk4builder.its b/tools/gtk4builder.its similarity index 100% rename from gtk/tools/gtk4builder.its rename to tools/gtk4builder.its diff --git a/gtk/tools/gtk4builder.loc b/tools/gtk4builder.loc similarity index 100% rename from gtk/tools/gtk4builder.loc rename to tools/gtk4builder.loc diff --git a/gtk/tools/gtk4builder.rng b/tools/gtk4builder.rng similarity index 100% rename from gtk/tools/gtk4builder.rng rename to tools/gtk4builder.rng diff --git a/gtk/tools/meson.build b/tools/meson.build similarity index 68% rename from gtk/tools/meson.build rename to tools/meson.build index 8f7a62db17..e93f97d32a 100644 --- a/gtk/tools/meson.build +++ b/tools/meson.build @@ -1,27 +1,29 @@ # Installed tools gtk_tools = [ - ['gtk4-query-settings', ['gtk-query-settings.c']], + ['gtk4-query-settings', ['gtk-query-settings.c'], []], ['gtk4-builder-tool', ['gtk-builder-tool.c', 'gtk-builder-tool-simplify.c', 'gtk-builder-tool-validate.c', 'gtk-builder-tool-enumerate.c', - 'gtk-builder-tool-preview.c']], - ['gtk4-update-icon-cache', ['updateiconcache.c', 'gtkiconcachevalidator.c']], - ['gtk4-encode-symbolic-svg', ['encodesymbolic.c', 'gdkpixbufutils.c']], + 'gtk-builder-tool-preview.c'], [] ], + ['gtk4-update-icon-cache', ['updateiconcache.c'], [ libgtk_static ] ], + ['gtk4-encode-symbolic-svg', ['encodesymbolic.c'], [ libgtk_static ] ], ] if os_unix - gtk_tools += [['gtk4-launch', ['gtk-launch.c']]] + gtk_tools += [['gtk4-launch', ['gtk-launch.c'], []]] endif foreach tool: gtk_tools tool_name = tool.get(0) tool_srcs = tool.get(1) + tool_libs = tool.get(2) exe = executable(tool_name, sources: tool_srcs, include_directories: [confinc], c_args: common_cflags, + link_with: tool_libs, dependencies: libgtk_dep, install: true, ) diff --git a/gtk/tools/updateiconcache.c b/tools/updateiconcache.c similarity index 100% rename from gtk/tools/updateiconcache.c rename to tools/updateiconcache.c From 2d0d5797358b624b8635b5f80089272f142bf096 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 27 Jan 2021 22:21:02 -0500 Subject: [PATCH 2/7] Unify border-spacing handling Avoid using GtkStyleContext unnecessarily, just go to the css node directly. --- gtk/gtkboxlayout.c | 2 +- gtk/gtkcenterlayout.c | 11 ++++++----- gtk/gtkgridlayout.c | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gtk/gtkboxlayout.c b/gtk/gtkboxlayout.c index cb9bf024a0..744f6a7f46 100644 --- a/gtk/gtkboxlayout.c +++ b/gtk/gtkboxlayout.c @@ -25,9 +25,9 @@ #include "gtkorientable.h" #include "gtkprivate.h" #include "gtksizerequest.h" -#include "gtkstylecontextprivate.h" #include "gtktypebuiltins.h" #include "gtkwidgetprivate.h" +#include "gtkcssnodeprivate.h" /** * SECTION:gtkboxlayout diff --git a/gtk/gtkcenterlayout.c b/gtk/gtkcenterlayout.c index b2dee1db0d..c5264ddaf6 100644 --- a/gtk/gtkcenterlayout.c +++ b/gtk/gtkcenterlayout.c @@ -23,8 +23,8 @@ #include "gtklayoutchild.h" #include "gtkprivate.h" #include "gtksizerequest.h" -#include "gtkstylecontextprivate.h" #include "gtkwidgetprivate.h" +#include "gtkcssnodeprivate.h" /** * SECTION:gtkcenterlayout @@ -58,12 +58,13 @@ G_DEFINE_TYPE (GtkCenterLayout, gtk_center_layout, GTK_TYPE_LAYOUT_MANAGER) static int get_spacing (GtkCenterLayout *self, - GtkStyleContext *style_context) + GtkCssNode *node) { + GtkCssStyle *style = gtk_css_node_get_style (node); GtkCssValue *border_spacing; int css_spacing; - border_spacing = _gtk_style_context_peek_property (style_context, GTK_CSS_PROPERTY_BORDER_SPACING); + border_spacing = style->size->border_spacing; if (self->orientation == GTK_ORIENTATION_HORIZONTAL) css_spacing = _gtk_css_position_value_get_x (border_spacing, 100); else @@ -226,7 +227,7 @@ gtk_center_layout_measure_orientation (GtkCenterLayout *self, int spacing; int i; - spacing = get_spacing (self, _gtk_widget_get_style_context (widget)); + spacing = get_spacing (self, gtk_widget_get_css_node (widget)); for (i = 0; i < 3; i ++) { @@ -386,7 +387,7 @@ gtk_center_layout_allocate (GtkLayoutManager *layout_manager, int i; int spacing; - spacing = get_spacing (self, _gtk_widget_get_style_context (widget)); + spacing = get_spacing (self, gtk_widget_get_css_node (widget)); if (self->orientation == GTK_ORIENTATION_HORIZONTAL) { diff --git a/gtk/gtkgridlayout.c b/gtk/gtkgridlayout.c index 77cc7a4e38..3d01787680 100644 --- a/gtk/gtkgridlayout.c +++ b/gtk/gtkgridlayout.c @@ -51,8 +51,8 @@ #include "gtkorientable.h" #include "gtkprivate.h" #include "gtksizerequest.h" -#include "gtkstylecontextprivate.h" #include "gtkwidgetprivate.h" +#include "gtkcssnodeprivate.h" /* {{{ GtkGridLayoutChild */ typedef struct { From 10d5705b70461576c6227d046132a71c5af9f80b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 27 Jan 2021 23:07:55 -0500 Subject: [PATCH 3/7] Reduce use of GtkStyleContext Remove some unnecessary uses of GtkStyleContext where we can directly go to the GtkCssStyle, and and drop unnnecessary includes. --- gtk/gtkbox.c | 1 - gtk/gtkbuiltinicon.c | 9 +++++---- gtk/gtkcalendar.c | 1 - gtk/gtkcheckbutton.c | 2 +- gtk/gtkcolorswatch.c | 1 - gtk/gtkcssinheritvalue.c | 2 +- gtk/gtkcssprovider.c | 1 - gtk/gtkcssshadowvalue.c | 1 - gtk/gtkentry.c | 1 - gtk/gtkexpander.c | 1 - gtk/gtkfilechooserwidget.c | 1 - gtk/gtkfontchooserwidget.c | 1 - gtk/gtkframe.c | 2 -- gtk/gtkgrid.c | 2 +- gtk/gtkiconhelper.c | 1 - gtk/gtkimage.c | 1 - gtk/gtklabel.c | 1 - gtk/gtklevelbar.c | 3 +-- gtk/gtklistbase.c | 1 - gtk/gtkmountoperation.c | 1 - gtk/gtknotebook.c | 1 - gtk/gtkpaned.c | 3 +-- gtk/gtkpasswordentry.c | 2 +- gtk/gtkprogressbar.c | 3 --- gtk/gtkroundedbox.c | 1 - gtk/gtkscale.c | 2 -- gtk/gtkspinbutton.c | 2 -- gtk/gtkspinner.c | 2 +- gtk/gtkswitch.c | 1 - gtk/gtktexthandle.c | 17 +++++++---------- gtk/gtktextutil.c | 5 +---- gtk/gtktextview.c | 12 ++++++------ gtk/gtktreeview.c | 1 - gtk/gtkwidget.c | 1 - gtk/gtkwindow.c | 1 - 35 files changed, 26 insertions(+), 62 deletions(-) diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index 074d98d2a3..d30dbfb8bf 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -67,7 +67,6 @@ #include "gtkprivate.h" #include "gtktypebuiltins.h" #include "gtksizerequest.h" -#include "gtkstylecontextprivate.h" #include "gtkwidgetprivate.h" diff --git a/gtk/gtkbuiltinicon.c b/gtk/gtkbuiltinicon.c index 697b06c387..642b77bd18 100644 --- a/gtk/gtkbuiltinicon.c +++ b/gtk/gtkbuiltinicon.c @@ -20,7 +20,7 @@ #include "config.h" -#include "gtkstylecontextprivate.h" +#include "gtkcssnodeprivate.h" #include "gtkcssnumbervalueprivate.h" #include "gtkbuiltiniconprivate.h" #include "gtkwidgetprivate.h" @@ -80,10 +80,11 @@ gtk_builtin_icon_measure (GtkWidget *widget, int *minimum_baseline, int *natural_baseline) { - GtkCssValue *icon_size; + GtkCssStyle *style; - icon_size = _gtk_style_context_peek_property (gtk_widget_get_style_context (widget), GTK_CSS_PROPERTY_ICON_SIZE); - *minimum = *natural = _gtk_css_number_value_get (icon_size, 100); + style = gtk_css_node_get_style (gtk_widget_get_css_node (widget)); + + *minimum = *natural = _gtk_css_number_value_get (style->icon->icon_size, 100); } static void diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 59e43033f4..7083d15726 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -103,7 +103,6 @@ #include "gtkprivate.h" #include "gtkrendericonprivate.h" #include "gtksnapshot.h" -#include "gtkstylecontextprivate.h" #include "gtkwidgetprivate.h" #include "gtkgestureclick.h" #include "gtkgesturedrag.h" diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c index 78a53579bb..afadecd841 100644 --- a/gtk/gtkcheckbutton.c +++ b/gtk/gtkcheckbutton.c @@ -35,7 +35,7 @@ #include "gtklabel.h" #include "gtkprivate.h" #include "gtkshortcuttrigger.h" -#include "gtkstylecontextprivate.h" +#include "gtkcssnodeprivate.h" #include "gtkwidgetprivate.h" #include "gtkmodelbuttonprivate.h" diff --git a/gtk/gtkcolorswatch.c b/gtk/gtkcolorswatch.c index a451fd827f..00e9195a99 100644 --- a/gtk/gtkcolorswatch.c +++ b/gtk/gtkcolorswatch.c @@ -34,7 +34,6 @@ #include "gtkpopovermenu.h" #include "gtkprivate.h" #include "gtksnapshot.h" -#include "gtkstylecontextprivate.h" #include "gtkwidgetprivate.h" #include "gtkeventcontrollerkey.h" #include "gtknative.h" diff --git a/gtk/gtkcssinheritvalue.c b/gtk/gtkcssinheritvalue.c index e17482afb9..691e43d2f6 100644 --- a/gtk/gtkcssinheritvalue.c +++ b/gtk/gtkcssinheritvalue.c @@ -20,7 +20,7 @@ #include "gtkcssinheritvalueprivate.h" #include "gtkcssinitialvalueprivate.h" -#include "gtkstylecontextprivate.h" +#include "gtkcssstyleprivate.h" struct _GtkCssValue { GTK_CSS_VALUE_BASE diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index ebbc1a165a..7044dd7b03 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -30,7 +30,6 @@ #include "gtkcssshorthandpropertyprivate.h" #include "gtksettingsprivate.h" #include "gtkstyleprovider.h" -#include "gtkstylecontextprivate.h" #include "gtkstylepropertyprivate.h" #include "gtkstyleproviderprivate.h" #include "gtkmarshalers.h" diff --git a/gtk/gtkcssshadowvalue.c b/gtk/gtkcssshadowvalue.c index f66d34205f..19314662e3 100644 --- a/gtk/gtkcssshadowvalue.c +++ b/gtk/gtkcssshadowvalue.c @@ -25,7 +25,6 @@ #include "gtkcssnumbervalueprivate.h" #include "gtkcsscolorvalueprivate.h" #include "gtksnapshotprivate.h" -#include "gtkstylecontextprivate.h" #include "gtkpango.h" #include "gsk/gskcairoblurprivate.h" diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 2626a2ffc7..791886cced 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -54,7 +54,6 @@ #include "gtkprogressbar.h" #include "gtksettings.h" #include "gtksnapshot.h" -#include "gtkstylecontextprivate.h" #include "gtktextprivate.h" #include "gtktexthandleprivate.h" #include "gtktextutil.h" diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c index 16adad8f44..d7fb46b4d0 100644 --- a/gtk/gtkexpander.c +++ b/gtk/gtkexpander.c @@ -127,7 +127,6 @@ #include "gtkmarshalers.h" #include "gtkmain.h" #include "gtkprivate.h" -#include "gtkstylecontextprivate.h" #include "gtkwidgetprivate.h" #include diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 18d4033892..5674d3cbda 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -66,7 +66,6 @@ #include "gtkshow.h" #include "gtkmain.h" #include "gtkscrollable.h" -#include "gtkstylecontextprivate.h" #include "gtkpopover.h" #include "gtkrevealer.h" #include "gtkspinner.h" diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index 62b0320049..3fef81ea55 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -45,7 +45,6 @@ #include "gtkscrolledwindow.h" #include "gtksearchentry.h" #include "gtkspinbutton.h" -#include "gtkstylecontextprivate.h" #include "gtktextview.h" #include "gtkwidgetprivate.h" #include "gtksettings.h" diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c index 10b9c818d4..25570c7616 100644 --- a/gtk/gtkframe.c +++ b/gtk/gtkframe.c @@ -31,8 +31,6 @@ #include "gtkintl.h" #include "gtkbuildable.h" #include "gtkwidgetprivate.h" -#include "gtkstylecontextprivate.h" -#include "gtkcssstylepropertyprivate.h" #include "gtklabel.h" /** diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c index 4f8d35492e..f5909b7f2f 100644 --- a/gtk/gtkgrid.c +++ b/gtk/gtkgrid.c @@ -29,7 +29,7 @@ #include "gtkorientable.h" #include "gtkprivate.h" #include "gtksizerequest.h" -#include "gtkstylecontextprivate.h" +#include "gtkcssnodeprivate.h" #include "gtkwidgetprivate.h" diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c index 54b06396f6..e4ff62a3c1 100644 --- a/gtk/gtkiconhelper.c +++ b/gtk/gtkiconhelper.c @@ -26,7 +26,6 @@ #include "gtkcssenumvalueprivate.h" #include "gtkcssnumbervalueprivate.h" #include "gtkcssstyleprivate.h" -#include "gtkcssstylepropertyprivate.h" #include "gtkcsstransientnodeprivate.h" #include "gtkiconthemeprivate.h" #include "gtkrendericonprivate.h" diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index 5c53a5ede1..4cbc1fd2fa 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -26,7 +26,6 @@ #include "gtkimageprivate.h" -#include "gtkcssstylepropertyprivate.h" #include "gtkiconhelperprivate.h" #include "gtkicontheme.h" #include "gtkintl.h" diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index d520fa0e8e..389a193bc1 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -28,7 +28,6 @@ #include "gtkbuildable.h" #include "gtkbuilderprivate.h" -#include "gtkcssstylepropertyprivate.h" #include "gtkeventcontrollermotion.h" #include "gtkeventcontrollerfocus.h" #include "gtkgesturedrag.h" diff --git a/gtk/gtklevelbar.c b/gtk/gtklevelbar.c index a62968b3f1..a44ad4a4e1 100644 --- a/gtk/gtklevelbar.c +++ b/gtk/gtklevelbar.c @@ -124,13 +124,12 @@ #include "gtkbinlayout.h" #include "gtkbuildable.h" #include "gtkbuilderprivate.h" -#include "gtkcssstylepropertyprivate.h" #include "gtkgizmoprivate.h" #include "gtkintl.h" #include "gtklevelbar.h" #include "gtkmarshalers.h" #include "gtkorientable.h" -#include "gtkstylecontextprivate.h" +#include "gtkcssnodeprivate.h" #include "gtktypebuiltins.h" #include "gtkwidgetprivate.h" diff --git a/gtk/gtklistbase.c b/gtk/gtklistbase.c index ed4f84ad2a..ccb9ad23a5 100644 --- a/gtk/gtklistbase.c +++ b/gtk/gtklistbase.c @@ -34,7 +34,6 @@ #include "gtkscrollable.h" #include "gtksingleselection.h" #include "gtksnapshot.h" -#include "gtkstylecontextprivate.h" #include "gtktypebuiltins.h" #include "gtkwidgetprivate.h" diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c index ae38e671a2..f5380863bd 100644 --- a/gtk/gtkmountoperation.c +++ b/gtk/gtkmountoperation.c @@ -49,7 +49,6 @@ #include "gtkicontheme.h" #include "gtkmain.h" #include "gtksettings.h" -#include "gtkstylecontextprivate.h" #include "gtkdialogprivate.h" #include "gtkgestureclick.h" #include "gtkmodelbuttonprivate.h" diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index bad99cdddc..ac1dbd88fe 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -31,7 +31,6 @@ #include "gtkboxlayout.h" #include "gtkbuildable.h" #include "gtkbutton.h" -#include "gtkcssstylepropertyprivate.h" #include "gtkdroptarget.h" #include "gtkdragicon.h" #include "gtkdropcontrollermotion.h" diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index fccdacd3c0..c15dab86d9 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -27,7 +27,6 @@ #include "gtkpaned.h" #include "gtkcssboxesprivate.h" -#include "gtkcssstylepropertyprivate.h" #include "gtkeventcontrollermotion.h" #include "gtkgesturepan.h" #include "gtkgesturesingle.h" @@ -37,7 +36,7 @@ #include "gtkorientable.h" #include "gtkprivate.h" #include "gtkrendericonprivate.h" -#include "gtkstylecontextprivate.h" +#include "gtkcssnodeprivate.h" #include "gtktypebuiltins.h" #include "gtkwidgetprivate.h" #include "gtkcssboxesprivate.h" diff --git a/gtk/gtkpasswordentry.c b/gtk/gtkpasswordentry.c index 36b2a187ec..28ea5f24e7 100644 --- a/gtk/gtkpasswordentry.c +++ b/gtk/gtkpasswordentry.c @@ -35,7 +35,7 @@ #include "gtkprivate.h" #include "gtkwidgetprivate.h" #include "gtkcsspositionvalueprivate.h" -#include "gtkstylecontextprivate.h" +#include "gtkcssnodeprivate.h" /** diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c index 30a91d447c..417c4538a0 100644 --- a/gtk/gtkprogressbar.c +++ b/gtk/gtkprogressbar.c @@ -27,15 +27,12 @@ #include "gtkprogressbar.h" #include "gtkboxlayout.h" -#include "gtkcssnumbervalueprivate.h" -#include "gtkcssstylepropertyprivate.h" #include "gtkgizmoprivate.h" #include "gtkintl.h" #include "gtklabel.h" #include "gtkorientable.h" #include "gtkprogresstrackerprivate.h" #include "gtkprivate.h" -#include "gtkstylecontextprivate.h" #include "gtkwidgetprivate.h" #include diff --git a/gtk/gtkroundedbox.c b/gtk/gtkroundedbox.c index 9ea6782573..172f58c4d5 100644 --- a/gtk/gtkroundedbox.c +++ b/gtk/gtkroundedbox.c @@ -22,7 +22,6 @@ #include "gtkcsscornervalueprivate.h" #include "gtkcssnumbervalueprivate.h" #include "gtkcsstypesprivate.h" -#include "gtkstylecontextprivate.h" #include diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index b4c2490319..4a38c5d213 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -38,8 +38,6 @@ #include "gtkorientable.h" #include "gtkprivate.h" #include "gtkrangeprivate.h" -#include "gtkstylecontextprivate.h" -#include "gtkstylepropertyprivate.h" #include "gtktypebuiltins.h" #include "gtkwidgetprivate.h" diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 7ebe279677..88ae86ad97 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -36,7 +36,6 @@ #include "gtkbox.h" #include "gtkbutton.h" #include "gtkbuttonprivate.h" -#include "gtkcssstylepropertyprivate.h" #include "gtkeditable.h" #include "gtkcelleditable.h" #include "gtkimage.h" @@ -53,7 +52,6 @@ #include "gtkorientable.h" #include "gtkprivate.h" #include "gtksettings.h" -#include "gtkstylecontextprivate.h" #include "gtktypebuiltins.h" #include "gtkwidgetprivate.h" #include "gtkboxlayout.h" diff --git a/gtk/gtkspinner.c b/gtk/gtkspinner.c index 3cf970eab1..3784da40ed 100644 --- a/gtk/gtkspinner.c +++ b/gtk/gtkspinner.c @@ -34,7 +34,7 @@ #include "gtkimage.h" #include "gtkintl.h" #include "gtkprivate.h" -#include "gtkstylecontextprivate.h" +#include "gtkcssnodeprivate.h" #include "gtkwidgetprivate.h" #include "gtkcssnumbervalueprivate.h" #include "gtkrendericonprivate.h" diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c index cff20c9aa8..d7a8e3a44b 100644 --- a/gtk/gtkswitch.c +++ b/gtk/gtkswitch.c @@ -70,7 +70,6 @@ #include "gtkprivate.h" #include "gtkprogresstrackerprivate.h" #include "gtksettingsprivate.h" -#include "gtkstylecontextprivate.h" #include "gtkwidgetprivate.h" typedef struct _GtkSwitchClass GtkSwitchClass; diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c index 73bd8d5bcc..33bbc6bf42 100644 --- a/gtk/gtktexthandle.c +++ b/gtk/gtktexthandle.c @@ -26,8 +26,7 @@ #include "gtkwidgetprivate.h" #include "gtkrendericonprivate.h" #include "gtkcssboxesimplprivate.h" -#include "gtkcssnumbervalueprivate.h" -#include "gtkstylecontextprivate.h" +#include "gtkcssnodeprivate.h" #include "gtknativeprivate.h" #include "gtkintl.h" @@ -110,17 +109,15 @@ gtk_text_handle_native_get_surface_transform (GtkNative *native, static void gtk_text_handle_get_padding (GtkTextHandle *handle, - GtkBorder *border) + GtkBorder *padding) { GtkWidget *widget = GTK_WIDGET (handle); - GtkStyleContext *context; + GtkCssStyle *style = gtk_css_node_get_style (gtk_widget_get_css_node (widget)); - context = gtk_widget_get_style_context (widget); - - border->left = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_PADDING_LEFT), 100); - border->right = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_PADDING_RIGHT), 100); - border->top = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_PADDING_TOP), 100); - border->bottom = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_PADDING_BOTTOM), 100); + padding->left = _gtk_css_number_value_get (style->size->padding_left, 100); + padding->right = _gtk_css_number_value_get (style->size->padding_right, 100); + padding->top = _gtk_css_number_value_get (style->size->padding_top, 100); + padding->bottom = _gtk_css_number_value_get (style->size->padding_bottom, 100); } static void diff --git a/gtk/gtktextutil.c b/gtk/gtktextutil.c index 3fdb2bc4be..74b3f5cc59 100644 --- a/gtk/gtktextutil.c +++ b/gtk/gtktextutil.c @@ -34,7 +34,6 @@ #include "gtkintl.h" #include "gtkwidgetprivate.h" #include "gtkcssstyleprivate.h" -#include "gtkstylepropertyprivate.h" #include "gtkcsscolorvalueprivate.h" #define DRAG_ICON_MAX_WIDTH 250 @@ -165,7 +164,6 @@ set_attributes_from_style (GtkWidget *widget, GtkTextAttributes *values) { GtkCssStyle *style; - GtkStyleContext *context; const GdkRGBA black = { 0, }; if (!values->appearance.bg_rgba) @@ -173,8 +171,7 @@ set_attributes_from_style (GtkWidget *widget, if (!values->appearance.fg_rgba) values->appearance.fg_rgba = gdk_rgba_copy (&black); - context = gtk_widget_get_style_context (widget); - style = gtk_style_context_lookup_style (context); + style = gtk_css_node_get_style (gtk_widget_get_css_node (widget)); *values->appearance.bg_rgba = *gtk_css_color_value_get_rgba (style->background->background_color); *values->appearance.fg_rgba = *gtk_css_color_value_get_rgba (style->core->color); diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 5a4ad33e2a..6f0bdb18bc 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -48,7 +48,7 @@ #include "gtktypebuiltins.h" #include "gtktextviewchildprivate.h" #include "gtktexthandleprivate.h" -#include "gtkcssstylepropertyprivate.h" +#include "gtkstylecontextprivate.h" #include "gtkpopover.h" #include "gtkmagnifierprivate.h" #include "gtkemojichooser.h" @@ -7491,7 +7491,7 @@ static void gtk_text_view_set_attributes_from_style (GtkTextView *text_view, GtkTextAttributes *values) { - GtkStyleContext *context; + GtkCssStyle *style; const GdkRGBA black = { 0, }; const GdkRGBA *color; @@ -7500,17 +7500,17 @@ gtk_text_view_set_attributes_from_style (GtkTextView *text_view, if (!values->appearance.fg_rgba) values->appearance.fg_rgba = gdk_rgba_copy (&black); - context = gtk_widget_get_style_context (GTK_WIDGET (text_view)); + style = gtk_css_node_get_style (gtk_widget_get_css_node (GTK_WIDGET (text_view))); - color = gtk_css_color_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BACKGROUND_COLOR)); + color = gtk_css_color_value_get_rgba (style->background->background_color); *values->appearance.bg_rgba = *color; - color = gtk_css_color_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_COLOR)); + color = gtk_css_color_value_get_rgba (style->core->color); *values->appearance.fg_rgba = *color; if (values->font) pango_font_description_free (values->font); - values->font = gtk_css_style_get_pango_font (gtk_style_context_lookup_style (context)); + values->font = gtk_css_style_get_pango_font (style); } static void diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 267c90b4fa..f6ed73b689 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -28,7 +28,6 @@ #include "gtkcellrenderer.h" #include "gtkcssnumbervalueprivate.h" #include "gtkcsscolorvalueprivate.h" -#include "gtkcssstylepropertyprivate.h" #include "gtkdragsource.h" #include "gtkdragicon.h" #include "gtkdroptargetasync.h" diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 52f5833f0e..3168091367 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -39,7 +39,6 @@ #include "gtkcsspositionvalueprivate.h" #include "gtkcssfontvariationsvalueprivate.h" #include "gtkcssnumbervalueprivate.h" -#include "gtkcssstylepropertyprivate.h" #include "gtkcsswidgetnodeprivate.h" #include "gtkdebug.h" #include "gtkgesturedrag.h" diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 91f6d46989..30f310197a 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -36,7 +36,6 @@ #include "gtkcsscornervalueprivate.h" #include "gtkcsscolorvalueprivate.h" #include "gtkcssshadowvalueprivate.h" -#include "gtkcssstylepropertyprivate.h" #include "gtkdroptargetasync.h" #include "gtkeventcontrollerlegacy.h" #include "gtkeventcontrollerkey.h" From 1ac9400712909bbc657f5a57f81deaab20aa8cf7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 27 Jan 2021 23:28:36 -0500 Subject: [PATCH 4/7] Drop unused logo resource The inspector no longer sets a window icon. --- gtk/gen-gtk-gresources-xml.py | 1 - gtk/inspector/logo.png | Bin 2640 -> 0 bytes tests/testentryicons.c | 2 +- 3 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 gtk/inspector/logo.png diff --git a/gtk/gen-gtk-gresources-xml.py b/gtk/gen-gtk-gresources-xml.py index 3f08c60e80..8072eee9f4 100644 --- a/gtk/gen-gtk-gresources-xml.py +++ b/gtk/gen-gtk-gresources-xml.py @@ -86,7 +86,6 @@ for f in get_files('inspector', '.ui'): xml += ' inspector/{0}\n'.format(f) xml += ''' - inspector/logo.png inspector/inspector.css emoji/en.data diff --git a/gtk/inspector/logo.png b/gtk/inspector/logo.png deleted file mode 100644 index d35178859b78d8ac87a590612f8aa52c3c7bb334..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2640 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 Date: Wed, 27 Jan 2021 23:34:06 -0500 Subject: [PATCH 5/7] Move the gesture icons in the right place Put these images into gtk/icons, where they belong. --- gtk/gen-gtk-gresources-xml.py | 7 +------ .../actions}/gesture-pinch-symbolic.symbolic.png | Bin ...sture-rotate-anticlockwise-symbolic.symbolic.png | Bin .../gesture-rotate-clockwise-symbolic.symbolic.png | Bin .../actions}/gesture-stretch-symbolic.symbolic.png | Bin .../gesture-swipe-left-symbolic.symbolic.png | Bin .../gesture-swipe-right-symbolic.symbolic.png | Bin ...ture-two-finger-swipe-left-symbolic.symbolic.png | Bin ...ure-two-finger-swipe-right-symbolic.symbolic.png | Bin .../scalable/actions}/gesture-pinch-symbolic.svg | 0 .../gesture-rotate-anticlockwise-symbolic.svg | 0 .../actions}/gesture-rotate-clockwise-symbolic.svg | 0 .../scalable/actions}/gesture-stretch-symbolic.svg | 0 .../actions}/gesture-swipe-left-symbolic.svg | 0 .../actions}/gesture-swipe-right-symbolic.svg | 0 .../gesture-two-finger-swipe-left-symbolic.svg | 0 .../gesture-two-finger-swipe-right-symbolic.svg | 0 17 files changed, 1 insertion(+), 6 deletions(-) rename gtk/{gesture => icons/64x64/actions}/gesture-pinch-symbolic.symbolic.png (100%) rename gtk/{gesture => icons/64x64/actions}/gesture-rotate-anticlockwise-symbolic.symbolic.png (100%) rename gtk/{gesture => icons/64x64/actions}/gesture-rotate-clockwise-symbolic.symbolic.png (100%) rename gtk/{gesture => icons/64x64/actions}/gesture-stretch-symbolic.symbolic.png (100%) rename gtk/{gesture => icons/64x64/actions}/gesture-swipe-left-symbolic.symbolic.png (100%) rename gtk/{gesture => icons/64x64/actions}/gesture-swipe-right-symbolic.symbolic.png (100%) rename gtk/{gesture => icons/64x64/actions}/gesture-two-finger-swipe-left-symbolic.symbolic.png (100%) rename gtk/{gesture => icons/64x64/actions}/gesture-two-finger-swipe-right-symbolic.symbolic.png (100%) rename gtk/{gesture => icons/scalable/actions}/gesture-pinch-symbolic.svg (100%) rename gtk/{gesture => icons/scalable/actions}/gesture-rotate-anticlockwise-symbolic.svg (100%) rename gtk/{gesture => icons/scalable/actions}/gesture-rotate-clockwise-symbolic.svg (100%) rename gtk/{gesture => icons/scalable/actions}/gesture-stretch-symbolic.svg (100%) rename gtk/{gesture => icons/scalable/actions}/gesture-swipe-left-symbolic.svg (100%) rename gtk/{gesture => icons/scalable/actions}/gesture-swipe-right-symbolic.svg (100%) rename gtk/{gesture => icons/scalable/actions}/gesture-two-finger-swipe-left-symbolic.svg (100%) rename gtk/{gesture => icons/scalable/actions}/gesture-two-finger-swipe-right-symbolic.svg (100%) diff --git a/gtk/gen-gtk-gresources-xml.py b/gtk/gen-gtk-gresources-xml.py index 8072eee9f4..0404bef758 100644 --- a/gtk/gen-gtk-gresources-xml.py +++ b/gtk/gen-gtk-gresources-xml.py @@ -63,17 +63,12 @@ xml += '\n' for f in get_files('theme/HighContrast/assets', '.svg'): xml += ' theme/HighContrast/assets/{0}\n'.format(f) -for f in get_files('gesture', '.symbolic.png'): - xml += ' gesture/{0}\n'.format(f) - -xml += '\n' - for f in get_files('ui', '.ui'): xml += ' ui/{0}\n'.format(f) xml += '\n' -for s in ['16x16', '24x24', '32x32', '48x48', 'scalable']: +for s in ['16x16', '32x32', '64x64', 'scalable']: for c in ['actions', 'categories', 'emblems', 'emotes', 'devices', 'mimetypes', 'places', 'status']: icons_dir = 'icons/{0}/{1}'.format(s,c) if os.path.exists(os.path.join(srcdir,icons_dir)): diff --git a/gtk/gesture/gesture-pinch-symbolic.symbolic.png b/gtk/icons/64x64/actions/gesture-pinch-symbolic.symbolic.png similarity index 100% rename from gtk/gesture/gesture-pinch-symbolic.symbolic.png rename to gtk/icons/64x64/actions/gesture-pinch-symbolic.symbolic.png diff --git a/gtk/gesture/gesture-rotate-anticlockwise-symbolic.symbolic.png b/gtk/icons/64x64/actions/gesture-rotate-anticlockwise-symbolic.symbolic.png similarity index 100% rename from gtk/gesture/gesture-rotate-anticlockwise-symbolic.symbolic.png rename to gtk/icons/64x64/actions/gesture-rotate-anticlockwise-symbolic.symbolic.png diff --git a/gtk/gesture/gesture-rotate-clockwise-symbolic.symbolic.png b/gtk/icons/64x64/actions/gesture-rotate-clockwise-symbolic.symbolic.png similarity index 100% rename from gtk/gesture/gesture-rotate-clockwise-symbolic.symbolic.png rename to gtk/icons/64x64/actions/gesture-rotate-clockwise-symbolic.symbolic.png diff --git a/gtk/gesture/gesture-stretch-symbolic.symbolic.png b/gtk/icons/64x64/actions/gesture-stretch-symbolic.symbolic.png similarity index 100% rename from gtk/gesture/gesture-stretch-symbolic.symbolic.png rename to gtk/icons/64x64/actions/gesture-stretch-symbolic.symbolic.png diff --git a/gtk/gesture/gesture-swipe-left-symbolic.symbolic.png b/gtk/icons/64x64/actions/gesture-swipe-left-symbolic.symbolic.png similarity index 100% rename from gtk/gesture/gesture-swipe-left-symbolic.symbolic.png rename to gtk/icons/64x64/actions/gesture-swipe-left-symbolic.symbolic.png diff --git a/gtk/gesture/gesture-swipe-right-symbolic.symbolic.png b/gtk/icons/64x64/actions/gesture-swipe-right-symbolic.symbolic.png similarity index 100% rename from gtk/gesture/gesture-swipe-right-symbolic.symbolic.png rename to gtk/icons/64x64/actions/gesture-swipe-right-symbolic.symbolic.png diff --git a/gtk/gesture/gesture-two-finger-swipe-left-symbolic.symbolic.png b/gtk/icons/64x64/actions/gesture-two-finger-swipe-left-symbolic.symbolic.png similarity index 100% rename from gtk/gesture/gesture-two-finger-swipe-left-symbolic.symbolic.png rename to gtk/icons/64x64/actions/gesture-two-finger-swipe-left-symbolic.symbolic.png diff --git a/gtk/gesture/gesture-two-finger-swipe-right-symbolic.symbolic.png b/gtk/icons/64x64/actions/gesture-two-finger-swipe-right-symbolic.symbolic.png similarity index 100% rename from gtk/gesture/gesture-two-finger-swipe-right-symbolic.symbolic.png rename to gtk/icons/64x64/actions/gesture-two-finger-swipe-right-symbolic.symbolic.png diff --git a/gtk/gesture/gesture-pinch-symbolic.svg b/gtk/icons/scalable/actions/gesture-pinch-symbolic.svg similarity index 100% rename from gtk/gesture/gesture-pinch-symbolic.svg rename to gtk/icons/scalable/actions/gesture-pinch-symbolic.svg diff --git a/gtk/gesture/gesture-rotate-anticlockwise-symbolic.svg b/gtk/icons/scalable/actions/gesture-rotate-anticlockwise-symbolic.svg similarity index 100% rename from gtk/gesture/gesture-rotate-anticlockwise-symbolic.svg rename to gtk/icons/scalable/actions/gesture-rotate-anticlockwise-symbolic.svg diff --git a/gtk/gesture/gesture-rotate-clockwise-symbolic.svg b/gtk/icons/scalable/actions/gesture-rotate-clockwise-symbolic.svg similarity index 100% rename from gtk/gesture/gesture-rotate-clockwise-symbolic.svg rename to gtk/icons/scalable/actions/gesture-rotate-clockwise-symbolic.svg diff --git a/gtk/gesture/gesture-stretch-symbolic.svg b/gtk/icons/scalable/actions/gesture-stretch-symbolic.svg similarity index 100% rename from gtk/gesture/gesture-stretch-symbolic.svg rename to gtk/icons/scalable/actions/gesture-stretch-symbolic.svg diff --git a/gtk/gesture/gesture-swipe-left-symbolic.svg b/gtk/icons/scalable/actions/gesture-swipe-left-symbolic.svg similarity index 100% rename from gtk/gesture/gesture-swipe-left-symbolic.svg rename to gtk/icons/scalable/actions/gesture-swipe-left-symbolic.svg diff --git a/gtk/gesture/gesture-swipe-right-symbolic.svg b/gtk/icons/scalable/actions/gesture-swipe-right-symbolic.svg similarity index 100% rename from gtk/gesture/gesture-swipe-right-symbolic.svg rename to gtk/icons/scalable/actions/gesture-swipe-right-symbolic.svg diff --git a/gtk/gesture/gesture-two-finger-swipe-left-symbolic.svg b/gtk/icons/scalable/actions/gesture-two-finger-swipe-left-symbolic.svg similarity index 100% rename from gtk/gesture/gesture-two-finger-swipe-left-symbolic.svg rename to gtk/icons/scalable/actions/gesture-two-finger-swipe-left-symbolic.svg diff --git a/gtk/gesture/gesture-two-finger-swipe-right-symbolic.svg b/gtk/icons/scalable/actions/gesture-two-finger-swipe-right-symbolic.svg similarity index 100% rename from gtk/gesture/gesture-two-finger-swipe-right-symbolic.svg rename to gtk/icons/scalable/actions/gesture-two-finger-swipe-right-symbolic.svg From 38e2f9138daf4b5f029b7360ca65506a8e79f674 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 27 Jan 2021 23:36:55 -0500 Subject: [PATCH 6/7] Remove vestigial glade support These files have not been kept up to date, and glade doesn't work with GTK4 currently. --- gtk/glade/README.glade | 17 ---------- gtk/glade/gtk-private-widgets.xml | 33 ------------------ gtk/gtkgladecatalog.c | 56 ------------------------------- gtk/meson.build | 1 - 4 files changed, 107 deletions(-) delete mode 100644 gtk/glade/README.glade delete mode 100644 gtk/glade/gtk-private-widgets.xml delete mode 100644 gtk/gtkgladecatalog.c diff --git a/gtk/glade/README.glade b/gtk/glade/README.glade deleted file mode 100644 index 4790294a07..0000000000 --- a/gtk/glade/README.glade +++ /dev/null @@ -1,17 +0,0 @@ -The catalog in this directory defines some widgets that are private -to GTK and is needed to edit .ui files defining composite classes -in GTK. - -In order to edit any composite classes in GTK, startup Glade -in the following way, example: - - cd /path/to/gtk/ - GLADE_CATALOG_SEARCH_PATH=`pwd`/gtk/glade glade gtk/ui/gtkfilechooserwidget.ui - -Documentation for updating this catalog can be found here: - https://developer.gnome.org/gladeui/stable/ - -Note also that when including private GTK widgets as components, it is -important to call g_type_ensure () to register the type explicitly -before calling gtk_container_init_template(), otherwise GtkBuilder will -not be able to properly load the type. diff --git a/gtk/glade/gtk-private-widgets.xml b/gtk/glade/gtk-private-widgets.xml deleted file mode 100644 index 7e2ca72b81..0000000000 --- a/gtk/glade/gtk-private-widgets.xml +++ /dev/null @@ -1,33 +0,0 @@ - - gtk_glade_catalog_init - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gtk/gtkgladecatalog.c b/gtk/gtkgladecatalog.c deleted file mode 100644 index a44a120767..0000000000 --- a/gtk/gtkgladecatalog.c +++ /dev/null @@ -1,56 +0,0 @@ -/* gtkgladecatalog.c - * - * Copyright (C) 2013 Openismus GmbH - * - * Authors: - * Tristan Van Berkom - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library. If not, see . - */ - - -#include "config.h" - -#include "gtkpathbar.h" -#include "gtkplacesviewprivate.h" -#include "gtkcolorswatchprivate.h" -#include "gtkcolorplaneprivate.h" -#include "gtkcolorscaleprivate.h" -#include "gtkcoloreditorprivate.h" - -#ifdef G_OS_UNIX -# include "gtkprinteroptionwidget.h" -#endif - -_GDK_EXTERN -void gtk_glade_catalog_init (const char *catalog_name); - -/* This function is referred to in gtk/glade/gtk-private-widgets.xml - * and is used to ensure the private types for use in Glade while - * editing UI files that define GTK’s various composite widget classes. - */ -void -gtk_glade_catalog_init (const char *catalog_name) -{ - g_type_ensure (GTK_TYPE_PATH_BAR); - g_type_ensure (GTK_TYPE_PLACES_VIEW); - g_type_ensure (GTK_TYPE_COLOR_SWATCH); - g_type_ensure (GTK_TYPE_COLOR_PLANE); - g_type_ensure (GTK_TYPE_COLOR_SCALE); - g_type_ensure (GTK_TYPE_COLOR_EDITOR); - -#ifdef G_OS_UNIX - g_type_ensure (GTK_TYPE_PRINTER_OPTION_WIDGET); -#endif -} diff --git a/gtk/meson.build b/gtk/meson.build index 74a0495189..c1b2186e89 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -110,7 +110,6 @@ gtk_private_sources = files([ 'gtkfilechooserutils.c', 'gtkfilesystemmodel.c', 'gtkgizmo.c', - 'gtkgladecatalog.c', 'gtkhsla.c', 'gtkiconcache.c', 'gtkiconcachevalidator.c', From 98c247ec29b38ab83b772baf1036bd758d7b75c6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 28 Jan 2021 00:01:35 -0500 Subject: [PATCH 7/7] label: Drop some unused includes --- gtk/gtklabel.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 389a193bc1..9e8fe679a7 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -27,15 +27,12 @@ #include "gtklabelprivate.h" #include "gtkbuildable.h" -#include "gtkbuilderprivate.h" #include "gtkeventcontrollermotion.h" #include "gtkeventcontrollerfocus.h" #include "gtkgesturedrag.h" #include "gtkgestureclick.h" #include "gtkgesturesingle.h" -#include "gtkimage.h" #include "gtkintl.h" -#include "gtkmain.h" #include "gtkmarshalers.h" #include "gtknotebook.h" #include "gtkpango.h" @@ -50,7 +47,6 @@ #include "gtktooltip.h" #include "gtktypebuiltins.h" #include "gtkwidgetprivate.h" -#include "gtkwindow.h" #include "gtkpopovermenu.h" #include "gtknative.h" #include "gtkdragsource.h"