projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
4 bt fixes, xft unrefd font fix, add: find in resources, add: user title, filebox...
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
gwindowgui.C
diff --git
a/cinelerra-5.1/cinelerra/gwindowgui.C
b/cinelerra-5.1/cinelerra/gwindowgui.C
index b1b8300c2ee9c72d42b67193ad8f7e6f737fec7d..c5248b4839b18591c02913405e7ebd2cd12f4c13 100644
(file)
--- a/
cinelerra-5.1/cinelerra/gwindowgui.C
+++ b/
cinelerra-5.1/cinelerra/gwindowgui.C
@@
-60,7
+60,7
@@
void GWindowGUI::start_color_thread(GWindowColorButton *color_button)
{
unlock_window();
delete color_thread;
{
unlock_window();
delete color_thread;
- color_thread = new GWindowColorThread(color_button);
+ color_thread = new GWindowColorThread(
this,
color_button);
int color = auto_colors[color_button->auto_toggle->info->ref];
color_thread->start(color);
lock_window("GWindowGUI::start_color_thread");
int color = auto_colors[color_button->auto_toggle->info->ref];
color_thread->start(color);
lock_window("GWindowGUI::start_color_thread");
@@
-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 Keyframes")
};
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] =
@@
-190,8
+190,10
@@
GWindowColorButton::GWindowColorButton(GWindowToggle *auto_toggle, int x, int y,
{
this->auto_toggle = auto_toggle;
this->color = 0;
{
this->auto_toggle = auto_toggle;
this->color = 0;
- for( int i=0; i<3; ++i )
- vframes[i] = new VFrame(w, w, BC_RGBA8888, -1);
+ for( int i=0; i<3; ++i ) {
+ vframes[i] = new VFrame(w, w, BC_RGBA8888);
+ vframes[i]->clear_frame();
+ }
}
GWindowColorButton::~GWindowColorButton()
}
GWindowColorButton::~GWindowColorButton()
@@
-247,11
+249,12
@@
void GWindowColorButton::update_gui(int color)
draw_face();
}
draw_face();
}
-GWindowColorThread::GWindowColorThread(GWindowColorButton *color_button)
- : Color
Thread
(0, color_button->auto_toggle->caption)
+GWindowColorThread::GWindowColorThread(GWindow
GUI *gui, GWindow
ColorButton *color_button)
+ : Color
Picker
(0, color_button->auto_toggle->caption)
{
{
- this->
color = 0
;
+ this->
gui = gui
;
this->color_button = color_button;
this->color_button = color_button;
+ this->color = 0;
color_update = new GWindowColorUpdate(this);
}
color_update = new GWindowColorUpdate(this);
}
@@
-269,7
+272,6
@@
void GWindowColorThread::start(int color)
void GWindowColorThread::handle_done_event(int result)
{
color_update->stop();
void GWindowColorThread::handle_done_event(int result)
{
color_update->stop();
- GWindowGUI *gui = color_button->auto_toggle->gui;
int ref = color_button->auto_toggle->info->ref;
gui->lock_window("GWindowColorThread::handle_done_event");
if( !result ) {
int ref = color_button->auto_toggle->info->ref;
gui->lock_window("GWindowColorThread::handle_done_event");
if( !result ) {
@@
-282,7
+284,7
@@
void GWindowColorThread::handle_done_event(int result)
color_button->update_gui(color);
}
gui->unlock_window();
color_button->update_gui(color);
}
gui->unlock_window();
- MWindowGUI *mwindow_gui =
color_button->auto_toggle->
gui->mwindow->gui;
+ MWindowGUI *mwindow_gui = gui->mwindow->gui;
mwindow_gui->lock_window("GWindowColorUpdate::run");
mwindow_gui->draw_overlays(1);
mwindow_gui->unlock_window();
mwindow_gui->lock_window("GWindowColorUpdate::run");
mwindow_gui->draw_overlays(1);
mwindow_gui->unlock_window();
@@
-297,7
+299,9
@@
int GWindowColorThread::handle_new_color(int color, int alpha)
void GWindowColorThread::update_gui()
{
void GWindowColorThread::update_gui()
{
+ gui->lock_window("GWindowColorThread::update_gui");
color_button->update_gui(color);
color_button->update_gui(color);
+ gui->unlock_window();
}
GWindowColorUpdate::GWindowColorUpdate(GWindowColorThread *color_thread)
}
GWindowColorUpdate::GWindowColorUpdate(GWindowColorThread *color_thread)
@@
-351,7
+355,7
@@
int GWindowColorButton::handle_event()
void GWindowGUI::create_objects()
{
int x = 10, y = 10;
void GWindowGUI::create_objects()
{
int x = 10, y = 10;
- lock_window("GWindowGUI::create_objects
1
");
+ lock_window("GWindowGUI::create_objects");
for( int i=0; i<(int)(sizeof(toggle_order)/sizeof(toggle_order[0])); ++i ) {
toggleinfo *tp = &toggle_order[i];
for( int i=0; i<(int)(sizeof(toggle_order)/sizeof(toggle_order[0])); ++i ) {
toggleinfo *tp = &toggle_order[i];
@@
-369,9
+373,9
@@
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];
int color = !tp->isauto ? -1 : auto_colors[tp->ref];
- GWindowToggle *toggle = new GWindowToggle(
mwindow,
this, x, y, label, color, tp);
+ GWindowToggle *toggle = new GWindowToggle(this, x, y, label, color, tp);
add_tool(toggles[i] = toggle);
if( vframe )
draw_vframe(vframe, get_w()-vframe->get_w()-10, y);
add_tool(toggles[i] = toggle);
if( vframe )
draw_vframe(vframe, get_w()-vframe->get_w()-10, y);
@@
-415,6
+419,7
@@
int GWindowGUI::translation_event()
int GWindowGUI::close_event()
{
int GWindowGUI::close_event()
{
+ delete color_thread; color_thread = 0;
hide_window();
mwindow->session->show_gwindow = 0;
unlock_window();
hide_window();
mwindow->session->show_gwindow = 0;
unlock_window();
@@
-444,11
+449,10
@@
int GWindowGUI::keypress_event()
}
}
-GWindowToggle::GWindowToggle(
MWindow *mwindow,
GWindowGUI *gui, int x, int y,
+GWindowToggle::GWindowToggle(GWindowGUI *gui, int x, int y,
const char *text, int color, toggleinfo *info)
const char *text, int color, toggleinfo *info)
- : BC_CheckBox(x, y, *get_main_value(mwindow, info), text, MEDIUMFONT, color)
+ : BC_CheckBox(x, y, *get_main_value(
gui->
mwindow, info), text, MEDIUMFONT, color)
{
{
- this->mwindow = mwindow;
this->gui = gui;
this->info = info;
this->color = color;
this->gui = gui;
this->info = info;
this->color = color;
@@
-463,12
+467,13
@@
GWindowToggle::~GWindowToggle()
int GWindowToggle::handle_event()
{
int value = get_value();
int GWindowToggle::handle_event()
{
int value = get_value();
- *get_main_value(mwindow, info) = value;
+ *get_main_value(
gui->
mwindow, info) = value;
gui->update_mwindow();
// Update stuff in MWindow
unlock_window();
gui->update_mwindow();
// Update stuff in MWindow
unlock_window();
+ MWindow *mwindow = gui->mwindow;
mwindow->gui->lock_window("GWindowToggle::handle_event");
if( info->isauto ) {
int autogroup_type = -1;
mwindow->gui->lock_window("GWindowToggle::handle_event");
if( info->isauto ) {
int autogroup_type = -1;
@@
-535,7
+540,7
@@
int* GWindowToggle::get_main_value(MWindow *mwindow, toggleinfo *info)
void GWindowToggle::update()
{
void GWindowToggle::update()
{
- int *vp = get_main_value(mwindow, info);
+ int *vp = get_main_value(
gui->
mwindow, info);
if( !vp ) return;
set_value(*vp);
}
if( !vp ) return;
set_value(*vp);
}