notes-extension-gnome icon indicating copy to clipboard operation
notes-extension-gnome copied to clipboard

Option to show notes at start-up (2 gsettings keys: state has to be saved too)

Open themighty1 opened this issue 3 years ago • 7 comments

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.

themighty1 avatar Apr 04 '21 12:04 themighty1

+1, happens to me as well, on 3.36.7.

floe avatar Jun 01 '21 08:06 floe

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 avatar Jun 14 '21 16:06 maoschanz

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

themighty1 avatar Jun 14 '21 16:06 themighty1

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

maoschanz avatar Jun 14 '21 16:06 maoschanz

This would be very helpful - I tend to forget about my notes when they're not visible without me clicking the icon.

floe avatar Jun 15 '21 09:06 floe

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.

themighty1 avatar Jul 30 '21 11:07 themighty1

I tried with @glerroo’s branch (line 37 if I am right), and it seems it doesn’t not work anymore.

945fc41467 avatar Jan 10 '24 09:01 945fc41467