translation fixes, pref wdw min width, xfer mode ops
authorGood Guy <good1.2guy@gmail.com>
Sun, 25 Sep 2016 20:06:13 +0000 (14:06 -0600)
committerGood Guy <good1.2guy@gmail.com>
Sun, 25 Sep 2016 20:06:13 +0000 (14:06 -0600)
cinelerra-5.1/cinelerra/awindowgui.C
cinelerra-5.1/cinelerra/edl.inc
cinelerra-5.1/cinelerra/gwindowgui.C
cinelerra-5.1/cinelerra/overlayframe.inc
cinelerra-5.1/cinelerra/preferencesthread.C
cinelerra-5.1/cinelerra/preferencesthread.h
cinelerra-5.1/plugins/cdripper/cdripwindow.C

index bee6da43413f3ff4d3b8ca9e155472ac0d802330..ba047200dc5e3115375624660dc1a63916f9d964 100644 (file)
@@ -536,19 +536,19 @@ SET_TRACE
 SET_TRACE
 
 // Mandatory folders
 SET_TRACE
 
 // Mandatory folders
-       folders.append(picon = new AssetPicon(mwindow, this, _(AEFFECT_FOLDER)));
+       folders.append(picon = new AssetPicon(mwindow, this, AEFFECT_FOLDER));
        picon->persistent = 1;
        picon->persistent = 1;
-       folders.append(picon = new AssetPicon(mwindow, this, _(VEFFECT_FOLDER)));
+       folders.append(picon = new AssetPicon(mwindow, this, VEFFECT_FOLDER));
        picon->persistent = 1;
        picon->persistent = 1;
-       folders.append(picon = new AssetPicon(mwindow, this, _(ATRANSITION_FOLDER)));
+       folders.append(picon = new AssetPicon(mwindow, this, ATRANSITION_FOLDER));
        picon->persistent = 1;
        picon->persistent = 1;
-       folders.append(picon = new AssetPicon(mwindow, this, _(VTRANSITION_FOLDER)));
+       folders.append(picon = new AssetPicon(mwindow, this, VTRANSITION_FOLDER));
        picon->persistent = 1;
        picon->persistent = 1;
-       folders.append(picon = new AssetPicon(mwindow, this, _(LABEL_FOLDER)));
+       folders.append(picon = new AssetPicon(mwindow, this, LABEL_FOLDER));
        picon->persistent = 1;
        picon->persistent = 1;
-       folders.append(picon = new AssetPicon(mwindow, this, _(CLIP_FOLDER)));
+       folders.append(picon = new AssetPicon(mwindow, this, CLIP_FOLDER));
        picon->persistent = 1;
        picon->persistent = 1;
-       folders.append(picon = new AssetPicon(mwindow, this, _(MEDIA_FOLDER)));
+       folders.append(picon = new AssetPicon(mwindow, this, MEDIA_FOLDER));
        picon->persistent = 1;
 
        create_label_folder();
        picon->persistent = 1;
 
        create_label_folder();
index 96ab0e424c0561b9e8b0bce6d239be4cda29ed97..07e06c245c18eb4c0aaa28ec413a8059270f47ee 100644 (file)
@@ -55,16 +55,16 @@ class EDL;
 
 
 // Mandatory folders
 
 
 // Mandatory folders
-#define AEFFECT_FOLDER N_("Audio Effects")
-#define VEFFECT_FOLDER N_("Video Effects")
-#define ATRANSITION_FOLDER N_("Audio Transitions")
-#define VTRANSITION_FOLDER N_("Video Transitions")
+#define AEFFECT_FOLDER _("Audio Effects")
+#define VEFFECT_FOLDER _("Video Effects")
+#define ATRANSITION_FOLDER _("Audio Transitions")
+#define VTRANSITION_FOLDER _("Video Transitions")
 
 
-#define LABEL_FOLDER N_("Labels")
+#define LABEL_FOLDER _("Labels")
 
 // Default folders
 
 // Default folders
-#define CLIP_FOLDER N_("Clips")
-#define MEDIA_FOLDER N_("Media")
+#define CLIP_FOLDER _("Clips")
+#define MEDIA_FOLDER _("Media")
 
 
 
 
 
 
index b1b8300c2ee9c72d42b67193ad8f7e6f737fec7d..5cf353caff3068013edd24f29bd6f36accfa3775 100644 (file)
@@ -68,26 +68,26 @@ void GWindowGUI::start_color_thread(GWindowColorButton *color_button)
 
 const char *GWindowGUI::other_text[NON_AUTOMATION_TOTAL] =
 {
 
 const char *GWindowGUI::other_text[NON_AUTOMATION_TOTAL] =
 {
-       "Assets",
-       "Titles",
-       "Transitions",
-       "Plugin Autos"
+       N_("Assets"),
+       N_("Titles"),
+       N_("Transitions"),
+       N_("Plugin Autos")
 };
 
 const char *GWindowGUI::auto_text[AUTOMATION_TOTAL] =
 {
 };
 
 const char *GWindowGUI::auto_text[AUTOMATION_TOTAL] =
 {
-       "Mute",
-       "Camera X",
-       "Camera Y",
-       "Camera Z",
-       "Projector X",
-       "Projector Y",
-       "Projector Z",
-       "Fade",
-       "Pan",
-       "Mode",
-       "Mask",
-       "Speed"
+       N_("Mute"),
+       N_("Camera X"),
+       N_("Camera Y"),
+       N_("Camera Z"),
+       N_("Projector X"),
+       N_("Projector Y"),
+       N_("Projector Z"),
+       N_("Fade"),
+       N_("Pan"),
+       N_("Mode"),
+       N_("Mask"),
+       N_("Speed")
 };
 
 int GWindowGUI::auto_colors[AUTOMATION_TOTAL] =
 };
 
 int GWindowGUI::auto_colors[AUTOMATION_TOTAL] =
@@ -369,7 +369,7 @@ void GWindowGUI::create_objects()
                case AUTOMATION_PAN:  vframe = mwindow->theme->pankeyframe_data;   break;
                case AUTOMATION_MASK: vframe = mwindow->theme->maskkeyframe_data;  break;
                }
                case AUTOMATION_PAN:  vframe = mwindow->theme->pankeyframe_data;   break;
                case AUTOMATION_MASK: vframe = mwindow->theme->maskkeyframe_data;  break;
                }
-               const char *label = tp->isauto ? auto_text[tp->ref] : other_text[tp->ref] ;
+               const char *label = _(tp->isauto ? auto_text[tp->ref] : other_text[tp->ref]);
                int color = !tp->isauto ? -1 : auto_colors[tp->ref];
                GWindowToggle *toggle = new GWindowToggle(mwindow, this, x, y, label, color, tp);
                add_tool(toggles[i] = toggle);
                int color = !tp->isauto ? -1 : auto_colors[tp->ref];
                GWindowToggle *toggle = new GWindowToggle(mwindow, this, x, y, label, color, tp);
                add_tool(toggles[i] = toggle);
index 05052de1760718d3f3b325e16abd654b627c6bb0..f29bc5724be062b7c8c51033a66600895e3723b1 100644 (file)
 
 // Modes
 
 
 // Modes
 
+/*
+source
+x = porter duff operator
+g = good guy
+a = android
+* = hv 4.6.1
+
+cin 5.1 overlayframe TRANSFER_MODEs
+x      DST [Da, Dc]
+x      DST_ATOP [Sa, Sc * (1 - Da) + Dc * Sa]
+x      DST_IN  [Da * Sa, Dc * Sa]
+x      DST_OUT [Da * (1 - Sa), Dc * (1 - Sa)]
+x      DST_OVER [Sa * (1 - Da) + Da, Sc * (1 - Da) + Dc]
+x      SRC [Sa, Sc]
+x      SRC_ATOP [Da, Sc * Da + Dc * (1 - Sa)]
+x      SRC_IN  [Sa * Da, Sc * Da]
+x      SRC_OUT [Sa * (1 - Da), Sc * (1 - Da)]
+x      SRC_OVER [Sa + Da * (1 - Sa), Sc + (1 - Sa) * Dc]
+g      OR [Sa + Da - Sa * Da, Sc + Dc - Sc * Dc]
+a      XOR     [Sa * (1 - Da) + Da * (1 - Sa), Sc * (1 - Da) + Dc * (1 ­ Sa)]
+*      NORMAL [Sa + Da * (1 - Sa), Sc * Sa + Dc * (1 ­ Sa)])
+*      ADDITION [(Sa + Da), (Sc + Dc)]
+*      SUBTRACT [(Sa - Da), (Sc ­ Dc)]
+*      MULTIPLY [(Sa * Da), Sc * Dc]
+*      DIVIDE  [(Sa / Da), (Sc / Dc)]
+*      REPLACE [Sa, Sc] (fade = 1)
+*      MAX     [max(Sa, Da), MAX(Sc, Dc)]
+*      MIN [min(Sa, Da), MIN(Sc, Dc)]
+g      AVERAGE [(Sa + Da) * 0.5, (Sc + Dc) * 0.5]
+a      DARKEN [Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + min(Sc, Dc)]
+a      LIGHTEN [Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + max(Sc, Dc)]
+
+https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html
+       ADD Saturate(S + D)
+       CLEAR [0, 0]  
+       DARKEN [Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + min(Sc, Dc)]  
+       DST [Da, Dc]  
+       DST_ATOP [Sa, Sa * Dc + Sc * (1 - Da)]  
+       DST_IN [Sa * Da, Sa * Dc]  
+       DST_OUT [Da * (1 - Sa), Dc * (1 - Sa)]  
+       DST_OVER [Sa + (1 - Sa)*Da, Rc = Dc + (1 - Da)*Sc]  
+       LIGHTEN [Sa + Da - Sa*Da, Sc*(1 - Da) + Dc*(1 - Sa) + max(Sc, Dc)]  
+       MULTIPLY [Sa * Da, Sc * Dc]  
+       OVERLAY (defined, but unspecified in android)
+       SCREEN [Sa + Da - Sa * Da, Sc + Dc - Sc * Dc]  
+       SRC [Sa, Sc]  
+       SRC_ATOP [Da, Sc * Da + (1 - Sa) * Dc]  
+       SRC_IN [Sa * Da, Sc * Da]  
+       SRC_OUT [Sa * (1 - Da), Sc * (1 - Da)]  
+       SRC_OVER [Sa + (1 - Sa)*Da, Rc = Sc + (1 - Sa)*Dc]  
+       XOR [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + (1 - Sa) * Dc]  
+
+https://docs.gimp.org/2.6/en/gimp-concepts-layer-modes.html
+       Normal          [M]
+       Dissolve        [I + dots]
+       Multiply        [M * I]
+       Divide          [I / M]
+       Screen          [1 - (1-M)*(1-I)]
+       Overlay         [I * (I + 2*M*(1-I))]
+       Dodge           [I / (1-M)]
+       Burn            [1 - (1-I) / M]
+       Hard light      [M>0.5 ? (1 - (1-2*(M-0.5))*(1 - I) : 2*M*I]
+       Soft light      [((1-I)*M + Screen()) * I]
+       Grain extract   [I - M + 0.5]
+       Grain merge     [I + M - 0.5]
+       Difference      [abs(I-M)]
+       Addition        [min((I+M),1.0)]
+       Subtract        [max((I-M),0.0)]
+       Darken only     [min(M,I)]
+       Lighten only    [max(M,I)]
+       Hue             [hue(M) + sat(I)+val(I)]
+       Saturation      [sat(M) + hue(I)+val(I)]
+       Color           [hue(M)+sat(M) + val(I)]
+       Value           [val(M) + sat(I)+hue(I)]
+
+*/
+
 #define TRANSFER_TYPES 23
 
 #define TRANSFER_NORMAL                0
 #define TRANSFER_TYPES 23
 
 #define TRANSFER_NORMAL                0
index 853c7a7012bbdeeda75fa368fb3aea184b6aedfe..d02f9ad44304704bfd90990a42367a9295ede31c 100644 (file)
@@ -127,10 +127,17 @@ BC_Window* PreferencesThread::new_gui()
        int scr_w = mwindow->gui->get_screen_w(0, -1);
        int scr_h = mwindow->gui->get_screen_h(0, -1);
 
        int scr_w = mwindow->gui->get_screen_w(0, -1);
        int scr_h = mwindow->gui->get_screen_h(0, -1);
 
-       int x = scr_x + scr_w / 2 - WIDTH / 2;
-       int y = scr_h / 2 - HEIGHT / 2;
+       int w = WIDTH, h = HEIGHT;
+       int min_w = mwindow->theme->preferencescategory_x;
+       for(int i = 0; i < CATEGORIES; i++) {
+               min_w += PreferencesButton::calculate_w(mwindow->gui, category_to_text(i)) -
+                       mwindow->theme->preferences_category_overlap;
+       }
+       if( w < min_w ) w = min_w;
+       int x = scr_x + scr_w / 2 - w / 2;
+       int y = scr_h / 2 - h / 2;
 
 
-       window = new PreferencesWindow(mwindow, this, x, y);
+       window = new PreferencesWindow(mwindow, this, x, y, w, h);
        window->create_objects();
        mwindow->gui->unlock_window();
 
        window->create_objects();
        mwindow->gui->unlock_window();
 
@@ -357,11 +364,8 @@ SET_TRACE
 
 
 PreferencesWindow::PreferencesWindow(MWindow *mwindow,
 
 
 PreferencesWindow::PreferencesWindow(MWindow *mwindow,
-       PreferencesThread *thread,
-       int x,
-       int y)
- : BC_Window(_(PROGRAM_NAME ": Preferences"),
-       x,y, WIDTH,HEIGHT, WIDTH,HEIGHT, 1,0,1)
+       PreferencesThread *thread, int x, int y, int w, int h)
+ : BC_Window(_(PROGRAM_NAME ": Preferences"), x,y, w,h, 1,0,1)
 {
        this->mwindow = mwindow;
        this->thread = thread;
 {
        this->mwindow = mwindow;
        this->thread = thread;
index 4de6aa8a4a369718f70f2d7417895572dc0018c9..a2437018dd2fc1e96ea464bfd56a2de9b8935b9b 100644 (file)
@@ -113,8 +113,7 @@ class PreferencesWindow : public BC_Window
 public:
        PreferencesWindow(MWindow *mwindow,
                PreferencesThread *thread,
 public:
        PreferencesWindow(MWindow *mwindow,
                PreferencesThread *thread,
-               int x,
-               int y);
+               int x, int y, int w, int h);
        ~PreferencesWindow();
 
        void create_objects();
        ~PreferencesWindow();
 
        void create_objects();
index 8bb88ac24ef8a8ee561ade499e4974676fdad882..94dd5b4e28f2998bf9392768af9fa9de99f9b667 100644 (file)
@@ -41,12 +41,12 @@ void CDRipWindow::create_objects()
        int y = 10, x = 10;
        add_tool(new BC_Title(x, y, _("Select the range to transfer:"))); y += 25;
        add_tool(new BC_Title(x, y, _("Track"))); x += 70;
        int y = 10, x = 10;
        add_tool(new BC_Title(x, y, _("Select the range to transfer:"))); y += 25;
        add_tool(new BC_Title(x, y, _("Track"))); x += 70;
-       add_tool(new BC_Title(x, y, _("Min"))); x += 70;
-       add_tool(new BC_Title(x, y, _("Sec"))); x += 100;
+       add_tool(new BC_Title(x, y, _("Min."))); x += 70;
+       add_tool(new BC_Title(x, y, _("Sec."))); x += 100;
 
        add_tool(new BC_Title(x, y, _("Track"))); x += 70;
 
        add_tool(new BC_Title(x, y, _("Track"))); x += 70;
-       add_tool(new BC_Title(x, y, _("Min"))); x += 70;
-       add_tool(new BC_Title(x, y, _("Sec"))); x += 100;
+       add_tool(new BC_Title(x, y, _("Min."))); x += 70;
+       add_tool(new BC_Title(x, y, _("Sec."))); x += 100;
        
        x = 10;  y += 25;
        add_tool(track1 = new CDRipTextValue(this, &(cdripper->track1), x, y, 50));
        
        x = 10;  y += 25;
        add_tool(track1 = new CDRipTextValue(this, &(cdripper->track1), x, y, 50));