talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit f2a22c54e626b8c1ebce3d6df117a35b076e163f
parent 80146a82f66445d6da624035b5269d762717a722
Author: Oliver Lowe <o@olowe.co>
Date:   Thu, 20 Nov 2025 23:47:17 +1100

gtk: delete unused screen dimension reading

Diffstat:
Msrc/gtk/gtkutils.c | 40----------------------------------------
Msrc/gtk/gtkutils.h | 8--------
2 files changed, 0 insertions(+), 48 deletions(-)

diff --git a/src/gtk/gtkutils.c b/src/gtk/gtkutils.c @@ -44,24 +44,6 @@ static GdkRectangle _screen_area = { 0 }; -gboolean gtkut_get_font_size(GtkWidget *widget, - gint *width, gint *height) -{ - PangoLayout *layout; - const gchar *str = "Abcdef"; - - cm_return_val_if_fail(GTK_IS_WIDGET(widget), FALSE); - - layout = gtk_widget_create_pango_layout(widget, str); - cm_return_val_if_fail(layout, FALSE); - pango_layout_get_pixel_size(layout, width, height); - if (width) - *width = *width / g_utf8_strlen(str, -1); - g_object_unref(layout); - - return TRUE; -} - PangoFontDescription *default_font() { GtkSettings *settings = gtk_settings_get_default(); @@ -1600,18 +1582,6 @@ gboolean gtkut_time_select_get_time(GtkComboBox *combo, int *hour, int *minute) return TRUE; } -void gtk_calendar_select_today(GtkCalendar *calendar) -{ - time_t t = time (NULL); - struct tm buft; - struct tm *lt = localtime_r (&t, &buft); - - mktime(lt); - gtk_calendar_select_day(calendar, lt->tm_mday); - gtk_calendar_select_month(calendar, lt->tm_mon, lt->tm_year + 1900); -} - - #define RGBA_ELEMENT_TO_BYTE(x) (int)((gdouble)x * 255) gchar *gtkut_gdk_rgba_to_string(GdkRGBA *rgba) { @@ -1634,16 +1604,6 @@ static void get_screen_rectangle() } } -gint gtkut_gdk_screen_width() -{ - return _screen_area.width; -} - -gint gtkut_gdk_screen_height() -{ - return _screen_area.height; -} - void gtkut_gdk_screen_size_changed (GdkScreen* self, gpointer data) { _screen_area.width = 0; diff --git a/src/gtk/gtkutils.h b/src/gtk/gtkutils.h @@ -80,10 +80,6 @@ extern "C" { * The returned string has to be freed by the caller. */ gchar *gtkut_gdk_rgba_to_string(GdkRGBA *rgba); -gboolean gtkut_get_font_size (GtkWidget *widget, - gint *width, - gint *height); - void gtkut_stock_button_add_help(GtkWidget *bbox, GtkWidget **help_btn); void gtkut_stock_button_set_create_with_help(GtkWidget **bbox, @@ -194,8 +190,6 @@ GtkWidget *gtkut_time_select_combo_new(); void gtkut_time_select_select_by_time(GtkComboBox *combo, int hour, int minute); gboolean gtkut_time_select_get_time(GtkComboBox *combo, int *hour, int *minute); -void gtk_calendar_select_today(GtkCalendar *calendar); - typedef void (*ClawsIOFunc)(gpointer data, gint source, GIOCondition condition); gint claws_input_add (gint source, @@ -251,8 +245,6 @@ gpointer gtkut_tree_view_get_selected_pointer(GtkTreeView *view, gint column, GtkTreeModel **_model, GtkTreeSelection **_selection, GtkTreeIter *_iter); -gint gtkut_gdk_screen_width(); -gint gtkut_gdk_screen_height(); void gtkut_gdk_screen_size_changed (GdkScreen* self, gpointer data); #ifdef __cplusplus