Gtk2: fixed memleak in TGtk2WidgetSet.PromptUser()

git-svn-id: trunk@28285 -
This commit is contained in:
zeljko 2010-11-17 07:08:21 +00:00
parent fb6e2e2372
commit 9d19f99a23

View File

@ -891,12 +891,12 @@ var
Title: String; Title: String;
ActiveWindow: HWND; ActiveWindow: HWND;
procedure CreateButton(const ALabel : PChar; const AResponse: Integer); procedure CreateButton(const ALabel : String; const AResponse: Integer);
var var
NewButton: PGtkWidget; NewButton: PGtkWidget;
begin begin
NewButton := gtk_dialog_add_button(PGtkDialog(Dialog), NewButton := gtk_dialog_add_button(PGtkDialog(Dialog),
Ampersands2Underscore(ALabel), AResponse); PgChar(Ampersands2Underscore(ALabel)), AResponse);
gtk_button_set_use_underline(PGtkButton(NewButton), True); gtk_button_set_use_underline(PGtkButton(NewButton), True);
end; end;
@ -958,11 +958,11 @@ begin
idButtonYes : CreateButton('gtk-yes', GTK_RESPONSE_YES); idButtonYes : CreateButton('gtk-yes', GTK_RESPONSE_YES);
idButtonNo : CreateButton('gtk-no', GTK_RESPONSE_NO); idButtonNo : CreateButton('gtk-no', GTK_RESPONSE_NO);
idButtonClose : CreateButton('gtk-close', GTK_RESPONSE_CLOSE); idButtonClose : CreateButton('gtk-close', GTK_RESPONSE_CLOSE);
idButtonAbort : CreateButton(PGChar(rsMBAbort), GTK_RESPONSE_REJECT); idButtonAbort : CreateButton(rsMBAbort, GTK_RESPONSE_REJECT);
idButtonRetry : CreateButton(PGChar(rsMBRetry), GTK_RESPONSE_ACCEPT); idButtonRetry : CreateButton(rsMBRetry, GTK_RESPONSE_ACCEPT);
idButtonIgnore : CreateButton(PGChar(rsMBIgnore), GTK_RESPONSE_CLOSE); idButtonIgnore : CreateButton(rsMBIgnore, GTK_RESPONSE_CLOSE);
idButtonNoToAll : CreateButton(PGChar(rsMBNoToAll), GTK_RESPONSE_REJECT); idButtonNoToAll : CreateButton(rsMBNoToAll, GTK_RESPONSE_REJECT);
idButtonYesToAll : CreateButton(PGChar(rsMBYesToAll), GTK_RESPONSE_APPLY); idButtonYesToAll : CreateButton(rsMBYesToAll, GTK_RESPONSE_APPLY);
end; end;
end; end;
end; end;