Skip to content
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

Make it work with gnome-shell 3.36 #564

Closed
wants to merge 9 commits into from

Conversation

shemgp
Copy link
Contributor

@shemgp shemgp commented Mar 3, 2020

Well actually it's for GNOME Shell 3.35.91 still, but hopefully no more changes required for 3.36.

References for where I got hints for the fixes:

@rishabhpatel9
Copy link

Thank you! this works!

@rishabhpatel9
Copy link

For some reason, I can't access the preferences anymore. neither is there a logo of the extension in applications. How do i fix that?

@shemgp
Copy link
Contributor Author

shemgp commented Mar 5, 2020 via email

@chrisjbillington
Copy link

Thanks works here on Arch!

Also can't access preferences from the context menu though. I can access preferences of other extensions through their context menus, and I access the system-monitor extension's preferences through gnome-tweaks.

@velitasali
Copy link

I don't think the problem with the preferences is related to the host. I can access the preferences of system-monitor with the new 'Extensions' app.

Thanks for the work.

@d2r2
Copy link

d2r2 commented Mar 9, 2020

Confirmed. This works on Arch. Thanks!
Update: @shemgp, button "Preferences..." from the widget doesn't work, but preferences window can be opened from Tweaks app.

@AlexWayfer
Copy link

You can mark this PR as resolving #559.

@hadim
Copy link

hadim commented Mar 10, 2020

Thanks for this PR! I am waiting for it.

@shemgp
Copy link
Contributor Author

shemgp commented Mar 10, 2020

Preferences menu should work now. I tested it on GNOME 3.36.0.

@d2r2
Copy link

d2r2 commented Mar 10, 2020

Preferences menu should work now. I tested it on GNOME 3.36.0.

Confirmed. Preference menu works from widget after update! @shemgp, thanks a lot!

@vltr
Copy link

vltr commented Mar 11, 2020

This PR works, even though the size of each graph on display doesn't respect the size set (initially) on settings:

screenshot_2020-03-11_06-33-27

Going to the settings and resetting the value to 40 (in my case, by clicking + and -) makes it works properly (until next login):

screenshot_2020-03-11_06-34-05

@shemgp
Copy link
Contributor Author

shemgp commented Mar 11, 2020

@vltr It does remember the values for me and upon looking at the code, it should too. Perhaps you could try resetting the system-monitor folder in dconf-editor, or running make install in the checkout of this repo.

@vltr
Copy link

vltr commented Mar 12, 2020

@shemgp did that (from your branch), no luck 😬 my extension is installed locally. I'll play around with some other extensions to see if any of them may be causing this ... Because, well, I just got "Gnome'd" again 😅

@vltr
Copy link

vltr commented Mar 12, 2020

@shemgp update: it does work properly if compact display is off. When on, it gives me the behavior I mentioned earlier. Weird ...

@shemgp
Copy link
Contributor Author

shemgp commented Mar 12, 2020

@vltr Compact display compacts the width by 1.5 so maybe like me, you thought it's not remembering it, when actually it's just compacting it. Try putting, eg., 100 on only one of them and see that it's still wider than the others even in compact mode and when restarted.

@vltr
Copy link

vltr commented Mar 12, 2020

@shemgp wrong assumption made by me, then. All I thought it did was appending -compact to the CSS classes ... Maybe at one point, I don't know. Sorry for the misunderstanding 😐

@suiryc
Copy link

suiryc commented Mar 12, 2020

@vltr I confirm that the behaviour appears to have changed as you though.

In gnome 3.34, the non-compact mode looks like this (bar and text):
standard-bar
standard-text
The compact mode does shrink the text and the space between graphs in the bar:
compact-bar
compact-text

Now in gnome 3.36, the compact mode starts like this in the bar:
compact-bar-3 36
And as you said, simply doing "+1" "-1" for each graph in the preferences (still in compact mode) does resize them to what we had in 3.34 (until you restart the session):
compact-bar-2-3 36

@shemgp
Copy link
Contributor Author

shemgp commented Mar 13, 2020

@suiryc, I made the resize ([+] and [-]) work the same as when loading, for this PR anyway, as I think that's the intention of the original developers: To compact the width too when compact is set. It's just that on resize, they forgot to make it compute the compacted width.

If you want to have the same width as the non-compact mode when on compact mode, you'll just have to multiply the size by 1.5.

@suiryc
Copy link

suiryc commented Mar 13, 2020

Maybe.
The previous behaviour has been there for some time now (have been using this extension for a few years).

I am not sure either of what the majority of people using this extension expect when dealing with 'graph width' and 'refresh rate'.

Depending on the intent the new behaviour makes it a bit harder to configure.
Previously it was easy to configure the 'history length' to display in the graph: e.g. a width of N with a refresh rate of 2s would give N*2s of history. And having compact mode or not had no impact on that.
Now depending on the mode there would be the 1.5 factor to apply or not. Hoping this hard-coded value won't change too much in the future then 😉

@zegkljan
Copy link

I was using the version from this PR for some time (ever since gnome-shell 3.36 started rolling out on archlinux) and everything was quite fine up until today when it stopped working. The error I get is

JS ERROR: Extension system-monitor@paradoxxx.zero.gmail.com: Error: Tried to construct an object without a GType; are you using GObject.registerClass() when inheriting from a GObject type?
SystemMonitor_TipItem@/home/zegkljan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/extension.js:635:9
tip_format@/home/zegkljan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/extension.js:898:27
SystemMonitor_Cpu@/home/zegkljan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/extension.js:1191:14
createCpus@/home/zegkljan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/extension.js:1353:24
enable@/home/zegkljan/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/extension.js:2286:26
_callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:160:32
loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:311:26
activate@/home/zegkljan/.local/share/gnome-shell/extensions/extension-reloader@nls1729/extension.js:112:34
vfunc_button_release_event@resource:///org/gnome/shell/ui/popupMenu.js:138:14

I would be thrilled to help (I can't imagine life without this extension), if instructed because I know literally nothing about how gnome-shell extensions work and how are they developed.

I'm running on gnome-shell 3.36.0 on wayland on archlinux.

@shemgp
Copy link
Contributor Author

shemgp commented Mar 18, 2020

@zegkljan There's no more SystemMonitor_TipItem in this PR. Please make sure you're using this PR.

@zegkljan
Copy link

@shemgp Sorry, I'm an idiot. I did not checkout the correct branch. Everything works.

@DmitryBurstein
Copy link

I'm getting the following on F32 beta with gnome-shell-3.36.1-2.fc32.x86_64:
Error: Tried to construct an object without a GType; are you using GObject.registerClass() when inheriting from a GObject type?

@shemgp
Copy link
Contributor Author

shemgp commented Apr 8, 2020

@DmitryBurstein Please make sure you git checkout gnome-shell-3.36 before running make install?

@DmitryBurstein
Copy link

DmitryBurstein commented Apr 8, 2020

The Makefile I run was inside ~/gnome-shell-system-monitor-applet-gnome-shell-3.36/, so I hope it was the right one.
Anyways, the .local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/extension.js file does include "var GObject = imports.gi.GObject;" and everything else you've changed there.

@shemgp
Copy link
Contributor Author

shemgp commented Apr 8, 2020

@DmitryBurstein Here's how to install this PR:

git clone https://github.com/shemgp/gnome-shell-system-monitor-applet.git
cd gnome-shell-system-monitor-applet
git checkout gnome-shell-3.36
make install

Then restart gnome-shell.

@DmitryBurstein
Copy link

Great, thanks a lot! Now, after a log off/on cycle, everything is working again. Many thanks for your help!

@danielquinn
Copy link

This PR is beginning to devolve into a howto manual for installing this branch rather than fixing an incompatibility. What exactly is the hold up for pushing this out to extensions.gnome.org?

@AllesMeins
Copy link

AllesMeins commented Apr 10, 2020

What exactly is the hold up for pushing this out to extensions.gnome.org?

I second this - since installing manually also has the problem that I'd have to deactivate automatic updates - otherwise the extension is reverted to the old non-functioning one after each reboot.

@joshlangley
Copy link

@AllesMeins, I personally used a quick and dirty fix for this by making ~/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/ a read-only folder using sudo. It essentially prevents any modification of only that extension. Again, quick and dirty. I too think this should get pushed.

@leinardi
Copy link

leinardi commented Apr 10, 2020

This is great, thank you.
Only problem is that GNOME thinks the latest published version is newer than this, and automatically downloads it to ~/.local/share/gnome-shell/extension-updates and applies it when the shell is restarted.
Currently I work around the auto-update by explicitly specifying the version number, i.e., make install VERSION=39 (latest published version is 38 at the time of writing). Is there a less hackish way to do this?

@AllesMeins @ElSenor64 this seems to work for me and I think is better than changing file permissions.

@will-ca
Copy link

will-ca commented Apr 11, 2020

I'd like to again point out that the immediately preceding two comments— that (1) any discussion about developing this PR quickly devolves into instructions for manually installing it, and (2) the people who do install it manually seem to report no continued incompatibilities— seem to illustrate both that there is a considerable user demand for pushing this into the main branch and that it is ready to be released from there.

@AllesMeins
Copy link

seem to illustrate both that there is a considerable user demand

And there will be even more in less then ten days when Ubuntu 20.04 is released and the current version of the extension will break for everybody doing the upgrade.

@franglais125
Copy link
Collaborator

Rebased and merged. It would be great if additional testing could be done, for feedback. In case any regression might have sneaked in.

@sideeffffect
Copy link

could you please make a release that contains this fix? 🙏

@AlexWayfer
Copy link

Rebased and merged. It would be great if additional testing could be done, for feedback. In case any regression might have sneaked in.

"Preferences..." in the extension's drop-down menu opens extensions window. Is it expected?

image

image

@shemgp
Copy link
Contributor Author

shemgp commented Apr 13, 2020

@AlexWayfer should be fixed by #576

@AlexWayfer
Copy link

@AlexWayfer should be fixed by #576

Thank you!

@will-ca
Copy link

will-ca commented Apr 16, 2020

...Does anyone know who maintains the upload on extensions.gnome.org, and whether, when, or how it might be updated to reflect this patch?

Aside from the lack of automatic updating, requiring a separate manual installation also fragments the userbase, and has already confused many people and will likely soon confuse many more if a new Ubuntu release is indeed going to imminently break this extension for hundreds or thousands of users.

@franglais125
Copy link
Collaborator

@will-ca and everyone:

@chrisspen is taking care of this, and offers his time for free to do so responsibly. So let's please be patient.

Every time there is a new Gnome Shell release, lots of bugs pop up everywhere, with mixed reports. It's hard to track all the possible configuration mishaps (distros, versions, patched distros, etc.) To address this, look at some of the work he is proposing in the docker branch.

Whenever this new version will be ready for shipping, it's better to get it right.

Believe me, I do understand the frustration: I use myself other extensions and am in the same position as you.

Cheers everyone. And thank you @chrisspen for maintaining this extension for a few years already.

@gerstrong
Copy link

Yes, this works for me :-)

@ciltocruz
Copy link

Finally this method has worked correctly.

Thanks to the developers.

However, this is not yet available from the GNOME extension panel web page.

A greeting.

HinTak added a commit to HinTak/gnome-shell-extension-weather that referenced this pull request May 13, 2020
Fixing "TypeError: this.actor.reparent is not a function", with reference
from
paradoxxxzero/gnome-shell-system-monitor-applet#564
"Make it work with gnome-shell 3.36"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.