Giter VIP home page Giter VIP logo

Comments (11)

sc0w avatar sc0w commented on August 28, 2024

https://github.com/mate-desktop/mate-sensors-applet/blob/master/sensors-applet/active-sensor.c#L589

I can't find the gsettings key, where is it?

If I set the var hide_units to true on active-sensor.c, it works

I think it is a good idea to put a checkbox on preferences

from mate-sensors-applet.

raveit65 avatar raveit65 commented on August 28, 2024

I don't think there is a gsettings key for it, btw. i didn't find them.

from mate-sensors-applet.

sc0w avatar sc0w commented on August 28, 2024

I saw this:

http://wiki.mate-desktop.org/docs:mate-sensors-applet

Hide Units

The units for sensor values can also be hidden if desired by setting the boolean value /apps/sensors-applet/hide-units within the user's MateConf database. This can be achieved by the following command, where the value is specified as either true or false and is specified as the last parameter. In this case is the units will be hidden (the value is set to true):

mateconftool-2 -s /apps/sensors-applet/hide-units -t bool true

These values can also be set using the Configuration Editor.

mate-sensors-applet was migrated to gsettings with this commit: fbb7e89

from mate-sensors-applet.

info-cppsp avatar info-cppsp commented on August 28, 2024

more info:
in CLI:
gsettings list-relocatable-schemas
found org.mate.sensors-applet.sensor

http://wiki.mate-desktop.org/docs:gsettings

use d-conf editor to find the right path (object)
org/mate/panel/objects/object-2

screenshot at 2017-09-04 09-08-00

get current setting
gsettings get org.mate.sensors-applet:/org/mate/panel/objects/object_2/ hide-units
(should return false)

set hide-units
gsettings set org.mate.sensors-applet:/org/mate/panel/objects/object_2/ hide-units true

restart -> not working


after applying the pull request changes:

I got the CLI wrong, here are the right ones:
gsettings get org.mate.sensors-applet:/org/mate/panel/objects/object-16/prefs/ hide-units
gsettings set org.mate.sensors-applet:/org/mate/panel/objects/object-16/prefs/ hide-units true
gsettings set org.mate.sensors-applet:/org/mate/panel/objects/object-16/prefs/ hide-units false

These work, display changes accordingly. No restart required.
It is 16, bc I have removed the '2' msa, and added a new one to the mate-panel.
(The underscore was wrong and I needed to add the prefs/ as found in d-conf editor.)


OK, so I have just checked. These CLI commands work even without the pull request changes, which makes me believe, that they have been working since the gsettings commit. (2012. Dec.)

from mate-sensors-applet.

raveit65 avatar raveit65 commented on August 28, 2024

Ok, something like this works

gsettings set org.mate.sensors-applet:/org/mate/panel/objects/object-26/prefs/ hide-units true

But the hide-unit key exists only in dconf-editor after i set it via cli.
So, this isn't very user friendly and i'd like to see the setting in preferences.
Also the key is marked with 'No scheme found` in dconf-editor for some reason.
Looks like the implementation of the key is a bit worse.

from mate-sensors-applet.

info-cppsp avatar info-cppsp commented on August 28, 2024

yeaaah...
see #52
That is probably bc the schema is a relocatable one.
??

from mate-sensors-applet.

raveit65 avatar raveit65 commented on August 28, 2024

All this keys you will see only in dconf-editor if you set them in preferences or via cli.

[rave@mother ~]$ cat /usr/share/glib-2.0/schemas/org.mate.sensors-applet.gschema.xml 
<schemalist gettext-domain="mate-sensors-applet">
  <schema id="org.mate.sensors-applet">
    <key name="font-size" type="i">
      <default>0</default>
      <summary>Font size in points</summary>
    </key>
    <key name="hide-units" type="b">
      <default>false</default>
      <summary>Specify if show or hide sensor units</summary>
    </key>
    <key name="display-mode" type="i">
      <default>1</default>
      <summary>Set if display icons or text labels</summary>
    </key>
    <key name="layout-mode" type="i">
      <default>0</default>
      <summary>Set value beside or below label</summary>
    </key>
    <key name="temperature-scale" type="i">
      <default>1</default>
      <summary>Show temperature in Kelvin, Celsius or Fahrenheit </summary>
    </key>
    <key name="display-notifications" type="b">
      <default>true</default>
      <summary>Whether to display notifications</summary>
    </key>
    <key name="timeout-delay" type="i">
      <default>2000</default>
      <summary>Delay (in ms) between refreshes</summary>
    </key>
    <key name="graph-size" type="i">
      <default>42</default>
      <summary>The size of the graph in pixels (width if horizontal, height if vertical)</summary>
    </key>
    <key name="sensors-list" type="as">
      <default>[]</default>
      <summary>List of sensors</summary>
    </key>
  </schema>
</schemalist>

Not sure it's because a relocatable one.
Ie. clock-applet ships also some keys in dconf-editor prefs folder after installation.
Maybe @monsta can enlighten us about gsettings/glib stuff in m-s-a?

from mate-sensors-applet.

info-cppsp avatar info-cppsp commented on August 28, 2024

No I meant, 'No schema' shows up in d-conf, bc the schema is relocatable.
screenshot at 2017-10-25 20-44-59
That is what you mean, right?
(this is the clock-applet)

But you made a good point!
clock-applet prefs are visible
That just means, that I (or sy else) have to check, why the options don't show up.
Maybe we won't need the PR after all.

from mate-sensors-applet.

info-cppsp avatar info-cppsp commented on August 28, 2024

https://github.com/GNOME/dconf-editor/blob/master/editor/registry-info.ui
search for 'No schema available'
it says
"No schema available. Dconf Editor can’t find a schema associated with this key. The application that installed this key may have been removed, may have stop the use of this key, or may use a relocatable schema for defining its keys."

from mate-sensors-applet.

raveit65 avatar raveit65 commented on August 28, 2024

fixed 9912a19

from mate-sensors-applet.

info-cppsp avatar info-cppsp commented on August 28, 2024

about being able to edit configuration not set before
https://bugzilla.gnome.org/show_bug.cgi?id=755925
It is a relocatable schema problem after all. It may be fixed one day...

INFO
This lists all keys:
gsettings list-recursively org.mate.sensors-applet:/org/mate/panel/objects/object-16/prefs/

Well, after some searching, these relocatable schemas seem to be a very stupid construct...

from mate-sensors-applet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.