mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 20:41:37 +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;
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user