Flashlight application
#11
(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.
#12
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?
#13
(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...

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?

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.
#14
(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.
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 Wink ).

Anyway: In case you are interested, have a look at this MR.

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?
#15
If you take a look here
you can see, that something like
Code:
g_signal_connect (window, "destroy",
                  G_CALLBACK (destroy), NULL);
could also be used.

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 Tongue )

Quote:and read it like if gtk object class is finalized run the finalize function.

Is this the case?

Yup!
#16
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?
#17
It will soon be included in the release or nightly build
      LINUX = CHOICES
         **BCnAZ**
               Idea
   Donate to $upport
your favorite OS Team
#18
(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?
#19
(07-02-2020, 09:44 PM)devrtz Wrote:
(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?
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.
Code:
root@mobian:~# apt-cache policy u-boot-sunxi
u-boot-sunxi:
  Installed: 2020.04+dfsg-2+pinephone5
  Candidate: 2020.04+dfsg-2+pinephone5
  Version table:
*** 2020.04+dfsg-2+pinephone5 700
        700 http://repo.mobian-project.org mobian/main arm64 Packages
        100 /var/lib/dpkg/status
     2020.04+dfsg-2 500
        500 http://deb.debian.org/debian bullseye/main arm64 Packages
root@mobian:~# apt-cache policy linux-image-5.7-pinephone
linux-image-5.7-pinephone:
  Installed: 5.7.0+pinephone4
  Candidate: 5.7.0+pinephone4
  Version table:
*** 5.7.0+pinephone4 700
        700 http://repo.mobian-project.org mobian/main arm64 Packages
        100 /var/lib/dpkg/status
root@mobian:~# uname -a
Linux mobian 5.6-pinephone #5.6.0+pinephone10 SMP PREEMPT Thu May 28 14:13:07 CEST 2020 aarch64 GNU/Linux
root@mobian:~# apt-cache policy linux-image-5.6-pinephone
linux-image-5.6-pinephone:
  Installed: 5.6.0+pinephone10
  Candidate: 5.6.0+pinephone10
  Version table:
*** 5.6.0+pinephone10 700
        700 http://repo.mobian-project.org mobian/main arm64 Packages
        100 /var/lib/dpkg/status
root@mobian:~# apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
#20
Just updated and rebooted AND THE FLASHLIGHT APP WORKS NOW!
COOL!


Possibly Related Threads…
Thread Author Replies Views Last Post
  Auto start application on Phosh login Zebulon Walton 8 5,065 10-14-2023, 06:29 AM
Last Post: alaraajavamma
  Flashlight/Torch Barugon 6 5,796 10-18-2021, 08:31 AM
Last Post: ragreenburg
  How Do I Perform a Chatty Application Reinstall? rrholmes 2 2,840 07-13-2021, 01:11 AM
Last Post: rrholmes
Sad Problems with Twinkle SIP Application, strerror_r is not available phone123 0 1,797 07-04-2021, 12:58 PM
Last Post: phone123
  Application "Software" crashes when i tap on any category User 20385 0 1,886 11-20-2020, 03:59 AM
Last Post: User 20385
Wink Rockbox as an Application on Pinephone c3l@ 2 3,754 10-14-2020, 06:46 PM
Last Post: visiblink

Forum Jump:


Users browsing this thread: 3 Guest(s)