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

size of the sidepanel was not restored after a restart of Geany #3070

Closed
ralf3u opened this issue Dec 26, 2021 · 21 comments
Closed

size of the sidepanel was not restored after a restart of Geany #3070

ralf3u opened this issue Dec 26, 2021 · 21 comments
Labels
can't reproduce A developer couldn't reproduce the issue

Comments

@ralf3u
Copy link

ralf3u commented Dec 26, 2021

What I did:
I opened Geany (I'm sure that Geany was maximized).
I changed the size of the sidepanel at about 50%, so 50% editor and 50% sidepanel.
I closed Geany.
I reopened Geany.

Result
It was not any more 50% editor and 50% sidepanel. I tried it many times.

Then I did something like this:
I changed the size of the window, then I changed the size of the sidepanel. Then I closed Geany. I reopened Geany. Then I maximized Geany. And now it works properly, so the size of the sidepanel is remembered after a restart of Geany.

@ralf3u
Copy link
Author

ralf3u commented Dec 26, 2021

Help->Debug Message:
19:59:04.823621: Geany INFO : Geany 1.39, de_DE.UTF-8
19:59:04.823671: Geany INFO : GTK 3.24.25, GLib 2.68.1
19:59:04.823775: Geany INFO : OS: Ubuntu 21.04 (hirsute)
19:59:04.823790: Geany INFO : System data dir: /usr/share/geany
19:59:04.823811: Geany INFO : User config dir: /home/p/.config/geany
19:59:04.850572: GLib-GIO DEBUG : _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
19:59:05.119492: fcitx-connection DEBUG : _fcitx_connection_create_ic
19:59:05.119580: fcitx-connection DEBUG : _fcitx_connection_watch
19:59:05.429084: Geany INFO : Loaded GTK+ CSS theme '/usr/share/geany/geany.css'
19:59:05.432322: Geany INFO : Loaded GTK+ CSS theme '/usr/share/geany/geany-3.20.css'
19:59:05.451231: Geany INFO : System plugin path: /usr/lib/x86_64-linux-gnu/geany
19:59:05.481015: Geany INFO : Added filetype Clojure (65).
19:59:05.481054: Geany INFO : Added filetype Kotlin (66).
19:59:05.481076: Geany INFO : Added filetype Graphviz (67).
19:59:05.481097: Geany INFO : Added filetype Groovy (68).
19:59:05.481130: Geany INFO : Added filetype Arduino (69).
19:59:05.481152: Geany INFO : Added filetype TypeScript (70).
19:59:05.481173: Geany INFO : Added filetype Meson (71).
19:59:05.481193: Geany INFO : Added filetype JSON (72).
19:59:05.481213: Geany INFO : Added filetype Cython (73).
19:59:05.481233: Geany INFO : Added filetype Genie (74).
19:59:05.481254: Geany INFO : Added filetype Swift (75).
19:59:05.481274: Geany INFO : Added filetype Nim (76).
19:59:05.481294: Geany INFO : Added filetype Scala (77).
19:59:05.481326: Geany INFO : Added filetype CUDA (78).
19:59:05.534565: Geany INFO : Loaded libvte from libvte-2.91.so.0
...

@elextr
Copy link
Member

elextr commented Dec 27, 2021

I can't follow your steps to reproduce there seems to be missing steps. I presume you built from nightly tarball to get a 1.39, unfortunately that doesn't say what the git was when you built it as it does for built from git (see below), 1.39 is still in development so things can change at any point.

I ran Geany:

(null): Geany INFO		: Geany 1.39 (git >= b7558417), en_AU.UTF-8
(null): Geany INFO		: GTK 3.24.20, GLib 2.64.6
(null): Geany INFO		: OS: Linux Mint 20 (ulyana)

on a separate config ie geany -c /tmp/something and did:

  1. start Geany, starts with the default size, not maximised
  2. maximise geany, close and reopen, sidebar has same width
  3. change sidebar width, close and reopen, sidebar retains new width
  4. unmaximise geany, size and position is defined by the WM I suspect since Geany has no record of the pre-maximise values, but sidebar is the same width in pixels not percent.
  5. close and reopen, sidebar retains the same width

AFAIK thats the expected behaviour. If yours behaves differently can you post the values of the treeview_position and geometry from /tmp/something/session.conf after each time you close Geany in the steps above. Use another editor to look at the file, want Geany closed.

[Edited, didn't finish before posting, oops]

@ralf3u
Copy link
Author

ralf3u commented Dec 27, 2021

@elextr Now everything works fine, so I can't reproduce the issue, nor with maximized window, nor with not maximized window, and nor with different position of the not maximized window.
But the issue was there, and many times it was there, till I started to play around with the window size. I played with the window size only because of the comment of a user in #2562 (comment).
Next time it will happen, I would like to publish of the treeview_position and geometry from /tmp/something/session.conf. The problem: I can't find /tmp/something/session.conf. I find only /tmp/.

@elextr
Copy link
Member

elextr commented Dec 28, 2021

I can't find /tmp/something/session.conf.

You have to tell Geany to use the alternative config by starting from the command line with the -c /tmp/something . I picked /tmp/something because it is unlikely to exist so no other settings get in the way and Geany will create it with default values then it gets deleted automagically when the machine is shutdown.

If it happens again look for session.conf in whatever config you are using, default your home directory/.config/geany

@elextr elextr added the can't reproduce A developer couldn't reproduce the issue label Dec 28, 2021
@elextr
Copy link
Member

elextr commented Dec 28, 2021

you can re-open if you get more information

@elextr elextr closed this as completed Dec 28, 2021
@ralf3u
Copy link
Author

ralf3u commented Dec 28, 2021

@elextr

You write in your comment #3070 (comment) several times "reopen".
Before I start testing: Should I reopen Geany always from the terminal?

@elextr
Copy link
Member

elextr commented Dec 28, 2021

@ralf3u to be able to specify the config with -c you have to run from the terminal, and to be clear all occurrances of "start" or "reopen" means geany -c /tmp/something on the terminal command line (hint: on a ubuntu shell the uparrow key recalls the previous command so you don't retype it, saves time and makes it identical).

@ralf3u
Copy link
Author

ralf3u commented Dec 28, 2021

@elextr To your tests mentioned in #3070 (comment):

I made the test on an other computer and everything works fine.
On the computer where I had the issue the test does not work fine (see point 3). Here the result step by step:

That is the content of session.conf after rebooting the computer:
[geany]
fullscreen=false
treeview_position=1173
msgwindow_position=816
geometry=415;400;1501;535;1;

Then I do point 1.
Then I do point 2.
Result: sidebar has same width.
After closing Geany, that is the content of session.conf:

[geany]
fullscreen=false
treeview_position=1173
msgwindow_position=816
geometry=415;400;1501;535;1;

Then I do point 3.
"sidebar retains new width": NOT IN MY CASE!! The width is exactly like point 2.
After closing Geany, that is the content of session.conf:

[geany]
fullscreen=false
treeview_position=1173
msgwindow_position=816
geometry=415;400;1501;535;1;

Then I do point 4.
"but sidebar is the same width in pixels not percent": That is the case.
After closing Geany, that is the content of session.conf:

[geany]
fullscreen=false
treeview_position=1173
msgwindow_position=816
geometry=415;400;1501;535;1;

Then I do point 5.
"sidebar retains the same width": That is the case.
After closing Geany, that is the content of session.conf:
[geany]
fullscreen=false
treeview_position=1173
msgwindow_position=816
geometry=415;400;1501;535;1;

@elextr
Copy link
Member

elextr commented Dec 28, 2021

I'm not sure what you are doing, but I asked for /tmp/something/session.conf "after each time you close Geany in the steps above. Use another editor to look at the file, want Geany closed.". There are only three "close" instructions in that list but you have pasted five sets of identical values.

What I get at the three points where Geany is closed are:

treeview_position=156
geometry=0;0;2560;1388;1;
treeview_position=912
geometry=0;0;2560;1388;1;
treeview_position=912
geometry=320;0;1920;1388;0;

Note the change in treeview_position when the sidebar is resized and the change in geometry when Geany is unmaximised. These are expected.

Also I notice you have provided the value of "fullscreen". Full screen is NOT maximised, maximised is the window control not View->Fullscreen (assuming whatever window manager you are using on Ubuntu has a maximise control). If you mean fullscreen that is a different thing.

@ralf3u
Copy link
Author

ralf3u commented Dec 28, 2021

Use another editor to look at the file, want Geany closed

I did that with FeatherPad.

Also I notice you have provided the value of "fullscreen". Full screen is NOT maximised,

I did not go in fullscreen. I did maximize the window.

But now I know what I did wrong:
I menrtioned the values of session.conf that is located in .config/geany and not in /tmp/something.
So, I will redo the test. Sorry for my mistake.

@ralf3u
Copy link
Author

ralf3u commented Dec 28, 2021

@elextr To your tests mentioned in #3070 (comment)

I do point 1.

Then I do point 2.
"maximise geany, close"
After closing Geany, that is the content of session.conf that is located in /tmp/something:
[geany]
fullscreen=false
treeview_position=165
msgwindow_position=398
geometry=-1;-1;-1;-1;1;

Then I do point 3.
"change sidebar width, close"
After closing Geany, that is the content of session.conf that is located in /tmp/something:
[geany]
fullscreen=false
treeview_position=165
msgwindow_position=398
geometry=-1;-1;-1;-1;1;
"and reopen, sidebar retains new width": NOT IN MY CASE!! The width is exactly like point 2.

Then I do point 4.
"but sidebar is the same width in pixels not percent": That is the case. So, the size is like point 2.

Then I do point 5.
"close"
After closing Geany, that is the content of session.conf that is located in /tmp/something:
[geany]
fullscreen=false
treeview_position=165
msgwindow_position=644
geometry=0;0;1366;846;0;
"sidebar retains the same width": That is the case. So, the size is like point 2.

@ralf3u
Copy link
Author

ralf3u commented Dec 28, 2021

I made a test:
If fullscreen would be turned on, then the value is fullscreen=true after closing Geany.

@elextr
Copy link
Member

elextr commented Dec 28, 2021

If fullscreen would be turned on, then the value is fullscreen=true after closing Geany.

Yes, but remember the values you had posted before were wrong, so the fact that "fullscreen" was false did not tell me what you were doing :-)

The result you got from point 3 does not make sense, it has not saved a new sidebar width, it is still 165 which is why Geany reopens with that. What are you doing to "change the sidebar width"?

Maybe we are not talking about the same thing, I mean the width of the "symbols" or "documents" tree on the left of the edit window.

@ralf3u
Copy link
Author

ralf3u commented Dec 28, 2021

The result you got from point 3 does not make sense, it has not saved a new sidebar width, it is still 165 which is why Geany reopens with that. What are you doing to "change the sidebar width"?

I grabbed with the mouse the vertical line between editor and sidepanel and moved it. So instead of having about 10% and 90% I changed it to 50% and 50%.

@ralf3u
Copy link
Author

ralf3u commented Dec 28, 2021

As I mentioned before, on an other computer the test works fine, but not on this computer. Both are running with Lubuntu 21.04. I'm not a software developer, but for me it seems to be that Geany is the problem.

@elextr
Copy link
Member

elextr commented Dec 28, 2021

but for me it seems to be that Geany is the problem.

Yes, but since only one computer can reproduce the problem the question is what is the difference between the two computers, exactly which version of Geany 1.39? Which version of GTK and Glib, anything else different?

@elextr elextr reopened this Dec 28, 2021
@ralf3u
Copy link
Author

ralf3u commented Dec 28, 2021

... which version of Geany 1.39? Which version of GTK and Glib, ...

Exactly the same. I got Geany 1.39 by PPA, described in https://github.com/xiota/geany-preview.

@elextr
Copy link
Member

elextr commented Dec 28, 2021

Well, I'm afraid we don't know what that PPA provides, its a personal archive. It might be better to build Geany from a nightly tarball, then you know its exactly the same since its made from the same tarball.

But then when you are sure its exactly the same Geany on both systems then it comes back to what is different between the two systems? The same Geany can't behave in differing ways unless the underlying system is different.

@ralf3u
Copy link
Author

ralf3u commented Dec 28, 2021

@elextr

But then when you are sure its exactly the same Geany on both systems then it comes back to what is different between the two systems? The same Geany can't behave in differing ways unless the underlying system is different.

Maybe the versions of Geany are different because now I remembered that I had problems with this computer when installing Geany 1.39 by PPA.

It might be better to build Geany from a nightly tarball, then you know its exactly the same since its made from the same tarball.

I have no idea how to do this.

My suggestion:
You can close this issue if you want. When I will install Lubuntu 21.10 or rather Lubuntu 22.04 on both computer, I will first install Geany by sudo apt install geany. Then I will do on both computer the test, so with Geany 1.37 or rather Geany 1.38. If everything is fine, then I will install Geany by PPA. And if the issue is still there, then it could be that the issue has to do with the private archive. I will try to do also the test when Geany 1.39 is officially released.

@xiota
Copy link
Contributor

xiota commented Dec 30, 2021

@ralf3u That is my PPA. The build you're using is from 2021-11-30, and has several patches that have not been merged upstream (probably based on d8f2f14). (A one-line description of each patch is noted in the deb changelog.) If you have more problems with that PPA, please contact me elsewhere.

One of the patches is #2979, which changes save/restore of geometry and position. The issue you describe (not accurately saving sidebar position when window is maximized) happens sometimes on my computer. There may be some race-like condition in my patch. I'll update the PPA to remove it.

@ralf3u
Copy link
Author

ralf3u commented Jan 11, 2022

@xiota I updated the system. Then I did again the test mentioned in #3070 (comment). And now the test works fine.

@ralf3u ralf3u closed this as completed Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can't reproduce A developer couldn't reproduce the issue
Projects
None yet
Development

No branches or pull requests

3 participants