Re: [gedit-list] method called on gedit exit
- From: "Lucas Stephanou" <domluc gmail com>
- To: "Paolo Borelli" <pborelli katamail com>, "gedit list" <gedit-list gnome org>
- Subject: Re: [gedit-list] method called on gedit exit
- Date: Fri, 20 Jul 2007 16:36:18 -0300
Finally I'll start code this :-)
Well, I was study the code and confuse with some things.
I need to emit a signal when gedit is to close. But where.
gedit-app.c is right place?
I think that gedit-commands-file.c
is the only part of gedit can now to do this.
remember that this should be received by plugins, then I can write a plugin that save what files was opened is last gedit run!
thx in advance.
I'm learning every day! Gedit Rocks
On 5/24/07, Lucas Stephanou <domluc gmail com> wrote:
Yes, it's this :-)
On 5/24/07, Paolo Borelli <
pborelli katamail com> wrote:
On gio, 2007-05-24 at 09:01 -0300, Lucas Stephanou wrote:
> Paolo,
>
> I really like gedit, and I'll try to make this patch, but I only
> develop with c at university, good times :-)
> Can you suggest any place to remember me, then I can get restart?
You mean some docs about developing with glib/gtk in C?
I suggest going through
http://www.gtk.org/tutorial/
http://developer.gnome.org/doc/API/2.0/gobject/ and in particular
http://developer.gnome.org/doc/API/2.0/gobject/pt02.html
That should explain you how to add and emit signals from GObjects.
As I said the relevant code in gedit is in the gedit-app.[ch] files
ciao
paolo
>
> On 5/24/07, Paolo Borelli <
pborelli katamail com> wrote:
> On mar, 2007-05-22 at 18:00 -0300, Lucas Stephanou wrote:
> > Paolo,
> >
> > I was thinking in this second alternative, it's hard to
> code?
> >
>
> You mean adding a signal to GeditApp, no it's not really hard,
> juts a
> matter
>
>
> of adding a signal to the GeditApp class and read the code a
> bit
> to understand where is the proper time to emit it. I would
> surely
> welcome a patch :)
>
> ciao
> Paolo
>
> > How you told, the first alternative fix my problem, but
> doesn't fix
> > the needs of others plugins in the future.
> >
> > On 5/22/07, Lucas Stephanou <
domluc gmail com> wrote:
> > thx Paolo,
> >
> > I'll try this.
> >
> >
> > On 5/22/07, Paolo Borelli <
pborelli katamail com>
> wrote:
> > On lun, 2007-05-21 at 09:37 -0300, Lucas
> Stephanou
> > wrote:
> > > Hi All,
> > >
> > > I'm making some adjusts at plugin session
> saver,
> > > and I need that one of my methods be
> calleds when
> > gedit is closed.
> > >
> > > i try
> > > <python>
> > > def destroy:
> > > print "closing gedit"
> > > </python>
> > >
> > > but it never print the msg.
> > >
> > > how can I made this?
> > >
> >
> > I guess you have different possibilities:
> you could
> > connect to each
> > GeditWindow destroy signal and check if this
> is the
> > last one or maybe
> > you could check when the GeditApp object is
> destroyed
> > (
e.g. using a weak
> > pointer)... the problem with this approach
> is that by
> > the time yiu get
> > the signal windows and documents have
> already been
> > closed, so you
> > probably have to keep your own list of
> things you want
> > to save.
> >
> > Maybe we should add a "shutdown" signal to
> GeditApp
> > that is emitted
> > before actually destroying the windows so
> that plugins
> > have an easier
> > way to hook into the shutdown process.
> >
> >
> > Paolo
> >
> >
> >
> >
> >
> >
> >
> > --
> > Lucas Stephanou
> >
> >
> >
> > --
> > Lucas Stephanou
>
>
>
>
> --
> Lucas Stephanou
--
Lucas Stephanou
--
Lucas Stephanou
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]