Re: [gedit-list] Creating menu in gedit plugin



Hi Matěj,

I believe your menu isn't showing up because insert_menu() isn't being called. In gedit 3, method names for the plugin interface start with "do_": do_activate() and do_deactivate(). (Also update_ui() is now do_update_state().)

If you haven't seen it yet, I suggest checking out the Python Plugin How To: https://wiki.gnome.org/Apps/Gedit/PythonPluginHowTo

HTH,
Jeff



On Thu, Dec 12, 2013 at 10:18 AM, Matej Cepl <mcepl redhat com> wrote:
Hi,

I have taken over the rope maintenance (it now resides on https://github.com/python-rope/) and so I am also trying to port at least the proof of concept which is gedit-rope (http://code.google.com/p/gedit-rope/) to Gnome 3 state.

My current state is at the gnome3 branch, but I cannot understand why in the world https://github.com/mcepl/gedit-rope/blob/gnome3/ropeplugin/ropeplugin.py doesn’t create ANY menu. Aside from this which should hopefully add a submenu to the TOols menu, I tried also

ROPE_UI = '''<ui>
   <menubar name="MenuBar">
       <menu name="RopeMenu" action="">            <placeholder name="RopeOps_1">
               <menu name="RopeProjectMenu" action="">                    <menuitem action="" />
                   <menuitem action="" />
               </menu>
               <menu name="RopeRefactorMenu" action="">                    <menuitem action="" />
               </menu>
           <separator />
           <menuitem action="" />
           </placeholder>
       </menu>
   </menubar>
</ui>'''

which should hopefully create a new highest-level menu, but neither of these created anything in gedit-3.8. There is no Error message on the stderr.

Any ideas, what I do wrong, please?

Thank you,

Matěj

--
http://www.ceplovi.cz/matej/, Jabber: mcepl<at>ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC

I am a Roman Catholic, so that I do not expect `history' to be
anything but a `long defeat' -- though it contains (and in
a legend may contain more clearly and movingly) some samples or
glimpses of final victory.
     -- J.R.R. Tolkien


_______________________________________________
gedit-list mailing list
gedit-list gnome org
https://mail.gnome.org/mailman/listinfo/gedit-list




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