Index: pinentry-0.7.5.new/gtk+-2/pinentry-gtk-2.c =================================================================== --- pinentry-0.7.5.new/gtk+-2/pinentry-gtk-2.c +++ pinentry-0.7.5.new/gtk+-2/pinentry-gtk-2.c @@ -287,6 +284,11 @@ box = gtk_vbox_new (FALSE, HIG_SMALL); gtk_box_pack_start (GTK_BOX (chbox), box, TRUE, TRUE, 0); + if (pinentry->title) + { + msg = pinentry_utf8_validate (pinentry->title); + gtk_window_set_title(GTK_WINDOW(win), msg); + } if (pinentry->description) { msg = pinentry_utf8_validate (pinentry->description); Index: pinentry-0.7.5.new/pinentry/pinentry.h =================================================================== --- pinentry-0.7.5.new/pinentry/pinentry.h +++ pinentry-0.7.5.new/pinentry/pinentry.h @@ -38,6 +38,8 @@ struct pinentry { + /* The window title, or NULL. */ + char *title; /* The description to display, or NULL. */ char *description; /* The error message to display, or NULL. */ Index: pinentry-0.7.5.new/pinentry/pinentry.c =================================================================== --- pinentry-0.7.5.new/pinentry/pinentry.c +++ pinentry-0.7.5.new/pinentry/pinentry.c @@ -48,6 +48,7 @@ struct pinentry pinentry = { + NULL, /* Title. */ NULL, /* Description. */ NULL, /* Error. */ NULL, /* Prompt. */ @@ -745,6 +746,21 @@ } +static int +cmd_settitle (ASSUAN_CONTEXT ctx, char *line) +{ + char *newt; + newt = malloc (strlen (line) + 1); + + if (!newt) + return ASSUAN_Out_Of_Core; + + strcpy_escaped (newt, line); + if (pinentry.title) + free (pinentry.title); + pinentry.title = newt; + return 0; +} static int cmd_setqualitybar (ASSUAN_CONTEXT ctx, char *line) @@ -947,6 +963,7 @@ { "SETQUALITYBAR", 0, cmd_setqualitybar }, { "SETQUALITYBAR_TT", 0, cmd_setqualitybar_tt }, { "GETINFO", 0, cmd_getinfo }, + { "SETTITLE", 0, cmd_settitle }, { NULL } }; int i, j, rc;