comparison libinterp/dldfcn/__fltk_uigetfile__.cc @ 30196:813b7827c5f8

Remove "position" argument from file dialog functions (bug #60980). * libinterp/corefcn/event-manager.cc (F__event_manager_file_dialog__), libinterp/dldfcn/__fltk_uigetfile (F__fltk_uigetfile__): Remove unused argument "position". * scripts/gui/uigetdir.m, scripts/gui/uigetfile.m, scripts/gui/uiputfile.m, scripts/gui/private/__uigetdir_fltk__.m, scripts/gui/private/__uigetfile_fltk__.m, scripts/gui/private/__uiputfile_fltk__.m: Remove handling argument "position".
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 19 Sep 2021 17:06:26 +0200
parents 7d6709900da7
children 796f54d4ddbf
comparison
equal deleted inserted replaced
30195:a7981aa5822b 30196:813b7827c5f8
27 # include "config.h" 27 # include "config.h"
28 #endif 28 #endif
29 29
30 #if defined (HAVE_FLTK) 30 #if defined (HAVE_FLTK)
31 31
32 #if defined (WIN32) 32 # if defined (WIN32)
33 # define WIN32_LEAN_AND_MEAN 33 # define WIN32_LEAN_AND_MEAN
34 #endif 34 # endif
35 35
36 #include <string> 36 # include <string>
37 37
38 #include <FL/Fl.H> 38 # include <FL/Fl.H>
39 #include <FL/Fl_File_Chooser.H> 39 # include <FL/Fl_File_Chooser.H>
40 40
41 // FLTK headers may include X11/X.h which defines Complex, and that 41 // FLTK headers may include X11/X.h which defines Complex, and that
42 // conflicts with Octave's Complex typedef. We don't need the X11 42 // conflicts with Octave's Complex typedef. We don't need the X11
43 // Complex definition in this file, so remove it before including Octave 43 // Complex definition in this file, so remove it before including Octave
44 // headers which may require Octave's Complex typedef. 44 // headers which may require Octave's Complex typedef.
45 #undef Complex 45 # undef Complex
46 46
47 #endif 47 #endif
48 48
49 #include "dMatrix.h" 49 #include "dMatrix.h"
50 #include "file-ops.h" 50 #include "file-ops.h"
67 // Expected argument list: 67 // Expected argument list:
68 // 68 //
69 // args(0) ... FileFilter in fltk format 69 // args(0) ... FileFilter in fltk format
70 // args(1) ... Title 70 // args(1) ... Title
71 // args(2) ... Default Filename 71 // args(2) ... Default Filename
72 // args(3) ... PositionValue [x,y] 72 // args(3) ... SelectValue "on"/"off"/"dir"/"create"
73 // args(4) ... SelectValue "on"/"off"/"dir"/"create"
74 73
75 octave_value_list retval (3, octave_value (0)); 74 octave_value_list retval (3, octave_value (0));
76 75
77 std::string file_filter = args(0).string_value (); 76 std::string file_filter = args(0).string_value ();
78 std::string title = args(1).string_value (); 77 std::string title = args(1).string_value ();
79 std::string default_name = args(2).string_value (); 78 std::string default_name = args(2).string_value ();
80 Matrix pos = args(3).matrix_value ();
81 79
82 int multi_type = Fl_File_Chooser::SINGLE; 80 int multi_type = Fl_File_Chooser::SINGLE;
83 std::string flabel = "Filename:"; 81 std::string flabel = "Filename:";
84 82
85 std::string multi = args(4).string_value (); 83 std::string multi = args(3).string_value ();
86 if (multi == "on") 84 if (multi == "on")
87 multi_type = Fl_File_Chooser::MULTI; 85 multi_type = Fl_File_Chooser::MULTI;
88 else if (multi == "dir") 86 else if (multi == "dir")
89 { 87 {
90 multi_type = Fl_File_Chooser::DIRECTORY; 88 multi_type = Fl_File_Chooser::DIRECTORY;