notes-extension-gnome
notes-extension-gnome copied to clipboard
Option to show notes at start-up (2 gsettings keys: state has to be saved too)
Hi, on gnome-shell 3.36.4 the notes are visible on the desktop. I often lock the screen and when I return to machine to log in, the notes are not visible anymore. I have to click the icon to toggle their visibility. Is it something that is easily fixable? @maoschanz , since you have more experience with gnome-shell, maybe you could give some pointers about what causes this behaviour. I could then make a PR.
+1, happens to me as well, on 3.36.7.
fixable
You're implying it's a bug? Your title made it seem like a bug, but if notes are shown when you ask them to be shown, everything is fine.
When the extension is loaded, notes are hidden by default, and it's a feature: loading notes can take time, and people don't want their session startup to be delayed for a few seconds because of an extension. In the future i could make an option for this maybe
@maoschanz , thanks for looking into this. what i had in mind was LockScreen/UnlockScreen, not login/logout. would be nice if the extension could remember if it was visible when lockScreen happens and restore its visibility when screen is unlocked.
Sadly from the point of view of the extension, there is no distinction between a login/logout and a locking/unlocking: all the code knows is that something enabled or disabled the extension
The meaning of the new title of the issue is that, as you say, if you enable this option, it'll remember whether it was visible or not the last time i was disabled. But there will still be no distinction between login and unlocking
This would be very helpful - I tend to forget about my notes when they're not visible without me clicking the icon.
A temporary fix which worked for me:
insert here: https://github.com/maoschanz/notes-extension-gnome/blob/5ccfb5731d40b41e87e401823bfdda375ab4a2ca/notes%40maestroschan.fr/extension.js#L47
the lines
NOTES_MANAGER = new NotesManager();
if (Main.screenShield._activationTime > 0){
// this is not the first login because screen lock
// was already activated at least once
NOTES_MANAGER._loadAllNotes();
NOTES_MANAGER._showNotes();
}
This will show all notes after unlock screen regardless of their previous show/hide state.
I tried with @glerroo’s branch (line 37 if I am right), and it seems it doesn’t not work anymore.