Hello Rui,

I do believe Tom has set a good path for you.  From my foggy recollection that 
will get you most of the way there.

I don't know the state of RG's build system these days, but if I remember 
correctly, a simple make will not show the changes.  You will need to rebuild 
the resource files again.  I don't have a copy of the sources easily avaiable 
to give you the exact command.

Sincerely,
Julie S.

--- On Sat, 3/9/13, Tom Breton (Tehom) <[email protected]> wrote:

> From: Tom Breton (Tehom) <[email protected]>
> Subject: Re: [Rosegarden-devel] how to add a menu to rosegarden
> To: "Rui Pereira" <[email protected]>
> Cc: [email protected]
> Date: Saturday, March 9, 2013, 12:27 PM
> > Hello,
> >
> > I would like to know how to add a menu button to the
> menu bar of
> > rosegarden, but I have no idea where to start...
> 
> Start with data/rc/.  From there, you probably want
> either
> rosegardenmainwindow.rc or notation.rc.  It'll be
> pretty obvious how it
> goes, from all the other entries there.  Invent some
> unique name for your
> action; I'll call it "foo".
> 
> One thing you want to watch out for is state, which greys
> out some entries
> when there's nothing sensible for them to do.  You
> generally don't need to
> mess with it, but if your entry greys out for no apparent
> reason, that's
> probably it.
> 
> Once you've done that, you'll have a menu item that does
> nothing.
> 
> Then you need to add a slotFoo and connect it to command
> "foo", probably
> in src/gui/application/RosegardenMainWindow.cpp or
> src/gui/editors/notation/NotationView.cpp.  Let's say
> it's
> RosegardenMainWindow.
> 
> In RosegardenMainWindow.h, in class RosegardenMainWindow,
> after "public
> slots:" add:
> 
>    /* Description of what foo does */
>    void slotFoo();
> 
> In RosegardenMainWindow.cpp, add:
> 
>  createAction("foo", SLOT(slotFoo()));
> 
> Please group it nicely with the other actions; should be
> fairly obvious
> from the file.
> 
> Now you're created and connected a menu item. 
> Debugging it, well, that's
> another story.
> 
>     Tom Breton (Tehom)
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Symantec Endpoint Protection 12 positioned as A LEADER in
> The Forrester  
> Wave(TM): Endpoint Security, Q1 2013 and "remains a good
> choice" in the  
> endpoint security space. For insight on selecting the right
> partner to 
> tackle endpoint security challenges, access the full report.
> 
> http://p.sf.net/sfu/symantec-dev2dev
> _______________________________________________
> Rosegarden-devel mailing list
> [email protected]
> - use the link below to unsubscribe
> https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
> 

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to