From 99099a10532659f2d8c198960110000aabdea124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 20 Jun 2018 14:56:35 +0200 Subject: [PATCH] Remove some unnecessary snapshot implementations --- gtk/gtkaccellabel.c | 15 +-------------- gtk/gtkfilechooserwidget.c | 11 ----------- gtk/gtkfontchooserwidget.c | 11 ----------- gtk/gtklevelbar.c | 11 ----------- gtk/gtknotebook.c | 13 ------------- gtk/inspector/gtkstackcombo.c | 10 ---------- 6 files changed, 1 insertion(+), 70 deletions(-) diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c index f2efe9e1fa..e8945124e9 100644 --- a/gtk/gtkaccellabel.c +++ b/gtk/gtkaccellabel.c @@ -35,7 +35,6 @@ #include "gtkmain.h" #include "gtkprivate.h" #include "gtksizerequest.h" -#include "gtksnapshot.h" #include "gtkstylecontextprivate.h" #include "gtkwidgetprivate.h" #include "gtkcssnodeprivate.h" @@ -148,8 +147,7 @@ static void gtk_accel_label_get_property (GObject *object, GParamSpec *pspec); static void gtk_accel_label_destroy (GtkWidget *widget); static void gtk_accel_label_finalize (GObject *object); -static void gtk_accel_label_snapshot (GtkWidget *widget, - GtkSnapshot *snapshot); + static void gtk_accel_label_measure (GtkWidget *widget, GtkOrientation orientation, int for_size, @@ -184,7 +182,6 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class) widget_class->measure = gtk_accel_label_measure; widget_class->size_allocate = gtk_accel_label_size_allocate; - widget_class->snapshot = gtk_accel_label_snapshot; widget_class->destroy = gtk_accel_label_destroy; gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_ACCEL_LABEL); @@ -442,16 +439,6 @@ gtk_accel_label_measure (GtkWidget *widget, minimum_baseline, natural_baseline); } -static void -gtk_accel_label_snapshot (GtkWidget *widget, - GtkSnapshot *snapshot) -{ - GtkAccelLabel *accel_label = GTK_ACCEL_LABEL (widget); - GtkAccelLabelPrivate *priv = gtk_accel_label_get_instance_private (accel_label); - - gtk_widget_snapshot_child (widget, priv->box, snapshot); -} - static void refetch_widget_accel_closure (GtkAccelLabel *accel_label) { diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 458b977e07..e8c6ae74cd 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -7934,16 +7934,6 @@ gtk_file_chooser_widget_measure (GtkWidget *widget, minimum_baseline, natural_baseline); } -static void -gtk_file_chooser_widget_snapshot (GtkWidget *widget, - GtkSnapshot *snapshot) -{ - GtkFileChooserWidget *self = GTK_FILE_CHOOSER_WIDGET (widget); - GtkFileChooserWidgetPrivate *priv = gtk_file_chooser_widget_get_instance_private (self); - - gtk_widget_snapshot_child (widget, priv->box, snapshot); -} - static void gtk_file_chooser_widget_size_allocate (GtkWidget *widget, const GtkAllocation *allocation, @@ -7985,7 +7975,6 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class) widget_class->event = gtk_file_chooser_widget_event; widget_class->measure = gtk_file_chooser_widget_measure; widget_class->size_allocate = gtk_file_chooser_widget_size_allocate; - widget_class->snapshot = gtk_file_chooser_widget_snapshot; /* * Signals diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index 3932bf9626..6b161f084c 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -646,16 +646,6 @@ gtk_font_chooser_widget_measure (GtkWidget *widget, minimum_baseline, natural_baseline); } -static void -gtk_font_chooser_widget_snapshot (GtkWidget *widget, - GtkSnapshot *snapshot) -{ - GtkFontChooserWidget *self = GTK_FONT_CHOOSER_WIDGET (widget); - GtkFontChooserWidgetPrivate *priv = gtk_font_chooser_widget_get_instance_private (self); - - gtk_widget_snapshot_child (widget, priv->stack, snapshot); -} - static void gtk_font_chooser_widget_size_allocate (GtkWidget *widget, const GtkAllocation *allocation, @@ -697,7 +687,6 @@ gtk_font_chooser_widget_class_init (GtkFontChooserWidgetClass *klass) widget_class->display_changed = gtk_font_chooser_widget_display_changed; widget_class->measure = gtk_font_chooser_widget_measure; widget_class->size_allocate = gtk_font_chooser_widget_size_allocate; - widget_class->snapshot = gtk_font_chooser_widget_snapshot; widget_class->map = gtk_font_chooser_widget_map; gobject_class->finalize = gtk_font_chooser_widget_finalize; diff --git a/gtk/gtklevelbar.c b/gtk/gtklevelbar.c index 9c7c8a05c5..fbf304d522 100644 --- a/gtk/gtklevelbar.c +++ b/gtk/gtklevelbar.c @@ -371,16 +371,6 @@ gtk_level_bar_render_trough (GtkGizmo *gizmo, return FALSE; } -static void -gtk_level_bar_snapshot (GtkWidget *widget, - GtkSnapshot *snapshot) -{ - GtkLevelBar *self = GTK_LEVEL_BAR (widget); - GtkLevelBarPrivate *priv = gtk_level_bar_get_instance_private (self); - - gtk_widget_snapshot_child (widget, priv->trough_widget, snapshot); -} - static void gtk_level_bar_measure_trough (GtkGizmo *gizmo, GtkOrientation orientation, @@ -954,7 +944,6 @@ gtk_level_bar_class_init (GtkLevelBarClass *klass) oclass->set_property = gtk_level_bar_set_property; oclass->finalize = gtk_level_bar_finalize; - wclass->snapshot = gtk_level_bar_snapshot; wclass->size_allocate = gtk_level_bar_size_allocate; wclass->measure = gtk_level_bar_measure; wclass->direction_changed = gtk_level_bar_direction_changed; diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 9b8eb574a4..a51110d9ed 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -369,8 +369,6 @@ static void gtk_notebook_measure (GtkWidget *widget, static void gtk_notebook_size_allocate (GtkWidget *widget, const GtkAllocation *allocation, int baseline); -static void gtk_notebook_snapshot (GtkWidget *widget, - GtkSnapshot *snapshot); static gboolean gtk_notebook_popup_menu (GtkWidget *widget); static void gtk_notebook_motion (GtkEventController *controller, double x, @@ -666,7 +664,6 @@ gtk_notebook_class_init (GtkNotebookClass *class) widget_class->unmap = gtk_notebook_unmap; widget_class->measure = gtk_notebook_measure; widget_class->size_allocate = gtk_notebook_size_allocate; - widget_class->snapshot = gtk_notebook_snapshot; widget_class->popup_menu = gtk_notebook_popup_menu; widget_class->grab_notify = gtk_notebook_grab_notify; widget_class->state_flags_changed = gtk_notebook_state_flags_changed; @@ -2046,16 +2043,6 @@ gtk_notebook_size_allocate (GtkWidget *widget, gtk_widget_size_allocate (priv->box, allocation, -1); } -static void -gtk_notebook_snapshot (GtkWidget *widget, - GtkSnapshot *snapshot) -{ - GtkNotebook *notebook = GTK_NOTEBOOK (widget); - GtkNotebookPrivate *priv = notebook->priv; - - gtk_widget_snapshot_child (widget, priv->box, snapshot); -} - static gboolean gtk_notebook_show_arrows (GtkNotebook *notebook) { diff --git a/gtk/inspector/gtkstackcombo.c b/gtk/inspector/gtkstackcombo.c index 5c1ef4a633..cb837a6d09 100644 --- a/gtk/inspector/gtkstackcombo.c +++ b/gtk/inspector/gtkstackcombo.c @@ -239,15 +239,6 @@ gtk_stack_combo_measure (GtkWidget *widget, minimum_baseline, natural_baseline); } -static void -gtk_stack_combo_snapshot (GtkWidget *widget, - GtkSnapshot *snapshot) -{ - GtkStackCombo *self = GTK_STACK_COMBO (widget); - - gtk_widget_snapshot_child (widget, GTK_WIDGET (self->combo), snapshot); -} - static void gtk_stack_combo_size_allocate (GtkWidget *widget, const GtkAllocation *allocation, @@ -269,7 +260,6 @@ gtk_stack_combo_class_init (GtkStackComboClass *class) widget_class->measure = gtk_stack_combo_measure; widget_class->size_allocate = gtk_stack_combo_size_allocate; - widget_class->snapshot = gtk_stack_combo_snapshot; g_object_class_install_property (object_class, PROP_STACK,