projecthamster / hamster-shell-extension

Shell extension for hamster
http://projecthamster.org
GNU General Public License v3.0
217 stars 92 forks source link

"Replace calendar" option breaks, maybe simplify positioning options? #335

Open matthijskooijman opened 4 years ago

matthijskooijman commented 4 years ago

When I select "Positioning: Replace calendar" in the extension settings, the extension is placed left of the calendar, but the calendar is also still shown. journalctl -g hamster shows:

okt 19 09:33:08 grubby gnome-shell[155596]: JS ERROR: ReferenceError: dateMenu is not defined
                                            _placeWidget@/home/matthijs/.local/share/gnome-shell/extensions/contact@projecthamster.org/extension.js:228:13
                                            deferred_enable@/home/matthijs/.local/share/gnome-shell/extensions/contact@projecthamster.org/extension.js:145:14
                                            enable/<@/home/matthijs/.local/share/gnome-shell/extensions/contact@projecthamster.org/extension.js:131:14
                                            _makeProxyWrapper/</<@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:262:21

Which explains this behavior. I'm not sure why this happens, looking at the source for my gnome-shell 3.36.3, I see that Main.panel.statusArea.dateMenu is still used, but maybe there is an ordering problem there?

Regardless, I was not actually using this positioning option, I just tried it when debugging another issue, so I don't care much about it. Given that this positioning option, and even more so the "Replace activities" option, messes with gnome-shell internals and produces fragile coupling with the gnome-shell internals, I wonder if the positioning options should maybe simplified to just "left", "center" and "right" (maybe also with an "insert-position" option to control the position within these three boxes)? I think there are other extensions available to remove the calendar or activities buttons, which should allow the same behavior for anyone that really needs this?

mwilck commented 3 years ago

No solution to this problem, but we do have a new "center, next to calendar" placement option now.