[fltk.bugs] [MOD] STR #2931: Re-implement fl_scandir for *nix systems that do not provide a native version
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR New] Link: http://www.fltk.org/str.php?L2931 Version: 1.3-current Upload Michael Baeuerle's patches to implement a scandir() function that we can use on *nix systems that is free of any potential license restrictions. The prior fl_scandir method was removed by #2687 due to license concerns, but this broke compilation on some systems (e.g. SunOS 5.7) that do not provide a suitable scandir() function natively. Attached files implement a substitute that we can use, that is reported to work, and should not break any exisitng platforms. Link: http://www.fltk.org/str.php?L2931 Version: 1.3-current scandir_patches_for_fltk-1.3.x-r9824.tar.gz Description: Binary data ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [MOD] STR #2931: Re-implement fl_scandir for *nix systems that do not provide a native version
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW. [STR New] Link: http://www.fltk.org/str.php?L2931 Version: 1.3-current Currently tested on the following systems: -- Windows: - WinXP with mingw32 (assume other WinXX versions OK, since code change is trivial here) OSX: - 10.6.8 (OSX post 10.8 has a different scandir() implementation so needs to be verified separately) Systems with no usable native 'scandir()': - SunOS 5.7 (64Bit, big endian) Systems with a native POSIX.1-2008 compliant 'scandir()': - F17, 32-bit - Ubuntu 12.10, 32-bit (this codepath is effectively unchanged from before) OSF/DU/Tru64/IRIX: - None yet AIX: - None yet Systems with native 'scandir()', but not a POSIX.1-2008 compliant one (plus it matches to none of the explicitly handled cases above): - GNU/Linux with glibc 2.8 (32Bit, little endian) - NetBSD 5.1 (32Bit, little endian) Link: http://www.fltk.org/str.php?L2931 Version: 1.3-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
[fltk.commit] [Library] r9825 - in branches/branch-1.3: FL src
Author: manolo Date: 2013-02-19 07:19:58 -0800 (Tue, 19 Feb 2013) New Revision: 9825 Log: Introduced new Fl_Native_File_Chooser option USE_FILTER_EXT. Modified: branches/branch-1.3/FL/Fl_Native_File_Chooser.H branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm Modified: branches/branch-1.3/FL/Fl_Native_File_Chooser.H === --- branches/branch-1.3/FL/Fl_Native_File_Chooser.H 2013-02-14 18:40:04 UTC (rev 9824) +++ branches/branch-1.3/FL/Fl_Native_File_Chooser.H 2013-02-19 15:19:58 UTC (rev 9825) @@ -116,7 +116,8 @@ NO_OPTIONS = 0x, /// no options enabled SAVEAS_CONFIRM = 0x0001, /// Show native 'Save As' overwrite confirm dialog (if supported) NEW_FOLDER = 0x0002, /// Show 'New Folder' icon (if supported) -PREVIEW= 0x0004/// enable preview mode +PREVIEW= 0x0004, /// enable preview mode +USE_FILTER_EXT = 0x0008/// Chooser filter pilots the output file extension }; /** Localizable message */ static const char *file_exists_message; Modified: branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm === --- branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm 2013-02-14 18:40:04 UTC (rev 9824) +++ branches/branch-1.3/src/Fl_Native_File_Chooser_MAC.mm 2013-02-19 15:19:58 UTC (rev 9825) @@ -621,9 +621,11 @@ char *t = prepareMacFilter(_filt_total, _filter, _filt_patt); popup = createPopupAccessory((NSSavePanel*)_panel, t, [[(NSSavePanel*)_panel nameFieldLabel] UTF8String], _filt_value); delete[] t; - [popup setAction:@selector(changedPopup:)]; - [popup setTarget:saveDelegate]; - [saveDelegate panel:(NSSavePanel*)_panel]; + if (_options USE_FILTER_EXT) { + [popup setAction:@selector(changedPopup:)]; + [popup setTarget:saveDelegate]; + [saveDelegate panel:(NSSavePanel*)_panel]; + } [(NSSavePanel*)_panel setCanSelectHiddenExtension:YES]; } } ___ fltk-commit mailing list fltk-commit@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-commit
[fltk.commit] [Library] r9826 - branches/branch-1.3/src
Author: manolo Date: 2013-02-19 07:25:17 -0800 (Tue, 19 Feb 2013) New Revision: 9826 Log: Introduced new Fl_Native_File_Chooser option USE_FILTER_EXT. Modified: branches/branch-1.3/src/Fl_Native_File_Chooser_FLTK.cxx Modified: branches/branch-1.3/src/Fl_Native_File_Chooser_FLTK.cxx === --- branches/branch-1.3/src/Fl_Native_File_Chooser_FLTK.cxx 2013-02-19 15:19:58 UTC (rev 9825) +++ branches/branch-1.3/src/Fl_Native_File_Chooser_FLTK.cxx 2013-02-19 15:25:17 UTC (rev 9826) @@ -123,6 +123,7 @@ NEW_FOLDERShows the 'New Folder' button.Ignored Used Used PREVIEW Enables the 'Preview' mode by default.Ignored Ignored Used SAVEAS_CONFIRMConfirm dialog if BROWSE_SAVE_FILE file exists. Used Used Used + USE_FILTER_EXTChooser filter pilots the output file extension. Ignored Used Ignored \endcode */ void Fl_Native_File_Chooser::options(int val) { ___ fltk-commit mailing list fltk-commit@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-commit
Re: [fltk.development] [RFE] STR #2904: Native file chooser isn'texactly native on linux
AFAIK kdialog is often distributed with KDE, which isn't the case for zenity/Gnome. Of the gnome-using boxes I have ready access to, the Ubuntu 12.10 and F17 versions do appear to have zenity, but some others do not (though these are for particular uses and may be atypical!) But there's still the issue of coming to depend on it, if we can not be sure it is always available... But in any case, as long as we can fall back to the fltk built-in chooser, then the user will always get something, so maybe that does not matter? In any case: We still need to address the issue of guessing what desktop the user is running and then choosing either zenity or kdialog accordingly... There is a env variable XDG_CURRENT_DESKTOP and should indicate the name of running desktop; however, the variable was added silently (which is unfortunate) by Canonical, RedHat, who knows, and there is no definitive spec about it on freedesktop.org. You can check how it is used (with a couple of hacks for other desktops) at http://cgit.freedesktop.org/xdg/xdg-utils/tree/scripts/xdg-utils- common.in (search for 'detectDE'). That might do, though I'd worry about ending having to maintain a list of different distros and so on; I guess what I had envisaged was a magic env var that said I am gtk-based or I am KDE/QT based. For example, gnome and mate are shown as being different values, but AFAICT from our perspective they are The Same Thing... (Also XFCE, it's GTK based too, is it not?) And so on... Also to not forget 'xdg-file-dialog' intended to be portable among desktops and if another desktop adds a tool like kdialog, it will probably end up there. Yes, that might be a better option, insofar as, if the distro implements it, then *should* sort out the choice of host file-chooser for us. But of course it triggers all of Mike's concerns about execing external processes and so on, since it is a shell script wrapper for zenity and kdialog... It's tricky... This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ___ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev
Re: [fltk.general] Missing scandir() (STR #2687)
Though we need to be cautious about not breaking the alternate implementation of fl_scandir() given in scandir_win32.c also. Maybe the win32 version needs tweaked to match the more const-correct prototype anyway? I have made the default prototypes for all 'scandir()'s and the sort functions to be POSIX compliant. Leaving typecasts only for the cases this doesn't match. Anyway - if you have the bits for this working, would it be possible for you to create an STR and upload the files there? After testing it inside the source tree I will open an STR. Great. Thanks. This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] Unable to change labelsize and labelfont fltk1.3.2
We have built FLTK1.3.2 on x86 with the following configuration $ ./configure --prefix=/home/sachin/FLTK1.3.2_test/ --enable-threads -- enable-shared --enable-gl --enable-Xft --enable-x11 --with-x --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib What host system are you building on? And is it necessary to force the X libs like that? I guess you are cross-compiling for an arm target, but would perhaps need to know more. Or are you building on the arm system itself? If so, forcing the X values for configure is probably not helpful, it would be better to let the configure script find the X values for itself I think... If you are cross-compiling, should you not be setting the X values to point to the arm target files? Those look like paths to host files you see, and that seems odd to me. When we run the test/fonts.cxx we are not able to choose between the fonts and the font size on the X window.It shows the default. Hmm, I don't know what that would be. I ran your sample code on several machines, including a linux/arm board, and it worked fine in each case. Which is why I have to assume that something is awry in the configuration of the build, since the code itself seems to be OK... This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] change labelfont and labelsize?
On 18 Feb 2013, at 22:38, edgar wrote: Hi. I am not able to change labelfont() and labelsize() in fltk-1.3.2 I am using the g++ compiler and Ubuntu 12.10. Here is an example of the code with Hello World: #include FL/Fl.H #include FL/Fl_Window.H #include FL/Fl_Box.H int main(int argc, char **argv) { Fl_Window *window = new Fl_Window(340,180); Fl_Box *box = new Fl_Box(20,40,300,100,Hello, World!); box-box(FL_UP_BOX); box-labelfont(FL_BOLD); FL_BOLD is not a font face name; it is a modifier. Perhaps you meant FL_HELVETICA or FL_HELVETICA_BOLD or some such? Note that, FL_HELVETICA_BOLD is actually the value (FL_HELVETICA | FL_BOLD) Actually - I am sort of talking bollocks here: due to a weird consequence of the way that the FLK numbers are set, FL_BOLD on its own, does happen to equate to FL_HELVETICA_BOLD in practice, though I'd be wary of relying on that! Given that that is the case, I do not know why your code does not work. It probably does not help if I say I just ran your code on this test box, and it works fine here... How did you build the fltk libs? Do you have all the necessary dependencies in place (in my experience, Ubuntu is very bad for *not* including dev packages that you need by default!) Was anything odd flagged up during the configure or make phases? How did you compile / link your code? Given that your code appears to be correct, I have to guess that something is a bit crook in your build environment, though I can't see what it could be... This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] Missing scandir() (STR #2687)
MacArthur, Ian (Selex ES, UK) wrote: Though we need to be cautious about not breaking the alternate implementation of fl_scandir() given in scandir_win32.c also. Maybe the win32 version needs tweaked to match the more const-correct prototype anyway? I have made the default prototypes for all 'scandir()'s and the sort functions to be POSIX compliant. Leaving typecasts only for the cases this doesn't match. Anyway - if you have the bits for this working, would it be possible for you to create an STR and upload the files there? After testing it inside the source tree I will open an STR. Great. Thanks. This archive contains the patched files, the content is intended to be copied over a vanilla 1.3.x-r9824 source tree: http://micha.freeshell.org/tmp/scandir_patches_for_fltk-1.3.x-r9824.tar Can you please open the STR for it? I have forgotten the password of my account and the recovery mechanism don't seem to work (no E-Mail after hours). Regards, Micha ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] Missing scandir() (STR #2687)
This archive contains the patched files, the content is intended to be copied over a vanilla 1.3.x-r9824 source tree: http://micha.freeshell.org/tmp/scandir_patches_for_fltk-1.3.x-r9824.tar Can you please open the STR for it? I have forgotten the password of my account and the recovery mechanism don't seem to work (no E-Mail after hours). Uploaded as STR #2931. Not sure what to do about a password reset - presumably your account is still active since your email posts are making it to the list OK though! One for Mike maybe... This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] Missing scandir() (STR #2687)
MacArthur, Ian (Selex ES, UK) wrote: Michael Baeuerle wrote: This archive contains the patched files, the content is intended to be copied over a vanilla 1.3.x-r9824 source tree: http://micha.freeshell.org/tmp/scandir_patches_for_fltk-1.3.x-r9824.tar Can you please open the STR for it? I have forgotten the password of my account and the recovery mechanism don't seem to work (no E-Mail after hours). Uploaded as STR #2931. Thanks. Somebody with a Windows machine should verify the code. Not sure what to do about a password reset - presumably your account is still active since your email posts are making it to the list OK though! I don't use the mailing list, I read and post via USENET (feed from news.easysw.com). No account seems to be required to do that, probably because spammers no longer know what USENET is. Micha ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] Missing scandir() (STR #2687)
Uploaded as STR #2931. Thanks. Somebody with a Windows machine should verify the code. Yes, I did; at least on WinXP. Built and ran fine. I guess the only issue would be if someone was secretly using fl_scandir() directly in their own code and got caught out by the prototype being made more strict, but that might count as a self-inflicted injury? Other than that, I guess we need to verify it on a few more systems - e.g. OSX before and after the 10.8 transition where they made their scandir() prototype more POSIX compliant. (I only have access to 10.6 these days...) I guess most Linuxes will be fine, though have not checked; what systems have you tested on? Also, maybe need to get you to assign the copyright of scandir_posix.c to the fltk project? Not sure how that is handled, actually... Not sure what to do about a password reset - presumably your account is still active since your email posts are making it to the list OK though! I don't use the mailing list, I read and post via USENET (feed from news.easysw.com). No account seems to be required to do that, probably because spammers no longer know what USENET is. Ha, yeah, that sounds right... This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] Unable to change labelsize andlabelfont fltk1.3.2
On 02/19/13 02:39, MacArthur, Ian (Selex ES, UK) wrote: When we run the test/fonts.cxx we are not able to choose between the fonts and the font size on the X window.It shows the default. Which is why I have to assume that something is awry in the configuration of the build, since the code itself seems to be OK... Right; I can confirm on centos 5 the OP's code works fine. If I change the 20 - 40 and rebuild, the font size gets bigger. Sounds like it might be platform dependent (arm target), or perhaps an FLTK headers conflict with a previously installed version of FLTK. OP, see if there is a /usr/include/FL and/or /usr/lib*/libfltk* on your system that might be conflicting with the one you have in your /home/sachin/FLTK1.3.2_test directory. If so, either rename them away, and rebuild both the FLTK library and your app. If that's not it, do you get the same behavior if you run ./configure without any special flags, and just run 'make' to build the library in your /home/sachin/FLTK1.3.2_test/ dir, and the to build your test app, run: /home/sachin/FLTK1.3.2_test/fltk-config --compile foo.app ..and see if that works locally on your system? If it does, then modify the build commands printed by the above command to build against your arm target instead, and repeat the test to see if the problem is arm specific. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] Missing scandir() (STR #2687)
On 02/19/13 06:03, Michael Baeuerle wrote: I don't use the mailing list, I read and post via USENET (feed from news.easysw.com). +1 No account seems to be required to do that, probably because spammers no longer know what USENET is. LOL, yes, we love sturdy but ancient technology ;) Speaking for Mike, and perhaps tempting fate, I think the newsd news interface has never screwed up on us once over the last, what's it been, 9 years? Yay for an all-ascii back end.. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] Missing scandir() (STR #2687)
MacArthur, Ian (Selex ES, UK) wrote: Michael Baeuerle wrote: MacArthur, Ian (Selex ES, UK) wrote: Uploaded as STR #2931. Thanks. Somebody with a Windows machine should verify the code. Yes, I did; at least on WinXP. Built and ran fine. Good. I only added the 'const's to the parameters and don't touch the code itself. I guess the only issue would be if someone was secretly using fl_scandir() directly in their own code and got caught out by the prototype being made more strict, but that might count as a self-inflicted injury? IMHO yes. The compare functions are intended to compare and only to compare. If somebody expect them to modify the objects or provide its own sort function that do such nasty things ... I think this can really be seen as abuse. In reality this should very rarely happen because 'fl_scandir()' is intended to be used with the 'fl_*sort()' function family defined by FLTK (which I have modified to matching constant parameters too). As said above, the 'fl_*sort()' functions now have constant parameters too. But it should still be possible to call them with non-constant objects with the correct result (the objects are simply not changed as before). Other than that, I guess we need to verify it on a few more systems - e.g. OSX before and after the 10.8 transition where they made their scandir() prototype more POSIX compliant. (I only have access to 10.6 these days...) Yes, I have merged all cases that in fact had the same API together. At first I was confused about some lines use 'struct dirent' and other lines use 'dirent' (and from a C programmers view I nowhere found a typedef for 'dirent'). But 'filename_list.cxx' contains C++, and C++ implicitly adds the 'struct' keyword if it is missing: http://www.cplusplus.com/doc/tutorial/structures/ This makes some of the former different looking lines compile to the same code. I guess most Linuxes will be fine, though have not checked; what systems have you tested on? Currently I have tested the following systems: -- Windows: - None yet Systems with no usable native 'scandir()': - SunOS 5.7 (64Bit, big endian) Systems with a native POSIX.1-2008 compliant 'scandir()': - None yet OSF/DU/Tru64/IRIX: - None yet AIX: - None yet Systems with native 'scandir()', but not a POSIX.1-2008 compliant one (plus it match to none of the explicitly handled cases above): - GNU/Linux with glibc 2.8 (32Bit, little endian) - NetBSD 5.1 (32Bit, little endian) -- Please add yours too, so that we get a complete single list. AIX and HP-UX again with the final code will follow from me ... Also, maybe need to get you to assign the copyright of scandir_posix.c to the fltk project? Not sure how that is handled, actually... As an example: 'Fl_PNG_Image.cxx' contains copyrights too. I have applied the FLTK license to the new code, this means everybody is allowed to do with it the same things as with the rest of the library (at least modify, redistribute and statically link). So I think it is no problem (IANAL). In any case: I have written this code for the FLTK project to resolve a copyright/license problem, so we definitely will find a way that the FLTK project get a problem solved and not a new problem ;-) Regards, Micha ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
[fltk.general] [OT] USENET (was: Missing scandir() (STR #2687))
Greg Ercolano wrote: On 02/19/13 06:03, Michael Baeuerle wrote: I don't use the mailing list, I read and post via USENET (feed from news.easysw.com). +1 No account seems to be required to do that, probably because spammers no longer know what USENET is. LOL, yes, we love sturdy but ancient technology ;) Yes, with a USENET newsreader all messages from all groups and all servers are displayed the way you like it (configured once and for all). And for posting you can use your favourite editor. Any kind of web-based service to read text messages will never beat that! Every website needs special configuration or you have to sell your soul^Wdata to Google/MS/$VENDOR to unify that a bit for you. And even then it will not come even near that what a dedicated newsreader application gives you with less bloat and security vulnerability. Speaking for Mike, and perhaps tempting fate, I think the newsd news interface has never screwed up on us once over the last, what's it been, 9 years? Yay for an all-ascii back end.. The NNTP protocol is so trivial, you can read articles even via telnet. If somebody of the younger people that are grown with GUI/Touch gadgets in their pockets don't believe it, they should try this: -- $ telnet news.easysw.com 119 Trying 208.96.52.100... Connected to dns.easysw.com. Escape character is '^]'. 200 newsd news server ready - posting ok GROUP fltk.general 211 27124 8943 36068 fltk.general group selected ARTICLE 36067-fltk.gene...@news.easysw.com ... -- Nothing beats simplicity ... Regards, Micha ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] Missing scandir() (STR #2687)
On 02/19/13 06:52, MacArthur, Ian (Selex ES, UK) wrote: I guess most Linuxes will be fine, though have not checked; what systems have you tested on? Perhaps include a comment in the code indicating platform/compiler combos it's been tested with to keep track. ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk
Re: [fltk.general] change labelfont and labelsize?
Thanks Ian, I will check the tests and docs and post again if questions arise. Cheers, Edgar ___ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk