Re: [gedit-list] Exporting gedit_tab_save(_as)


> Am Sonntag, den 11.06.2006, 23:53 +0200 schrieb Steve Frécinaux:
> > Johannes Hölzl wrote:
> > 
> > > Or are there other ways to save all unsaved documents, in a plugin?
> > 
> > We are considering making all those methods private, and instead binding
> > the gedit_commands_foo ones (which are intended to behave like the menu
> > entries). This is done because wha the tab_foo methods do is not enough
> > in the application context.
> > Those methods have been introduced recently but they'll be present in
> > the upcoming gedit 2.15.3. These are not binded into python yet but you
> > can provide a patch ;-)
> Okay, I would like to make a patch. But I'm not sure how to bind this
> functions, currently they are private, at least the
> _gedit_cmds_-functions. Should they directly made public, or only
> without the GtkAction parameter?
> Binding the commands under Gedit.Window? E.g.
> Gedit.Window.command_save_all(), or as Gedit.commands_save_all(window)?
> gedit_tab_save and gedit_tab_save_as should probably removed?

ATM, we expose public functions that plugins can use to open files, see 
the new public functions gedit_commands_load_uri and
gedit_commands_load_uris in gedit/gedit-commands.h (we still need to
bind them for python plugins).
We still need to expose functions for save/save_all. 
If you have time, you could try to write a patch to expose such
functionalities to plugins. Before implementing them, I'd suggest you to
post here the proposed function prototypes with the exact semantic you
expect for them.
I should check the code but I suspect there could be some problem when
trying to save_as a non-active document.

It would be also nice to have a patch to bind the new functions I cited
above and also the function gedit_window_get_tab_from_uri (see


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