Re: [gedit-list] plugin developement - how to edit a panels toolbar?



I am trying to recreate a functionallity from the Eclise IDE. The
functionallity is basically to highlight the file which is being
edited in the file browser pane, while the button is checked.

It is prefered to have the icon (button) on the toolbar like Eclise IDE.
If is not possible to edit the file browser panel menu toolbar I could
try to compile a custom version.

Thank you


On Monday, December 14, 2009, Jesse van den Kieboom <jesse icecrew nl> wrote:
> Rodrigo Lopes wrote:
>
> Hello, the file browser plugin pane adds a item(widget) in the left panel. I want to add a icon to its toolbar pane, but my icon is showing up on the top gedit toolbar.
>
> This is what I tried:
>
> ui_str = """<ui>
>   <toolbar name="ToolBar">
>     <placeholder name="Tool_Opt3">
>       <toolitem name="ExamplePy" action="ExamplePy"/>     </placeholder>
>   </toolbar>
> </ui>
> """
>
> I'm based on the file browser plugin ui description. That is:
> <ui>
>   <toolbar name="ToolBar">
>     <placeholder name="Tool_Opt1"/>
>     <separator/>
>     <toolitem action="DirectoryRefresh"/>
>     <separator/>
>     <placeholder name="Tool_Opt2"/>
>     <separator/>
>     <toolitem action="FilterHidden"/>
>     <separator/>
>     <placeholder name="Tool_Opt3"/>
>   </toolbar>
> ...
> </ui>
>
> I think that if I had the same UIManager as the plugin has, I could do this job. Is it possible to access the plugin's UIManager? Is there another way to edit this toolbar?
>
> Basicly no, you can't change that toolbar from another plugin like that. What we could do is expose this similarly to how you can extend the context menu of the file browser widget, namely using the message bus API. Then you could add/remove toolbar buttons. What do you want to use this for? Is it possible that you could the same with putting new items in the context menu (which is preferable)?
>
>
> Jesse
>
>
> Thanks
>
> --
> Rodrigo Lopes
> ------------------------------------------------------------------------
>
> _______________________________________________
> gedit-list mailing list
> gedit-list gnome org
> http://mail.gnome.org/mailman/listinfo/gedit-list
>
>
>
>

-- 
Rodrigo Lopes


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