Closed MonsieurV closed 3 years ago
I'm not on 3.38 yet, but this problem is probably fixed by #183 (already merged into the master branch).
Indeed this work by manual installation from the master branch.
Could there be a release on https://extensions.gnome.org/extension/841/freon/?
Done, under review
Hi!
I have to add also this patch to get it to work:
--- /tmp/freonItem.js 2020-10-03 05:46:53.555147052 +0200
+++ freonItem.js 2020-10-03 05:47:41.939514289 +0200
@@ -1,6 +1,7 @@
const GObject = imports.gi.GObject;
const PopupMenu = imports.ui.popupMenu;
const St = imports.gi.St;
+const Clutter = imports.gi.Clutter;
var FreonItem = GObject.registerClass(class FreonItem extends PopupMenu.PopupBaseMenuItem {
@@ -10,9 +11,9 @@ var FreonItem = GObject.registerClass(cl
this._key = key;
this._gIcon = gIcon;
- this._labelActor = new St.Label({text: displayName ? displayName : label});
+ this._labelActor = new St.Label({text: displayName ? displayName : label, x_align: Clutter.ActorAlign.CENTER, x_expand: true});
this.actor.add(new St.Icon({ style_class: 'popup-menu-icon', gicon : gIcon}));
- this.actor.add(this._labelActor, {x_fill: true, expand: true});
+ this.actor.add_child(this._labelActor);
this._valueLabel = new St.Label({text: value});
this.actor.add(this._valueLabel);
}
Looks like latest update work on gnome-shell 3.38 only. I inactivated latest update and uploaded new version for 3.38 only.
I can confirm what @mokilcde posted. Without his patch the extension worked somehow, but I couldn't open the popup-menu when I clicked on the item in the panel.
Its working fine now with his patch.
I got the following error:
JS ERROR: TypeError: meta is null
_patchContainerClass/containerClass.prototype.child_set@resource:///org/gnome/shell/ui/environment.js:43:13
_patchContainerClass/containerClass.prototype.add@resource:///org/gnome/shell/ui/environment.js:52:18
_init@/usr/share/gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/freonItem.js:15:20
_appendMenuItems@/usr/share/gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/extension.js:528:28
_updateDisplay@/usr/share/gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/extension.js:462:22
_updateUI@/usr/share/gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/extension.js:297:18
_init/this._updateUITimeoutId<@/usr/share/gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/extension.js:122:18
and I can confirm that @mokilcde's patch works.
Just upgraded to 3.38 myself. I found that @mokilcde's patch changed the alignment on the Freon items, so I slightly changed it to:
diff --git a/freon@UshakovVasilii_Github.yahoo.com/freonItem.js b/freon@UshakovVasilii_Github.yahoo.com/freonItem.js
index 05d623da88ed..901e0e4a4608 100644
--- a/freon@UshakovVasilii_Github.yahoo.com/freonItem.js
+++ b/freon@UshakovVasilii_Github.yahoo.com/freonItem.js
@@ -10,9 +10,9 @@ var FreonItem = GObject.registerClass(class FreonItem extends PopupMenu.PopupBas
this._key = key;
this._gIcon = gIcon;
- this._labelActor = new St.Label({text: displayName ? displayName : label});
+ this._labelActor = new St.Label({text: displayName ? displayName : label, x_expand: true});
this.actor.add(new St.Icon({ style_class: 'popup-menu-icon', gicon : gIcon}));
- this.actor.add(this._labelActor, {x_fill: true, expand: true});
+ this.actor.add_child(this._labelActor);
this._valueLabel = new St.Label({text: value});
this.actor.add(this._valueLabel);
}
Please create pull request, I cannot check it, I'm using Xfce now
Done #188
Just upgraded to 3.38 myself. I found that @mokilcde's patch changed the alignment on the Freon items, so I slightly changed it to:
diff --git a/freon@UshakovVasilii_Github.yahoo.com/freonItem.js b/freon@UshakovVasilii_Github.yahoo.com/freonItem.js index 05d623da88ed..901e0e4a4608 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/freonItem.js +++ b/freon@UshakovVasilii_Github.yahoo.com/freonItem.js @@ -10,9 +10,9 @@ var FreonItem = GObject.registerClass(class FreonItem extends PopupMenu.PopupBas this._key = key; this._gIcon = gIcon; - this._labelActor = new St.Label({text: displayName ? displayName : label}); + this._labelActor = new St.Label({text: displayName ? displayName : label, x_expand: true}); this.actor.add(new St.Icon({ style_class: 'popup-menu-icon', gicon : gIcon})); - this.actor.add(this._labelActor, {x_fill: true, expand: true}); + this.actor.add_child(this._labelActor); this._valueLabel = new St.Label({text: value}); this.actor.add(this._valueLabel); }
Expand for diff on top of @mokilcde's patch. Nice, now it's working, but still missing item text labels. Only showing temps on the list.
@gilvbp that's curious, text labels are showing fine for me (and I imagine for the others that posted here).
Can you post a screenshot and take a look at the logs?
@gilvbp that's curious, text labels are showing fine for me (and I imagine for the others that posted here).
Can you post a screenshot and take a look at the logs?
I double-check the .js and saw that was missing const Clutter = imports.gi.Clutter;
. Now it's ok. Obrigado, doutor! Tmj
@gilvbp great!
Although that's only necessary if you have kept x_align: Clutter.ActorAlign.CENTER
.
Is a newer version that works in 3.38 available now? How can we get it? Thanks.
@spxak1 you can use https://extensions.gnome.org/extension/841/freon/
@spxak1 you can use https://extensions.gnome.org/extension/841/freon/
Thanks, but this is what I get:
JS ERROR: Extension freon@UshakovVasilii_Github.yahoo.com: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data @ /home/otheos/.local/share/gnome-shell/extensions/freon@UshakovVasilii_Github.yahoo.com/nvmecliUtil.js:7
I think it fails to run nvme (needs sudo). I will look into this too.
Edit: Indeed, it fals to run nvme because it needs sudo. A temporary fix is chmod u+s /usr/sbin/nvme but I am sure there is a more elegant way (add some user to the disk group?). Please advise.
Thanks again.
Hi!
The merge request is already pushed so it shall be available.
But you can chekcout the git version and see whether it works
CU Michael
Is a newer version that works in 3.38 available now? How can we get it? Thanks.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.*
CU
Michael
--
,''. : :' : Michael Ott
. ' e-mail: michael at k-c13 dot org
-
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der Werbung sowie der Markt- oder Meinungsforschung.
The extension does not work anymore on Gnome 3.38, with the error
TypeError: meta is null
.Stack trace: