From 72af64d9646e89f5c6b60e86bb36c917b39562c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 17 Oct 2019 23:29:06 +0200 Subject: [PATCH] st: Remove st_get_align_factor() utility method It is now unused. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803 --- src/st/st-widget.c | 60 ---------------------------------------------- src/st/st-widget.h | 6 ----- 2 files changed, 66 deletions(-) diff --git a/src/st/st-widget.c b/src/st/st-widget.c index f7e308494..586954b46 100644 --- a/src/st/st-widget.c +++ b/src/st/st-widget.c @@ -3112,63 +3112,3 @@ st_widget_get_focus_chain (StWidget *widget) { return ST_WIDGET_GET_CLASS (widget)->get_focus_chain (widget); } - -/** - * st_get_align_factors: - * @x_align: an #StAlign - * @y_align: an #StAlign - * @x_align_out: (out) (optional): @x_align as a #gdouble - * @y_align_out: (out) (optional): @y_align as a #gdouble - * - * Converts @x_align and @y_align to #gdouble values. - */ -void -st_get_align_factors (StAlign x_align, - StAlign y_align, - gdouble *x_align_out, - gdouble *y_align_out) -{ - if (x_align_out) - { - switch (x_align) - { - case ST_ALIGN_START: - *x_align_out = 0.0; - break; - - case ST_ALIGN_MIDDLE: - *x_align_out = 0.5; - break; - - case ST_ALIGN_END: - *x_align_out = 1.0; - break; - - default: - g_warn_if_reached (); - break; - } - } - - if (y_align_out) - { - switch (y_align) - { - case ST_ALIGN_START: - *y_align_out = 0.0; - break; - - case ST_ALIGN_MIDDLE: - *y_align_out = 0.5; - break; - - case ST_ALIGN_END: - *y_align_out = 1.0; - break; - - default: - g_warn_if_reached (); - break; - } - } -} diff --git a/src/st/st-widget.h b/src/st/st-widget.h index d6e3ca2bf..2f593e3d3 100644 --- a/src/st/st-widget.h +++ b/src/st/st-widget.h @@ -157,12 +157,6 @@ void st_widget_set_accessible_name (StWidget *widget, const gchar * st_widget_get_accessible_name (StWidget *widget); void st_widget_set_accessible (StWidget *widget, AtkObject *accessible); -/* utility methods */ -void st_get_align_factors (StAlign x_align, - StAlign y_align, - gdouble *x_align_out, - gdouble *y_align_out); - G_END_DECLS #endif /* __ST_WIDGET_H__ */