From 977077a4ea51b9d392b42ec43e543d2504f62372 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 9 Nov 2018 02:59:04 +0800 Subject: [PATCH 01/10] wrong function name in comment --- ex-mortis/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ex-mortis/log.py b/ex-mortis/log.py index fd6959d..694d270 100644 --- a/ex-mortis/log.py +++ b/ex-mortis/log.py @@ -53,7 +53,7 @@ if name in NAMES_TO_LEVELS: output_level = NAMES_TO_LEVELS[name] -# set by query(), used by prefix() +# set by query(), used by name() last_queried_level = None From 27a136272e1d6d7112b55c66f0eaa2d8573ead41 Mon Sep 17 00:00:00 2001 From: user Date: Mon, 21 Jan 2019 09:26:28 +0300 Subject: [PATCH 02/10] Add Russian l10n --- ex-mortis.plugin | 1 + .../locale/ru/LC_MESSAGES/gedit-ex-mortis.mo | Bin 0 -> 1538 bytes .../locale/ru/LC_MESSAGES/gedit-ex-mortis.po | 48 ++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 ex-mortis/locale/ru/LC_MESSAGES/gedit-ex-mortis.mo create mode 100644 ex-mortis/locale/ru/LC_MESSAGES/gedit-ex-mortis.po diff --git a/ex-mortis.plugin b/ex-mortis.plugin index 1a30904..f244e80 100644 --- a/ex-mortis.plugin +++ b/ex-mortis.plugin @@ -4,6 +4,7 @@ Module=ex-mortis IAge=3 Name=Ex-Mortis Description=Reopen closed windows and optionally restore windows between sessions +Description[ru]=Переоткрывает закрытые окна и восстанавливает окна между сессиями Icon=window-new Authors=Jeffery To Copyright=Copyright © 2017-2018 Jeffery To diff --git a/ex-mortis/locale/ru/LC_MESSAGES/gedit-ex-mortis.mo b/ex-mortis/locale/ru/LC_MESSAGES/gedit-ex-mortis.mo new file mode 100644 index 0000000000000000000000000000000000000000..f1b3aeca22fe0e4724e3b1408b87008191857eba GIT binary patch literal 1538 zcmZ`&&u<$=6dp?XWeEwWI8*}ksDwB)Yu4e?8iA-nDk2e4jDZW1wYDeDqV=rV9g{>A zQk$p+6lf#_Di`3w6_L1c>o|_{FT9aBS3=x4RPZ10y2Q5-ZW)z*fll~USR*6l!D z3?rR8R&?CahUTI;)lI5>6q;tdqAEJIaiVD@drhgX?TUt5s?!u2sj4oA>Ex6eff1p) zrX(W+Pq;*ljIl^U6(p8gx*1xsF)ekYXpOW9>d0Y!)mw}c8>U57jS-*A+9~_Yk>{Dq zokTCyOwiV!pP|r9LtiF2(TO$=B>n^>-a^y+P$$xaaxUQMRj-|uKz^}QoGn~>*Q@By zLUHll3al>EtY13s`6X|*ME?1*@1ONw_5H#-L2A8f5|}g!(Cjk39iYw4(BQY!bwN*7HJOkr_haegXZD*A=F*jR1Aveto&)vNZEP85XZHEJve35Ndq2i1$-xv8J1 zp;O+xX~a-!mFZkPwD$$elynP_bQgl*$>9aLj%4gW*`3!?UTU-8e}ui?DUW4F#j@NB~W z>zsD-D#3)u5PW0B-@^5((1HR2+(VWFJh$_}+zVAljc?P2S~w zx0R8A0(|Z|(mjxWyhj<``lPDsz`^v&7Zrb($Npb#$bi5v-4VK5(@N2m9@@C?Zn!Vd z3`vK3$H%lM!*$oDdUX8jLn_>Jn;72i5yOD* Date: Sun, 24 Feb 2019 18:33:08 +0800 Subject: [PATCH 03/10] reuse initial window when restoring windows (fixes #4) --- Changelog.md | 3 + ex-mortis/__init__.py | 4 +- ex-mortis/quittingmixin.py | 130 +++++++++++++++++++++---------------- 3 files changed, 78 insertions(+), 59 deletions(-) diff --git a/Changelog.md b/Changelog.md index 5e274d1..eb771d9 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +## Unreleased +* When restoring windows on startup, reuse the new window/tab (#4) + ## 0.1.2 (2018-03-13) * Fixed auto-closing gedit if there are no windows to restore (#1) * Fixed (potentially) affecting the translations of other plugins diff --git a/ex-mortis/__init__.py b/ex-mortis/__init__.py index 27c5d64..c576d50 100644 --- a/ex-mortis/__init__.py +++ b/ex-mortis/__init__.py @@ -133,7 +133,7 @@ def do_activate(self): # windows windows = app.get_main_windows() - self.restore_windows( + self.handle_restore_data( window_manager, settings, settings.restore_between_sessions and not windows ) @@ -220,7 +220,7 @@ def setup_window(self, window, is_existing=False): window_manager.track_window(window) - self.setup_restore_window(window) + self.setup_restore_window(window_manager, window) if self.is_saving_window_states(): self.bind_window_settings(window_manager, settings, window) diff --git a/ex-mortis/quittingmixin.py b/ex-mortis/quittingmixin.py index 4767810..febe4ef 100644 --- a/ex-mortis/quittingmixin.py +++ b/ex-mortis/quittingmixin.py @@ -32,6 +32,7 @@ def do_activate_quitting(self, is_saving_window_states): self._window_ids = {} if is_saving_window_states else None self._quitting = None + self._restore_states = None self._restore_windows = None def do_deactivate_quitting(self): @@ -42,6 +43,7 @@ def do_deactivate_quitting(self): self._window_ids = None self._quitting = None + self._restore_states = None self._restore_windows = None @@ -304,12 +306,11 @@ def end_quitting(self, settings, do_save): # restoring - def restore_windows(self, window_manager, settings, do_restore): + def handle_restore_data(self, window_manager, settings, do_restore): if log.query(log.INFO): Gedit.debug_plugin_message(log.format("do_restore=%s", do_restore)) states = [] - windows = [] for window_id in list(settings.restore_windows): if do_restore: @@ -339,48 +340,44 @@ def restore_windows(self, window_manager, settings, do_restore): settings.remove_window(window_id) - if do_restore and states: - if log.query(log.MESSAGE): - Gedit.debug_plugin_message(log.format("restoring %s windows", len(states))) - - screen_width = window_manager.get_screen_width() - screen_height = window_manager.get_screen_height() - - for state in states: - # when gedit goes to open the first blank tab, - # it tries to find an active window first - # but it tests for windows in the current screen/workspace/viewport - # which is in part based on the size of the window - # so we need to shrink our windows here to fit the screen, - # otherwise gedit will think they are in a different viewport - # (if the window is too large for the screen, - # the window manager will probably resize the window to fit anyway) - if state.width > screen_width: - state.side_panel_size = round((state.side_panel_size / state.width) * screen_width) - state.width = screen_width - if state.height > screen_height: - state.bottom_panel_size = round((state.bottom_panel_size / state.height) * screen_height) - state.height = screen_height - - windows.append(window_manager.open_new_window_with_window_state(state)) - - self._restore_windows = {} - - # the window manager can choose to make another window active - # rather than the active window at the end of this process - # so listen for new tab on all windows - for window, state in zip(windows, states): - self.setup_restore_window(window, state) - - elif not do_restore: + if not do_restore: if log.query(log.MESSAGE): Gedit.debug_plugin_message(log.format("not restoring windows")) - else: + return + + if not states: if log.query(log.MESSAGE): Gedit.debug_plugin_message(log.format("no windows to restore")) - def setup_restore_window(self, window, state=None): + return + + if log.query(log.MESSAGE): + Gedit.debug_plugin_message(log.format("will restore %s windows", len(states))) + + screen_width = window_manager.get_screen_width() + screen_height = window_manager.get_screen_height() + + for state in states: + # when gedit goes to open the first blank tab, + # it tries to find an active window first + # but it tests for windows in the current screen/workspace/viewport + # which is in part based on the size of the window + # so we need to shrink our windows here to fit the screen, + # otherwise gedit will think they are in a different viewport + # (if the window is too large for the screen, + # the window manager will probably resize the window to fit anyway) + if state.width > screen_width: + state.side_panel_size = round((state.side_panel_size / state.width) * screen_width) + state.width = screen_width + if state.height > screen_height: + state.bottom_panel_size = round((state.bottom_panel_size / state.height) * screen_height) + state.height = screen_height + + self._restore_states = states + self._restore_windows = {} + + def setup_restore_window(self, window_manager, window): if log.query(log.INFO): Gedit.debug_plugin_message(log.format("%s", window)) @@ -400,7 +397,7 @@ def setup_restore_window(self, window, state=None): Gedit.debug_plugin_message(log.format("setting up restore window")) self._restore_windows[window] = window.connect( - 'tab-added', self.on_restore_window_tab_added, state + 'tab-added', self.on_restore_window_tab_added, window_manager ) def teardown_restore_windows(self): @@ -441,32 +438,51 @@ def teardown_restore_window(self, window): del self._restore_windows[window] - def on_restore_window_tab_added(self, window, tab, state): + def on_restore_window_tab_added(self, window, tab, window_manager): if log.query(log.INFO): Gedit.debug_plugin_message(log.format("%s, %s", window, tab)) - if (tab.get_document().is_untouched() - and tab.get_state() == Gedit.TabState.STATE_NORMAL): - if log.query(log.DEBUG): - Gedit.debug_plugin_message(log.format("closing untouched tab")) + self.teardown_restore_windows() - def close_tab(): - window.close_tab(tab) + def do_restore_windows(): + self.restore_windows(window_manager, window, tab) - if not window.get_active_tab(): - window.close() + return False - elif state: - state.apply_active_uri(window) - state.apply_notebook_widths(window) + GLib.idle_add(do_restore_windows) - return False + def restore_windows(self, window_manager, window, tab): + if log.query(log.INFO): + Gedit.debug_plugin_message(log.format("%s, %s", window, tab)) - GLib.idle_add(close_tab) + active_tab = window.get_active_tab() + num_tabs = len(active_tab.get_parent().get_children()) + is_single_empty_tab = ( + num_tabs == 1 + and tab == active_tab + and tab.get_document().is_untouched() + and tab.get_state() == Gedit.TabState.STATE_NORMAL + ) - else: - if log.query(log.DEBUG): - Gedit.debug_plugin_message(log.format("new tab is not untouched")) + # if there is only one empty tab, let gedit reuse it when opening files + # otherwise, open a new tab to be (re)used + # this protects the new tab that was added if gedit was run with + # --new-document and one or more files to open - self.teardown_restore_windows() + if log.query(log.DEBUG): + Gedit.debug_plugin_message(log.format("is_single_empty_tab=%s", is_single_empty_tab)) + + if not is_single_empty_tab: + window.create_tab(True) + + state = self._restore_states.pop() + window_manager.import_window_state(window, state) + + for state in self._restore_states: + window_manager.open_new_window_with_window_state(state) + + self._restore_states = None + if not is_single_empty_tab: + window.set_active_tab(active_tab) + window.present() From 6b23a0e338cae1ae23703ca4989c8d8c891fd0f5 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Sun, 24 Feb 2019 18:53:47 +0800 Subject: [PATCH 04/10] add menu section fallback (fixes #5) --- Changelog.md | 2 ++ ex-mortis/__init__.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Changelog.md b/Changelog.md index eb771d9..0076483 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,8 @@ ## Unreleased * When restoring windows on startup, reuse the new window/tab (#4) +* Fixed adding "Reopen Closed Window" menu item on platforms with no app + menu or menu bar (#5) ## 0.1.2 (2018-03-13) * Fixed auto-closing gedit if there are no windows to restore (#1) diff --git a/ex-mortis/__init__.py b/ex-mortis/__init__.py index c576d50..fa866af 100644 --- a/ex-mortis/__init__.py +++ b/ex-mortis/__init__.py @@ -102,6 +102,8 @@ def do_activate(self): 'app.reopen-closed-window', ['N'] ) menu_ext = self.extend_menu('app-commands-section') + if not menu_ext: + menu_ext = self.extend_menu('file-section') menu_item = Gio.MenuItem.new( _("Reopen Closed _Window"), 'app.reopen-closed-window' ) From b4a23bed852ac5b6f92a59918cc62e02d78f9c40 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 25 Feb 2019 19:14:49 +0800 Subject: [PATCH 05/10] restore windows only for the primary instance --- Changelog.md | 2 ++ ex-mortis/__init__.py | 8 +++++++- ex-mortis/settings.py | 17 ++++++++++------- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Changelog.md b/Changelog.md index 0076483..09531a0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,8 @@ # Changelog ## Unreleased +* Restore windows on startup, and save windows for restoring, only for + the primary instance, i.e. when gedit is not in standalone mode * When restoring windows on startup, reuse the new window/tab (#4) * Fixed adding "Reopen Closed Window" menu item on platforms with no app menu or menu bar (#5) diff --git a/ex-mortis/__init__.py b/ex-mortis/__init__.py index fa866af..9761de8 100644 --- a/ex-mortis/__init__.py +++ b/ex-mortis/__init__.py @@ -61,8 +61,9 @@ def do_activate(self): Gedit.debug_plugin_message(log.format("")) app = self.app + is_primary = not (app.get_flags() & Gio.ApplicationFlags.NON_UNIQUE) window_manager = ExMortisWindowManager() - settings = ExMortisSettings() + settings = ExMortisSettings(is_primary) # app connect_handlers( @@ -440,6 +441,8 @@ def do_create_configure_widget(self): if log.query(log.INFO): Gedit.debug_plugin_message(log.format("")) + app = Gedit.App.get_default() + is_primary = not (app.get_flags() & Gio.ApplicationFlags.NON_UNIQUE) settings = ExMortisSettings() if settings.can_save: @@ -447,6 +450,9 @@ def do_create_configure_widget(self): _("Restore windows between sessions") ) + if not is_primary: + widget.set_sensitive(False) + create_bindings( self, settings, widget, {'restore_between_sessions': 'active'}, diff --git a/ex-mortis/settings.py b/ex-mortis/settings.py index 6e7eb34..2e1622d 100644 --- a/ex-mortis/settings.py +++ b/ex-mortis/settings.py @@ -36,11 +36,11 @@ class ExMortisSettings(GObject.Object): restore_windows = GObject.Property(type=GObject.GType.from_name('GStrv'), default=[]) - def __init__(self): + def __init__(self, is_enabled=True): GObject.Object.__init__(self) if log.query(log.INFO): - Gedit.debug_plugin_message(log.format("")) + Gedit.debug_plugin_message(log.format("is_enabled=%s", is_enabled)) try: schema_source = Gio.SettingsSchemaSource.new_from_directory( @@ -55,11 +55,14 @@ def __init__(self): schema_source = None - settings = get_settings( - schema_source, - 'com.thingsthemselves.gedit.plugins.ex-mortis', - '/com/thingsthemselves/gedit/plugins/ex-mortis/' - ) + if is_enabled: + settings = get_settings( + schema_source, + 'com.thingsthemselves.gedit.plugins.ex-mortis', + '/com/thingsthemselves/gedit/plugins/ex-mortis/' + ) + else: + settings = None if settings: try: From f92015c4ea9f4d8d85e7c497364d892328a46dab Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 25 Feb 2019 20:35:51 +0800 Subject: [PATCH 06/10] add note about develop branch --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c47b28..663cade 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,10 @@ i.e. only unsaved or blank documents, will not be reopenable. open in the previous session will be reopened when gedit is started again. (Default: Disabled) -## Development +## Contributing + +Please base changes on, and open pull requests against, the `develop` +branch. The code in `ex-mortis/utils` comes from [python-gtk-utils][]; changes should ideally be contributed to that project, then pulled back into From d18ac7bceff88503e8b472b65fb0c1536f82b607 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 22 Mar 2019 04:01:48 +0800 Subject: [PATCH 07/10] 2019 --- README.md | 2 +- ex-mortis.plugin | 2 +- ex-mortis/__init__.py | 2 +- ex-mortis/closingmixin.py | 2 +- ex-mortis/existingmixin.py | 2 +- ex-mortis/log.py | 2 +- ex-mortis/quittingmixin.py | 2 +- ex-mortis/settings.py | 2 +- ex-mortis/windowmanager.py | 2 +- ex-mortis/windowstate.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 663cade..c724bc3 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Inspired by: ## License -Copyright © 2017-2018 Jeffery To +Copyright © 2017-2019 Jeffery To Available under GNU General Public License version 3 diff --git a/ex-mortis.plugin b/ex-mortis.plugin index f244e80..a5ba244 100644 --- a/ex-mortis.plugin +++ b/ex-mortis.plugin @@ -7,6 +7,6 @@ Description=Reopen closed windows and optionally restore windows between session Description[ru]=Переоткрывает закрытые окна и восстанавливает окна между сессиями Icon=window-new Authors=Jeffery To -Copyright=Copyright © 2017-2018 Jeffery To +Copyright=Copyright © 2017-2019 Jeffery To Website=https://github.com/jefferyto/gedit-ex-mortis Version=0.1.2 diff --git a/ex-mortis/__init__.py b/ex-mortis/__init__.py index 9761de8..1054cf7 100644 --- a/ex-mortis/__init__.py +++ b/ex-mortis/__init__.py @@ -3,7 +3,7 @@ # __init__.py # This file is part of Ex-Mortis, a plugin for gedit # -# Copyright (C) 2017-2018 Jeffery To +# Copyright (C) 2017-2019 Jeffery To # https://github.com/jefferyto/gedit-ex-mortis # # This program is free software: you can redistribute it and/or modify diff --git a/ex-mortis/closingmixin.py b/ex-mortis/closingmixin.py index 16b73f5..bc7f70f 100644 --- a/ex-mortis/closingmixin.py +++ b/ex-mortis/closingmixin.py @@ -3,7 +3,7 @@ # closingmixin.py # This file is part of Ex-Mortis, a plugin for gedit # -# Copyright (C) 2017-2018 Jeffery To +# Copyright (C) 2017-2019 Jeffery To # https://github.com/jefferyto/gedit-ex-mortis # # This program is free software: you can redistribute it and/or modify diff --git a/ex-mortis/existingmixin.py b/ex-mortis/existingmixin.py index dad5a71..63b0f08 100644 --- a/ex-mortis/existingmixin.py +++ b/ex-mortis/existingmixin.py @@ -3,7 +3,7 @@ # existingmixin.py # This file is part of Ex-Mortis, a plugin for gedit # -# Copyright (C) 2017-2018 Jeffery To +# Copyright (C) 2017-2019 Jeffery To # https://github.com/jefferyto/gedit-ex-mortis # # This program is free software: you can redistribute it and/or modify diff --git a/ex-mortis/log.py b/ex-mortis/log.py index 694d270..24ebf87 100644 --- a/ex-mortis/log.py +++ b/ex-mortis/log.py @@ -3,7 +3,7 @@ # log.py # This file is part of Ex-Mortis, a plugin for gedit # -# Copyright (C) 2017-2018 Jeffery To +# Copyright (C) 2017-2019 Jeffery To # https://github.com/jefferyto/gedit-ex-mortis # # This program is free software: you can redistribute it and/or modify diff --git a/ex-mortis/quittingmixin.py b/ex-mortis/quittingmixin.py index febe4ef..a4df476 100644 --- a/ex-mortis/quittingmixin.py +++ b/ex-mortis/quittingmixin.py @@ -3,7 +3,7 @@ # quittingmixin.py # This file is part of Ex-Mortis, a plugin for gedit # -# Copyright (C) 2017-2018 Jeffery To +# Copyright (C) 2017-2019 Jeffery To # https://github.com/jefferyto/gedit-ex-mortis # # This program is free software: you can redistribute it and/or modify diff --git a/ex-mortis/settings.py b/ex-mortis/settings.py index 2e1622d..a74c945 100644 --- a/ex-mortis/settings.py +++ b/ex-mortis/settings.py @@ -3,7 +3,7 @@ # settings.py # This file is part of Ex-Mortis, a plugin for gedit # -# Copyright (C) 2017-2018 Jeffery To +# Copyright (C) 2017-2019 Jeffery To # https://github.com/jefferyto/gedit-ex-mortis # # This program is free software: you can redistribute it and/or modify diff --git a/ex-mortis/windowmanager.py b/ex-mortis/windowmanager.py index 9cd161e..6191690 100644 --- a/ex-mortis/windowmanager.py +++ b/ex-mortis/windowmanager.py @@ -3,7 +3,7 @@ # windowmanager.py # This file is part of Ex-Mortis, a plugin for gedit # -# Copyright (C) 2017-2018 Jeffery To +# Copyright (C) 2017-2019 Jeffery To # https://github.com/jefferyto/gedit-ex-mortis # # This program is free software: you can redistribute it and/or modify diff --git a/ex-mortis/windowstate.py b/ex-mortis/windowstate.py index b7da88a..900e748 100644 --- a/ex-mortis/windowstate.py +++ b/ex-mortis/windowstate.py @@ -3,7 +3,7 @@ # windowstate.py # This file is part of Ex-Mortis, a plugin for gedit # -# Copyright (C) 2017-2018 Jeffery To +# Copyright (C) 2017-2019 Jeffery To # https://github.com/jefferyto/gedit-ex-mortis # # This program is free software: you can redistribute it and/or modify From 497a65ca53bb70a3beab5e9bddca11b01dc3992e Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 22 Mar 2019 04:18:30 +0800 Subject: [PATCH 08/10] refreshed pot/po files --- ex-mortis/locale/gedit-ex-mortis.pot | 12 +++---- .../locale/ru/LC_MESSAGES/gedit-ex-mortis.mo | Bin 1538 -> 1564 bytes .../locale/ru/LC_MESSAGES/gedit-ex-mortis.po | 32 ++++++++++++------ 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/ex-mortis/locale/gedit-ex-mortis.pot b/ex-mortis/locale/gedit-ex-mortis.pot index 8cc1db8..7ab1e4b 100644 --- a/ex-mortis/locale/gedit-ex-mortis.pot +++ b/ex-mortis/locale/gedit-ex-mortis.pot @@ -1,30 +1,30 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gedit-ex-mortis 0.1.2\n" -"POT-Creation-Date: 2018-03-13 21:31+0800\n" +"Project-Id-Version: gedit-ex-mortis 0.2.0\n" +"POT-Creation-Date: 2019-03-22 04:12+0800\n" "PO-Revision-Date: 2017-10-13 22:50+0800\n" "Last-Translator: Jeffery To \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.4\n" +"X-Generator: Poedit 2.1.1\n" "X-Poedit-KeywordsList: _;gettext;gettext_noop\n" "X-Poedit-Basepath: ..\n" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPathExcluded-0: schemas\n" "X-Poedit-SearchPathExcluded-1: utils\n" -#: __init__.py:106 +#: __init__.py:109 msgid "Reopen Closed _Window" msgstr "" -#: __init__.py:445 existingmixin.py:87 +#: __init__.py:450 existingmixin.py:87 msgid "Restore windows between sessions" msgstr "" -#: __init__.py:458 +#: __init__.py:466 msgid "Could not load settings schema" msgstr "" diff --git a/ex-mortis/locale/ru/LC_MESSAGES/gedit-ex-mortis.mo b/ex-mortis/locale/ru/LC_MESSAGES/gedit-ex-mortis.mo index f1b3aeca22fe0e4724e3b1408b87008191857eba..e98543eba9c4e69b2f0ef9e45e9519095190e637 100644 GIT binary patch delta 163 zcmZqTnZq+7$B%`PfgzZQfkBpmfgysKfx!VtmjP)(AiW((8v^N*K-w8d{|3@~fwVmf z1H%U({TE0}0_k_G3=G0RnuBfQuKkS6MtTO5YnUW?jdhKT6bwwP3{ABSEG92vGU4$_ y%u6p#Oi#5^C@P(Nl_^>>Lf1VtFSRJKB)`Z?As|0BC9_1qNY7BuaI+2bF(v^0b|Vr1 delta 137 zcmbQk)5J3&$L|#b14A$q1A{D(wqs^sZ~)RVKw1z;&jr$kKzcopb_UW9f%IM=t;)i{ z@Bv6a2GWv1`U)!pgD{YO$GUOXenw_PJ)_ArOp?5Yx<-Zy29{O^2HFP3lNT|WOn%H1 X#p9EhmtLBfo@%8~RJu8g`4|%bGTIy$ diff --git a/ex-mortis/locale/ru/LC_MESSAGES/gedit-ex-mortis.po b/ex-mortis/locale/ru/LC_MESSAGES/gedit-ex-mortis.po index 4fc7799..2723376 100644 --- a/ex-mortis/locale/ru/LC_MESSAGES/gedit-ex-mortis.po +++ b/ex-mortis/locale/ru/LC_MESSAGES/gedit-ex-mortis.po @@ -1,24 +1,25 @@ -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: gedit-ex-mortis 0.1.2\n" -"PO-Revision-Date: 2019-01-21 09:00+0300\n" +"Project-Id-Version: gedit-ex-mortis 0.2.0\n" +"POT-Creation-Date: 2019-03-22 04:12+0800\n" +"PO-Revision-Date: 2019-03-22 04:15+0800\n" "Last-Translator: Habetdin\n" "Language-Team: Russian\n" +"Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: ru\n" +"X-Generator: Poedit 2.1.1\n" -#: __init__.py:106 +#: __init__.py:109 msgid "Reopen Closed _Window" msgstr "Пе_реоткрыть закрытое окно" -#: __init__.py:445 existingmixin.py:87 +#: __init__.py:450 existingmixin.py:87 msgid "Restore windows between sessions" msgstr "Восстанавливать окна между сессиями" -#: __init__.py:458 +#: __init__.py:466 msgid "Could not load settings schema" msgstr "Ошибка при загрузке схемы настроек" @@ -31,8 +32,12 @@ msgid "_Ignore" msgstr "И_гнорировать" #: existingmixin.py:77 -msgid "This window cannot be reopened if closed. Restart gedit to fully enable Ex-Mortis." -msgstr "Это окно не может быть восстановлено после закрытия. Перезапустите gedit для полноценной активации Ex-Mortis." +msgid "" +"This window cannot be reopened if closed. Restart gedit to fully enable Ex-" +"Mortis." +msgstr "" +"Это окно не может быть восстановлено после закрытия. Перезапустите gedit для " +"полноценной активации Ex-Mortis." #: existingmixin.py:88 msgid "Application menu" @@ -44,5 +49,10 @@ msgstr "меню Файл" #: existingmixin.py:89 #, python-brace-format -msgid "To restore this window, enable \"{pref_name}\" in Ex-Mortis' preferences, and quit gedit by selecting Quit in the {menu_name} or in this message." -msgstr "Для восстановления данного окна включите в настройках Ex-Mortis \"{pref_name}\" и выйдите из gedit, выбрав Завершить в {menu_name} или в этом сообщении." +msgid "" +"To restore this window, enable \"{pref_name}\" in Ex-Mortis' preferences, " +"and quit gedit by selecting Quit in the {menu_name} or in this message." +msgstr "" +"Для восстановления данного окна включите в настройках Ex-Mortis " +"\"{pref_name}\" и выйдите из gedit, выбрав Завершить в {menu_name} или в " +"этом сообщении." From 86dc0b9bb94c697e2ea3ce66ce3aa035d528e55d Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 22 Mar 2019 04:20:26 +0800 Subject: [PATCH 09/10] log russian translation --- Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog.md b/Changelog.md index 09531a0..95743c7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,6 +6,7 @@ * When restoring windows on startup, reuse the new window/tab (#4) * Fixed adding "Reopen Closed Window" menu item on platforms with no app menu or menu bar (#5) +* Added Russian translation (#6, thanks Habetdin!) ## 0.1.2 (2018-03-13) * Fixed auto-closing gedit if there are no windows to restore (#1) From 01813ba9e1b88f571bc51050d9c71f80db8da679 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 22 Mar 2019 04:22:50 +0800 Subject: [PATCH 10/10] 0.2.0 --- Changelog.md | 2 +- README.md | 2 +- ex-mortis.plugin | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index 95743c7..e40f9f6 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## 0.2.0 (2019-03-22) * Restore windows on startup, and save windows for restoring, only for the primary instance, i.e. when gedit is not in standalone mode * When restoring windows on startup, reuse the new window/tab (#4) diff --git a/README.md b/README.md index c724bc3..c415eba 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Reopen closed windows and optionally restore windows between sessions -0.1.2 +0.2.0 All bug reports, feature requests and miscellaneous comments are welcome at the [project issue tracker][]. diff --git a/ex-mortis.plugin b/ex-mortis.plugin index a5ba244..84f2eaa 100644 --- a/ex-mortis.plugin +++ b/ex-mortis.plugin @@ -9,4 +9,4 @@ Icon=window-new Authors=Jeffery To Copyright=Copyright © 2017-2019 Jeffery To Website=https://github.com/jefferyto/gedit-ex-mortis -Version=0.1.2 +Version=0.2.0