Martin Vermeer wrote:
>> or presumably alternatively:
>> 
>> // file frontends/xforms/xformsBC.C
>> void xformsBC::setButtonLabel(FL_OBJECT * obj, string const &
>> label) const
>> {
>>         fl_set_object_label(obj, _(label).c_str());
>> }
> 
> Yes! This bites. At least for Cancel and Close.
> 
> Now the same for the inset dialog headers (Note, Minipage, ...) I
> know where to put the N_(), but where goes _()?

Somewhere in the path of code executed at run time.
Try FormDialogView.C
FormDialogView::FormDialogView(Dialog & parent,
                               string const & t, bool allowResize)
-        : Dialog::View(parent, t),
+        : Dialog::View(parent, _(t)),
          warning_posted_(false), message_widget_(0),
          minw_(0), minh_(0), allow_resize_(allowResize),
          icon_pixmap_(0), icon_mask_(0),
          tooltips_(new Tooltips())
{}

or alternatively:
void FormDialogView::prepare_to_show()
{
        ...
        if (!lyxrc.dialogs_iconify_with_main)
-               fl_winicontitle(form()->window, getTitle().c_str());
+               fl_winicontitle(form()->window, _(getTitle()).c_str());
        ...
}

void FormDialogView::show()
{
        ...
-               string const maximize_title = "LyX: " + getTitle();
+               string const maximize_title = "LyX: " + _(getTitle());
        
> By the way, I run CVS LyX uninstalled. Relevant?

Not to the fact that the code is crashing, no.

Incidentally, maybe a script would help automate the changing of 
those _("Minipage settings") to N_(...)

for file in Form*.C; do
        sed 's/\(^[      ]*: base_class([^_]*\)_/\1N_/' $file > tmp
        cmp -s $file tmp && continue
        diff -u $file tmp
        mv -i tmp $file
done


-- 
Angus

Reply via email to