askmrsinh / touchpad-indicator

Touchpad management GNOME Shell Extension.
https://extensions.gnome.org/extension/131/touchpad-indicator/
GNU General Public License v2.0
83 stars 20 forks source link

Show/hide switch icon not working #56

Closed odimn closed 4 years ago

odimn commented 4 years ago

Hello! Thumbs up for this extension! Very nice work! In extension settings the Show Icon switch does nothing.


Expected behavior
Clicking the switch, the icon indicator in top panel disappears.


Steps to reproduce the behavior

  1. Right click on TouchpadIndicator icon on top panel.
  2. Click on 'Indicator Preferences'.
  3. Left click on switch 'Show Icon' to disable panel icon.
  4. Nothing happens!

Screenshots


Mandatory system details touchpad-indicator.log

I: Bus=0003 Vendor=045e Product=07fd Version=0111 N: Name="Microsoft Microsoft Nano Transceiver 1.1" P: Phys=usb-0000:00:14.0-1/input2 S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb2/2-1/2-1:1.2/0003:045E:07FD.0003/input/input21 U: Uniq= H: Handlers=event20 mouse1 B: PROP=0 B: EV=17 B: KEY=1f0000 0 0 0 0 B: REL=903 B: MSC=10


Additional context
From a small investigation i made in the extensions files, I found out, that inside the file 'extensions.js' in lines: 285 // Show panel icon if show-panelicon is true or at least one of the 286 // device switches is in the off position. 287 this.visible = alwaysShow || items.some(s => s.state === false) if i change "=> s.state === false" to "=> s.state === true" the function is normal again. I hope this helped.

Thank you again for this great extension!

askmrsinh commented 4 years ago

Hi! Thank you. Your investigation is correct but this is intentional (see: https://github.com/user501254/TouchpadIndicator/issues/39). As per current functionality, an icon will always be shown when any of the pointing devices is disabled. This is to prevent unnecessary frustration that my arise by not immediately knowing the state of the pointing device.

You can anyways modify the lines to fit your needs. I hope that helps.

odimn commented 4 years ago

Ah, Ok!! Thank you for the clarification and your quick answer. Sorry I missed that post. Anyways, i commend you could remove the switch in some update for it serves no purpose. I modified the line because i'm trying to de-clutter my panel from the icons. Thanks again!

On Thu, Jun 25, 2020 at 11:10 PM Ashesh Singh notifications@github.com wrote:

Closed #56 https://github.com/user501254/TouchpadIndicator/issues/56.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/user501254/TouchpadIndicator/issues/56#event-3483969995, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQCQNRNNQAHPJ2HOMBV3GSTRYOVJTANCNFSM4OIWG2NQ .