Hi,

Some time ago, I had a discussion with Pierre-Marc and submitted a
question to the list about the way to have some kind of dynamic
resizing of the panels to that the translated text could fit in the
room left by the theme.

Is there any nexs on this front?

Best regards

Jean-Luc


2005/6/9, Pierre Marc Dumuid <[EMAIL PROTECTED]>:
Hi All,

Jean-Luc Coulon asked me about possibly developing a patch to resolve
the problem shown between languages in:

http://jean.luc.coulon.free.fr/images/format-genuine.png
http://jean.luc.coulon.free.fr/images/format-modified.png

My proposition is as follows, (and I wouldn't mind a bit of feedback on
the idea!):

Please note that I've got a few things on, so couldn't really clean the
idea up for a few weeks... (Also need to get around to fixing a little
bug that cinelerra has when going to Settings->Format, the "interlace
mode" shown isn't always the interlace mode set for that project, ..
then I need to get a patch of the interlace fixups applied to Heroine's
source)

Here's A ROUGH SKETCH what I  would propose:

void BlondTheme::new_bg_get_positions(int *width, int *height, int *x1,
int *x2, int *x3, int *x4) {
  char *s;
   s = getenv("LANG");
   if (strstr(s,"en_")) {
       width = 500;
       height = 700;
       x1 = 20;
       x2 = 60;
       x3 = 120;
       x4 = 180;
   } else if (strstr(s,"fr_")) {
       width = 600;
       height = 700;
       x1 = 20;
       x2 = 70;
       x3 = 140;
       x4 = 190;
  } else {
       printf("Lang Test -> Don't know that language, will use english
\n");
       width = 600;
       height = 700;
       x1 = 20;
       x2 = 70;
       x3 = 140;
       x4 = 190;
  }
}

would sit in defaulttheme.C

Then in new.C, in void NewThread::run() at the top, place:

   int width, int height, int x1, int x2, int x3, int x4 ;
    mwindow->theme->new_bg_get_positions(width, height, x1, x2, x3, x4);

and change:
   int x = mwindow->gui->get_root_w(0, 1) / 2 - WIDTH / 2;
   int y = mwindow->gui->get_root_h(1) / 2 - HEIGHT / 2;

to

   int x = mwindow->gui->get_root_w(0, 1) / 2 - width / 2;
   int y = mwindow->gui->get_root_h(1) / 2 - height / 2;

and also,

       nwindow = new NewWindow(mwindow, this, x, y);
to
   nwindow = new NewWindow(mwindow, this, x, y,width,height);

and
NewWindow::NewWindow(MWindow *mwindow, NewThread *new_thread, int x, int y)
: BC_Window(_(PROGRAM_NAME ": New Project"),
        x,
       y,
       WIDTH,
       HEIGHT,
       -1,
       -1,
       0,
       0,
       1)

to

NewWindow::NewWindow(MWindow *mwindow, NewThread *new_thread, int x, int
y, int width, int height)
: BC_Window(_(PROGRAM_NAME ": New Project"),
        x,
       y,
       width,
       height,
       -1,
       -1,
       0,
       0,
       1)

and in int NewWindow::create_objects(), call

   int width, int height, int x1, int x2, int x3, int x4 ;
    mwindow->theme->new_bg_get_positions(width, height, x1, x2, x3, x4);

again, and ensure that the x1,x2,x3,x4 refer correctly..

That type of patch would allow the text authors to have good access to
tuning the column positions of their language.  In terms of fixing the
background, I would propose modifying:

void BlondTheme::draw_new_bg(NewWindow *gui)
{
   int width, int height, int x1, int x2, int x3, int x4 , int x5, x6;
   new_bg_get_positions(width, height, x1, x2, x3, x4,x5,x6);
   gui->draw_vframe(new_bg_topredbox, 0, 0);
   gui->draw_vframe(new_bg_redcurve, x5, 0);
   gui->draw_vframe(new_bg_fainttab, x1 - 3, 25);
   gui->draw_vframe(new_bg_fainttabcurvedown, x2 - 13, 25);
   gui->draw_vframe(new_bg_fainttabcurvedown, x2 - 13, 25);
}

Not sure if that's possible, would also checkout if draw_vframe could
streach a png (i.e. draw left edge of audio, draw streached 1-pixel
width column till the curve down...etc..)

That's how I would approach the problem, (NOTE: I haven't tried or
tested it, but that's my general approach.  I don't mind doing it, but
it'll be some time before I can look into it...

Regards,
Pierre

Jean-Luc Coulon (f5ibh) wrote:

> Pierre,
>
> I've translated Cinelerra (updated the translation from Eric). I've
> also trranslated the whole Wiki in French.
>
> On the IRC? we have had a discussion about the preferences or options
> dialog: when the text is translated from English to many foreign
> language (like French ;-) ), the texts dont fit and the dialog
> becomes  unreadable.
>
> As a test, I've done a modification for the "Define format" dialog.
> But  as everything is hard coded, it is not a solution for the future.
> You can find screenshots of this dialog before/after ath the following
> addresses:
>
> http://jean.luc.coulon.free.fr/images/format-genuine.png
> http://jean.luc.coulon.free.fr/images/format-modified.png
>
> I was told that you have a couple of patches to adapt dynamically the
> text areas according to the string length.

In terms of fixing the spacing, the patch that I had for neating up the
layout, I've deleted (though I think it's sitting in the mail list
somewhere) because I was told I was changing way too much, and others
desired that we keep in sync with Heroine, rather than neatifying the code.)

>
> Is it possible to prepare a patch or two for each dialog so that we
> can  test this possibility. It would be nice if heroine could accept
> such a  modification.
>
> Best regards
>
> Jean-Luc




_______________________________________________
Cinelerra mailing list
[email protected]
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra


_______________________________________________
Cinelerra mailing list
[email protected]
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra

Reply via email to