-
Notifications
You must be signed in to change notification settings - Fork 12
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
Restore tabs no longer works #14
Comments
Hi @duck7000 and sorry for the late response. Which is the Gnome version? |
First of all thanks for making this and your reaction! I don't know, i don't use Gnome. |
I see. I'm still using Ubuntu |
That is of course the big difference between a Arch based distro or Ubuntu based, i will hit problems much sooner than on Ubuntu. In think it has something to do with amtk get replaced by libgedit-amtk but that is guessing as i only develop in php |
Oeps wrong button |
I started gedit on the terminal, opened a few files and closed gedit this gives some interesting errors:
I hope this may help you get started |
Are you still working on this, as your last reaction was from 27 November 2023? |
Not yet. Probably you should try, as suggested by the error, replace all |
i tried that, result is the same. |
same issue here. If I replace Traceback (most recent call last):
File "/home/user/.local/share/gedit/plugins/restoretabs.py", line 77, in on_window_show
self.window.create_tab_from_location(location, None, 0,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Window' object has no attribute 'create_tab_from_location'. Did you mean: 'get_tab_from_location'? looks like there have been changes to the gedit API as I can see that some files from gedit-plugins also stopped working. https://gitlab.gnome.org/World/gedit/gedit-plugins/-/commits/master/plugins/sessionsaver/sessionsaver?ref_type=heads |
ok, I have managed to adress the missing 'create_tab_from_location' by replacing it with tab creation followed by document loading. tab = self.window.create_tab(True) #create new tab and jump_to it
tab.load_file(location, None, 0, 0, True) #GFile *location,*encoding,line_pos,column_pos,create
see updated file here: https://github.com/Batwam/gedit-restore-tabs/blob/master/restoretabs.py |
ok, I dug through the documentation and I think that I found a workaround to delete the Untitled Document tab. See explanations in the pull request above. |
Thank you for fixing this, I couldn't figure it out but with your changes it works again. |
yeah, it's a bit of hacky to be honest and I occasionally find that I have to select a file twice for it to open but still better than nothing as I can't live without this feature ;-) |
I just switched to Ubuntu 24.04 (was using 22.04). I've noticed that the default editor, Gnome Text Editor already has a session management (i.e., it restores previous opened files). |
Yeah, Text Editor does have tab management, however it doesn't have any plugin to include a terminal within the editor. That's the main reason I'm still using gedit as I use it (mostly) as a light IDE for coding scripts. |
I've merged the PR. |
I'm using Manjaro and after update glibc to 2.38-7 restore tabs no longer works
During this update i noticed that amtk get replaced by libgedit-amtk, gedit now uses libgedit-amtk as required.
I did install restore tabs as described here but it didn't work.
Restore tabs is still in plugins section of gedit and checked but tabs are not restored
The text was updated successfully, but these errors were encountered: