New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose the ability to hide the temperature units of the sensors #22

Closed
sunweaver opened this Issue Mar 9, 2015 · 11 comments

Comments

Projects
None yet
5 participants
@sunweaver
Member

sunweaver commented Mar 9, 2015

A feature request from a Debian user (DebianBug#778756):

Could you please expose the ability to hide the temperature units of the
sensors in the applet? This would help a lot for those that have limited
space on their screens.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/9347354-expose-the-ability-to-hide-the-temperature-units-of-the-sensors?utm_campaign=plugin&utm_content=tracker%2F1631700&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1631700&utm_medium=issues&utm_source=github).
@sc0w

This comment has been minimized.

Show comment
Hide comment
@sc0w

sc0w Jul 12, 2016

Member

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

Member

sc0w commented Jul 12, 2016

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

@raveit65

This comment has been minimized.

Show comment
Hide comment
@raveit65

raveit65 Jul 12, 2016

Member

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

Member

raveit65 commented Jul 12, 2016

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

@sc0w

This comment has been minimized.

Show comment
Hide comment
@sc0w

sc0w Jul 13, 2016

Member

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

Member

sc0w commented Jul 13, 2016

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

@info-cppsp

This comment has been minimized.

Show comment
Hide comment
@info-cppsp

info-cppsp Sep 4, 2017

Member

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

Member

info-cppsp commented Sep 4, 2017

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

@raveit65

This comment has been minimized.

Show comment
Hide comment
@raveit65

raveit65 Oct 25, 2017

Member

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.

Member

raveit65 commented Oct 25, 2017

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.

@info-cppsp

This comment has been minimized.

Show comment
Hide comment
@info-cppsp

info-cppsp Oct 25, 2017

Member

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

Member

info-cppsp commented Oct 25, 2017

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

@raveit65

This comment has been minimized.

Show comment
Hide comment
@raveit65

raveit65 Oct 25, 2017

Member

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?

Member

raveit65 commented Oct 25, 2017

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?

@info-cppsp

This comment has been minimized.

Show comment
Hide comment
@info-cppsp

info-cppsp Oct 25, 2017

Member

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.

Member

info-cppsp commented Oct 25, 2017

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.

@info-cppsp

This comment has been minimized.

Show comment
Hide comment
@info-cppsp

info-cppsp Oct 25, 2017

Member

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."

Member

info-cppsp commented Oct 25, 2017

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."

@raveit65

This comment has been minimized.

Show comment
Hide comment
Member

raveit65 commented Oct 25, 2017

fixed 9912a19

@raveit65 raveit65 closed this Oct 25, 2017

@info-cppsp

This comment has been minimized.

Show comment
Hide comment
@info-cppsp

info-cppsp Oct 26, 2017

Member

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...

Member

info-cppsp commented Oct 26, 2017

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment