mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 20:42:48 -05:00
Make string_width() work in GTK3.
This was another piece of code that determined text size by instantiating a GtkLabel and asking for its size, which I had to fix in gtkfont.c recently because that strategy doesn't work in GTK3. Replaced the implementation of string_width() with a call to the function I added in gtkfont.c, and now dialog boxes which depend on that for their width measurement (e.g. the one in reallyclose()) don't come out in silly sizes on GTK3 any more.
This commit is contained in:
@ -137,6 +137,9 @@ void unix_setup_config_box(struct controlbox *b, int midsession, int protocol);
|
||||
/* gtkcfg.c */
|
||||
void gtk_setup_config_box(struct controlbox *b, int midsession, void *window);
|
||||
|
||||
/* Helper function which happens to be in gtkfont.c at the moment */
|
||||
void get_label_text_dimensions(const char *text, int *width, int *height);
|
||||
|
||||
/*
|
||||
* In the Unix Unicode layer, DEFAULT_CODEPAGE is a special value
|
||||
* which causes mb_to_wc and wc_to_mb to call _libc_ rather than
|
||||
|
Reference in New Issue
Block a user