<div>Thanks Caolán</div>
<div> </div>
<div>I added these lines in the wiki under Q&A, if you don't mind</div>
<div> </div>
<div>Regards<br>Olivier<br></div>
<div class="gmail_quote">2012/10/8 Caolán McNamara <span dir="ltr"><<a href="mailto:caolanm@redhat.com" target="_blank">caolanm@redhat.com</a>></span><br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div class="im">On Mon, 2012-10-08 at 07:52 -0300, Olivier Hallot wrote:<br>> Hi Caolán<br>><br>> What is the recomendation to convert to a .ui file? That is, for all the<br>> existing scr/hrc pairs, is there a tool to convert them to .ui?<br>
<br></div>There's no tool. A tool might be helpful but I've put that on the long<br>finger for now. So it's currently<br>a) fire up glade and draw something similar to the existing dialog and<br>cut and paste in the strings from the .src.<br>
b) Follow the basic guidelines from<br><a href="https://wiki.documentfoundation.org/Development/WidgetLayout" target="_blank">https://wiki.documentfoundation.org/Development/WidgetLayout</a> e.g. ok<br>buttons are called "ok" cancel "cancel" and so on<br>
c) remove from the code any declarations of widgets which only appear in<br>the .hxx and once in the .cxx in the member init list (because we don't<br>need to explicitly declare them anymore if that's all they were there<br>
for)<br>d) search and replace aWidget. to m_pWidget-><br>e) convert aWidget(this, SOMERESID) in the ctor member init list to<br>get(m_pWidget, SOMEUIID) in the ctor where SOMEUIID is a human-helpful<br>name which you fill into the .ui e.g.<br>
<br>in .hxx<br>PushButton m_aFOO<br>in .cxx<br>SomeDialog::SomeDialog() :<br>...<br>    m_aFOO(this, SwRes(DIALOG_OK_BTN)<br>...<br>{<br>    m_aFOO.SetClickFoo(something)<br>}<br><br>to<br><br>in .hxx<br>PushButton* m_pFOO<br>
in .cxx<br>SomeDialog::SomeDialog() :<br>{<br>    get(m_pFOO, "foo);<br>    m_pFOO->SetClickFoo(something)<br>}<br><br>If you'd like to get a conversion a shot, then you could just start with<br>demoing up converting a dialog in glade first and not worry about the<br>
code yet and I can convert the code over to use the new .ui<br><span class="HOEnZb"><font color="#888888"><br>C.<br><br></font></span></blockquote></div><br><br clear="all"><br>-- <br>Olivier Hallot<br>Founder and Steering Commitee Member<br>
The Document Foundation<br><br>