1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 19:42:48 -05:00

Move more functions into the new gtkmisc.c.

Several utility functions I've written over the last few weeks were in
rather random places because I didn't have a central gtkmisc.c to put
them in. Now I've got one, put them there!
This commit is contained in:
Simon Tatham
2015-08-31 15:44:24 +01:00
parent dc11417aee
commit 49ff9f480e
6 changed files with 59 additions and 64 deletions

View File

@ -1077,15 +1077,6 @@ static void set_transient_window_pos(GtkWidget *parent, GtkWidget *child)
#endif
}
void align_label_left(GtkLabel *label)
{
#if GTK_CHECK_VERSION(3,16,0)
gtk_label_set_xalign(label, 0.0);
#else
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
#endif
}
void dlg_error_msg(void *dlg, const char *msg)
{
struct dlgparam *dp = (struct dlgparam *)dlg;
@ -3413,13 +3404,6 @@ int messagebox(GtkWidget *parentwin, const char *title, const char *msg,
return dp.retval;
}
int string_width(const char *text)
{
int ret;
get_label_text_dimensions(text, &ret, NULL);
return ret;
}
int reallyclose(void *frontend)
{
char *title = dupcat(appname, " Exit Confirmation", NULL);