Giter Site home page Giter Site logo

gedit-sessionsaver's Introduction

gedit session saver plugin

This is a plugin for gedit, the official text editor of the GNOME desktop environment. It’s a fork of the original gedit session saver plugin that have been dropped in gedit 3.7.1. This repository contains the ready-to-use version of this plugin that I fixed and improved in my gedit-plugins repository.

This plugin is for gedit versions 3 and above. This plugin is NOT compatible with gedit 2.x.

If python 3 is not installed or not available on your distribution, you should use the python 2.x version of this plugin. The Python 3 version requires python3-gobject or python3-gi depending of your distribution.

The translation of the plugin is not available in this repository, but it is always available in the package gedit-plugins from your distribution. If this package is installed on your system, the translation should works.

Installation

  1. Download the source code form this repository in zip format, in tar format or using the git clone command:

     $ git clone https://github.com/sphax3d/gedit-sessionsaver.git
    
  2. Link or copy the plugin file and the plugin directory into the gedit plugins directory :

     # link
     $ ln -s gedit-sessionsaver/sessionsaver ~/.local/share/gedit/plugins/
     $ ln -s gedit-sessionsaver/sessionsaver.plugin ~/.local/share/gedit/plugins/
     
     # or copy 
     $ cp gedit-sessionsaver/sessionsaver gedit-sessionsaver/sessionsaver.plugin ~/.local/share/gedit/plugins/
    
  3. Open or restart gedit.

  4. Activate the plugin through the Plugins tab in the Edit > Preferences dialog.

License

Copyright © 2006 Steve Frécinaux
GNU GPLv2. See the COPYING file.

Code available on Github at https://github.com/sphax3d/gedit-sessionsaver

gedit-sessionsaver's People

Contributors

annoab avatar atriwidada avatar benzea avatar claudep avatar dmustieles avatar frandieguez avatar gregier avatar helix84 avatar jjardon avatar joedalton2 avatar juergbi avatar jwendell avatar kelemeng avatar khaledhosny avatar krixapolinario avatar marv-cz avatar mazurs avatar milocasagrande avatar mirosnik1 avatar nacho avatar nud avatar ovitters avatar pbor avatar piotrdrag avatar pmkovar avatar stephane avatar takeshi-aihana avatar yarons avatar yeager avatar ymyasoedov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gedit-sessionsaver's Issues

Plugin List Has No Option

I followed the instructions, I don't see the option for the session saver in the plugin list in gedit.

AttributeError(s) in Gedit 3.12.1

I read that this plugin is for Gnome 3.0-3.8. I'm on debian testing (currently gnome 3.8), but Gedit is version 3.12.1.
I can activate the plugin, but when I launch Gedit I'm getting the following error:

$ gedit
Traceback (most recent call last):
  File "/home/fede/.local/share/gedit/plugins/sessionsaver/__init__.py", line 65, in do_activate
    self._insert_menu()
  File "/home/fede/.local/share/gedit/plugins/sessionsaver/__init__.py", line 74, in _insert_menu
    ui_manager = self.window.get_ui_manager()
AttributeError: 'Window' object has no attribute 'get_ui_manager'
Traceback (most recent call last):
  File "/home/fede/.local/share/gedit/plugins/sessionsaver/__init__.py", line 71, in do_update_state
    self._action_group.get_action("FileSessionSave").set_sensitive(self.window.get_active_document() != None)
AttributeError: 'SessionSaverPlugin' object has no attribute '_action_group'
Traceback (most recent call last):
  File "/home/fede/.local/share/gedit/plugins/sessionsaver/__init__.py", line 71, in do_update_state
    self._action_group.get_action("FileSessionSave").set_sensitive(self.window.get_active_document() != None)
AttributeError: 'SessionSaverPlugin' object has no attribute '_action_group'
Traceback (most recent call last):
  File "/home/fede/.local/share/gedit/plugins/sessionsaver/__init__.py", line 71, in do_update_state
    self._action_group.get_action("FileSessionSave").set_sensitive(self.window.get_active_document() != None)
AttributeError: 'SessionSaverPlugin' object has no attribute '_action_group'
Traceback (most recent call last):
  File "/home/fede/.local/share/gedit/plugins/sessionsaver/__init__.py", line 68, in do_deactivate
    self._remove_menu()
  File "/home/fede/.local/share/gedit/plugins/sessionsaver/__init__.py", line 97, in _remove_menu
    ui_manager = self.window.get_ui_manager()
AttributeError: 'Window' object has no attribute 'get_ui_manager'

Its not working on Gnome 3.10

Looks like this extension is not working in Gnome 3.10(Ubuntu 13.10 , gnome shell 3.10). I enabled the extension , opened two tabs, closed Gedit, opened it again and couldn't see those two tabs open automatically on startup.

I tried both python 2 and python 3 versions of this plugin (Both python 2 and python 3 are installed on my system)
I couldn't even enable Python2 version in plugins section. I was able to enable python3 version of the plugin but I am not able to restore tabs on startup

Broken in Ubuntu 13.10?

I'm getting errors on ubuntu 13.10 / gedit 3.8.3 / python3:

Running from terminal, on Save, I get this:

Traceback (most recent call last):
File "/home/user/.local/share/gedit/plugins/sessionsaver/init.py", line 161, in on_save_session_action
SaveSessionDialog(self.window, self, self.sessions).run()
TypeError: new() takes 1 positional argument but 4 were given

On Manage, I get this:

Traceback (most recent call last):
File "/home/user/.local/share/gedit/plugins/sessionsaver/init.py", line 164, in on_manage_sessions_action
SessionManagerDialog(self, self.sessions).run()
TypeError: new() takes 1 positional argument but 3 were given

...and with both, nothing ever happens in gedit.

Thanks for any advice or fix.

TypeError

  File "/home/muranyia/.local/share/gedit/plugins/sessionsaver/__init__.py", line 164, in on_manage_sessions_action
    SessionManagerDialog(self, self.sessions).run()
TypeError: __new__() takes 1 positional argument but 3 were given

Gedit 1.10.4, Ubuntu 14.04.1

Changing line 54 in dialogs.py to:

def __new__(cls, *args):

solves the problem.
(Line 56 is not to be touched).

Readme: use absolute path for links

In the README these commands are suggested:

$ ln -s gedit-sessionsaver/sessionsaver ~/.local/share/gedit/plugins/
$ ln -s gedit-sessionsaver/sessionsaver.plugin ~/.local/share/gedit/plugins/

However I managed to make it work only when I used a full path:

$ ln -s ~/path/to/gedit-sessionsaver/sessionsaver ~/.local/share/gedit/plugins/
$ ln -s ~/path/to/gedit-sessionsaver/sessionsaver.plugin ~/.local/share/gedit/plugins/

Doesn't work :(

Environment:

  • Debian 8 (Jessie)
  • python3 runtime is 3.4.2, python runtime is 2.7.9
  • python3-gi 3.14.0-1 installed
  • gedit 3.14.0 (latest available from Debian stable repo)

Steps to reproduce:

  • Clone this repo
  • Copy the sessionsaver directory (along with its contents) and sessionsaver.plugin file to ~/.local/share/gedit/plugins/
  • Launch gedit, open preferences, see "Session Saver" in the Plugins tab, check box to enable it
  • Open some files in the editor, then quit gedit (ctrl-Q or Quit from the GNOME menu bar)
  • Launch gedit again, see no open files, be sad

I tried the Python 2.x branch and that version wouldn't even let me enable in gedit, shows a red minus sign instead of a checkbox.

I really like almost everything else about gedit, but this is pushing me to another editor (Atom, probably).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.