Interesting. I tried that in Windows and the system shows an error dialog
saying that multiple files can be selected only if in the same folder.
Probably that's why we introduced that limitation in the GTK driver.
We have the MULTIVALUEid attribute that can be used. But its definition
implies that all files must be in the same folder.
Maybe we can use an extra attribute to make MULTIVALUEid to include full
paths. I'll think about that.
Best,
Scuri
On Thu, Jul 7, 2016 at 10:28 PM, Andy Xiyue <[email protected]> wrote:
> Hi Scuri,
>
> I ran into a problem when I was using IupFileDlg() to collect file's path.
>
> Firstly I define the dialog
>
> gui->dlg_open = IupFileDlg();
> IupSetAttribute(gui->dlg_open, "PARENTDIALOG", gui->inst_id);
> IupSetAttribute(gui->dlg_open, "TITLE", "Open Files");
> IupSetAttribute(gui->dlg_open, "MULTIPLEFILES", "YES");
>
> then I popped up the dialog
>
> IupPopup(gui->dlg_open, IUP_CENTERPARENT, IUP_CENTERPARENT);
> if (IupGetInt(gui->dlg_open, "STATUS") >= 0) {
> printf("Open File VALUE: %s\n",
> IupGetAttribute(gui->dlg_open, "VALUE"));
> }
>
> In GTK it opened "Recently Used" folder by default. Randomly pick some
> files and I received a choatic results:
>
> Open File VALUE:
>
> /home/xum1/Downloads|TDA10023_datasheet.pdf|re/meld/recent-b4r7cC.meldcmp|93c0135djw1f5fjquxg10j20e60k0wez.jpg|624/logs_20160624.7z|p/mkmap-4.0.zip|p/mkmap-4.0-win32-bin.zip|p/MAP_16_39324_60293_2x2.png|
>
> The problem is the
> '/home/xum1/Downloads/re/meld/recent-b4r7cC.meldcmp' doesn't exist at
> all. It is actually
> '/home/xum1/.local/share/meld/recent-b4r7cC.meldcmp'.
>
> I roughly had an idea what had happened there. The IupFileDlg()
> returned a squeezed form of the path collection, which starts with one
> path and a group of files under this path. However the "Recently Used"
> folder is not under a single path, like the example above, the first
> two files are actually
>
> /home/xum1/Downloads/TDA10023_datasheet.pdf
> /home/xum1/.local/share/meld/recent-b4r7cC.meldcmp
>
> which confused the IupFileDlg(). It probably has already a solution
> which I don't know. If there isn't, do you think it will be fixed in
> the futurn, maybe just add another attribute like "VALUE2" to return
> the full pathes?
>
> Kind regards
> Andy
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Iup-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users