diff options
| author | trustable-code <krauter.simon@arcor.de> | 2019-10-22 21:53:31 +0200 |
|---|---|---|
| committer | trustable-code <krauter.simon@arcor.de> | 2019-10-22 21:53:31 +0200 |
| commit | 9f82654b1ff231b65cf6a9a22c92d71efb9276f3 (patch) | |
| tree | df5e0a0b5851c709ad68e5fc18af02ab039bf633 | |
| parent | 2827f65ac625fa22c64cf20c2898f9386a35dce1 (diff) | |
| download | NiGui-9f82654b1ff231b65cf6a9a22c92d71efb9276f3.tar.gz NiGui-9f82654b1ff231b65cf6a9a22c92d71efb9276f3.zip | |
Fixes #68 Gtk: fileDialog.title has no effect
| -rwxr-xr-x | src/nigui/private/gtk3/platform_impl.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nigui/private/gtk3/platform_impl.nim b/src/nigui/private/gtk3/platform_impl.nim index c31f405..b4a0f8b 100755 --- a/src/nigui/private/gtk3/platform_impl.nim +++ b/src/nigui/private/gtk3/platform_impl.nim @@ -400,7 +400,7 @@ proc alert(window: Window, message: string, title = "Message") = method run*(dialog: OpenFileDialog) = dialog.files = @[] - var chooser = gtk_file_chooser_dialog_new(nil, nil, GTK_FILE_CHOOSER_ACTION_OPEN, "Cancel", GTK_RESPONSE_CANCEL, "Open", GTK_RESPONSE_ACCEPT, nil) + var chooser = gtk_file_chooser_dialog_new(dialog.title, nil, GTK_FILE_CHOOSER_ACTION_OPEN, "Cancel", GTK_RESPONSE_CANCEL, "Open", GTK_RESPONSE_ACCEPT, nil) # Issue: When a title is passed, the dialog is shown without a title discard gtk_file_chooser_set_current_folder(chooser, dialog.directory) gtk_file_chooser_set_select_multiple(chooser, dialog.multiple) @@ -413,7 +413,7 @@ method run*(dialog: OpenFileDialog) = gtk_widget_destroy(chooser) method run(dialog: SaveFileDialog) = - var chooser = gtk_file_chooser_dialog_new(nil, nil, GTK_FILE_CHOOSER_ACTION_SAVE, "Cancel", GTK_RESPONSE_CANCEL, "Save", GTK_RESPONSE_ACCEPT, nil) + var chooser = gtk_file_chooser_dialog_new(dialog.title, nil, GTK_FILE_CHOOSER_ACTION_SAVE, "Cancel", GTK_RESPONSE_CANCEL, "Save", GTK_RESPONSE_ACCEPT, nil) # Issue: When a title is passed, the dialog is shown without a title let res = gtk_dialog_run(chooser) discard gtk_file_chooser_set_current_folder(chooser, dialog.directory) |
