Flashlight application - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121) +---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139) +---- Thread: Flashlight application (/showthread.php?tid=10498) |
RE: Flashlight application - devrtz - 07-01-2020 (07-01-2020, 04:07 PM)bcnaz Wrote: Will this flashlight app soon be in the nightly build, or in a soon to be release ? Without having it checked, I would expect it to already be in the nightly build. If not, it will definitely soon be in there (both nightly and release). The debos recipe has recently been updated to include flashlight. RE: Flashlight application - antiX-Dave - 07-01-2020 I was looking at the code but as I am not too familiar with C and the method of compiling, I am not really capable of making changes and submitting a merge request at this moment. Still trying to learn but finding it a bit more vague than python, php, perl and the like... So perhaps a function request? Maybe the app could have a g_signal_connect on the window for the delete and destroy events to run the enable_flashlight(False) function (which as best as I can tell is a toggle based on the button press being true or false) so that the flashlight is turned off before the application is closed? RE: Flashlight application - devrtz - 07-02-2020 (07-01-2020, 09:11 PM)antiX-Dave Wrote: I was looking at the code but as I am not too familiar with C and the method of compiling, I am not really capable of making changes and submitting a merge request at this moment. Still trying to learn but finding it a bit more vague than python, php, perl and the like... I myself have never really dived into php and perl. Python is cool though, but sometimes I get confused by all the magic that happens in the background. In C I feel there is no magic involved and I like being in total control (also allowing you to make stupid mistakes of course ;) ). Anyway: In case you are interested, have a look at this MR. RE: Flashlight application - antiX-Dave - 07-02-2020 (07-02-2020, 12:46 AM)devrtz Wrote: I myself have never really dived into php and perl. Python is cool though, but sometimes I get confused by all the magic that happens in the background. Ah excellent, thank you for the addition; Super quick with an update to the repo as well! Indeed there is full control and allowing all the mistakes. I see the new function, and an variable for the object class being set. Now it is not as clear to me how the function is attached to the events. For python I would have something like Code: window.connect("destroy", quit_app()) But I cannot tell what would be the equivalent / replacement of that line in C. I deduce it to be Code: object_class->finalize = finalize; and read it like if gtk object class is finalized run the finalize function. Is this the case? RE: Flashlight application - devrtz - 07-02-2020 If you take a look here you can see, that something like Code: g_signal_connect (window, "destroy", In most C GTK apps I have looked at (gnome-calendar, phosh, calls, chatty) usually the finalize or dispose methods are overriden. (By the way I only started with GTK in C ~2months back - so I'm definitely not an expert - I just poke at things until they do what I want them to ) Quote:and read it like if gtk object class is finalized run the finalize function. Yup! RE: Flashlight application - arturo2bodegas - 07-02-2020 just tried ...installs, opens, but no light when I click the button...ran all apt updates, including dist and other above...wonder what could be the problem? RE: Flashlight application - bcnaz - 07-02-2020 It will soon be included in the release or nightly build RE: Flashlight application - devrtz - 07-02-2020 (07-02-2020, 07:18 PM)arturo2bodegas Wrote: just tried ...installs, opens, but no light when I click the button...ran all apt updates, including dist and other above...wonder what could be the problem?Did you also reboot your phone after the upgrade? RE: Flashlight application - wibble - 07-03-2020 (07-02-2020, 09:44 PM)devrtz Wrote:It looks like there's another step needed in the manual upgrade process - the new kernel package is installed but the older 5.6 kernel is still present and being used after reboot. 'apt autoremove' doesn't remove the 5.6 kernel package.(07-02-2020, 07:18 PM)arturo2bodegas Wrote: just tried ...installs, opens, but no light when I click the button...ran all apt updates, including dist and other above...wonder what could be the problem?Did you also reboot your phone after the upgrade? Code: root@mobian:~# apt-cache policy u-boot-sunxi RE: Flashlight application - arturo2bodegas - 07-03-2020 Just updated and rebooted AND THE FLASHLIGHT APP WORKS NOW! COOL! |