Skip to content

Commit

Permalink
Fix plugin api for menus
Browse files Browse the repository at this point in the history
  • Loading branch information
diegogangl committed Jan 18, 2020
1 parent 3929317 commit a0b8308
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions GTG/core/plugins/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion GTG/gtk/browser/taskbrowser.ui
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<property name="name">main_menu</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox">
<object class="GtkBox" id="menu_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">14</property>
Expand Down

0 comments on commit a0b8308

Please sign in to comment.