mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-15 10:49:49 +02:00
gtk2: ofOverwritePrompt in TSaveDialog.Options is working now if gtk_2_8 is defined (either manual or auto on windows). partially fixes #0011962
git-svn-id: trunk@16217 -
This commit is contained in:
parent
ce312d71a9
commit
11aaafc54f
@ -185,6 +185,7 @@ const
|
||||
GTK_PACK_DIRECTION_BTT = 3;
|
||||
|
||||
procedure gtk_menu_bar_set_pack_direction(menubar : PGtkMenuBar; pack_dir : TGtkPackDirection); cdecl; external gtklib;
|
||||
procedure gtk_file_chooser_set_do_overwrite_confirmation(chooser:PGtkFileChooser; do_overwrite_confirmation:gboolean); cdecl; external gtklib;
|
||||
{$endif}
|
||||
{$ifdef GTK_2_10}
|
||||
function gdk_screen_is_composited(screen: PGdkScreen): gboolean; cdecl; external gdklib;
|
||||
|
@ -125,6 +125,8 @@ procedure UpdateDetailView(OpenDialog: TOpenDialog);
|
||||
|
||||
implementation
|
||||
|
||||
{$I gtkdefines.inc}
|
||||
|
||||
{-------------------------------------------------------------------------------
|
||||
procedure UpdateDetailView
|
||||
Params: OpenDialog: TOpenDialog
|
||||
@ -1049,13 +1051,14 @@ begin
|
||||
Widget := gtk_file_chooser_dialog_new(PChar(FileDialog.Title), nil, Action,
|
||||
PChar(GTK_STOCK_CANCEL), [GTK_RESPONSE_CANCEL, PChar(Button1), GTK_RESPONSE_OK, nil]);
|
||||
|
||||
(*gtk 2.8
|
||||
{$ifdef GTK_2_8}
|
||||
if FileDialog is TSaveDialog then
|
||||
begin
|
||||
gtk_file_chooser_set_do_overwrite_confirmation(Widget,
|
||||
ofOverwritePrompt in TOpenDialog(theDialog).Options);
|
||||
ofOverwritePrompt in TOpenDialog(FileDialog).Options);
|
||||
end;
|
||||
*)
|
||||
{$endif}
|
||||
|
||||
if FileDialog.InitialDir <> '' then
|
||||
gtk_file_chooser_set_current_folder(Widget, Pgchar(FileDialog.InitialDir));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user