Jean-Luc,

Just call me Pierre, (not Pierre-Marc)

I have been using the widget-grid system at home for quite a while now, and haven't had it crash on me much.

The widget grid "engine" is actually already in SVN. To use the engine with the dialog box, code needs to be added to every declaration of a widget that uses the engine. (basically the widget are added to a grid, and then the grid engine cycles through each column, and row, finding the max width / height and then calls the repositioning function to move each widget accordingly. rowspan and colspan are also implemented similar to html)

Obviously, "adding every widget" to the grid makes the code quite different, and can make it really confusing when doing a merge with upstream.

Having done (and doing) some merging with j6t, I have a better understanding of branching tools and will look into the idea of making a branch in SVN that contains widget-grid enabled dialog boxes, and ensuring that it is kept somewhat up with the main SVN branch. I will send a patch of the latest version of BC_widgetgrid ( against 2.1 ) upstream in hope that HV consider it worth of including in his next version, but until we see the next version we won't know if he's taken it upstream.

Regards,
Pierre Dumuid

Jean-Luc Coulon (f5ibh) wrote:
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


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

Reply via email to