From a0b83087055f8a71b74e3c57bc1841654631f4e6 Mon Sep 17 00:00:00 2001 From: Diego Garcia Gangl Date: Fri, 17 Jan 2020 21:00:58 -0300 Subject: [PATCH] Fix plugin api for menus --- GTG/core/plugins/api.py | 7 ++++--- GTG/gtk/browser/taskbrowser.ui | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/GTG/core/plugins/api.py b/GTG/core/plugins/api.py index de04c1edad..58706787d6 100644 --- a/GTG/core/plugins/api.py +++ b/GTG/core/plugins/api.py @@ -137,9 +137,10 @@ def add_menu_item(self, item): @param item: The Gtk.MenuItem that is going to be added. """ - widget = self.__builder.get_object('plugin_mi') - widget.get_submenu().append(item) - widget.show_all() + menu_box = self.__builder.get_object('menu_box') + menu_box.add(item) + menu_box.reorder_child(item, 1) + menu_box.show_all() def remove_menu_item(self, item): """Removes a menu entry from the Plugin Menu of the Main Window diff --git a/GTG/gtk/browser/taskbrowser.ui b/GTG/gtk/browser/taskbrowser.ui index f8f2863ce3..1484f3b088 100644 --- a/GTG/gtk/browser/taskbrowser.ui +++ b/GTG/gtk/browser/taskbrowser.ui @@ -100,7 +100,7 @@ main_menu False - + True False 14