mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 20:20:23 +02:00
Gtk2: fixed memleak in TGtk2WidgetSet.PromptUser()
git-svn-id: trunk@28285 -
This commit is contained in:
parent
fb6e2e2372
commit
9d19f99a23
@ -891,12 +891,12 @@ var
|
||||
Title: String;
|
||||
ActiveWindow: HWND;
|
||||
|
||||
procedure CreateButton(const ALabel : PChar; const AResponse: Integer);
|
||||
procedure CreateButton(const ALabel : String; const AResponse: Integer);
|
||||
var
|
||||
NewButton: PGtkWidget;
|
||||
begin
|
||||
NewButton := gtk_dialog_add_button(PGtkDialog(Dialog),
|
||||
Ampersands2Underscore(ALabel), AResponse);
|
||||
PgChar(Ampersands2Underscore(ALabel)), AResponse);
|
||||
gtk_button_set_use_underline(PGtkButton(NewButton), True);
|
||||
end;
|
||||
|
||||
@ -958,11 +958,11 @@ begin
|
||||
idButtonYes : CreateButton('gtk-yes', GTK_RESPONSE_YES);
|
||||
idButtonNo : CreateButton('gtk-no', GTK_RESPONSE_NO);
|
||||
idButtonClose : CreateButton('gtk-close', GTK_RESPONSE_CLOSE);
|
||||
idButtonAbort : CreateButton(PGChar(rsMBAbort), GTK_RESPONSE_REJECT);
|
||||
idButtonRetry : CreateButton(PGChar(rsMBRetry), GTK_RESPONSE_ACCEPT);
|
||||
idButtonIgnore : CreateButton(PGChar(rsMBIgnore), GTK_RESPONSE_CLOSE);
|
||||
idButtonNoToAll : CreateButton(PGChar(rsMBNoToAll), GTK_RESPONSE_REJECT);
|
||||
idButtonYesToAll : CreateButton(PGChar(rsMBYesToAll), GTK_RESPONSE_APPLY);
|
||||
idButtonAbort : CreateButton(rsMBAbort, GTK_RESPONSE_REJECT);
|
||||
idButtonRetry : CreateButton(rsMBRetry, GTK_RESPONSE_ACCEPT);
|
||||
idButtonIgnore : CreateButton(rsMBIgnore, GTK_RESPONSE_CLOSE);
|
||||
idButtonNoToAll : CreateButton(rsMBNoToAll, GTK_RESPONSE_REJECT);
|
||||
idButtonYesToAll : CreateButton(rsMBYesToAll, GTK_RESPONSE_APPLY);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user