[gedit-plugins/sessionsaver] Use append menu



commit ee67ac4909d94daaefa276127342b769a96f32d1
Author: Jordi Mas <jmas softcatala org>
Date:   Fri Jun 28 17:45:01 2019 +0200

    Use append menu

 plugins/sessionsaver/sessionsaver/__init__.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/plugins/sessionsaver/sessionsaver/__init__.py b/plugins/sessionsaver/sessionsaver/__init__.py
index 16552b0..8b00c0b 100644
--- a/plugins/sessionsaver/sessionsaver/__init__.py
+++ b/plugins/sessionsaver/sessionsaver/__init__.py
@@ -61,17 +61,17 @@ class SessionSaverAppActivatable(GObject.Object, Gedit.AppActivatable):
 
         self.menu_ext = self.extend_menu("tools-section")
 
+        item = Gio.MenuItem.new(_("_Manage saved sessions..."), "win.managedsession")
+        self.menu_ext.append_menu_item(item)
+
+        item = Gio.MenuItem.new(_("_Save session..."), "win.savesession")
+        self.menu_ext.append_menu_item(item)
+
         self.sessions = XMLSessionStore()
         for i, session in enumerate(self.sessions):
             session_id = 'win.session_{0}'.format(i)
             item = Gio.MenuItem.new(_("Recover '{0}' session").format(session.name), session_id)
-            self.menu_ext.prepend_menu_item(item)
-
-        item = Gio.MenuItem.new(_("_Manage saved sessions..."), "win.managedsession")
-        self.menu_ext.prepend_menu_item(item)
-
-        item = Gio.MenuItem.new(_("_Save session..."), "win.savesession")
-        self.menu_ext.prepend_menu_item(item)
+            self.menu_ext.append_menu_item(item)
 
     def _remove_session_menu(self):
         self.menu_ext.remove_items()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]